hexsha
stringlengths
40
40
size
int64
7
1.05M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
269
max_stars_repo_name
stringlengths
5
108
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
sequencelengths
1
9
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
269
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
sequencelengths
1
9
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
269
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
sequencelengths
1
9
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
7
1.05M
avg_line_length
float64
1.21
330k
max_line_length
int64
6
990k
alphanum_fraction
float64
0.01
0.99
author_id
stringlengths
2
40
f6d0a9e1fd5be0c9b253607424b1ede77b1b02b7
15,304
cc
C++
chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-02-03T05:32:07.000Z
2019-02-03T05:32:07.000Z
chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T07:19:17.000Z
2020-11-04T07:19:17.000Z
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/password_manager/chrome_password_manager_client.h" #include "base/command_line.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "chrome/common/chrome_version_info.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "chrome/test/base/testing_profile.h" #include "components/autofill/content/common/autofill_messages.h" #include "components/password_manager/content/browser/password_manager_internals_service_factory.h" #include "components/password_manager/content/common/credential_manager_messages.h" #include "components/password_manager/content/common/credential_manager_types.h" #include "components/password_manager/core/browser/log_receiver.h" #include "components/password_manager/core/browser/password_manager_internals_service.h" #include "components/password_manager/core/common/password_manager_switches.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/web_contents.h" #include "content/public/test/mock_render_process_host.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" using content::BrowserContext; using content::WebContents; namespace { const char kTestText[] = "abcd1234"; const int kRequestId = 4; class MockLogReceiver : public password_manager::LogReceiver { public: MOCK_METHOD1(LogSavePasswordProgress, void(const std::string&)); }; class TestChromePasswordManagerClient : public ChromePasswordManagerClient { public: explicit TestChromePasswordManagerClient(content::WebContents* web_contents) : ChromePasswordManagerClient(web_contents, NULL), is_sync_account_credential_(false) {} virtual ~TestChromePasswordManagerClient() {} virtual bool IsSyncAccountCredential( const std::string& username, const std::string& origin) const OVERRIDE { return is_sync_account_credential_; } void set_is_sync_account_credential(bool is_sync_account_credential) { is_sync_account_credential_ = is_sync_account_credential; } private: bool is_sync_account_credential_; DISALLOW_COPY_AND_ASSIGN(TestChromePasswordManagerClient); }; } // namespace class ChromePasswordManagerClientTest : public ChromeRenderViewHostTestHarness { public: ChromePasswordManagerClientTest(); virtual void SetUp() OVERRIDE; protected: ChromePasswordManagerClient* GetClient(); // If the test IPC sink contains an AutofillMsg_SetLoggingState message, then // copies its argument into |activation_flag| and returns true. Otherwise // returns false. bool WasLoggingActivationMessageSent(bool* activation_flag); password_manager::PasswordManagerInternalsService* service_; testing::StrictMock<MockLogReceiver> receiver_; }; ChromePasswordManagerClientTest::ChromePasswordManagerClientTest() : service_(NULL) { } void ChromePasswordManagerClientTest::SetUp() { ChromeRenderViewHostTestHarness::SetUp(); ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( web_contents(), NULL); service_ = password_manager::PasswordManagerInternalsServiceFactory:: GetForBrowserContext(profile()); ASSERT_TRUE(service_); } ChromePasswordManagerClient* ChromePasswordManagerClientTest::GetClient() { return ChromePasswordManagerClient::FromWebContents(web_contents()); } bool ChromePasswordManagerClientTest::WasLoggingActivationMessageSent( bool* activation_flag) { const uint32 kMsgID = AutofillMsg_SetLoggingState::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); if (!message) return false; Tuple1<bool> param; AutofillMsg_SetLoggingState::Read(message, &param); *activation_flag = param.a; process()->sink().ClearMessages(); return true; } TEST_F(ChromePasswordManagerClientTest, LogSavePasswordProgressNoReceiver) { ChromePasswordManagerClient* client = GetClient(); EXPECT_CALL(receiver_, LogSavePasswordProgress(kTestText)).Times(0); // Before attaching the receiver, no text should be passed. client->LogSavePasswordProgress(kTestText); EXPECT_FALSE(client->IsLoggingActive()); } TEST_F(ChromePasswordManagerClientTest, LogSavePasswordProgressAttachReceiver) { ChromePasswordManagerClient* client = GetClient(); EXPECT_FALSE(client->IsLoggingActive()); // After attaching the logger, text should be passed. service_->RegisterReceiver(&receiver_); EXPECT_TRUE(client->IsLoggingActive()); EXPECT_CALL(receiver_, LogSavePasswordProgress(kTestText)).Times(1); client->LogSavePasswordProgress(kTestText); service_->UnregisterReceiver(&receiver_); EXPECT_FALSE(client->IsLoggingActive()); } TEST_F(ChromePasswordManagerClientTest, LogSavePasswordProgressDetachReceiver) { ChromePasswordManagerClient* client = GetClient(); service_->RegisterReceiver(&receiver_); EXPECT_TRUE(client->IsLoggingActive()); service_->UnregisterReceiver(&receiver_); EXPECT_FALSE(client->IsLoggingActive()); // After detaching the logger, no text should be passed. EXPECT_CALL(receiver_, LogSavePasswordProgress(kTestText)).Times(0); client->LogSavePasswordProgress(kTestText); } TEST_F(ChromePasswordManagerClientTest, LogSavePasswordProgressNotifyRenderer) { ChromePasswordManagerClient* client = GetClient(); bool logging_active = false; // Initially, the logging should be off, so no IPC messages. EXPECT_FALSE(WasLoggingActivationMessageSent(&logging_active)); service_->RegisterReceiver(&receiver_); EXPECT_TRUE(client->IsLoggingActive()); EXPECT_TRUE(WasLoggingActivationMessageSent(&logging_active)); EXPECT_TRUE(logging_active); service_->UnregisterReceiver(&receiver_); EXPECT_FALSE(client->IsLoggingActive()); EXPECT_TRUE(WasLoggingActivationMessageSent(&logging_active)); EXPECT_FALSE(logging_active); } TEST_F(ChromePasswordManagerClientTest, AnswerToPingsAboutLoggingState_Active) { service_->RegisterReceiver(&receiver_); process()->sink().ClearMessages(); // Ping the client for logging activity update. AutofillHostMsg_PasswordAutofillAgentConstructed msg(0); static_cast<IPC::Listener*>(GetClient())->OnMessageReceived(msg); bool logging_active = false; EXPECT_TRUE(WasLoggingActivationMessageSent(&logging_active)); EXPECT_TRUE(logging_active); service_->UnregisterReceiver(&receiver_); } TEST_F(ChromePasswordManagerClientTest, AnswerToPingsAboutLoggingState_Inactive) { process()->sink().ClearMessages(); // Ping the client for logging activity update. AutofillHostMsg_PasswordAutofillAgentConstructed msg(0); static_cast<IPC::Listener*>(GetClient())->OnMessageReceived(msg); bool logging_active = true; EXPECT_TRUE(WasLoggingActivationMessageSent(&logging_active)); EXPECT_FALSE(logging_active); } TEST_F(ChromePasswordManagerClientTest, IsAutomaticPasswordSavingEnabledDefaultBehaviourTest) { EXPECT_FALSE(GetClient()->IsAutomaticPasswordSavingEnabled()); } TEST_F(ChromePasswordManagerClientTest, IsAutomaticPasswordSavingEnabledWhenFlagIsSetTest) { CommandLine::ForCurrentProcess()->AppendSwitch( password_manager::switches::kEnableAutomaticPasswordSaving); if (chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_UNKNOWN) EXPECT_TRUE(GetClient()->IsAutomaticPasswordSavingEnabled()); else EXPECT_FALSE(GetClient()->IsAutomaticPasswordSavingEnabled()); } TEST_F(ChromePasswordManagerClientTest, LogToAReceiver) { ChromePasswordManagerClient* client = GetClient(); service_->RegisterReceiver(&receiver_); EXPECT_TRUE(client->IsLoggingActive()); EXPECT_CALL(receiver_, LogSavePasswordProgress(kTestText)).Times(1); client->LogSavePasswordProgress(kTestText); service_->UnregisterReceiver(&receiver_); EXPECT_FALSE(client->IsLoggingActive()); } TEST_F(ChromePasswordManagerClientTest, ShouldFilterAutofillResult_Reauth) { // Make client disallow only reauth requests. CommandLine* command_line = CommandLine::ForCurrentProcess(); command_line->AppendSwitch( password_manager::switches::kDisallowAutofillSyncCredentialForReauth); scoped_ptr<TestChromePasswordManagerClient> client( new TestChromePasswordManagerClient(web_contents())); autofill::PasswordForm form; client->set_is_sync_account_credential(false); NavigateAndCommit( GURL("https://accounts.google.com/login?rart=123&continue=blah")); EXPECT_FALSE(client->ShouldFilterAutofillResult(form)); client->set_is_sync_account_credential(true); NavigateAndCommit( GURL("https://accounts.google.com/login?rart=123&continue=blah")); EXPECT_TRUE(client->ShouldFilterAutofillResult(form)); // This counts as a reauth url, though a valid URL should have a value for // "rart" NavigateAndCommit(GURL("https://accounts.google.com/addlogin?rart")); EXPECT_TRUE(client->ShouldFilterAutofillResult(form)); NavigateAndCommit(GURL("https://accounts.google.com/login?param=123")); EXPECT_FALSE(client->ShouldFilterAutofillResult(form)); NavigateAndCommit(GURL("https://site.com/login?rart=678")); EXPECT_FALSE(client->ShouldFilterAutofillResult(form)); } TEST_F(ChromePasswordManagerClientTest, ShouldFilterAutofillResult) { // Normally the client should allow any credentials through, even if they // are the sync credential. scoped_ptr<TestChromePasswordManagerClient> client( new TestChromePasswordManagerClient(web_contents())); autofill::PasswordForm form; client->set_is_sync_account_credential(true); NavigateAndCommit(GURL("https://accounts.google.com/Login")); EXPECT_FALSE(client->ShouldFilterAutofillResult(form)); // Adding disallow switch should cause sync credential to be filtered. CommandLine* command_line = CommandLine::ForCurrentProcess(); command_line->AppendSwitch( password_manager::switches::kDisallowAutofillSyncCredential); client.reset(new TestChromePasswordManagerClient(web_contents())); client->set_is_sync_account_credential(true); NavigateAndCommit(GURL("https://accounts.google.com/Login")); EXPECT_TRUE(client->ShouldFilterAutofillResult(form)); } TEST_F(ChromePasswordManagerClientTest, IsPasswordManagerEnabledForCurrentPage) { ChromePasswordManagerClient* client = GetClient(); NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "https://passwords.google.com/settings&rart=123")); EXPECT_FALSE(client->IsPasswordManagerEnabledForCurrentPage()); // Password site is inaccesible via HTTP, but because of HSTS the following // link should still continue to https://passwords.google.com. NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "http://passwords.google.com/settings&rart=123")); EXPECT_FALSE(client->IsPasswordManagerEnabledForCurrentPage()); // Specifying default port still passes. NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "https://passwords.google.com:443/settings&rart=123")); EXPECT_FALSE(client->IsPasswordManagerEnabledForCurrentPage()); // Encoded URL is considered the same. NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "https://passwords.%67oogle.com/settings&rart=123")); EXPECT_FALSE(client->IsPasswordManagerEnabledForCurrentPage()); // Make sure testing sites are disabled as well. NavigateAndCommit( GURL("https://accounts.google.com/Login?continue=" "https://passwords-ac-testing.corp.google.com/settings&rart=456")); EXPECT_FALSE(client->IsPasswordManagerEnabledForCurrentPage()); // Fully qualified domain name is considered a different hostname by GURL. // Ideally this would not be the case, but this quirk can be avoided by // verification on the server. This test is simply documentation of this // behavior. NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "https://passwords.google.com./settings&rart=123")); EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage()); // Not a transactional reauth page. NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "https://passwords.google.com/settings")); EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage()); // Should be enabled for other transactional reauth pages. NavigateAndCommit( GURL("https://accounts.google.com/ServiceLogin?continue=" "https://mail.google.com&rart=234")); EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage()); // Reauth pages are only on accounts.google.com NavigateAndCommit( GURL("https://other.site.com/ServiceLogin?continue=" "https://passwords.google.com&rart=234")); EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage()); } TEST_F(ChromePasswordManagerClientTest, CredentialManagerOnNotifyFailedSignIn) { scoped_ptr<TestChromePasswordManagerClient> client( new TestChromePasswordManagerClient(web_contents())); password_manager::CredentialInfo info(base::ASCIIToUTF16("id"), base::ASCIIToUTF16("name"), GURL("https://example.com/image.png")); client->OnNotifyFailedSignIn(kRequestId, info); const uint32 kMsgID = CredentialManagerMsg_AcknowledgeFailedSignIn::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); process()->sink().ClearMessages(); } TEST_F(ChromePasswordManagerClientTest, CredentialManagerOnNotifySignedIn) { scoped_ptr<TestChromePasswordManagerClient> client( new TestChromePasswordManagerClient(web_contents())); password_manager::CredentialInfo info(base::ASCIIToUTF16("id"), base::ASCIIToUTF16("name"), GURL("https://example.com/image.png")); client->OnNotifySignedIn(kRequestId, info); const uint32 kMsgID = CredentialManagerMsg_AcknowledgeSignedIn::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); process()->sink().ClearMessages(); } TEST_F(ChromePasswordManagerClientTest, CredentialManagerOnNotifySignedOut) { scoped_ptr<TestChromePasswordManagerClient> client( new TestChromePasswordManagerClient(web_contents())); client->OnNotifySignedOut(kRequestId); const uint32 kMsgID = CredentialManagerMsg_AcknowledgeSignedOut::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); process()->sink().ClearMessages(); } TEST_F(ChromePasswordManagerClientTest, CredentialManagerOnRequestCredential) { scoped_ptr<TestChromePasswordManagerClient> client( new TestChromePasswordManagerClient(web_contents())); std::vector<GURL> federations; client->OnRequestCredential(kRequestId, false, federations); const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); process()->sink().ClearMessages(); }
38.941476
99
0.77666
Fusion-Rom
f6d3dc11620d400ff83228bcf024300c31efa7d6
3,115
cpp
C++
cmdstan/stan/lib/stan_math/test/unit/math/torsten/mixSolver/pred1_mix2_test.cpp
csetraynor/Torsten
55b59b8068e2a539346f566ec698c755a9e3536c
[ "BSD-3-Clause" ]
null
null
null
cmdstan/stan/lib/stan_math/test/unit/math/torsten/mixSolver/pred1_mix2_test.cpp
csetraynor/Torsten
55b59b8068e2a539346f566ec698c755a9e3536c
[ "BSD-3-Clause" ]
null
null
null
cmdstan/stan/lib/stan_math/test/unit/math/torsten/mixSolver/pred1_mix2_test.cpp
csetraynor/Torsten
55b59b8068e2a539346f566ec698c755a9e3536c
[ "BSD-3-Clause" ]
null
null
null
#include <stan/math/rev/mat.hpp> // FIX ME - more specific #include <stan/math/torsten/PKModel/Pred/Pred1_mix2.hpp> #include <stan/math/torsten/PKModel/functors/mix2_functor.hpp> #include <gtest/gtest.h> struct ODE_functor { template <typename T0, typename T1, typename T2, typename T3> inline std::vector<typename boost::math::tools::promote_args<T0, T1, T2, T3>::type> operator()(const T0& t, const std::vector<T1>& y, const std::vector<T2>& y_pk, const std::vector<T3>& theta, const std::vector<double>& x_r, const std::vector<int>& x_i, std::ostream* pstream_) const { typedef typename boost::math::tools::promote_args<T0, T1, T2, T3>::type scalar; scalar VC = theta[2], Mtt = theta[5], circ0 = theta[6], alpha = theta[7], gamma = theta[8], ktr = 4 / Mtt, prol = y[0] + circ0, transit = y[1] + circ0, circ = y[2] + circ0, conc = y_pk[1] / VC, Edrug = alpha * conc; std::vector<scalar> dxdt(3); dxdt[0] = ktr * prol * ((1 - Edrug) * pow(circ0 / circ, gamma) - 1); dxdt[1] = ktr * (prol - transit); dxdt[2] = ktr * (transit - circ); return dxdt; } }; TEST(Torsten, pred1_mix) { using Eigen::Matrix; using Eigen::Dynamic; double dt = 1.0; int nParameters = 9; std::vector<double> parameters(nParameters); parameters[0] = 10; // CL parameters[1] = 15; // Q parameters[2] = 35; // VC parameters[3] = 105; // VP parameters[4] = 2.0; // ka parameters[5] = 125; // Mtt parameters[6] = 5; // Circ0 parameters[7] = 3e-4; // alpha parameters[8] = 0.17; // gamma std::vector<double> biovar_dummy(1, 0); std::vector<double> tlag_dummy(1, 0); Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> K(0, 0); // initialize Model Parameters object torsten::ModelParameters<double, double, double, double> parms(dt, parameters, biovar_dummy, tlag_dummy); int nOdes = 6; Matrix<double, 1, Dynamic> init(nOdes); init << 10000, 0, 0, 0, 0, 0; // initial dose in the gut std::vector<double> rate(6, 0); // no rate // Use default value of parameters double rel_tol = 1e-6, abs_tol = 1e-6; long int max_num_steps = 1e+6; typedef torsten::mix2_functor<ODE_functor> F0; torsten::Pred1_mix2<F0> Pred1(F0(ODE_functor()), rel_tol, abs_tol, max_num_steps, 0, "rk45"); Matrix<double, 1, Dynamic> pred = Pred1(dt, parms, init, rate); // Compare to results obtained with mrgsolve Eigen::VectorXd mrgResults(6); mrgResults << 1353.352829, 5597.489, 1787.0134, -0.0060546255, -7.847821e-05, -7.039447e-07; // PK compartments EXPECT_FLOAT_EQ(mrgResults(0), pred(0)); EXPECT_FLOAT_EQ(mrgResults(1), pred(1)); EXPECT_FLOAT_EQ(mrgResults(2), pred(2)); // PD compartments // (are estimated less accurately) EXPECT_NEAR(mrgResults(3), pred(3), std::abs(mrgResults(3) * 1e-4)); EXPECT_NEAR(mrgResults(4), pred(4), std::abs(mrgResults(4) * 1e-4)); EXPECT_NEAR(mrgResults(5), pred(5), std::abs(mrgResults(5) * 1e-4)); }
31.464646
86
0.61862
csetraynor
f6d9564be528650f25ef90fdebaa2ecc7f82fd33
12,354
cpp
C++
src/tests/functional/inference_engine/transformations/transpose_to_reshape_test.cpp
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2019-09-22T01:05:07.000Z
2019-09-22T01:05:07.000Z
inference-engine/tests/functional/inference_engine/transformations/transpose_to_reshape_test.cpp
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
inference-engine/tests/functional/inference_engine/transformations/transpose_to_reshape_test.cpp
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4
2021-09-29T20:44:49.000Z
2021-10-20T13:02:12.000Z
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <gtest/gtest.h> #include "common_test_utils/test_common.hpp" #include <string> #include <sstream> #include <fstream> #include <memory> #include <queue> #include <map> #include <ngraph/function.hpp> #include <ngraph/opsets/opset3.hpp> #include <ngraph/pass/constant_folding.hpp> #include <transformations/utils/utils.hpp> #include <transformations/init_node_info.hpp> #include <ngraph/pass/visualize_tree.hpp> #include <transformations/common_optimizations/transpose_sinking.hpp> #include <transformations/common_optimizations/transpose_to_reshape.hpp> #include "common_test_utils/ngraph_test_utils.hpp" using namespace testing; using namespace ngraph; using namespace std; using InputShape = ngraph::PartialShape; using TransposeOrder = std::vector<int64_t>; struct ReferenceParams { bool no_changes = false; bool is_empty = false; std::vector<int64_t> reshape_value; ReferenceParams() = default; explicit ReferenceParams(bool no_changes, bool is_empty) : no_changes(no_changes), is_empty(is_empty) {} explicit ReferenceParams(const std::vector<int64_t> & reshape_value): reshape_value(reshape_value) {} }; class TransposeToReshapeTests: public CommonTestUtils::TestsCommon, public testing::WithParamInterface<std::tuple<InputShape, TransposeOrder, ReferenceParams> > { public: std::shared_ptr<ngraph::Function> f, f_ref; void SetUp() override { const auto& input_shape = std::get<0>(GetParam()); const auto& transpose_order = std::get<1>(GetParam()); const auto& reference_params = std::get<2>(GetParam()); f = get_initial_function(input_shape, transpose_order); f_ref = get_reference_function(input_shape, transpose_order, reference_params); } private: std::shared_ptr<ngraph::Function> get_initial_function(const ngraph::PartialShape & input_shape, const std::vector<int64_t> & transpose_order) { auto data = std::make_shared<ngraph::opset3::Parameter>(ngraph::element::f32, input_shape); auto order_const = ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape{transpose_order.size()}, transpose_order); auto transpose = std::make_shared<ngraph::opset3::Transpose>(data, order_const); // WA to test cases with transpose elimination auto relu = std::make_shared<ngraph::opset3::Relu>(transpose); return std::make_shared<ngraph::Function>(ngraph::NodeVector{relu}, ngraph::ParameterVector{data}); } std::shared_ptr<ngraph::Function> get_reference_function(const ngraph::PartialShape & input_shape, const std::vector<int64_t> & transpose_order, const ReferenceParams & params) { if (params.no_changes) { return get_initial_function(input_shape, transpose_order); } auto data = std::make_shared<ngraph::opset3::Parameter>(ngraph::element::f32, input_shape); ngraph::Output<ngraph::Node> reshape_dims, last(data); if (!params.reshape_value.empty()) { reshape_dims = ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape{params.reshape_value.size()}, params.reshape_value); } else { auto shape_of = std::make_shared<ngraph::opset3::ShapeOf>(data); reshape_dims = std::make_shared<ngraph::opset3::Gather>(shape_of, ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape{transpose_order.size()}, transpose_order), ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {0})); } if (!params.is_empty) { last = std::make_shared<ngraph::opset3::Reshape>(last, reshape_dims, true); } last = std::make_shared<ngraph::opset3::Relu>(last); return std::make_shared<ngraph::Function>(ngraph::NodeVector{last.get_node_shared_ptr()}, ngraph::ParameterVector{data}); } }; TEST_P(TransposeToReshapeTests, CompareFunctions) { auto unh = std::make_shared<ngraph::pass::UniqueNamesHolder>(); pass::Manager m; m.register_pass<pass::InitUniqueNames>(unh); m.register_pass<ngraph::pass::InitNodeInfo>(); m.register_pass<ngraph::pass::TransposeToReshape>(); m.register_pass<ngraph::pass::CheckUniqueNames>(unh); m.run_passes(f); f->validate_nodes_and_infer_types(); ASSERT_NO_THROW(check_rt_info(f)); auto fc = FunctionsComparator::no_default().enable(FunctionsComparator::PRECISIONS); auto res = fc.compare(f, f_ref); ASSERT_TRUE(res.valid) << res.message; } #define SAME_FUNCTION ReferenceParams(true, false) #define EMPTY_FUNCTION ReferenceParams(false, true) #define SHAPE_OF_GATHER ReferenceParams() INSTANTIATE_TEST_SUITE_P(KeepTranspose, TransposeToReshapeTests, testing::Values(std::make_tuple(InputShape{1, 3, 64, 64}, TransposeOrder{0, 1, 3, 2}, SAME_FUNCTION), std::make_tuple(InputShape{1, 3, 1, 64}, TransposeOrder{2, 0, 3, 1}, SAME_FUNCTION), std::make_tuple(InputShape{1, 3, 1, 3}, TransposeOrder{3, 0, 2, 1}, SAME_FUNCTION), std::make_tuple(InputShape{DYN, 2, 64, 1}, TransposeOrder{1, 0, 3, 2}, SAME_FUNCTION), std::make_tuple(InputShape{DYN, 3}, TransposeOrder{1, 0}, SAME_FUNCTION), std::make_tuple(InputShape{DYN, DYN, 1}, TransposeOrder{2, 1, 0}, SAME_FUNCTION), std::make_tuple(InputShape{DYN, DYN}, TransposeOrder{1, 0}, SAME_FUNCTION))); INSTANTIATE_TEST_SUITE_P(EliminateTranspose, TransposeToReshapeTests, testing::Values(std::make_tuple(InputShape{1, 3, 64, 64}, TransposeOrder{0, 1, 2, 3}, EMPTY_FUNCTION), std::make_tuple(InputShape{1, 1, 1}, TransposeOrder{2, 0, 1}, EMPTY_FUNCTION), std::make_tuple(InputShape{DYN, DYN}, TransposeOrder{0, 1}, EMPTY_FUNCTION))); INSTANTIATE_TEST_SUITE_P(ReshapeWithConstant, TransposeToReshapeTests, testing::Values(std::make_tuple(InputShape{1, 3, 64, 1}, TransposeOrder{0, 1, 3, 2}, ReferenceParams({1, 3, 1, 64})), std::make_tuple(InputShape{1, 3, 1, 64}, TransposeOrder{1, 0, 3, 2}, ReferenceParams({3, 1, 64, 1})), std::make_tuple(InputShape{DYN, DYN, 1}, TransposeOrder{0, 2, 1}, ReferenceParams({0, 1, -1})), std::make_tuple(InputShape{1, 1, DYN}, TransposeOrder{2, 1, 0}, ReferenceParams({-1, 0, 1})), std::make_tuple(InputShape{DYN, 1, 64, 1}, TransposeOrder{1, 0, 3, 2}, ReferenceParams({1, -1, 1, 64})))); INSTANTIATE_TEST_SUITE_P(ReshapeWithGather, TransposeToReshapeTests, testing::Values(std::make_tuple(InputShape{DYN, 1, DYN, 1}, TransposeOrder{1, 0, 3, 2}, SHAPE_OF_GATHER), std::make_tuple(InputShape{1, DYN, DYN, DYN}, TransposeOrder{1, 2, 3, 0}, SHAPE_OF_GATHER))); #undef SAME_FUNCTION #undef EMPTY_FUNCTION #undef SHAPE_OF_GATHER TEST(TransformationTests, replace_transpose_with_reshape) { auto check_usecase = [](const PartialShape& shape, const std::vector<int64_t>& perm_val, bool i32, bool multiout, size_t num) { static size_t id = 0; auto casename = string("usecase #") + to_string(++id); shared_ptr<Node> perm; if (i32) { std::vector<int32_t> perm_val_i32(perm_val.begin(), perm_val.end()); perm = op::Constant::create<int32_t>(element::i32, Shape{perm_val.size()}, perm_val_i32); } else { perm = op::Constant::create<int64_t>(element::i64, Shape{perm_val.size()}, perm_val); } auto param = make_shared<op::Parameter>(element::f32, shape); shared_ptr<Node> A1; if (multiout) { shared_ptr<Node> k; auto last_dim = shape.rank().get_length() - 1; if (shape[last_dim].is_dynamic()) { k = make_shared<op::v1::Gather>(make_shared<op::ShapeOf>(param), op::Constant::create(element::i64, {}, {last_dim}), op::Constant::create(element::i64, {}, {0})); } else { k = make_shared<op::Constant>(element::i64, Shape{}, std::vector<int64_t>{shape[last_dim].get_length()}); } A1 = make_shared<op::v1::TopK>(param, k, last_dim, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::NONE); } else { A1 = make_shared<op::v0::Abs>(param); } auto transpose = make_shared<op::v1::Transpose>((multiout ? A1->output(0) : A1), perm); auto transpose1 = make_shared<op::v0::Abs>(transpose); auto baseline_f = make_shared<Function>(transpose1, ParameterVector{param}); auto optimized_f = clone_function(*baseline_f); auto unh = std::make_shared<ngraph::pass::UniqueNamesHolder>(); pass::Manager m; m.register_pass<pass::InitUniqueNames>(unh); m.register_pass<ngraph::pass::InitNodeInfo>(); m.register_pass<ngraph::pass::Validate>(); m.register_pass<ngraph::pass::TransposeToReshape>(); m.register_pass<ngraph::pass::CheckUniqueNames>(unh); m.run_passes(optimized_f); auto ps = baseline_f->get_results()[0]->get_output_partial_shape(0); auto ps_r = optimized_f->get_results()[0]->get_output_partial_shape(0); EXPECT_TRUE(ps.rank().is_static() && ps_r.rank().is_static()) << casename; ASSERT_EQ(ps.rank().get_length(), ps_r.rank().get_length()) << casename; ASSERT_EQ(count_ops_of_type<op::v1::Transpose>(baseline_f), 1); ASSERT_EQ(count_ops_of_type<op::v1::Reshape>(baseline_f), 0); ASSERT_EQ(count_ops_of_type<op::v1::Transpose>(optimized_f), num); ASSERT_EQ(count_ops_of_type<op::v1::Reshape>(optimized_f), (num ? 0 : 1)); }; for (auto& i32 : {true, false}) for (auto& multiout : {true, false}) { check_usecase(Shape{1, 3}, vector<int64_t>{1, 0}, i32, multiout, 0); check_usecase(Shape{2, 3, 1}, vector<int64_t>{2, 0, 1}, i32, multiout, 0); check_usecase(Shape{10, 20, 1, 1}, vector<int64_t>{0, 2, 3, 1}, i32, multiout, 0); check_usecase(Shape{10, 1, 1, 20}, vector<int64_t>{0, 3, 1, 2}, i32, multiout, 0); check_usecase(Shape{10, 20, 1, 2}, vector<int64_t>{0, 2, 1, 3}, i32, multiout, 0); check_usecase(Shape{10, 1, 1, 1, 20}, vector<int64_t>{0, 4, 1, 2, 3}, i32, multiout, 0); check_usecase(Shape{10, 20, 1, 1, 1}, vector<int64_t>{0, 2, 3, 4, 1}, i32, multiout, 0); check_usecase(Shape{10, 1, 1, 1, 1}, vector<int64_t>{1, 4, 2, 3, 0}, i32, multiout, 0); check_usecase(Shape{10, 1, 1, 1, 1}, vector<int64_t>{4, 2, 0, 1, 3}, i32, multiout, 0); check_usecase(Shape{10, 20, 1, 2}, vector<int64_t>{0, 2, 3, 1}, i32, multiout, 1); check_usecase(Shape{10, 20, 1, 2}, vector<int64_t>{0, 3, 1, 2}, i32, multiout, 1); check_usecase(Shape{10, 20}, vector<int64_t>{1, 0}, i32, multiout, 1); check_usecase(PartialShape{Dimension::dynamic(), 20, 1, 1}, vector<int64_t>{ 0, 2, 3, 1, }, i32, multiout, 0); check_usecase(PartialShape{Dimension::dynamic(), Dimension::dynamic(), 20, 1, 1}, vector<int64_t>{0, 1, 3, 2, 4}, i32, multiout, 0); check_usecase(PartialShape{Dimension::dynamic(), Dimension::dynamic(), 20, 1, 1}, vector<int64_t>{0, 2, 1, 4, 3}, i32, multiout, 1); } }
50.839506
148
0.604582
pazamelin
f6d9d896e4f0834d9c5c3285e409dc3be35914be
343
cpp
C++
14/1448. Count Good Nodes in Binary Tree.cpp
eagleoflqj/LeetCode
ca5dd06cad4c7fe5bf679cca7ee60f4348b316e9
[ "MIT" ]
null
null
null
14/1448. Count Good Nodes in Binary Tree.cpp
eagleoflqj/LeetCode
ca5dd06cad4c7fe5bf679cca7ee60f4348b316e9
[ "MIT" ]
1
2021-12-25T10:33:23.000Z
2022-02-16T00:34:05.000Z
14/1448. Count Good Nodes in Binary Tree.cpp
eagleoflqj/LeetCode
ca5dd06cad4c7fe5bf679cca7ee60f4348b316e9
[ "MIT" ]
null
null
null
class Solution { int helper(TreeNode *root, int M) { if(!root) return 0; int good = root->val >= M; if(good) M = root->val; return good + helper(root->left, M) + helper(root->right, M); } public: int goodNodes(TreeNode* root) { return helper(root, INT_MIN); } };
22.866667
69
0.507289
eagleoflqj
f6dc0ededa96ca4ebf070ed8249ab09c2e49f76e
318
cpp
C++
Entrega4/ComparacionAviones.cpp
driden/EntregaGrafos4
90d5d3d82580725b1bc7161e2191ba5bbfd98041
[ "MIT" ]
null
null
null
Entrega4/ComparacionAviones.cpp
driden/EntregaGrafos4
90d5d3d82580725b1bc7161e2191ba5bbfd98041
[ "MIT" ]
null
null
null
Entrega4/ComparacionAviones.cpp
driden/EntregaGrafos4
90d5d3d82580725b1bc7161e2191ba5bbfd98041
[ "MIT" ]
null
null
null
#include "ComparacionAviones.h" CompRetorno ComparacionAviones::Comparar(const CostoArco& t1, const CostoArco& t2) const { if (t1.aviones > t2.aviones) return MAYOR; if (t1.aviones < t2.aviones) return MENOR; if (t1.tiempo > t2.tiempo) return MAYOR; if (t1.tiempo < t2.tiempo) return MENOR; return IGUALES; }
24.461538
88
0.732704
driden
f6e1f9e4f3dbdeb17f822d615eb6b5a26144c45c
275
cpp
C++
C++/0050-Powx-N/soln-2.cpp
wyaadarsh/LeetCode-Solutions
3719f5cb059eefd66b83eb8ae990652f4b7fd124
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
C++/0050-Powx-N/soln-2.cpp
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
C++/0050-Powx-N/soln-2.cpp
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
class Solution { public: double myPow(double x, int n) { if (n == 0) return 1; if (n < 0) return (1.0 / x) / (myPow(x, -(n + 1))); double half = myPow(x, n / 2); if (n % 2) return half * half * x; else return half * half; } };
25
59
0.465455
wyaadarsh
f6e20bd24fe446d6ee2b78b8fc1984a92e4e832f
4,755
cpp
C++
Shape_detection/benchmark/Shape_detection/benchmark_region_growing_on_point_set_2.cpp
gaschler/cgal
d1fe2afa18da5524db6d4946f42ca4b8d00e0bda
[ "CC0-1.0" ]
2
2020-12-12T09:30:07.000Z
2021-01-04T05:00:23.000Z
Shape_detection/benchmark/Shape_detection/benchmark_region_growing_on_point_set_2.cpp
guorongtao/cgal
a848e52552a9205124b7ae13c7bcd2b860eb4530
[ "CC0-1.0" ]
1
2021-03-12T14:38:20.000Z
2021-03-12T14:38:20.000Z
Shape_detection/benchmark/Shape_detection/benchmark_region_growing_on_point_set_2.cpp
szobov/cgal
e7b91b92b8c6949e3b62023bdd1e9f3ad8472626
[ "CC0-1.0" ]
1
2022-03-05T04:18:59.000Z
2022-03-05T04:18:59.000Z
// STL includes. #include <string> #include <vector> #include <utility> #include <cstdlib> #include <fstream> #include <iostream> #include <iterator> // CGAL includes. #include <CGAL/Timer.h> #include <CGAL/property_map.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Shape_detection/Region_growing/Region_growing.h> #include <CGAL/Shape_detection/Region_growing/Region_growing_on_point_set.h> namespace SD = CGAL::Shape_detection; using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Vector_2 = typename Kernel::Vector_2; using Point_with_normal = std::pair<Point_2, Vector_2>; using Input_range = std::vector<Point_with_normal>; using Point_map = CGAL::First_of_pair_property_map<Point_with_normal>; using Normal_map = CGAL::Second_of_pair_property_map<Point_with_normal>; using Neighbor_query = SD::Point_set::Sphere_neighbor_query<Kernel, Input_range, Point_map>; using Region_type = SD::Point_set::Least_squares_line_fit_region<Kernel, Input_range, Point_map, Normal_map>; using Region_growing = SD::Region_growing<Input_range, Neighbor_query, Region_type>; using Timer = CGAL::Timer; using Region = std::vector<std::size_t>; void benchmark_region_growing_on_point_set_2( const std::size_t test_count, const Input_range& input_range, const FT sphere_radius, const FT distance_threshold, const FT angle_threshold, const std::size_t min_region_size) { // Create instances of the parameter classes. Neighbor_query neighbor_query( input_range, sphere_radius); Region_type region_type( input_range, distance_threshold, angle_threshold, min_region_size); // Create an instance of the region growing class. Region_growing region_growing( input_range, neighbor_query, region_type); // Run the algorithm. Timer timer; std::vector<Region> regions; timer.start(); region_growing.detect(std::back_inserter(regions)); timer.stop(); // Compute the number of points assigned to all found regions. std::size_t number_of_assigned_points = 0; for (const auto& region : regions) number_of_assigned_points += region.size(); std::vector<std::size_t> unassigned_points; region_growing.unassigned_items(std::back_inserter(unassigned_points)); // Print statistics. std::cout << "Test #" << test_count << std::endl; std::cout << " sphere_radius = " << sphere_radius << std::endl; std::cout << " min_region_size = " << min_region_size << std::endl; std::cout << " distance_threshold = " << distance_threshold << std::endl; std::cout << " angle_threshold = " << angle_threshold << std::endl; std::cout << " -----" << std::endl; std::cout << " Time elapsed: " << timer.time() << std::endl; std::cout << " Number of detected regions: " << regions.size() << std::endl; std::cout << " Number of assigned points: " << number_of_assigned_points << std::endl; std::cout << " Number of unassigned points: " << unassigned_points.size() << std::endl; std::cout << std::endl << std::endl; } int main(int argc, char *argv[]) { // Load xyz data either from a local folder or a user-provided file. std::ifstream in(argc > 1 ? argv[1] : "data/point_set_2.xyz"); CGAL::set_ascii_mode(in); if (!in) { std::cout << "Error: cannot read the file point_set_2.xyz!" << std::endl; std::cout << "You can either create a symlink to the data folder or provide this file by hand." << std::endl << std::endl; return EXIT_FAILURE; } Input_range input_range; FT a, b, c, d, e, f; while (in >> a >> b >> c >> d >> e >> f) input_range.push_back(std::make_pair(Point_2(a, b), Vector_2(d, e))); in.close(); // Default parameter values for the data file point_set_2.xyz. const FT distance_threshold = FT(45) / FT(10); const FT angle_threshold = FT(45); const std::size_t min_region_size = 5; // Run benchmarks. benchmark_region_growing_on_point_set_2(1, input_range, FT(1), distance_threshold, angle_threshold, min_region_size); benchmark_region_growing_on_point_set_2(2, input_range, FT(3), distance_threshold, angle_threshold, min_region_size); benchmark_region_growing_on_point_set_2(3, input_range, FT(6), distance_threshold, angle_threshold, min_region_size); benchmark_region_growing_on_point_set_2(4, input_range, FT(9), distance_threshold, angle_threshold, min_region_size); return EXIT_SUCCESS; }
36.29771
112
0.686225
gaschler
f6e20eb992d838d7c87345fbe6ff8d9cc174d166
16,671
cpp
C++
shared/test/unit_test/main.cpp
ConnectionMaster/compute-runtime
ea373d2664251b10e55aa237555e4ba9221ace0f
[ "Intel", "MIT" ]
1
2019-04-25T23:21:01.000Z
2019-04-25T23:21:01.000Z
shared/test/unit_test/main.cpp
ConnectionMaster/compute-runtime
ea373d2664251b10e55aa237555e4ba9221ace0f
[ "Intel", "MIT" ]
null
null
null
shared/test/unit_test/main.cpp
ConnectionMaster/compute-runtime
ea373d2664251b10e55aa237555e4ba9221ace0f
[ "Intel", "MIT" ]
null
null
null
/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/gmm_interface.h" #include "shared/source/gmm_helper/resource_info.h" #include "shared/source/helpers/api_specific_config.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/utilities/debug_settings_reader.h" #include "shared/test/common/helpers/custom_event_listener.h" #include "shared/test/common/helpers/default_hw_info.inl" #include "shared/test/common/helpers/kernel_binary_helper.h" #include "shared/test/common/helpers/memory_leak_listener.h" #include "shared/test/common/helpers/test_files.h" #include "shared/test/common/helpers/ult_hw_config.inl" #include "shared/test/common/libult/global_environment.h" #include "shared/test/common/mocks/mock_gmm.h" #include "shared/test/common/mocks/mock_gmm_client_context.h" #include "shared/test/common/mocks/mock_sip.h" #include "shared/test/common/test_macros/test_checks_shared.h" #include "shared/test/unit_test/base_ult_config_listener.h" #include "shared/test/unit_test/test_stats.h" #include "shared/test/unit_test/tests_configuration.h" #include "gmock/gmock.h" #include <algorithm> #include <fstream> #include <limits.h> #include <mutex> #include <sstream> #include <thread> #ifdef WIN32 const char *fSeparator = "\\"; #else const char *fSeparator = "/"; #endif TEST(Should, pass) { EXPECT_TRUE(true); } namespace NEO { extern const char *hardwarePrefix[]; extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT]; extern const unsigned int ultIterationMaxTime; extern bool useMockGmm; extern TestMode testMode; extern const char *executionDirectorySuffix; std::thread::id tempThreadID; namespace MockSipData { extern std::unique_ptr<MockSipKernel> mockSipKernel; } namespace PagaFaultManagerTestConfig { bool disabled = false; } } // namespace NEO using namespace NEO; PRODUCT_FAMILY productFamily = DEFAULT_TEST_PLATFORM::hwInfo.platform.eProductFamily; extern GFXCORE_FAMILY renderCoreFamily; extern std::string lastTest; bool generateRandomInput = false; void applyWorkarounds() { { std::ofstream f; const std::string fileName("_tmp_"); f.open(fileName, std::ofstream::binary); f.close(); } { std::mutex mtx; std::unique_lock<std::mutex> stateLock(mtx); } { std::stringstream ss("1"); int val; ss >> val; } { class BaseClass { public: int method(int param) { return 1; } }; class MockClass : public BaseClass { public: MOCK_METHOD1(method, int(int param)); }; ::testing::NiceMock<MockClass> mockObj; EXPECT_CALL(mockObj, method(::testing::_)) .Times(1); mockObj.method(2); } //intialize rand srand(static_cast<unsigned int>(time(nullptr))); //Create at least on thread to prevent false memory leaks in tests using threads std::thread t([&]() { }); tempThreadID = t.get_id(); t.join(); //Create FileLogger to prevent false memory leaks { NEO::FileLoggerInstance(); } } #ifdef __linux__ void handle_SIGALRM(int signal) { std::cout << "Tests timeout on: " << lastTest << std::endl; abort(); } void handle_SIGSEGV(int signal) { std::cout << "SIGSEGV on: " << lastTest << std::endl; abort(); } struct sigaction oldSigAbrt; void handle_SIGABRT(int signal) { std::cout << "SIGABRT on: " << lastTest << std::endl; // restore signal handler to abort if (sigaction(SIGABRT, &oldSigAbrt, nullptr) == -1) { std::cout << "FATAL: cannot fatal SIGABRT handler" << std::endl; std::cout << "FATAL: try SEGV" << std::endl; uint8_t *ptr = nullptr; *ptr = 0; std::cout << "FATAL: still alive, call exit()" << std::endl; exit(-1); } raise(signal); } #else LONG WINAPI UltExceptionFilter( _In_ struct _EXCEPTION_POINTERS *exceptionInfo) { std::cout << "UnhandledException: 0x" << std::hex << exceptionInfo->ExceptionRecord->ExceptionCode << std::dec << " on test: " << lastTest << std::endl; return EXCEPTION_CONTINUE_SEARCH; } #endif std::string getHardwarePrefix() { std::string s = hardwarePrefix[defaultHwInfo->platform.eProductFamily]; return s; } std::string getRunPath(char *argv0) { std::string res(argv0); auto pos = res.rfind(fSeparator); if (pos != std::string::npos) res = res.substr(0, pos); if (res == "." || pos == std::string::npos) { char *cwd; #if defined(__linux__) cwd = getcwd(nullptr, 0); #else cwd = _getcwd(nullptr, 0); #endif res = cwd; free(cwd); } return res; } int main(int argc, char **argv) { int retVal = 0; bool useDefaultListener = false; bool enable_alarm = true; bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false; bool showTestStats = false; applyWorkarounds(); #if defined(__linux__) bool enable_segv = true; bool enable_abrt = true; if (getenv("IGDRCL_TEST_SELF_EXEC") == nullptr) { std::string wd = getRunPath(argv[0]); char *ldLibraryPath = getenv("LD_LIBRARY_PATH"); if (ldLibraryPath == nullptr) { setenv("LD_LIBRARY_PATH", wd.c_str(), 1); } else { std::string ldLibraryPathConcat = wd + ":" + std::string(ldLibraryPath); setenv("LD_LIBRARY_PATH", ldLibraryPathConcat.c_str(), 1); } setenv("IGDRCL_TEST_SELF_EXEC", wd.c_str(), 1); execv(argv[0], argv); printf("FATAL ERROR: cannot self-exec test: %s!, errno: %d\n", argv[0], errno); return -1; } #endif ::testing::InitGoogleMock(&argc, argv); HardwareInfo hwInfoForTests = DEFAULT_TEST_PLATFORM::hwInfo; uint32_t euPerSubSlice = 0; uint32_t sliceCount = 0; uint32_t subSlicePerSliceCount = 0; int32_t revId = -1; int dieRecovery = 0; for (int i = 1; i < argc; ++i) { if (!strcmp("--disable_default_listener", argv[i])) { useDefaultListener = false; } else if (!strcmp("--enable_default_listener", argv[i])) { useDefaultListener = true; } else if (!strcmp("--disable_alarm", argv[i])) { enable_alarm = false; } else if (!strcmp("--show_test_stats", argv[i])) { showTestStats = true; } else if (!strcmp("--disable_pagefaulting_tests", argv[i])) { //disable tests which raise page fault signal during execution NEO::PagaFaultManagerTestConfig::disabled = true; } else if (!strcmp("--tbx", argv[i])) { if (testMode == TestMode::AubTests) { testMode = TestMode::AubTestsWithTbx; } initialHardwareTag = 0; } else if (!strcmp("--rev_id", argv[i])) { ++i; if (i < argc) { revId = atoi(argv[i]); } } else if (!strcmp("--product", argv[i])) { ++i; if (i < argc) { if (::isdigit(argv[i][0])) { int productValue = atoi(argv[i]); if (productValue > 0 && productValue < IGFX_MAX_PRODUCT && hardwarePrefix[productValue] != nullptr) { productFamily = static_cast<PRODUCT_FAMILY>(productValue); } else { productFamily = IGFX_UNKNOWN; } } else { productFamily = IGFX_UNKNOWN; for (int j = 0; j < IGFX_MAX_PRODUCT; j++) { if (hardwarePrefix[j] == nullptr) continue; if (strcmp(hardwarePrefix[j], argv[i]) == 0) { productFamily = static_cast<PRODUCT_FAMILY>(j); break; } } } if (productFamily == IGFX_UNKNOWN) { std::cout << "unknown or unsupported product family has been set: " << argv[i] << std::endl; return -1; } else { std::cout << "product family: " << hardwarePrefix[productFamily] << " (" << productFamily << ")" << std::endl; } hwInfoForTests = *hardwareInfoTable[productFamily]; } } else if (!strcmp("--slices", argv[i])) { ++i; if (i < argc) { sliceCount = atoi(argv[i]); } } else if (!strcmp("--subslices", argv[i])) { ++i; if (i < argc) { subSlicePerSliceCount = atoi(argv[i]); } } else if (!strcmp("--eu_per_ss", argv[i])) { ++i; if (i < argc) { euPerSubSlice = atoi(argv[i]); } } else if (!strcmp("--die_recovery", argv[i])) { ++i; if (i < argc) { dieRecovery = atoi(argv[i]) ? 1 : 0; } } else if (!strcmp("--generate_random_inputs", argv[i])) { generateRandomInput = true; } else if (!strcmp("--read-config", argv[i]) && (testMode == TestMode::AubTests || testMode == TestMode::AubTestsWithTbx)) { if (DebugManager.registryReadAvailable()) { DebugManager.setReaderImpl(SettingsReader::create(ApiSpecificConfig::getRegistryPath())); DebugManager.injectSettingsFromReader(); } } else if (!strcmp("--dump_buffer_format", argv[i]) && testMode == TestMode::AubTests) { ++i; std::string dumpBufferFormat(argv[i]); std::transform(dumpBufferFormat.begin(), dumpBufferFormat.end(), dumpBufferFormat.begin(), ::toupper); DebugManager.flags.AUBDumpBufferFormat.set(dumpBufferFormat); } else if (!strcmp("--dump_image_format", argv[i]) && testMode == TestMode::AubTests) { ++i; std::string dumpImageFormat(argv[i]); std::transform(dumpImageFormat.begin(), dumpImageFormat.end(), dumpImageFormat.begin(), ::toupper); DebugManager.flags.AUBDumpImageFormat.set(dumpImageFormat); } } if (showTestStats) { std::cout << getTestStats() << std::endl; return 0; } productFamily = hwInfoForTests.platform.eProductFamily; renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily; uint32_t threadsPerEu = hwInfoConfigFactory[productFamily]->threadsPerEu; PLATFORM &platform = hwInfoForTests.platform; if (revId != -1) { platform.usRevId = revId; } else { revId = platform.usRevId; } uint64_t hwInfoConfig = defaultHardwareInfoConfigTable[productFamily]; setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests); // set Gt and FeatureTable to initial state hardwareInfoSetup[productFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig); GT_SYSTEM_INFO &gtSystemInfo = hwInfoForTests.gtSystemInfo; // and adjust dynamic values if not secified sliceCount = sliceCount > 0 ? sliceCount : gtSystemInfo.SliceCount; subSlicePerSliceCount = subSlicePerSliceCount > 0 ? subSlicePerSliceCount : (gtSystemInfo.SubSliceCount / sliceCount); euPerSubSlice = euPerSubSlice > 0 ? euPerSubSlice : gtSystemInfo.MaxEuPerSubSlice; // clang-format off gtSystemInfo.SliceCount = sliceCount; gtSystemInfo.SubSliceCount = gtSystemInfo.SliceCount * subSlicePerSliceCount; gtSystemInfo.EUCount = gtSystemInfo.SubSliceCount * euPerSubSlice - dieRecovery; gtSystemInfo.ThreadCount = gtSystemInfo.EUCount * threadsPerEu; gtSystemInfo.MaxEuPerSubSlice = std::max(gtSystemInfo.MaxEuPerSubSlice, euPerSubSlice); gtSystemInfo.MaxSlicesSupported = std::max(gtSystemInfo.MaxSlicesSupported, gtSystemInfo.SliceCount); gtSystemInfo.MaxSubSlicesSupported = std::max(gtSystemInfo.MaxSubSlicesSupported, gtSystemInfo.SubSliceCount); gtSystemInfo.IsDynamicallyPopulated = false; // clang-format on binaryNameSuffix.append(familyName[hwInfoForTests.platform.eRenderCoreFamily]); binaryNameSuffix.append(hwInfoForTests.capabilityTable.platformType); std::string testBinaryFiles = getRunPath(argv[0]); testBinaryFiles.append("/"); testBinaryFiles.append(binaryNameSuffix); testBinaryFiles.append("/"); testBinaryFiles.append(std::to_string(revId)); testBinaryFiles.append("/"); testBinaryFiles.append(testFiles); testFiles = testBinaryFiles; std::string executionDirectory(hardwarePrefix[productFamily]); executionDirectory += NEO::executionDirectorySuffix; // _aub for aub_tests, empty otherwise executionDirectory += "/"; executionDirectory += std::to_string(revId); #ifdef WIN32 #include <direct.h> if (_chdir(executionDirectory.c_str())) { std::cout << "chdir into " << executionDirectory << " directory failed.\nThis might cause test failures." << std::endl; } #elif defined(__linux__) #include <unistd.h> if (chdir(executionDirectory.c_str()) != 0) { std::cout << "chdir into " << executionDirectory << " directory failed.\nThis might cause test failures." << std::endl; } #endif defaultHwInfo = std::make_unique<HardwareInfo>(); *defaultHwInfo = hwInfoForTests; auto &listeners = ::testing::UnitTest::GetInstance()->listeners(); if (useDefaultListener == false) { auto defaultListener = listeners.default_result_printer(); auto customEventListener = new CCustomEventListener(defaultListener, hardwarePrefix[productFamily]); listeners.Release(defaultListener); listeners.Append(customEventListener); } listeners.Append(new MemoryLeakListener); listeners.Append(new BaseUltConfigListener); gEnvironment = reinterpret_cast<TestEnvironment *>(::testing::AddGlobalTestEnvironment(new TestEnvironment)); MockCompilerDebugVars fclDebugVars; MockCompilerDebugVars igcDebugVars; std::string builtInsFileName; if (TestChecks::supportsImages(defaultHwInfo)) { builtInsFileName = KernelBinaryHelper::BUILT_INS_WITH_IMAGES; } else { builtInsFileName = KernelBinaryHelper::BUILT_INS; } retrieveBinaryKernelFilename(fclDebugVars.fileName, builtInsFileName + "_", ".bc"); retrieveBinaryKernelFilename(igcDebugVars.fileName, builtInsFileName + "_", ".gen"); gEnvironment->setMockFileNames(fclDebugVars.fileName, igcDebugVars.fileName); gEnvironment->setDefaultDebugVars(fclDebugVars, igcDebugVars, hwInfoForTests); #if defined(__linux__) //ULTs timeout if (enable_alarm) { auto currentUltIterationMaxTime = NEO::ultIterationMaxTime; auto ultIterationMaxTimeEnv = getenv("NEO_ULT_ITERATION_MAX_TIME"); if (ultIterationMaxTimeEnv != nullptr) { currentUltIterationMaxTime = atoi(ultIterationMaxTimeEnv); } unsigned int alarmTime = currentUltIterationMaxTime * ::testing::GTEST_FLAG(repeat); struct sigaction sa; sa.sa_handler = &handle_SIGALRM; sa.sa_flags = SA_RESTART; sigfillset(&sa.sa_mask); if (sigaction(SIGALRM, &sa, NULL) == -1) { printf("FATAL ERROR: cannot intercept SIGALRM\n"); return -2; } alarm(alarmTime); std::cout << "set timeout to: " << alarmTime << std::endl; } if (enable_segv) { struct sigaction sa; sa.sa_handler = &handle_SIGSEGV; sa.sa_flags = SA_RESTART; sigfillset(&sa.sa_mask); if (sigaction(SIGSEGV, &sa, NULL) == -1) { printf("FATAL ERROR: cannot intercept SIGSEGV\n"); return -2; } } if (enable_abrt) { struct sigaction sa; sa.sa_handler = &handle_SIGABRT; sa.sa_flags = SA_RESTART; sigfillset(&sa.sa_mask); if (sigaction(SIGABRT, &sa, &oldSigAbrt) == -1) { printf("FATAL ERROR: cannot intercept SIGABRT\n"); return -2; } } #else SetUnhandledExceptionFilter(&UltExceptionFilter); #endif if (useMockGmm) { GmmHelper::createGmmContextWrapperFunc = GmmClientContext::create<MockGmmClientContext>; } else { GmmInterface::initialize(nullptr, nullptr); } NEO::MockSipData::mockSipKernel.reset(new NEO::MockSipKernel()); retVal = RUN_ALL_TESTS(); return retVal; }
35.928879
133
0.631036
ConnectionMaster
f6e31b47bf971e8872a7819ad50a0b4387374e04
4,835
cpp
C++
nano/nano_rpc/entry.cpp
MacroChip/nano-node
d555eae77a564550c76cc541a47d297a1dcd59d1
[ "BSD-2-Clause" ]
1
2021-05-23T11:23:01.000Z
2021-05-23T11:23:01.000Z
nano/nano_rpc/entry.cpp
Nikolya7373/nano-node
c673e4e340f46351786b1b5267b7e1635aba9ff5
[ "BSD-3-Clause" ]
5
2020-11-23T23:18:27.000Z
2020-11-24T23:40:23.000Z
nano/nano_rpc/entry.cpp
Nikolya7373/nano-node
c673e4e340f46351786b1b5267b7e1635aba9ff5
[ "BSD-3-Clause" ]
null
null
null
#include <nano/lib/errors.hpp> #include <nano/lib/threading.hpp> #include <nano/lib/utility.hpp> #include <nano/node/cli.hpp> #include <nano/node/ipc/ipc_server.hpp> #include <nano/rpc/rpc.hpp> #include <nano/rpc/rpc_request_processor.hpp> #include <nano/secure/utility.hpp> #include <boost/filesystem.hpp> #include <boost/log/utility/setup/common_attributes.hpp> #include <boost/log/utility/setup/file.hpp> #include <boost/program_options.hpp> #include <csignal> namespace { void logging_init (boost::filesystem::path const & application_path_a) { static std::atomic_flag logging_already_added = ATOMIC_FLAG_INIT; if (!logging_already_added.test_and_set ()) { boost::log::add_common_attributes (); auto path = application_path_a / "log"; uintmax_t max_size{ 128 * 1024 * 1024 }; uintmax_t rotation_size{ 4 * 1024 * 1024 }; bool flush{ true }; boost::log::add_file_log (boost::log::keywords::target = path, boost::log::keywords::file_name = path / "rpc_log_%Y-%m-%d_%H-%M-%S.%N.log", boost::log::keywords::rotation_size = rotation_size, boost::log::keywords::auto_flush = flush, boost::log::keywords::scan_method = boost::log::sinks::file::scan_method::scan_matching, boost::log::keywords::max_size = max_size, boost::log::keywords::format = "[%TimeStamp%]: %Message%"); } } volatile sig_atomic_t sig_int_or_term = 0; void run (boost::filesystem::path const & data_path, std::vector<std::string> const & config_overrides) { boost::filesystem::create_directories (data_path); boost::system::error_code error_chmod; nano::set_secure_perm_directory (data_path, error_chmod); std::unique_ptr<nano::thread_runner> runner; nano::rpc_config rpc_config; auto error = nano::read_rpc_config_toml (data_path, rpc_config, config_overrides); if (!error) { logging_init (data_path); boost::asio::io_context io_ctx; try { nano::ipc_rpc_processor ipc_rpc_processor (io_ctx, rpc_config); auto rpc = nano::get_rpc (io_ctx, rpc_config, ipc_rpc_processor); rpc->start (); debug_assert (!nano::signal_handler_impl); nano::signal_handler_impl = [&io_ctx]() { io_ctx.stop (); sig_int_or_term = 1; }; std::signal (SIGINT, &nano::signal_handler); std::signal (SIGTERM, &nano::signal_handler); runner = std::make_unique<nano::thread_runner> (io_ctx, rpc_config.rpc_process.io_threads); runner->join (); if (sig_int_or_term == 1) { rpc->stop (); } } catch (const std::runtime_error & e) { std::cerr << "Error while running rpc (" << e.what () << ")\n"; } } else { std::cerr << "Error deserializing config: " << error.get_message () << std::endl; } } } int main (int argc, char * const * argv) { nano::set_umask (); boost::program_options::options_description description ("Command line options"); // clang-format off description.add_options () ("help", "Print out options") ("config", boost::program_options::value<std::vector<std::string>>()->multitoken(), "Pass RPC configuration values. This takes precedence over any values in the configuration file. This option can be repeated multiple times.") ("daemon", "Start RPC daemon") ("data_path", boost::program_options::value<std::string> (), "Use the supplied path as the data directory") ("network", boost::program_options::value<std::string> (), "Use the supplied network (live, beta or test)") ("version", "Prints out version"); // clang-format on boost::program_options::variables_map vm; try { boost::program_options::store (boost::program_options::parse_command_line (argc, argv, description), vm); } catch (boost::program_options::error const & err) { std::cerr << err.what () << std::endl; return 1; } boost::program_options::notify (vm); auto network (vm.find ("network")); if (network != vm.end ()) { auto err (nano::network_constants::set_active_network (network->second.as<std::string> ())); if (err) { std::cerr << nano::network_constants::active_network_err_msg << std::endl; std::exit (1); } } auto data_path_it = vm.find ("data_path"); if (data_path_it == vm.end ()) { std::string error_string; if (!nano::migrate_working_path (error_string)) { std::cerr << error_string << std::endl; return 1; } } boost::filesystem::path data_path ((data_path_it != vm.end ()) ? data_path_it->second.as<std::string> () : nano::working_path ()); if (vm.count ("daemon") > 0) { std::vector<std::string> config_overrides; auto config (vm.find ("config")); if (config != vm.end ()) { config_overrides = config->second.as<std::vector<std::string>> (); } run (data_path, config_overrides); } else if (vm.count ("version")) { std::cout << "Version " << NANO_VERSION_STRING << "\n" << "Build Info " << BUILD_INFO << std::endl; } else { std::cout << description << std::endl; } return 1; }
30.601266
428
0.687694
MacroChip
f6e328b99cac6eb723dcf13452b7086e05f9bd0a
14,146
cc
C++
lib/ts/ink_hash_table.cc
garfieldonly/ats_git
940ff5c56bebabb96130a55c2a17212c5c518138
[ "Apache-2.0" ]
1
2022-01-19T14:34:34.000Z
2022-01-19T14:34:34.000Z
lib/ts/ink_hash_table.cc
mingzym/trafficserver
a01c3a357b4ff9193f2e2a8aee48e3751ef2177a
[ "Apache-2.0" ]
2
2017-12-05T23:48:37.000Z
2017-12-20T01:22:07.000Z
lib/ts/ink_hash_table.cc
maskit/trafficserver
3ffa19873f7cd7ced2fbdfed5a0ac8ddbbe70a68
[ "Apache-2.0" ]
null
null
null
/** @file A brief file description @section license License Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /**************************************************************************** ink_hash_table.c This file implements hash tables. This allows us to provide alternative implementations of hash tables. ****************************************************************************/ #include "ts/ink_error.h" #include "ts/ink_hash_table.h" #include "ts/ink_memory.h" /*===========================================================================* This is the Tcl implementation of InkHashTable *===========================================================================*/ /*---------------------------------------------------------------------------* InkHashTable *ink_hash_table_create(InkHashTableKeyType key_type) This routine allocates an initializes an empty InkHashTable, and returns a pointer to the new table. The <key_type> argument indicates whether keys are represented as strings, or as words. Legal values are InkHashTableKeyType_String and InkHashTableKeyType_Word. *---------------------------------------------------------------------------*/ InkHashTable * ink_hash_table_create(InkHashTableKeyType key_type) { InkHashTable *ht_ptr; Tcl_HashTable *tcl_ht_ptr; int tcl_key_type; tcl_ht_ptr = (Tcl_HashTable *)ats_malloc(sizeof(Tcl_HashTable)); if (key_type == InkHashTableKeyType_String) tcl_key_type = TCL_STRING_KEYS; else if (key_type == InkHashTableKeyType_Word) tcl_key_type = TCL_ONE_WORD_KEYS; else ink_fatal("ink_hash_table_create: bad key_type %d", key_type); Tcl_InitHashTable(tcl_ht_ptr, tcl_key_type); ht_ptr = (InkHashTable *)tcl_ht_ptr; return (ht_ptr); } /* End ink_hash_table_create */ /*---------------------------------------------------------------------------* void ink_hash_table_destroy(InkHashTable *ht_ptr) This routine takes a hash table <ht_ptr>, and frees its storage. *---------------------------------------------------------------------------*/ InkHashTable * ink_hash_table_destroy(InkHashTable *ht_ptr) { Tcl_HashTable *tcl_ht_ptr; tcl_ht_ptr = (Tcl_HashTable *)ht_ptr; Tcl_DeleteHashTable(tcl_ht_ptr); ats_free(tcl_ht_ptr); return (InkHashTable *)0; } /* End ink_hash_table_destroy */ /*---------------------------------------------------------------------------* void ink_hash_table_destroy_and_free_values(InkHashTable *ht_ptr) This routine takes a hash table <ht_ptr>, and frees its storage, after first calling ink_free on all the values. You better darn well make sure the values have been dynamically allocated. *---------------------------------------------------------------------------*/ static int _ink_hash_table_free_entry_value(InkHashTable *ht_ptr, InkHashTableEntry *e) { InkHashTableValue value; value = ink_hash_table_entry_value(ht_ptr, e); if (value != NULL) { ats_free(value); } return (0); } /* End _ink_hash_table_free_entry_value */ InkHashTable * ink_hash_table_destroy_and_free_values(InkHashTable *ht_ptr) { ink_hash_table_map(ht_ptr, _ink_hash_table_free_entry_value); ink_hash_table_destroy(ht_ptr); return (InkHashTable *)0; } /* End ink_hash_table_destroy_and_free_values */ /*---------------------------------------------------------------------------* int ink_hash_table_isbound(InkHashTable *ht_ptr, InkHashTableKey key) This routine takes a hash table <ht_ptr>, a key <key>, and returns 1 if the value <key> is bound in the hash table, 0 otherwise. *---------------------------------------------------------------------------*/ int ink_hash_table_isbound(InkHashTable *ht_ptr, const char *key) { InkHashTableEntry *he_ptr; he_ptr = ink_hash_table_lookup_entry(ht_ptr, key); return ((he_ptr == NULL) ? 0 : 1); } /* End ink_hash_table_isbound */ /*---------------------------------------------------------------------------* int ink_hash_table_lookup(InkHashTable *ht_ptr, InkHashTableKey key, InkHashTableValue *value_ptr) This routine takes a hash table <ht_ptr>, a key <key>, and stores the value bound to the key by reference through <value_ptr>. If no binding is found, 0 is returned, else 1 is returned. *---------------------------------------------------------------------------*/ int ink_hash_table_lookup(InkHashTable *ht_ptr, const char *key, InkHashTableValue *value_ptr) { InkHashTableEntry *he_ptr; InkHashTableValue value; he_ptr = ink_hash_table_lookup_entry(ht_ptr, key); if (he_ptr == NULL) return (0); value = ink_hash_table_entry_value(ht_ptr, he_ptr); *value_ptr = value; return (1); } /* End ink_hash_table_lookup */ /*---------------------------------------------------------------------------* int ink_hash_table_delete(InkHashTable *ht_ptr, InkHashTableKey key) This routine takes a hash table <ht_ptr> and a key <key>, and deletes the binding for the <key> in the hash table if it exists. This routine returns 1 if the key existed, else 0. *---------------------------------------------------------------------------*/ int ink_hash_table_delete(InkHashTable *ht_ptr, const char *key) { char *tcl_key; Tcl_HashTable *tcl_ht_ptr; Tcl_HashEntry *tcl_he_ptr; tcl_key = (char *)key; tcl_ht_ptr = (Tcl_HashTable *)ht_ptr; tcl_he_ptr = Tcl_FindHashEntry(tcl_ht_ptr, tcl_key); if (!tcl_he_ptr) return (0); Tcl_DeleteHashEntry(tcl_he_ptr); return (1); } /* End ink_hash_table_delete */ /*---------------------------------------------------------------------------* InkHashTableEntry *ink_hash_table_lookup_entry(InkHashTable *ht_ptr, InkHashTableKey key) This routine takes a hash table <ht_ptr> and a key <key>, and returns the entry matching the key, or NULL otherwise. *---------------------------------------------------------------------------*/ InkHashTableEntry * ink_hash_table_lookup_entry(InkHashTable *ht_ptr, const char *key) { Tcl_HashTable *tcl_ht_ptr; Tcl_HashEntry *tcl_he_ptr; InkHashTableEntry *he_ptr; tcl_ht_ptr = (Tcl_HashTable *)ht_ptr; tcl_he_ptr = Tcl_FindHashEntry(tcl_ht_ptr, key); he_ptr = (InkHashTableEntry *)tcl_he_ptr; return (he_ptr); } /* End ink_hash_table_lookup_entry */ /*---------------------------------------------------------------------------* InkHashTableEntry *ink_hash_table_get_entry(InkHashTable *ht_ptr, InkHashTableKey key, int *new_value) This routine takes a hash table <ht_ptr> and a key <key>, and returns the entry matching the key, or creates, binds, and returns a new entry. If the binding already existed, *new is set to 0, else 1. *---------------------------------------------------------------------------*/ InkHashTableEntry * ink_hash_table_get_entry(InkHashTable *ht_ptr, const char *key, int *new_value) { Tcl_HashTable *tcl_ht_ptr; Tcl_HashEntry *tcl_he_ptr; tcl_ht_ptr = (Tcl_HashTable *)ht_ptr; tcl_he_ptr = Tcl_CreateHashEntry(tcl_ht_ptr, key, new_value); if (tcl_he_ptr == NULL) { ink_fatal("%s: Tcl_CreateHashEntry returned NULL", "ink_hash_table_get_entry"); } return ((InkHashTableEntry *)tcl_he_ptr); } /* End ink_hash_table_get_entry */ /*---------------------------------------------------------------------------* void ink_hash_table_set_entry(InkHashTable *ht_ptr, InkHashTableEntry *he_ptr, InkHashTableValue value) This routine takes a hash table <ht_ptr>, a hash table entry <he_ptr>, and changes the value field of the entry to <value>. *---------------------------------------------------------------------------*/ void ink_hash_table_set_entry(InkHashTable *ht_ptr, InkHashTableEntry *he_ptr, InkHashTableValue value) { (void)ht_ptr; ClientData tcl_value; Tcl_HashEntry *tcl_he_ptr; tcl_value = (ClientData)value; tcl_he_ptr = (Tcl_HashEntry *)he_ptr; Tcl_SetHashValue(tcl_he_ptr, tcl_value); } /* End ink_hash_table_set_entry */ /*---------------------------------------------------------------------------* void ink_hash_table_insert(InkHashTable *ht_ptr, InkHashTableKey key, InkHashTableValue value) This routine takes a hash table <ht_ptr>, a key <key>, and binds the value <value> to the key, replacing any previous binding, if any. *---------------------------------------------------------------------------*/ void ink_hash_table_insert(InkHashTable *ht_ptr, const char *key, InkHashTableValue value) { int new_value; InkHashTableEntry *he_ptr; he_ptr = ink_hash_table_get_entry(ht_ptr, key, &new_value); ink_hash_table_set_entry(ht_ptr, he_ptr, value); } /* End ink_hash_table_insert */ /*---------------------------------------------------------------------------* void ink_hash_table_map(InkHashTable *ht_ptr, InkHashTableEntryFunction map) This routine takes a hash table <ht_ptr> and a function pointer <map>, and applies the function <map> to each entry in the hash table. The function <map> should return 0 normally, otherwise the iteration will stop. *---------------------------------------------------------------------------*/ void ink_hash_table_map(InkHashTable *ht_ptr, InkHashTableEntryFunction map) { int retcode; InkHashTableEntry *e; InkHashTableIteratorState state; for (e = ink_hash_table_iterator_first(ht_ptr, &state); e != NULL; e = ink_hash_table_iterator_next(ht_ptr, &state)) { retcode = (*map)(ht_ptr, e); if (retcode != 0) break; } } /* End ink_hash_table_map */ /*---------------------------------------------------------------------------* InkHashTableKey ink_hash_table_entry_key(InkHashTable *ht_ptr, InkHashTableEntry *entry_ptr) This routine takes a hash table <ht_ptr> and a pointer to a hash table entry <entry_ptr>, and returns the key portion of the entry. *---------------------------------------------------------------------------*/ InkHashTableKey ink_hash_table_entry_key(InkHashTable *ht_ptr, InkHashTableEntry *entry_ptr) { char *tcl_key; tcl_key = (char *)Tcl_GetHashKey((Tcl_HashTable *)ht_ptr, (Tcl_HashEntry *)entry_ptr); return ((InkHashTableKey)tcl_key); } /* End ink_hash_table_entry_key */ /*---------------------------------------------------------------------------* InkHashTableValue ink_hash_table_entry_value(InkHashTable *ht_ptr, InkHashTableEntry *entry_ptr) This routine takes a hash table <ht_ptr> and a pointer to a hash table entry <entry_ptr>, and returns the value portion of the entry. *---------------------------------------------------------------------------*/ InkHashTableValue ink_hash_table_entry_value(InkHashTable *ht_ptr, InkHashTableEntry *entry_ptr) { (void)ht_ptr; ClientData tcl_value; tcl_value = Tcl_GetHashValue((Tcl_HashEntry *)entry_ptr); return ((InkHashTableValue)tcl_value); } /* End ink_hash_table_entry_value */ /*---------------------------------------------------------------------------* void ink_hash_table_dump_strings(InkHashTable *ht_ptr) This routine takes a hash table of string values, and dumps the keys and string values to stdout. It is the caller's responsibility to ensure that both the key and the value are NUL terminated strings. *---------------------------------------------------------------------------*/ static int DumpStringEntry(InkHashTable *ht_ptr, InkHashTableEntry *e) { InkHashTableKey key; InkHashTableValue value; key = ink_hash_table_entry_key(ht_ptr, e); value = ink_hash_table_entry_value(ht_ptr, e); fprintf(stderr, "key = '%s', value = '%s'\n", (char *)key, (char *)value); return (0); } void ink_hash_table_dump_strings(InkHashTable *ht_ptr) { ink_hash_table_map(ht_ptr, DumpStringEntry); } /* End ink_hash_table_dump_strings */ /*---------------------------------------------------------------------------* void ink_hash_table_replace_string(InkHashTable *ht_ptr, char *string_key, char *string_value) This conveninece routine is intended for hash tables with keys of type InkHashTableKeyType_String, and values being dynamically allocated strings. This routine binds <string_key> to a copy of <string_value>, and any previous bound value is deallocated. *---------------------------------------------------------------------------*/ void ink_hash_table_replace_string(InkHashTable *ht_ptr, char *string_key, char *string_value) { int new_value; char *old_str; InkHashTableEntry *he_ptr; /* * The following line will flag a type-conversion warning on the * DEC Alpha, but that message can be ignored, since we're * still dealing with pointers, and we aren't loosing any bits. */ he_ptr = ink_hash_table_get_entry(ht_ptr, (InkHashTableKey)string_key, &new_value); if (new_value == 0) { old_str = (char *)ink_hash_table_entry_value(ht_ptr, he_ptr); if (old_str) ats_free(old_str); } ink_hash_table_set_entry(ht_ptr, he_ptr, (InkHashTableValue)(ats_strdup(string_value))); } /* End ink_hash_table_replace_string */
32.51954
120
0.592394
garfieldonly
f6e6059a6415d714619b00822d2853005c87977d
6,154
cpp
C++
LevelHEngine/Physics/Collision.cpp
JSlowgrove/LevelHEngine-GEP-Assignment-1
ab5f59414e712c1c10177e3063f9e1554cda8331
[ "MIT" ]
null
null
null
LevelHEngine/Physics/Collision.cpp
JSlowgrove/LevelHEngine-GEP-Assignment-1
ab5f59414e712c1c10177e3063f9e1554cda8331
[ "MIT" ]
null
null
null
LevelHEngine/Physics/Collision.cpp
JSlowgrove/LevelHEngine-GEP-Assignment-1
ab5f59414e712c1c10177e3063f9e1554cda8331
[ "MIT" ]
null
null
null
#include "Collision.h" namespace Collision { bool rectRectIntersect(Vec2 posBoxA, Vec2 dimBoxA, Vec2 posBoxB, Vec2 dimBoxB) { if (posBoxA.x <= (posBoxB.x + dimBoxB.x) && posBoxA.y <= (posBoxB.y + dimBoxB.y) && posBoxB.x <= (posBoxA.x + dimBoxA.x) && posBoxB.y <= (posBoxA.y + dimBoxA.y)) { return true; } return false; } bool cubeCubeIntersect(Vec3 posBoxA, Vec3 dimBoxA, Vec3 posBoxB, Vec3 dimBoxB) { Vec3 collisionSides = Vec3(0.0f, 0.0f, 0.0f); return cubeCubeIntersect(posBoxA, dimBoxA, posBoxB, dimBoxB, collisionSides); } bool cubeCubeIntersect(Vec3 posBoxA, Vec3 dimBoxA, Vec3 posBoxB, Vec3 dimBoxB, Vec3 &collisionSides) { //Half dimensions for center Vec3 halfDimA = dimBoxA * 0.5f; Vec3 halfDimB = dimBoxB * 0.5f; //calculate max/min coords for box a float minAX = posBoxA.x - halfDimA.x; float maxAX = posBoxA.x + halfDimA.x; float minAY = posBoxA.y - halfDimA.y; float maxAY = posBoxA.y + halfDimA.y; float minAZ = posBoxA.z - halfDimA.z; float maxAZ = posBoxA.z + halfDimA.z; //calculate max/min coords for box b float minBX = posBoxB.x - halfDimB.x; float maxBX = posBoxB.x + halfDimB.x; float minBY = posBoxB.y - halfDimB.y; float maxBY = posBoxB.y + halfDimB.y; float minBZ = posBoxB.z - halfDimB.z; float maxBZ = posBoxB.z + halfDimB.z; bool collisionX = false; bool collisionY = false; bool collisionZ = false; if (minAX < minBX) { if (maxAX >= minBX) { collisionX = true; collisionSides.x = 1.0f; } } else if (maxBX >= minAX) { collisionX = true; collisionSides.x = -1.0f; } if (minAY < minBY) { if (maxAY >= minBY) { collisionY = true; collisionSides.y = 1.0f; } } else if (maxBY >= minAY) { collisionY = true; collisionSides.y = -1.0f; } if (minAZ < minBZ) { if (maxAZ >= minBZ) { collisionZ = true; collisionSides.z = 1.0f; } } else if (maxBZ >= minAZ) { collisionZ = true; collisionSides.z = -1.0f; } //check for intersection return (collisionX && collisionY && collisionZ); } bool sphereCubeIntersect(Vec3 posBox, Vec3 dimBox, Vec3 posSphere, float radSphere) { Vec3 collisionSides = Vec3(0.0f, 0.0f, 0.0f); return sphereCubeIntersect(posBox, dimBox, posSphere, radSphere, collisionSides); } bool sphereCubeIntersect(Vec3 posBox, Vec3 dimBox, Vec3 posSphere, float radSphere, Vec3 &collisionSides) { //Half dimensions for center Vec3 halfDim = dimBox * 0.5f; //calculate max/min coords for box a float minBoxX = posBox.x - halfDim.x; float maxBoxX = posBox.x + halfDim.x; float minBoxY = posBox.y - halfDim.y; float maxBoxY = posBox.y + halfDim.y; float minBoxZ = posBox.z - halfDim.z; float maxBoxZ = posBox.z + halfDim.z; //calculate max/min coords for sphere float minSphereX = posSphere.x - radSphere; float maxSphereX = posSphere.x + radSphere; float minSphereY = posSphere.y - radSphere; float maxSphereY = posSphere.y + radSphere; float minSphereZ = posSphere.z - radSphere; float maxSphereZ = posSphere.z + radSphere; bool collisionX = false; bool collisionY = false; bool collisionZ = false; if (minBoxX < minSphereX) { if (maxBoxX >= minSphereX) { collisionX = true; collisionSides.x = 1.0f; } } else if (maxSphereX >= minBoxX) { collisionX = true; collisionSides.x = -1.0f; } if (minBoxY < minSphereY) { if (maxBoxY >= minSphereY) { collisionY = true; collisionSides.y = 1.0f; } } else if (maxSphereY >= minBoxY) { collisionY = true; collisionSides.y = -1.0f; } if (minBoxZ < minSphereZ) { if (maxBoxZ >= minSphereZ) { collisionZ = true; collisionSides.z = 1.0f; } } else if (maxSphereZ >= minBoxZ) { collisionZ = true; collisionSides.z = -1.0f; } //check for intersection return (collisionX && collisionY && collisionZ); } bool circleCircleIntersect(Vec2 circle1Pos, Vec2 circle2Pos, float circle1Rad, float circle2Rad) { // gets the combination of the 2 circles radius float radSum = circle1Rad + circle2Rad; //work out the distance between the circles float distance = Mechanics::distanceBetweenTwoPoints(circle1Pos, circle2Pos); //if the distance between the two circles is less than the sum of the radius's then there will be a collision if (distance < radSum) { return true; } return false; } bool sphereSphereIntersect(Vec3 sphere1Pos, Vec3 sphere2Pos, float sphere1Rad, float sphere2Rad) { Vec3 vel1 = Vec3(0.0f, 0.0f, 0.0f); Vec3 vel2 = Vec3(0.0f, 0.0f, 0.0f); return sphereSphereIntersect(sphere1Pos, sphere2Pos, sphere1Rad, sphere2Rad, vel1, vel2); } bool sphereSphereIntersect(Vec3 sphere1Pos, Vec3 sphere2Pos, float sphere1Rad, float sphere2Rad, Vec3 &vel1, Vec3 &vel2) { // gets the combination of the 2 sphere's radius float radSum = sphere1Rad + sphere2Rad; //work out the distance between the spheres float distance = Mechanics::distanceBetweenTwoPoints(sphere1Pos, sphere2Pos); //if the distance between the two spheres is less than the sum of the radius's then there will be a collision if (distance < radSum) { if (vel1.x != 0.0f) { vel1.x = 0.0f; } if (vel1.y != 0.0f && vel1.y != -9.81f) { vel1.y = 0.0f; } if (vel1.z != 0.0f) { vel1.z = 0.0f; } if (vel2.x != 0.0f) { vel2.x = 0.0f; } if (vel2.y != 0.0f && vel2.y != -9.81f) { vel2.y = 0.0f; } if (vel2.z != 0.0f) { vel2.z = 0.0f; } return true; } return false; } bool circleRectIntersect(Vec2 circlePos, Vec2 boxPos, float circleRad, Vec2 boxDim) { //check if the the circle is inside the box if (circlePos.x + circleRad < boxPos.x + boxDim.x && circlePos.x + circleRad > boxPos.x - boxDim.x && circlePos.y + circleRad < boxPos.y + boxDim.y && circlePos.y + circleRad > boxPos.y - boxDim.y || circlePos.x - circleRad < boxPos.x + boxDim.x && circlePos.x - circleRad > boxPos.x - boxDim.x && circlePos.y - circleRad < boxPos.y + boxDim.y && circlePos.y - circleRad > boxPos.y - boxDim.y) { return true; } return false; } }
25.01626
121
0.654859
JSlowgrove
f6e774b1b24314bcbefe403af6de2a662da3240d
2,423
hpp
C++
lib/include/drivers/uart/detail/init.hpp
niclasberg/asfw
f836de1c0d6350541e3253863dedab6a3eb81df7
[ "MIT" ]
null
null
null
lib/include/drivers/uart/detail/init.hpp
niclasberg/asfw
f836de1c0d6350541e3253863dedab6a3eb81df7
[ "MIT" ]
null
null
null
lib/include/drivers/uart/detail/init.hpp
niclasberg/asfw
f836de1c0d6350541e3253863dedab6a3eb81df7
[ "MIT" ]
null
null
null
#pragma once #include "types.hpp" #include "reg/peripheral_operations.hpp" #include "board/regmap/uart.hpp" #include "reg/set.hpp" #include "reg/write.hpp" #include "reg/apply.hpp" namespace drivers::uart { namespace detail { using board::uart::CR1::PsVal; using board::uart::CR1::MVal; using board::uart::CR2::StopVal; template<MVal _dataBits, StopVal _stopBits, bool _parityOn, PsVal _parity = PsVal::EVEN> struct FrameFormatDef { constexpr bool_<_parityOn> getParityEnabled() const { return {}; } constexpr integral_constant<PsVal, _parity> getParity() const { return {}; } constexpr integral_constant<MVal, _dataBits> getDataBits() const { return {}; } constexpr integral_constant<StopVal, _stopBits> getStopBits() const { return {}; } }; template< class UartX, std::uint32_t _peripheralClockFrequency, std::uint32_t _baudRate, MVal _dataBits, StopVal _stopBits, bool _parityOn, PsVal _parity> void initUart( UartX uartX, constant_<_peripheralClockFrequency> peripheralClockFrequency, constant_<_baudRate> baudRate, FrameFormatDef<_dataBits, _stopBits, _parityOn, _parity>) { uartX.enable(); reg::set(uartX, board::uart::CR1::UE); // Configure baud rate generator // baud rate = pClockFrequency / (16 * usartDivider) // where usartDivider = div_Mantissa.(div_fraction/16) auto dividerTimes16 = (peripheralClockFrequency + uint32_c<_baudRate/2>) / baudRate; auto mantissa = dividerTimes16 / uint32_c<16>; auto fraction = (dividerTimes16 - uint32_c<16> * mantissa); reg::apply(uartX, reg::write(board::uart::BRR::DIV_Mantissa, mantissa), reg::write(board::uart::BRR::DIV_Fraction, fraction)); reg::write(uartX, board::uart::CR2::STOP, constant_c<_stopBits>); reg::apply(uartX, reg::write(board::uart::CR1::PCE, bool_c<_parityOn>), reg::write(board::uart::CR1::PS, constant_c<_parity>), reg::write(board::uart::CR1::M, constant_c<_dataBits>), reg::set (board::uart::CR1::TE)); } } }
37.859375
96
0.588114
niclasberg
f6e7dd267fd0640b20c53bd06fdcf1448a4d5f76
2,574
cpp
C++
Code/EditorPlugins/Assets/EnginePluginAssets/TextureCubeAsset/TextureCubeView.cpp
alinoctavian/ezEngine
0312c8d777c05ac58911f3fa879e4fd7efcfcb66
[ "MIT" ]
null
null
null
Code/EditorPlugins/Assets/EnginePluginAssets/TextureCubeAsset/TextureCubeView.cpp
alinoctavian/ezEngine
0312c8d777c05ac58911f3fa879e4fd7efcfcb66
[ "MIT" ]
null
null
null
Code/EditorPlugins/Assets/EnginePluginAssets/TextureCubeAsset/TextureCubeView.cpp
alinoctavian/ezEngine
0312c8d777c05ac58911f3fa879e4fd7efcfcb66
[ "MIT" ]
1
2022-03-28T15:57:46.000Z
2022-03-28T15:57:46.000Z
#include <EnginePluginAssetsPCH.h> #include <EnginePluginAssets/TextureCubeAsset/TextureCubeContext.h> #include <EnginePluginAssets/TextureCubeAsset/TextureCubeView.h> #include <EditorEngineProcessFramework/EngineProcess/EngineProcessMessages.h> #include <GameEngine/GameApplication/GameApplication.h> #include <RendererCore/Debug/DebugRenderer.h> #include <RendererCore/Pipeline/View.h> #include <RendererCore/RenderWorld/RenderWorld.h> ezTextureCubeViewContext::ezTextureCubeViewContext(ezTextureCubeContext* pContext) : ezEngineProcessViewContext(pContext) { m_pTextureContext = pContext; } ezTextureCubeViewContext::~ezTextureCubeViewContext() {} ezViewHandle ezTextureCubeViewContext::CreateView() { ezView* pView = nullptr; ezRenderWorld::CreateView("Texture Cube Editor - View", pView); pView->SetRenderPipelineResource(CreateDebugRenderPipeline()); pView->SetRenderPassProperty("DepthPrePass", "Active", false); pView->SetRenderPassProperty("AOPass", "Active", false); ezEngineProcessDocumentContext* pDocumentContext = GetDocumentContext(); pView->SetWorld(pDocumentContext->GetWorld()); pView->SetCamera(&m_Camera); return pView->GetHandle(); } void ezTextureCubeViewContext::SetCamera(const ezViewRedrawMsgToEngine* pMsg) { // Do not apply render mode here otherwise we would switch to a different pipeline. // Also use hard-coded clipping planes so the quad is not culled to early. ezCameraMode::Enum cameraMode = (ezCameraMode::Enum)pMsg->m_iCameraMode; m_Camera.SetCameraMode(cameraMode, pMsg->m_fFovOrDim, 0.0001f, 50.0f); m_Camera.LookAt(pMsg->m_vPosition, pMsg->m_vPosition + pMsg->m_vDirForwards, pMsg->m_vDirUp); // Draw some stats auto hResource = m_pTextureContext->GetTexture(); if (hResource.IsValid()) { ezResourceLock<ezTextureCubeResource> pResource(hResource, ezResourceAcquireMode::AllowLoadingFallback); ezGALResourceFormat::Enum format = pResource->GetFormat(); ezUInt32 uiWidthAndHeight = pResource->GetWidthAndHeight(); const ezUInt32 viewHeight = pMsg->m_uiWindowHeight; ezStringBuilder sText; if (ezReflectionUtils::EnumerationToString(ezGetStaticRTTI<ezGALResourceFormat>(), format, sText)) { sText.Shrink(21, 0); } else { sText = "Unknown format"; } sText.PrependFormat("{0}x{1}x6 - ", uiWidthAndHeight, uiWidthAndHeight); ezDebugRenderer::Draw2DText(m_hView, sText, ezVec2I32(10, viewHeight - 10), ezColor::White, 16, ezDebugRenderer::HorizontalAlignment::Left, ezDebugRenderer::VerticalAlignment::Bottom); } }
36.771429
143
0.773893
alinoctavian
f6eb9cafa30dd77c6a78e04eccc285efa3aa5f43
450
cpp
C++
Test Midterm/1.cpp
zyzkevin/C-Programming-and-Algorithms
be9642b62a3285341990c25bdc3c124c4dd8c38b
[ "MIT" ]
null
null
null
Test Midterm/1.cpp
zyzkevin/C-Programming-and-Algorithms
be9642b62a3285341990c25bdc3c124c4dd8c38b
[ "MIT" ]
null
null
null
Test Midterm/1.cpp
zyzkevin/C-Programming-and-Algorithms
be9642b62a3285341990c25bdc3c124c4dd8c38b
[ "MIT" ]
null
null
null
#include <iostream> #include <vector> using namespace std; class A { static int count; public: // 在此处补充你的代码 A () { count++; } static int theNumberOfA() { return count; } }; int A::count = 0; int main() { vector<A> v; for(int i = 0; i < 3; i++) { { A a; v.push_back(a); } cout << A::theNumberOfA() << endl; } system("pause"); return 0; }
13.235294
42
0.457778
zyzkevin
f6ece479737e76d5f7f1da109c6e15b356dc41e8
334
hpp
C++
src/mdp/core/oo/state/exceptions/unknown_object_exception.hpp
MarkieMark/fastrl
e4f0b9b60a7ecb6f13bbb79936ea82acb8adae0e
[ "Apache-2.0" ]
4
2019-04-19T00:11:36.000Z
2020-04-08T09:50:37.000Z
src/mdp/core/oo/state/exceptions/unknown_object_exception.hpp
MarkieMark/fastrl
e4f0b9b60a7ecb6f13bbb79936ea82acb8adae0e
[ "Apache-2.0" ]
null
null
null
src/mdp/core/oo/state/exceptions/unknown_object_exception.hpp
MarkieMark/fastrl
e4f0b9b60a7ecb6f13bbb79936ea82acb8adae0e
[ "Apache-2.0" ]
null
null
null
/* * Mark Benjamin 6th March 2019 * Copyright (c) 2019 Mark Benjamin */ #ifndef FASTRL_MDP_CORE_OO_STATE_EXCEPTIONS_UNKNOWN_OBJECT_EXCEPTION_HPP #define FASTRL_MDP_CORE_OO_STATE_EXCEPTIONS_UNKNOWN_OBJECT_EXCEPTION_HPP class UnknownObjectException { }; #endif //FASTRL_MDP_CORE_OO_STATE_EXCEPTIONS_UNKNOWN_OBJECT_EXCEPTION_HPP
22.266667
73
0.856287
MarkieMark
f6eff6422c429229bab5efda11a1062173665f21
14,900
cpp
C++
examples/210-Evt-EventListeners.cpp
shanep/Catch2
2db1cf34047f76cb2679a3804b476881536ad27b
[ "BSL-1.0" ]
682
2015-07-10T00:39:26.000Z
2022-03-30T05:24:53.000Z
examples/210-Evt-EventListeners.cpp
shanep/Catch2
2db1cf34047f76cb2679a3804b476881536ad27b
[ "BSL-1.0" ]
1,399
2015-07-24T22:09:09.000Z
2022-03-29T06:22:48.000Z
examples/210-Evt-EventListeners.cpp
shanep/Catch2
2db1cf34047f76cb2679a3804b476881536ad27b
[ "BSL-1.0" ]
311
2015-07-09T13:59:48.000Z
2022-03-28T00:15:20.000Z
// 210-Evt-EventListeners.cpp // Contents: // 1. Printing of listener data // 2. My listener and registration // 3. Test cases #include <catch2/catch_test_macros.hpp> #include <catch2/reporters/catch_reporter_event_listener.hpp> #include <catch2/reporters/catch_reporter_registrars.hpp> #include <catch2/catch_test_case_info.hpp> #include <iostream> // ----------------------------------------------------------------------- // 1. Printing of listener data: // namespace { std::string ws(int const level) { return std::string( 2 * level, ' ' ); } std::ostream& operator<<(std::ostream& out, Catch::Tag t) { return out << "original: " << t.original << "lower cased: " << t.lowerCased; } template< typename T > std::ostream& operator<<( std::ostream& os, std::vector<T> const& v ) { os << "{ "; for ( const auto& x : v ) os << x << ", "; return os << "}"; } // struct SourceLineInfo { // char const* file; // std::size_t line; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::SourceLineInfo const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- file: " << info.file << "\n" << ws(level+1) << "- line: " << info.line << "\n"; } //struct MessageInfo { // std::string macroName; // std::string message; // SourceLineInfo lineInfo; // ResultWas::OfType type; // unsigned int sequence; //}; void print( std::ostream& os, int const level, Catch::MessageInfo const& info ) { os << ws(level+1) << "- macroName: '" << info.macroName << "'\n" << ws(level+1) << "- message '" << info.message << "'\n"; print( os,level+1 , "- lineInfo", info.lineInfo ); os << ws(level+1) << "- sequence " << info.sequence << "\n"; } void print( std::ostream& os, int const level, std::string const& title, std::vector<Catch::MessageInfo> const& v ) { os << ws(level ) << title << ":\n"; for ( const auto& x : v ) { os << ws(level+1) << "{\n"; print( os, level+2, x ); os << ws(level+1) << "}\n"; } // os << ws(level+1) << "\n"; } // struct TestRunInfo { // std::string name; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::TestRunInfo const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- name: " << info.name << "\n"; } // struct Counts { // std::size_t total() const; // bool allPassed() const; // bool allOk() const; // // std::size_t passed = 0; // std::size_t failed = 0; // std::size_t failedButOk = 0; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::Counts const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- total(): " << info.total() << "\n" << ws(level+1) << "- allPassed(): " << info.allPassed() << "\n" << ws(level+1) << "- allOk(): " << info.allOk() << "\n" << ws(level+1) << "- passed: " << info.passed << "\n" << ws(level+1) << "- failed: " << info.failed << "\n" << ws(level+1) << "- failedButOk: " << info.failedButOk << "\n"; } // struct Totals { // Counts assertions; // Counts testCases; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::Totals const& info ) { os << ws(level) << title << ":\n"; print( os, level+1, "- assertions", info.assertions ); print( os, level+1, "- testCases" , info.testCases ); } // struct TestRunStats { // TestRunInfo runInfo; // Totals totals; // bool aborting; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::TestRunStats const& info ) { os << ws(level) << title << ":\n"; print( os, level+1 , "- runInfo", info.runInfo ); print( os, level+1 , "- totals" , info.totals ); os << ws(level+1) << "- aborting: " << info.aborting << "\n"; } // struct Tag { // StringRef original, lowerCased; // }; // // // enum class TestCaseProperties : uint8_t { // None = 0, // IsHidden = 1 << 1, // ShouldFail = 1 << 2, // MayFail = 1 << 3, // Throws = 1 << 4, // NonPortable = 1 << 5, // Benchmark = 1 << 6 // }; // // // struct TestCaseInfo : NonCopyable { // // bool isHidden() const; // bool throws() const; // bool okToFail() const; // bool expectedToFail() const; // // // std::string name; // std::string className; // std::vector<Tag> tags; // SourceLineInfo lineInfo; // TestCaseProperties properties = TestCaseProperties::None; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::TestCaseInfo const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- isHidden(): " << info.isHidden() << "\n" << ws(level+1) << "- throws(): " << info.throws() << "\n" << ws(level+1) << "- okToFail(): " << info.okToFail() << "\n" << ws(level+1) << "- expectedToFail(): " << info.expectedToFail() << "\n" << ws(level+1) << "- tagsAsString(): '" << info.tagsAsString() << "'\n" << ws(level+1) << "- name: '" << info.name << "'\n" << ws(level+1) << "- className: '" << info.className << "'\n" << ws(level+1) << "- tags: " << info.tags << "\n"; print( os, level+1 , "- lineInfo", info.lineInfo ); os << ws(level+1) << "- properties (flags): 0x" << std::hex << static_cast<uint32_t>(info.properties) << std::dec << "\n"; } // struct TestCaseStats { // TestCaseInfo testInfo; // Totals totals; // std::string stdOut; // std::string stdErr; // bool aborting; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::TestCaseStats const& info ) { os << ws(level ) << title << ":\n"; print( os, level+1 , "- testInfo", *info.testInfo ); print( os, level+1 , "- totals" , info.totals ); os << ws(level+1) << "- stdOut: " << info.stdOut << "\n" << ws(level+1) << "- stdErr: " << info.stdErr << "\n" << ws(level+1) << "- aborting: " << info.aborting << "\n"; } // struct SectionInfo { // std::string name; // std::string description; // SourceLineInfo lineInfo; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::SectionInfo const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- name: " << info.name << "\n"; print( os, level+1 , "- lineInfo", info.lineInfo ); } // struct SectionStats { // SectionInfo sectionInfo; // Counts assertions; // double durationInSeconds; // bool missingAssertions; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::SectionStats const& info ) { os << ws(level ) << title << ":\n"; print( os, level+1 , "- sectionInfo", info.sectionInfo ); print( os, level+1 , "- assertions" , info.assertions ); os << ws(level+1) << "- durationInSeconds: " << info.durationInSeconds << "\n" << ws(level+1) << "- missingAssertions: " << info.missingAssertions << "\n"; } // struct AssertionInfo // { // StringRef macroName; // SourceLineInfo lineInfo; // StringRef capturedExpression; // ResultDisposition::Flags resultDisposition; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::AssertionInfo const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- macroName: '" << info.macroName << "'\n"; print( os, level+1 , "- lineInfo" , info.lineInfo ); os << ws(level+1) << "- capturedExpression: '" << info.capturedExpression << "'\n" << ws(level+1) << "- resultDisposition (flags): 0x" << std::hex << info.resultDisposition << std::dec << "\n"; } //struct AssertionResultData //{ // std::string reconstructExpression() const; // // std::string message; // mutable std::string reconstructedExpression; // LazyExpression lazyExpression; // ResultWas::OfType resultType; //}; void print( std::ostream& os, int const level, std::string const& title, Catch::AssertionResultData const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- reconstructExpression(): '" << info.reconstructExpression() << "'\n" << ws(level+1) << "- message: '" << info.message << "'\n" << ws(level+1) << "- lazyExpression: '" << "(info.lazyExpression)" << "'\n" << ws(level+1) << "- resultType: '" << info.resultType << "'\n"; } //class AssertionResult { // bool isOk() const; // bool succeeded() const; // ResultWas::OfType getResultType() const; // bool hasExpression() const; // bool hasMessage() const; // std::string getExpression() const; // std::string getExpressionInMacro() const; // bool hasExpandedExpression() const; // std::string getExpandedExpression() const; // std::string getMessage() const; // SourceLineInfo getSourceInfo() const; // std::string getTestMacroName() const; // // AssertionInfo m_info; // AssertionResultData m_resultData; //}; void print( std::ostream& os, int const level, std::string const& title, Catch::AssertionResult const& info ) { os << ws(level ) << title << ":\n" << ws(level+1) << "- isOk(): " << info.isOk() << "\n" << ws(level+1) << "- succeeded(): " << info.succeeded() << "\n" << ws(level+1) << "- getResultType(): " << info.getResultType() << "\n" << ws(level+1) << "- hasExpression(): " << info.hasExpression() << "\n" << ws(level+1) << "- hasMessage(): " << info.hasMessage() << "\n" << ws(level+1) << "- getExpression(): '" << info.getExpression() << "'\n" << ws(level+1) << "- getExpressionInMacro(): '" << info.getExpressionInMacro() << "'\n" << ws(level+1) << "- hasExpandedExpression(): " << info.hasExpandedExpression() << "\n" << ws(level+1) << "- getExpandedExpression(): " << info.getExpandedExpression() << "'\n" << ws(level+1) << "- getMessage(): '" << info.getMessage() << "'\n"; print( os, level+1 , "- getSourceInfo(): ", info.getSourceInfo() ); os << ws(level+1) << "- getTestMacroName(): '" << info.getTestMacroName() << "'\n"; print( os, level+1 , "- *** m_info (AssertionInfo)", info.m_info ); print( os, level+1 , "- *** m_resultData (AssertionResultData)", info.m_resultData ); } // struct AssertionStats { // AssertionResult assertionResult; // std::vector<MessageInfo> infoMessages; // Totals totals; // }; void print( std::ostream& os, int const level, std::string const& title, Catch::AssertionStats const& info ) { os << ws(level ) << title << ":\n"; print( os, level+1 , "- assertionResult", info.assertionResult ); print( os, level+1 , "- infoMessages", info.infoMessages ); print( os, level+1 , "- totals", info.totals ); } // ----------------------------------------------------------------------- // 2. My listener and registration: // char const * dashed_line = "--------------------------------------------------------------------------"; struct MyListener : Catch::EventListenerBase { using EventListenerBase::EventListenerBase; // inherit constructor // Get rid of Wweak-tables ~MyListener(); // The whole test run starting void testRunStarting( Catch::TestRunInfo const& testRunInfo ) override { std::cout << std::boolalpha << "\nEvent: testRunStarting:\n"; print( std::cout, 1, "- testRunInfo", testRunInfo ); } // The whole test run ending void testRunEnded( Catch::TestRunStats const& testRunStats ) override { std::cout << dashed_line << "\nEvent: testRunEnded:\n"; print( std::cout, 1, "- testRunStats", testRunStats ); } // A test is being skipped (because it is "hidden") void skipTest( Catch::TestCaseInfo const& testInfo ) override { std::cout << dashed_line << "\nEvent: skipTest:\n"; print( std::cout, 1, "- testInfo", testInfo ); } // Test cases starting void testCaseStarting( Catch::TestCaseInfo const& testInfo ) override { std::cout << dashed_line << "\nEvent: testCaseStarting:\n"; print( std::cout, 1, "- testInfo", testInfo ); } // Test cases ending void testCaseEnded( Catch::TestCaseStats const& testCaseStats ) override { std::cout << "\nEvent: testCaseEnded:\n"; print( std::cout, 1, "testCaseStats", testCaseStats ); } // Sections starting void sectionStarting( Catch::SectionInfo const& sectionInfo ) override { std::cout << "\nEvent: sectionStarting:\n"; print( std::cout, 1, "- sectionInfo", sectionInfo ); } // Sections ending void sectionEnded( Catch::SectionStats const& sectionStats ) override { std::cout << "\nEvent: sectionEnded:\n"; print( std::cout, 1, "- sectionStats", sectionStats ); } // Assertions before/ after void assertionStarting( Catch::AssertionInfo const& assertionInfo ) override { std::cout << "\nEvent: assertionStarting:\n"; print( std::cout, 1, "- assertionInfo", assertionInfo ); } void assertionEnded( Catch::AssertionStats const& assertionStats ) override { std::cout << "\nEvent: assertionEnded:\n"; print( std::cout, 1, "- assertionStats", assertionStats ); } }; } // end anonymous namespace CATCH_REGISTER_LISTENER( MyListener ) // Get rid of Wweak-tables MyListener::~MyListener() {} // ----------------------------------------------------------------------- // 3. Test cases: // TEST_CASE( "1: Hidden testcase", "[.hidden]" ) { } TEST_CASE( "2: Testcase with sections", "[tag-A][tag-B]" ) { int i = 42; REQUIRE( i == 42 ); SECTION("Section 1") { INFO("Section 1"); i = 7; SECTION("Section 1.1") { INFO("Section 1.1"); REQUIRE( i == 42 ); } } SECTION("Section 2") { INFO("Section 2"); REQUIRE( i == 42 ); } WARN("At end of test case"); } struct Fixture { int fortytwo() const { return 42; } }; TEST_CASE_METHOD( Fixture, "3: Testcase with class-based fixture", "[tag-C][tag-D]" ) { REQUIRE( fortytwo() == 42 ); } // Compile & run: // - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -o 210-Evt-EventListeners 210-Evt-EventListeners.cpp 000-CatchMain.o && 210-Evt-EventListeners --success // - cl -EHsc -I%CATCH_SINGLE_INCLUDE% 210-Evt-EventListeners.cpp 000-CatchMain.obj && 210-Evt-EventListeners --success // Expected compact output (all assertions): // // prompt> 210-Evt-EventListeners --reporter compact --success // result omitted for brevity.
34.651163
156
0.555101
shanep
f6f05b8113afb39076127fdd578d088474758c81
46,661
cpp
C++
arangod/Aql/ClusterBlocks.cpp
dolfly/arangodb
b3ee17672e19e48db97c5dafce5978ba0a272fb5
[ "Apache-2.0" ]
null
null
null
arangod/Aql/ClusterBlocks.cpp
dolfly/arangodb
b3ee17672e19e48db97c5dafce5978ba0a272fb5
[ "Apache-2.0" ]
null
null
null
arangod/Aql/ClusterBlocks.cpp
dolfly/arangodb
b3ee17672e19e48db97c5dafce5978ba0a272fb5
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// 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. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Max Neunhoeffer //////////////////////////////////////////////////////////////////////////////// #include "ClusterBlocks.h" #include "Aql/AqlItemBlock.h" #include "Aql/AqlValue.h" #include "Aql/BlockCollector.h" #include "Aql/Collection.h" #include "Aql/ExecutionEngine.h" #include "Aql/ExecutionStats.h" #include "Aql/Query.h" #include "Basics/Exceptions.h" #include "Basics/StaticStrings.h" #include "Basics/StringBuffer.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" #include "Cluster/ClusterComm.h" #include "Cluster/ClusterInfo.h" #include "Cluster/ClusterMethods.h" #include "Cluster/ServerState.h" #include "Scheduler/JobGuard.h" #include "Scheduler/SchedulerFeature.h" #include "VocBase/ticks.h" #include "VocBase/vocbase.h" #include <velocypack/Builder.h> #include <velocypack/Collection.h> #include <velocypack/Parser.h> #include <velocypack/Slice.h> #include <velocypack/velocypack-aliases.h> using namespace arangodb; using namespace arangodb::aql; using VelocyPackHelper = arangodb::basics::VelocyPackHelper; using StringBuffer = arangodb::basics::StringBuffer; GatherBlock::GatherBlock(ExecutionEngine* engine, GatherNode const* en) : ExecutionBlock(engine, en), _sortRegisters(), _isSimple(en->getElements().empty()) { if (!_isSimple) { for (auto const& p : en->getElements()) { // We know that planRegisters has been run, so // getPlanNode()->_registerPlan is set up auto it = en->getRegisterPlan()->varInfo.find(p.var->id); TRI_ASSERT(it != en->getRegisterPlan()->varInfo.end()); TRI_ASSERT(it->second.registerId < ExecutionNode::MaxRegisterId); _sortRegisters.emplace_back(it->second.registerId, p.ascending); if (!p.attributePath.empty()) { _sortRegisters.back().attributePath = p.attributePath; } } } } GatherBlock::~GatherBlock() { DEBUG_BEGIN_BLOCK(); for (std::deque<AqlItemBlock*>& x : _gatherBlockBuffer) { for (AqlItemBlock* y : x) { delete y; } x.clear(); } _gatherBlockBuffer.clear(); DEBUG_END_BLOCK(); } /// @brief initialize int GatherBlock::initialize() { DEBUG_BEGIN_BLOCK(); _atDep = 0; return ExecutionBlock::initialize(); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief shutdown: need our own method since our _buffer is different int GatherBlock::shutdown(int errorCode) { DEBUG_BEGIN_BLOCK(); // don't call default shutdown method since it does the wrong thing to // _gatherBlockBuffer int ret = TRI_ERROR_NO_ERROR; for (auto it = _dependencies.begin(); it != _dependencies.end(); ++it) { int res = (*it)->shutdown(errorCode); if (res != TRI_ERROR_NO_ERROR) { ret = res; } } if (ret != TRI_ERROR_NO_ERROR) { return ret; } if (!_isSimple) { for (std::deque<AqlItemBlock*>& x : _gatherBlockBuffer) { for (AqlItemBlock* y : x) { delete y; } x.clear(); } _gatherBlockBuffer.clear(); _gatherBlockPos.clear(); } return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief initializeCursor int GatherBlock::initializeCursor(AqlItemBlock* items, size_t pos) { DEBUG_BEGIN_BLOCK(); int res = ExecutionBlock::initializeCursor(items, pos); if (res != TRI_ERROR_NO_ERROR) { return res; } _atDep = 0; if (!_isSimple) { for (std::deque<AqlItemBlock*>& x : _gatherBlockBuffer) { for (AqlItemBlock* y : x) { delete y; } x.clear(); } _gatherBlockBuffer.clear(); _gatherBlockPos.clear(); _gatherBlockBuffer.reserve(_dependencies.size()); _gatherBlockPos.reserve(_dependencies.size()); for (size_t i = 0; i < _dependencies.size(); i++) { _gatherBlockBuffer.emplace_back(); _gatherBlockPos.emplace_back(std::make_pair(i, 0)); } } if (_dependencies.empty()) { _done = true; } else { _done = false; } return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief count: the sum of the count() of the dependencies or -1 (if any /// dependency has count -1 int64_t GatherBlock::count() const { DEBUG_BEGIN_BLOCK(); int64_t sum = 0; for (auto const& x : _dependencies) { if (x->count() == -1) { return -1; } sum += x->count(); } return sum; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief remaining: the sum of the remaining() of the dependencies or -1 (if /// any dependency has remaining -1 int64_t GatherBlock::remaining() { DEBUG_BEGIN_BLOCK(); int64_t sum = 0; for (auto const& x : _dependencies) { if (x->remaining() == -1) { return -1; } sum += x->remaining(); } return sum; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief hasMore: true if any position of _buffer hasMore and false /// otherwise. bool GatherBlock::hasMore() { DEBUG_BEGIN_BLOCK(); if (_done || _dependencies.empty()) { return false; } if (_isSimple) { for (size_t i = 0; i < _dependencies.size(); i++) { if (_dependencies.at(i)->hasMore()) { return true; } } } else { for (size_t i = 0; i < _gatherBlockBuffer.size(); i++) { if (!_gatherBlockBuffer.at(i).empty()) { return true; } else if (getBlock(i, DefaultBatchSize(), DefaultBatchSize())) { _gatherBlockPos.at(i) = std::make_pair(i, 0); return true; } } } _done = true; return false; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getSome AqlItemBlock* GatherBlock::getSome(size_t atLeast, size_t atMost) { DEBUG_BEGIN_BLOCK(); traceGetSomeBegin(); if (_dependencies.empty()) { _done = true; } if (_done) { traceGetSomeEnd(nullptr); return nullptr; } // the simple case . . . if (_isSimple) { auto res = _dependencies.at(_atDep)->getSome(atLeast, atMost); while (res == nullptr && _atDep < _dependencies.size() - 1) { _atDep++; res = _dependencies.at(_atDep)->getSome(atLeast, atMost); } if (res == nullptr) { _done = true; } traceGetSomeEnd(res); return res; } // the non-simple case . . . size_t available = 0; // nr of available rows size_t index = 0; // an index of a non-empty buffer // pull more blocks from dependencies . . . TRI_ASSERT(_gatherBlockBuffer.size() == _dependencies.size()); TRI_ASSERT(_gatherBlockBuffer.size() == _gatherBlockPos.size()); for (size_t i = 0; i < _dependencies.size(); i++) { if (_gatherBlockBuffer.at(i).empty()) { if (getBlock(i, atLeast, atMost)) { index = i; _gatherBlockPos.at(i) = std::make_pair(i, 0); } } else { index = i; } auto const& cur = _gatherBlockBuffer.at(i); if (!cur.empty()) { available += cur.at(0)->size() - _gatherBlockPos.at(i).second; for (size_t j = 1; j < cur.size(); j++) { available += cur.at(j)->size(); } } } if (available == 0) { _done = true; traceGetSomeEnd(nullptr); return nullptr; } size_t toSend = (std::min)(available, atMost); // nr rows in outgoing block // the following is similar to AqlItemBlock's slice method . . . std::unordered_map<AqlValue, AqlValue> cache; // comparison function OurLessThan ourLessThan(_trx, _gatherBlockBuffer, _sortRegisters); AqlItemBlock* example = _gatherBlockBuffer.at(index).front(); size_t nrRegs = example->getNrRegs(); // automatically deleted if things go wrong std::unique_ptr<AqlItemBlock> res(requestBlock(toSend, static_cast<arangodb::aql::RegisterId>(nrRegs))); for (size_t i = 0; i < toSend; i++) { // get the next smallest row from the buffer . . . std::pair<size_t, size_t> val = *(std::min_element( _gatherBlockPos.begin(), _gatherBlockPos.end(), ourLessThan)); // copy the row in to the outgoing block . . . for (RegisterId col = 0; col < nrRegs; col++) { AqlValue const& x( _gatherBlockBuffer.at(val.first).front()->getValue(val.second, col)); if (!x.isEmpty()) { auto it = cache.find(x); if (it == cache.end()) { AqlValue y = x.clone(); try { res->setValue(i, col, y); } catch (...) { y.destroy(); throw; } cache.emplace(x, y); } else { res->setValue(i, col, it->second); } } } // renew the _gatherBlockPos and clean up the buffer if necessary _gatherBlockPos.at(val.first).second++; if (_gatherBlockPos.at(val.first).second == _gatherBlockBuffer.at(val.first).front()->size()) { AqlItemBlock* cur = _gatherBlockBuffer.at(val.first).front(); returnBlock(cur); _gatherBlockBuffer.at(val.first).pop_front(); _gatherBlockPos.at(val.first) = std::make_pair(val.first, 0); if (_gatherBlockBuffer.at(val.first).empty()) { // if we pulled everything from the buffer, we need to fetch // more data for the shard for which we have no more local // values. getBlock(val.first, atLeast, atMost); // note that if getBlock() returns false here, this is not // a problem, because the sort function used takes care of // this } } } traceGetSomeEnd(res.get()); return res.release(); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief skipSome size_t GatherBlock::skipSome(size_t atLeast, size_t atMost) { DEBUG_BEGIN_BLOCK(); if (_done) { return 0; } // the simple case . . . if (_isSimple) { auto skipped = _dependencies.at(_atDep)->skipSome(atLeast, atMost); while (skipped == 0 && _atDep < _dependencies.size() - 1) { _atDep++; skipped = _dependencies.at(_atDep)->skipSome(atLeast, atMost); } if (skipped == 0) { _done = true; } return skipped; } // the non-simple case . . . size_t available = 0; // nr of available rows TRI_ASSERT(_dependencies.size() != 0); // pull more blocks from dependencies . . . for (size_t i = 0; i < _dependencies.size(); i++) { if (_gatherBlockBuffer.at(i).empty()) { if (getBlock(i, atLeast, atMost)) { _gatherBlockPos.at(i) = std::make_pair(i, 0); } } auto cur = _gatherBlockBuffer.at(i); if (!cur.empty()) { available += cur.at(0)->size() - _gatherBlockPos.at(i).second; for (size_t j = 1; j < cur.size(); j++) { available += cur.at(j)->size(); } } } if (available == 0) { _done = true; return 0; } size_t skipped = (std::min)(available, atMost); // nr rows in outgoing block // comparison function OurLessThan ourLessThan(_trx, _gatherBlockBuffer, _sortRegisters); for (size_t i = 0; i < skipped; i++) { // get the next smallest row from the buffer . . . std::pair<size_t, size_t> val = *(std::min_element( _gatherBlockPos.begin(), _gatherBlockPos.end(), ourLessThan)); // renew the _gatherBlockPos and clean up the buffer if necessary _gatherBlockPos.at(val.first).second++; if (_gatherBlockPos.at(val.first).second == _gatherBlockBuffer.at(val.first).front()->size()) { AqlItemBlock* cur = _gatherBlockBuffer.at(val.first).front(); returnBlock(cur); _gatherBlockBuffer.at(val.first).pop_front(); _gatherBlockPos.at(val.first) = std::make_pair(val.first, 0); } } return skipped; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getBlock: from dependency i into _gatherBlockBuffer.at(i), /// non-simple case only bool GatherBlock::getBlock(size_t i, size_t atLeast, size_t atMost) { DEBUG_BEGIN_BLOCK(); TRI_ASSERT(i < _dependencies.size()); TRI_ASSERT(!_isSimple); std::unique_ptr<AqlItemBlock> docs(_dependencies.at(i)->getSome(atLeast, atMost)); if (docs != nullptr) { _gatherBlockBuffer.at(i).emplace_back(docs.get()); docs.release(); return true; } return false; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief OurLessThan: comparison method for elements of _gatherBlockPos bool GatherBlock::OurLessThan::operator()(std::pair<size_t, size_t> const& a, std::pair<size_t, size_t> const& b) { // nothing in the buffer is maximum! if (_gatherBlockBuffer[a.first].empty()) { return false; } if (_gatherBlockBuffer[b.first].empty()) { return true; } size_t i = 0; for (auto const& reg : _sortRegisters) { // Fast path if there is no attributePath: int cmp; if (reg.attributePath.empty()) { cmp = AqlValue::Compare( _trx, _gatherBlockBuffer[a.first].front()->getValue(a.second, reg.reg), _gatherBlockBuffer[b.first].front()->getValue(b.second, reg.reg), true); } else { // Take attributePath into consideration: AqlValue topA = _gatherBlockBuffer[a.first].front()->getValue(a.second, reg.reg); AqlValue topB = _gatherBlockBuffer[b.first].front()->getValue(b.second, reg.reg); bool mustDestroyA; AqlValue aa = topA.get(_trx, reg.attributePath, mustDestroyA, false); AqlValueGuard guardA(aa, mustDestroyA); bool mustDestroyB; AqlValue bb = topB.get(_trx, reg.attributePath, mustDestroyB, false); AqlValueGuard guardB(bb, mustDestroyB); cmp = AqlValue::Compare(_trx, aa, bb, true); } if (cmp == -1) { return reg.ascending; } else if (cmp == 1) { return !reg.ascending; } i++; } return false; } BlockWithClients::BlockWithClients(ExecutionEngine* engine, ExecutionNode const* ep, std::vector<std::string> const& shardIds) : ExecutionBlock(engine, ep), _nrClients(shardIds.size()), _wasShutdown(false) { _shardIdMap.reserve(_nrClients); for (size_t i = 0; i < _nrClients; i++) { _shardIdMap.emplace(std::make_pair(shardIds[i], i)); } } /// @brief initializeCursor: reset _doneForClient int BlockWithClients::initializeCursor(AqlItemBlock* items, size_t pos) { DEBUG_BEGIN_BLOCK(); int res = ExecutionBlock::initializeCursor(items, pos); if (res != TRI_ERROR_NO_ERROR) { return res; } _doneForClient.clear(); _doneForClient.reserve(_nrClients); for (size_t i = 0; i < _nrClients; i++) { _doneForClient.push_back(false); } return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief shutdown int BlockWithClients::shutdown(int errorCode) { DEBUG_BEGIN_BLOCK(); _doneForClient.clear(); if (_wasShutdown) { return TRI_ERROR_NO_ERROR; } int res = ExecutionBlock::shutdown(errorCode); _wasShutdown = true; return res; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getSomeForShard AqlItemBlock* BlockWithClients::getSomeForShard(size_t atLeast, size_t atMost, std::string const& shardId) { DEBUG_BEGIN_BLOCK(); size_t skipped = 0; AqlItemBlock* result = nullptr; int out = getOrSkipSomeForShard(atLeast, atMost, false, result, skipped, shardId); if (out == TRI_ERROR_NO_ERROR) { return result; } if (result != nullptr) { delete result; } THROW_ARANGO_EXCEPTION(out); DEBUG_END_BLOCK(); } /// @brief skipSomeForShard size_t BlockWithClients::skipSomeForShard(size_t atLeast, size_t atMost, std::string const& shardId) { DEBUG_BEGIN_BLOCK(); size_t skipped = 0; AqlItemBlock* result = nullptr; int out = getOrSkipSomeForShard(atLeast, atMost, true, result, skipped, shardId); TRI_ASSERT(result == nullptr); if (out != TRI_ERROR_NO_ERROR) { THROW_ARANGO_EXCEPTION(out); } return skipped; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief skipForShard bool BlockWithClients::skipForShard(size_t number, std::string const& shardId) { DEBUG_BEGIN_BLOCK(); size_t skipped = skipSomeForShard(number, number, shardId); size_t nr = skipped; while (nr != 0 && skipped < number) { nr = skipSomeForShard(number - skipped, number - skipped, shardId); skipped += nr; } if (nr == 0) { return true; } return !hasMoreForShard(shardId); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getClientId: get the number <clientId> (used internally) /// corresponding to <shardId> size_t BlockWithClients::getClientId(std::string const& shardId) { DEBUG_BEGIN_BLOCK(); if (shardId.empty()) { THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "got empty shard id"); } auto it = _shardIdMap.find(shardId); if (it == _shardIdMap.end()) { std::string message("AQL: unknown shard id "); message.append(shardId); THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, message); } return ((*it).second); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief initializeCursor int ScatterBlock::initializeCursor(AqlItemBlock* items, size_t pos) { DEBUG_BEGIN_BLOCK(); int res = BlockWithClients::initializeCursor(items, pos); if (res != TRI_ERROR_NO_ERROR) { return res; } // local clean up _posForClient.clear(); for (size_t i = 0; i < _nrClients; i++) { _posForClient.emplace_back(std::make_pair(0, 0)); } return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief initializeCursor int ScatterBlock::shutdown(int errorCode) { DEBUG_BEGIN_BLOCK(); int res = BlockWithClients::shutdown(errorCode); if (res != TRI_ERROR_NO_ERROR) { return res; } // local clean up _posForClient.clear(); return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief hasMoreForShard: any more for shard <shardId>? bool ScatterBlock::hasMoreForShard(std::string const& shardId) { DEBUG_BEGIN_BLOCK(); TRI_ASSERT(_nrClients != 0); size_t clientId = getClientId(shardId); if (_doneForClient.at(clientId)) { return false; } std::pair<size_t, size_t> pos = _posForClient.at(clientId); // (i, j) where i is the position in _buffer, and j is the position in // _buffer.at(i) we are sending to <clientId> if (pos.first > _buffer.size()) { if (!ExecutionBlock::getBlock(DefaultBatchSize(), DefaultBatchSize())) { _doneForClient.at(clientId) = true; return false; } } return true; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief remainingForShard: remaining for shard, sum of the number of row left /// in the buffer and _dependencies[0]->remaining() int64_t ScatterBlock::remainingForShard(std::string const& shardId) { DEBUG_BEGIN_BLOCK(); size_t clientId = getClientId(shardId); if (_doneForClient.at(clientId)) { return 0; } int64_t sum = _dependencies[0]->remaining(); if (sum == -1) { return -1; } std::pair<size_t, size_t> pos = _posForClient.at(clientId); if (pos.first <= _buffer.size()) { sum += _buffer.at(pos.first)->size() - pos.second; for (auto i = pos.first + 1; i < _buffer.size(); i++) { sum += _buffer.at(i)->size(); } } return sum; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getOrSkipSomeForShard int ScatterBlock::getOrSkipSomeForShard(size_t atLeast, size_t atMost, bool skipping, AqlItemBlock*& result, size_t& skipped, std::string const& shardId) { DEBUG_BEGIN_BLOCK(); TRI_ASSERT(0 < atLeast && atLeast <= atMost); TRI_ASSERT(result == nullptr && skipped == 0); size_t clientId = getClientId(shardId); if (_doneForClient.at(clientId)) { return TRI_ERROR_NO_ERROR; } std::pair<size_t, size_t> pos = _posForClient.at(clientId); // pull more blocks from dependency if necessary . . . if (pos.first >= _buffer.size()) { if (!getBlock(atLeast, atMost)) { _doneForClient.at(clientId) = true; return TRI_ERROR_NO_ERROR; } } size_t available = _buffer.at(pos.first)->size() - pos.second; // available should be non-zero skipped = (std::min)(available, atMost); // nr rows in outgoing block if (!skipping) { result = _buffer.at(pos.first)->slice(pos.second, pos.second + skipped); } // increment the position . . . _posForClient.at(clientId).second += skipped; // check if we're done at current block in buffer . . . if (_posForClient.at(clientId).second == _buffer.at(_posForClient.at(clientId).first)->size()) { _posForClient.at(clientId).first++; _posForClient.at(clientId).second = 0; // check if we can pop the front of the buffer . . . bool popit = true; for (size_t i = 0; i < _nrClients; i++) { if (_posForClient.at(i).first == 0) { popit = false; break; } } if (popit) { delete _buffer.front(); _buffer.pop_front(); // update the values in first coord of _posForClient for (size_t i = 0; i < _nrClients; i++) { _posForClient.at(i).first--; } } } return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } DistributeBlock::DistributeBlock(ExecutionEngine* engine, DistributeNode const* ep, std::vector<std::string> const& shardIds, Collection const* collection) : BlockWithClients(engine, ep, shardIds), _collection(collection), _index(0), _regId(ExecutionNode::MaxRegisterId), _alternativeRegId(ExecutionNode::MaxRegisterId), _allowSpecifiedKeys(false) { // get the variable to inspect . . . VariableId varId = ep->_varId; // get the register id of the variable to inspect . . . auto it = ep->getRegisterPlan()->varInfo.find(varId); TRI_ASSERT(it != ep->getRegisterPlan()->varInfo.end()); _regId = (*it).second.registerId; TRI_ASSERT(_regId < ExecutionNode::MaxRegisterId); if (ep->_alternativeVarId != ep->_varId) { // use second variable auto it = ep->getRegisterPlan()->varInfo.find(ep->_alternativeVarId); TRI_ASSERT(it != ep->getRegisterPlan()->varInfo.end()); _alternativeRegId = (*it).second.registerId; TRI_ASSERT(_alternativeRegId < ExecutionNode::MaxRegisterId); } _usesDefaultSharding = collection->usesDefaultSharding(); _allowSpecifiedKeys = ep->_allowSpecifiedKeys; } /// @brief initializeCursor int DistributeBlock::initializeCursor(AqlItemBlock* items, size_t pos) { DEBUG_BEGIN_BLOCK(); int res = BlockWithClients::initializeCursor(items, pos); if (res != TRI_ERROR_NO_ERROR) { return res; } // local clean up _distBuffer.clear(); _distBuffer.reserve(_nrClients); for (size_t i = 0; i < _nrClients; i++) { _distBuffer.emplace_back(); } return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief shutdown int DistributeBlock::shutdown(int errorCode) { DEBUG_BEGIN_BLOCK(); int res = BlockWithClients::shutdown(errorCode); if (res != TRI_ERROR_NO_ERROR) { return res; } // local clean up _distBuffer.clear(); return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief hasMore: any more for any shard? bool DistributeBlock::hasMoreForShard(std::string const& shardId) { DEBUG_BEGIN_BLOCK(); size_t clientId = getClientId(shardId); if (_doneForClient.at(clientId)) { return false; } if (!_distBuffer.at(clientId).empty()) { return true; } if (!getBlockForClient(DefaultBatchSize(), DefaultBatchSize(), clientId)) { _doneForClient.at(clientId) = true; return false; } return true; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getOrSkipSomeForShard int DistributeBlock::getOrSkipSomeForShard(size_t atLeast, size_t atMost, bool skipping, AqlItemBlock*& result, size_t& skipped, std::string const& shardId) { DEBUG_BEGIN_BLOCK(); traceGetSomeBegin(); TRI_ASSERT(0 < atLeast && atLeast <= atMost); TRI_ASSERT(result == nullptr && skipped == 0); size_t clientId = getClientId(shardId); if (_doneForClient.at(clientId)) { traceGetSomeEnd(result); return TRI_ERROR_NO_ERROR; } std::deque<std::pair<size_t, size_t>>& buf = _distBuffer.at(clientId); BlockCollector collector(&_engine->_itemBlockManager); if (buf.empty()) { if (!getBlockForClient(atLeast, atMost, clientId)) { _doneForClient.at(clientId) = true; traceGetSomeEnd(result); return TRI_ERROR_NO_ERROR; } } skipped = (std::min)(buf.size(), atMost); if (skipping) { for (size_t i = 0; i < skipped; i++) { buf.pop_front(); } traceGetSomeEnd(result); return TRI_ERROR_NO_ERROR; } size_t i = 0; while (i < skipped) { std::vector<size_t> chosen; size_t const n = buf.front().first; while (buf.front().first == n && i < skipped) { chosen.emplace_back(buf.front().second); buf.pop_front(); i++; // make sure we are not overreaching over the end of the buffer if (buf.empty()) { break; } } std::unique_ptr<AqlItemBlock> more(_buffer.at(n)->slice(chosen, 0, chosen.size())); collector.add(std::move(more)); } if (!skipping) { result = collector.steal(); } // _buffer is left intact, deleted and cleared at shutdown traceGetSomeEnd(result); return TRI_ERROR_NO_ERROR; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getBlockForClient: try to get atLeast pairs into /// _distBuffer.at(clientId), this means we have to look at every row in the /// incoming blocks until they run out or we find enough rows for clientId. We /// also keep track of blocks which should be sent to other clients than the /// current one. bool DistributeBlock::getBlockForClient(size_t atLeast, size_t atMost, size_t clientId) { DEBUG_BEGIN_BLOCK(); if (_buffer.empty()) { _index = 0; // position in _buffer _pos = 0; // position in _buffer.at(_index) } std::vector<std::deque<std::pair<size_t, size_t>>>& buf = _distBuffer; // it should be the case that buf.at(clientId) is empty while (buf.at(clientId).size() < atLeast) { if (_index == _buffer.size()) { if (!ExecutionBlock::getBlock(atLeast, atMost)) { if (buf.at(clientId).size() == 0) { _doneForClient.at(clientId) = true; return false; } break; } } AqlItemBlock* cur = _buffer.at(_index); while (_pos < cur->size() && buf.at(clientId).size() < atMost) { // this may modify the input item buffer in place size_t id = sendToClient(cur); buf.at(id).emplace_back(std::make_pair(_index, _pos++)); } if (_pos == cur->size()) { _pos = 0; _index++; } else { break; } } return true; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief sendToClient: for each row of the incoming AqlItemBlock use the /// attributes <shardKeys> of the Aql value <val> to determine to which shard /// the row should be sent and return its clientId size_t DistributeBlock::sendToClient(AqlItemBlock* cur) { DEBUG_BEGIN_BLOCK(); // inspect cur in row _pos and check to which shard it should be sent . . AqlValue val = cur->getValueReference(_pos, _regId); VPackSlice input = val.slice(); // will throw when wrong type bool usedAlternativeRegId = false; if (input.isNull() && _alternativeRegId != ExecutionNode::MaxRegisterId) { // value is set, but null // check if there is a second input register available (UPSERT makes use of // two input registers, // one for the search document, the other for the insert document) val = cur->getValueReference(_pos, _alternativeRegId); input = val.slice(); // will throw when wrong type usedAlternativeRegId = true; } VPackSlice value = input; VPackBuilder builder; VPackBuilder builder2; bool hasCreatedKeyAttribute = false; if (input.isString() && static_cast<DistributeNode const*>(_exeNode) ->_allowKeyConversionToObject) { builder.openObject(); builder.add(StaticStrings::KeyString, input); builder.close(); // clear the previous value cur->destroyValue(_pos, _regId); // overwrite with new value cur->setValue(_pos, _regId, AqlValue(builder)); value = builder.slice(); hasCreatedKeyAttribute = true; } else if (!input.isObject()) { THROW_ARANGO_EXCEPTION(TRI_ERROR_ARANGO_DOCUMENT_TYPE_INVALID); } TRI_ASSERT(value.isObject()); if (static_cast<DistributeNode const*>(_exeNode)->_createKeys) { // we are responsible for creating keys if none present if (_usesDefaultSharding) { // the collection is sharded by _key... if (!hasCreatedKeyAttribute && !value.hasKey(StaticStrings::KeyString)) { // there is no _key attribute present, so we are responsible for // creating one VPackBuilder temp; temp.openObject(); temp.add(StaticStrings::KeyString, VPackValue(createKey(value))); temp.close(); builder2 = VPackCollection::merge(input, temp.slice(), true); // clear the previous value and overwrite with new value: if (usedAlternativeRegId) { cur->destroyValue(_pos, _alternativeRegId); cur->setValue(_pos, _alternativeRegId, AqlValue(builder2)); } else { cur->destroyValue(_pos, _regId); cur->setValue(_pos, _regId, AqlValue(builder2)); } value = builder2.slice(); } } else { // the collection is not sharded by _key if (hasCreatedKeyAttribute || value.hasKey(StaticStrings::KeyString)) { // a _key was given, but user is not allowed to specify _key if (usedAlternativeRegId || !_allowSpecifiedKeys) { THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_MUST_NOT_SPECIFY_KEY); } } else { VPackBuilder temp; temp.openObject(); temp.add(StaticStrings::KeyString, VPackValue(createKey(value))); temp.close(); builder2 = VPackCollection::merge(input, temp.slice(), true); // clear the previous value and overwrite with new value: if (usedAlternativeRegId) { cur->destroyValue(_pos, _alternativeRegId); cur->setValue(_pos, _alternativeRegId, AqlValue(builder2.slice())); } else { cur->destroyValue(_pos, _regId); cur->setValue(_pos, _regId, AqlValue(builder2.slice())); } value = builder2.slice(); } } } std::string shardId; bool usesDefaultShardingAttributes; auto clusterInfo = arangodb::ClusterInfo::instance(); auto collInfo = _collection->getCollection(); int res = clusterInfo->getResponsibleShard(collInfo.get(), value, true, shardId, usesDefaultShardingAttributes); // std::cout << "SHARDID: " << shardId << "\n"; if (res != TRI_ERROR_NO_ERROR) { THROW_ARANGO_EXCEPTION(res); } TRI_ASSERT(!shardId.empty()); return getClientId(shardId); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief create a new document key, argument is unused here #ifndef USE_ENTERPRISE std::string DistributeBlock::createKey(VPackSlice) const { ClusterInfo* ci = ClusterInfo::instance(); uint64_t uid = ci->uniqid(); return std::to_string(uid); } #endif /// @brief local helper to throw an exception if a HTTP request went wrong static bool throwExceptionAfterBadSyncRequest(ClusterCommResult* res, bool isShutdown) { DEBUG_BEGIN_BLOCK(); if (res->status == CL_COMM_TIMEOUT || res->status == CL_COMM_BACKEND_UNAVAILABLE) { THROW_ARANGO_EXCEPTION_MESSAGE(res->getErrorCode(), res->stringifyErrorMessage()); } if (res->status == CL_COMM_ERROR) { std::string errorMessage = std::string("Error message received from shard '") + std::string(res->shardID) + std::string("' on cluster node '") + std::string(res->serverID) + std::string("': "); int errorNum = TRI_ERROR_INTERNAL; if (res->result != nullptr) { errorNum = TRI_ERROR_NO_ERROR; arangodb::basics::StringBuffer const& responseBodyBuf(res->result->getBody()); std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson( responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (!slice.hasKey("error") || slice.get("error").getBoolean()) { errorNum = TRI_ERROR_INTERNAL; } if (slice.isObject()) { VPackSlice v = slice.get("errorNum"); if (v.isNumber()) { if (v.getNumericValue<int>() != TRI_ERROR_NO_ERROR) { /* if we've got an error num, error has to be true. */ TRI_ASSERT(errorNum == TRI_ERROR_INTERNAL); errorNum = v.getNumericValue<int>(); } } v = slice.get("errorMessage"); if (v.isString()) { errorMessage += v.copyString(); } else { errorMessage += std::string("(no valid error in response)"); } } } if (isShutdown && errorNum == TRI_ERROR_QUERY_NOT_FOUND) { // this error may happen on shutdown and is thus tolerated // pass the info to the caller who can opt to ignore this error return true; } // In this case a proper HTTP error was reported by the DBserver, if (errorNum > 0 && !errorMessage.empty()) { THROW_ARANGO_EXCEPTION_MESSAGE(errorNum, errorMessage); } // default error THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_AQL_COMMUNICATION); } return false; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief timeout double const RemoteBlock::defaultTimeOut = 3600.0; /// @brief creates a remote block RemoteBlock::RemoteBlock(ExecutionEngine* engine, RemoteNode const* en, std::string const& server, std::string const& ownName, std::string const& queryId) : ExecutionBlock(engine, en), _server(server), _ownName(ownName), _queryId(queryId), _isResponsibleForInitializeCursor( en->isResponsibleForInitializeCursor()) { TRI_ASSERT(!queryId.empty()); TRI_ASSERT( (arangodb::ServerState::instance()->isCoordinator() && ownName.empty()) || (!arangodb::ServerState::instance()->isCoordinator() && !ownName.empty())); } RemoteBlock::~RemoteBlock() {} /// @brief local helper to send a request std::unique_ptr<ClusterCommResult> RemoteBlock::sendRequest( arangodb::rest::RequestType type, std::string const& urlPart, std::string const& body) const { DEBUG_BEGIN_BLOCK(); auto cc = ClusterComm::instance(); if (cc != nullptr) { // nullptr only happens on controlled shutdown // Later, we probably want to set these sensibly: ClientTransactionID const clientTransactionId = "AQL"; CoordTransactionID const coordTransactionId = TRI_NewTickServer(); std::unordered_map<std::string, std::string> headers; if (!_ownName.empty()) { headers.emplace("Shard-Id", _ownName); } ++_engine->_stats.httpRequests; { JobGuard guard(SchedulerFeature::SCHEDULER); guard.block(); auto result = cc->syncRequest(clientTransactionId, coordTransactionId, _server, type, std::string("/_db/") + arangodb::basics::StringUtils::urlEncode( _engine->getQuery()->trx()->vocbase()->name()) + urlPart + _queryId, body, headers, defaultTimeOut); return result; } } return std::make_unique<ClusterCommResult>(); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief initialize int RemoteBlock::initialize() { DEBUG_BEGIN_BLOCK(); if (!_isResponsibleForInitializeCursor) { // do nothing... return TRI_ERROR_NO_ERROR; } std::unique_ptr<ClusterCommResult> res = sendRequest(rest::RequestType::PUT, "/_api/aql/initialize/", "{}"); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: StringBuffer const& responseBodyBuf(res->result->getBody()); std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson(responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (slice.hasKey("code")) { return slice.get("code").getNumericValue<int>(); } return TRI_ERROR_INTERNAL; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief initializeCursor, could be called multiple times int RemoteBlock::initializeCursor(AqlItemBlock* items, size_t pos) { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP if (!_isResponsibleForInitializeCursor) { // do nothing... return TRI_ERROR_NO_ERROR; } VPackOptions options(VPackOptions::Defaults); options.buildUnindexedArrays = true; options.buildUnindexedObjects = true; VPackBuilder builder(&options); builder.openObject(); if (items == nullptr) { // first call, items is still a nullptr builder.add("exhausted", VPackValue(true)); builder.add("error", VPackValue(false)); } else { builder.add("exhausted", VPackValue(false)); builder.add("error", VPackValue(false)); builder.add("pos", VPackValue(pos)); builder.add(VPackValue("items")); builder.openObject(); items->toVelocyPack(_engine->getQuery()->trx(), builder); builder.close(); } builder.close(); std::string bodyString(builder.slice().toJson()); std::unique_ptr<ClusterCommResult> res = sendRequest( rest::RequestType::PUT, "/_api/aql/initializeCursor/", bodyString); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: StringBuffer const& responseBodyBuf(res->result->getBody()); { std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson( responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (slice.hasKey("code")) { return slice.get("code").getNumericValue<int>(); } return TRI_ERROR_INTERNAL; } // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief shutdown, will be called exactly once for the whole query int RemoteBlock::shutdown(int errorCode) { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP std::unique_ptr<ClusterCommResult> res = sendRequest(rest::RequestType::PUT, "/_api/aql/shutdown/", std::string("{\"code\":" + std::to_string(errorCode) + "}")); try { if (throwExceptionAfterBadSyncRequest(res.get(), true)) { // artificially ignore error in case query was not found during shutdown return TRI_ERROR_NO_ERROR; } } catch (arangodb::basics::Exception &ex) { if (ex.code() == TRI_ERROR_CLUSTER_BACKEND_UNAVAILABLE) { return TRI_ERROR_CLUSTER_BACKEND_UNAVAILABLE; } throw; } StringBuffer const& responseBodyBuf(res->result->getBody()); std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson(responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (slice.isObject()) { if (slice.hasKey("stats")) { ExecutionStats newStats(slice.get("stats")); _engine->_stats.add(newStats); } // read "warnings" attribute if present and add it to our query VPackSlice warnings = slice.get("warnings"); if (warnings.isArray()) { auto query = _engine->getQuery(); for (auto const& it : VPackArrayIterator(warnings)) { if (it.isObject()) { VPackSlice code = it.get("code"); VPackSlice message = it.get("message"); if (code.isNumber() && message.isString()) { query->registerWarning(code.getNumericValue<int>(), message.copyString().c_str()); } } } } } if (slice.hasKey("code")) { return slice.get("code").getNumericValue<int>(); } return TRI_ERROR_INTERNAL; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief getSome AqlItemBlock* RemoteBlock::getSome(size_t atLeast, size_t atMost) { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP traceGetSomeBegin(); VPackBuilder builder; builder.openObject(); builder.add("atLeast", VPackValue(atLeast)); builder.add("atMost", VPackValue(atMost)); builder.close(); std::string bodyString(builder.slice().toJson()); std::unique_ptr<ClusterCommResult> res = sendRequest(rest::RequestType::PUT, "/_api/aql/getSome/", bodyString); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: std::shared_ptr<VPackBuilder> responseBodyBuilder = res->result->getBodyVelocyPack(); VPackSlice responseBody = responseBodyBuilder->slice(); if (VelocyPackHelper::getBooleanValue(responseBody, "exhausted", true)) { traceGetSomeEnd(nullptr); return nullptr; } auto r = std::make_unique<AqlItemBlock>(_engine->getQuery()->resourceMonitor(), responseBody); traceGetSomeEnd(r.get()); return r.release(); // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief skipSome size_t RemoteBlock::skipSome(size_t atLeast, size_t atMost) { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP VPackBuilder builder; builder.openObject(); builder.add("atLeast", VPackValue(atLeast)); builder.add("atMost", VPackValue(atMost)); builder.close(); std::string bodyString(builder.slice().toJson()); std::unique_ptr<ClusterCommResult> res = sendRequest(rest::RequestType::PUT, "/_api/aql/skipSome/", bodyString); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: StringBuffer const& responseBodyBuf(res->result->getBody()); { std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson( responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (!slice.hasKey("error") || slice.get("error").getBoolean()) { THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_AQL_COMMUNICATION); } size_t skipped = 0; if (slice.hasKey("skipped")) { skipped = slice.get("skipped").getNumericValue<size_t>(); } return skipped; } // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief hasMore bool RemoteBlock::hasMore() { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP std::unique_ptr<ClusterCommResult> res = sendRequest(rest::RequestType::GET, "/_api/aql/hasMore/", std::string()); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: StringBuffer const& responseBodyBuf(res->result->getBody()); std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson(responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (!slice.hasKey("error") || slice.get("error").getBoolean()) { THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_AQL_COMMUNICATION); } bool hasMore = true; if (slice.hasKey("hasMore")) { hasMore = slice.get("hasMore").getBoolean(); } return hasMore; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief count int64_t RemoteBlock::count() const { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP std::unique_ptr<ClusterCommResult> res = sendRequest(rest::RequestType::GET, "/_api/aql/count/", std::string()); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: StringBuffer const& responseBodyBuf(res->result->getBody()); std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson(responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (!slice.hasKey("error") || slice.get("error").getBoolean()) { THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_AQL_COMMUNICATION); } int64_t count = 0; if (slice.hasKey("count")) { count = slice.get("count").getNumericValue<int64_t>(); } return count; // cppcheck-suppress style DEBUG_END_BLOCK(); } /// @brief remaining int64_t RemoteBlock::remaining() { DEBUG_BEGIN_BLOCK(); // For every call we simply forward via HTTP std::unique_ptr<ClusterCommResult> res = sendRequest( rest::RequestType::GET, "/_api/aql/remaining/", std::string()); throwExceptionAfterBadSyncRequest(res.get(), false); // If we get here, then res->result is the response which will be // a serialized AqlItemBlock: StringBuffer const& responseBodyBuf(res->result->getBody()); std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson(responseBodyBuf.c_str(), responseBodyBuf.length()); VPackSlice slice = builder->slice(); if (!slice.hasKey("error") || slice.get("error").getBoolean()) { THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_AQL_COMMUNICATION); } int64_t remaining = 0; if (slice.hasKey("remaining")) { remaining = slice.get("remaining").getNumericValue<int64_t>(); } return remaining; // cppcheck-suppress style DEBUG_END_BLOCK(); }
29.217909
106
0.64855
dolfly
f6f0b0e80b50c86bfc23ec26f479d41967b4a7a4
958
hpp
C++
client/data_parser.hpp
derpicated/dynamic_network_of_speakers
e2407d330a2f83d8a2de33cc9905d783906c7dfc
[ "MIT" ]
8
2016-05-23T22:56:57.000Z
2016-05-28T08:22:18.000Z
client/data_parser.hpp
derpicated/dynamic_network_of_speakers
e2407d330a2f83d8a2de33cc9905d783906c7dfc
[ "MIT" ]
10
2016-05-24T20:15:45.000Z
2016-05-27T22:13:50.000Z
client/data_parser.hpp
derpicated/dynamic_network_of_speakers
e2407d330a2f83d8a2de33cc9905d783906c7dfc
[ "MIT" ]
1
2019-03-09T18:03:56.000Z
2019-03-09T18:03:56.000Z
#ifndef DNS_data_parser_HPP #define DNS_data_parser_HPP #include "./libs/logger/easylogging++.h" #include <iostream> #include <map> #include <sstream> #include <string> #include <vector> #include "libs/jzon/Jzon.h" class audioObject { public: audioObject (); float distance; float angle; }; class speakerData { public: speakerData (); std::string speakerid; std::map<std::string, audioObject> objects; }; class data_parser { private: Jzon::Parser _filereader; Jzon::Writer _filewriter; public: data_parser (); speakerData parseClientData (std::string jsonstring, std::string client_id, std::map<std::string, std::vector<float>>& objects); std::map<std::string, std::string> parseAudioSourceData (std::string jsonstring); std::string composeClientData (speakerData speaker); std::string composeAudioSourceData (std::map<std::string, std::string> audioSources); }; #endif
19.958333
89
0.693111
derpicated
f6f0c548bdf9dba71e22a2df8a67da4205e9b0df
313
cpp
C++
SimulationTest/cpuTests/DistributionTest.cpp
KevinMcGin/Simulation
f1dbed05d6024274f6a69e0679f529feaae1e26e
[ "MIT" ]
4
2021-12-11T17:59:07.000Z
2021-12-24T11:08:55.000Z
SimulationTest/cpuTests/DistributionTest.cpp
KevinMcGin/Simulation
f1dbed05d6024274f6a69e0679f529feaae1e26e
[ "MIT" ]
121
2021-12-11T09:20:47.000Z
2022-03-13T18:36:48.000Z
SimulationTest/cpuTests/DistributionTest.cpp
KevinMcGin/Simulation
f1dbed05d6024274f6a69e0679f529feaae1e26e
[ "MIT" ]
null
null
null
#include <gtest/gtest.h> #include "distribution/Distribution.h" TEST(DistributionTest, RandomTest) { auto value = Distribution::random(0.0, 1.0); EXPECT_TRUE(value <= 1 && value >= -1); } TEST(DistributionTest, RandomTest2) { auto value = Distribution::random(1.0); EXPECT_TRUE(value <= 1 && value >= 0); }
26.083333
45
0.693291
KevinMcGin
f6f3a3ffa1f0b79281a576126d9d3d97ca6cd1b9
2,225
cpp
C++
tests/test_argparse.cpp
CraftSpider/AlphaUtils
70ff9cd4ec4184f67d7e8b779538ef88f1e88682
[ "MIT" ]
1
2019-06-23T14:03:16.000Z
2019-06-23T14:03:16.000Z
tests/test_argparse.cpp
CraftSpider/AlphaUtils
70ff9cd4ec4184f67d7e8b779538ef88f1e88682
[ "MIT" ]
null
null
null
tests/test_argparse.cpp
CraftSpider/AlphaUtils
70ff9cd4ec4184f67d7e8b779538ef88f1e88682
[ "MIT" ]
2
2019-06-23T14:03:17.000Z
2020-11-19T02:16:51.000Z
#include <at_tests> #include "argparser.h" void test_args() { const char* args[] = {"", "arg1", "-notarg", "--notarg", "arg2", "-not=arg", "--not=arg"}; ArgParser a = ArgParser(7, args); ASSERT(a.num_arguments() == 2); ASSERT(a.get_argument(0) == "arg1"); ASSERT(a.get_argument(1) == "arg2"); const char* args2[] = {"", "--no-args-supplied"}; ArgParser b = ArgParser(2, args2); ASSERT(b.num_arguments() == 0); const char* args3[] = {"", "only", "args", "provided"}; ArgParser c = ArgParser(4, args3); ASSERT(c.num_arguments() == 3); ASSERT(c.get_argument(0) == "only"); ASSERT(c.get_argument(1) == "args"); ASSERT(c.get_argument(2) == "provided"); } void test_flags() { const char* args[] = {"", "arg1", "-flagflag", "--flag", "arg2", "-not=flag", "--also-not=flag"}; ArgParser a = ArgParser(7, args); ASSERT(a.num_flags() == 9); ASSERT(a.has_flag("f")); ASSERT(a.has_flag("l")); ASSERT(!a.has_flag("x")); ASSERT(a.flag_count("g") == 2); ASSERT(a.has_flag("flag")); const char* args2[] = {"", "noflags", "given"}; ArgParser b = ArgParser(3, args2); ASSERT(b.num_flags() == 0); const char* args3[] = {"", "--only", "-flags"}; ArgParser c = ArgParser(3, args3); ASSERT(c.num_flags() == 6); ASSERT(!c.has_flag("flag")); ASSERT(c.has_flag("s")); } void test_variables() { const char* args[] = {"", "arg1", "-flag", "--flag", "arg2", "-var=1", "--var2=val"}; ArgParser a = ArgParser(7, args); ASSERT(a.num_variables() == 2); ASSERT(a.has_variable("var")); ASSERT(!a.has_variable("foo")); ASSERT(a.get_variable("var2") == "val"); const char* args2[] = {"", "novars", "given"}; ArgParser b = ArgParser(3, args2); ASSERT(b.num_variables() == 0); const char* args3[] = {"", "-only=vars", "--are=given"}; ArgParser c = ArgParser(3, args3); ASSERT(c.num_variables() == 2); ASSERT(c.has_variable("are")); ASSERT(!c.has_variable("bar")); ASSERT(c.get_variable("only") == "vars"); } void run_argparse_tests() { TEST(test_args) TEST(test_flags) TEST(test_variables) }
28.164557
101
0.551461
CraftSpider
f6f4ee542d7c34b77844a56f0a799e86223d1e78
2,423
cpp
C++
src/tools/kdb/merge.cpp
mirunix/libelektra
a808874567b2c0c823f7619fa72078d89802bca1
[ "BSD-3-Clause" ]
188
2015-01-07T20:34:26.000Z
2022-03-16T09:55:09.000Z
src/tools/kdb/merge.cpp
mirunix/libelektra
a808874567b2c0c823f7619fa72078d89802bca1
[ "BSD-3-Clause" ]
3,813
2015-01-02T14:00:08.000Z
2022-03-31T14:19:11.000Z
src/tools/kdb/merge.cpp
mirunix/libelektra
a808874567b2c0c823f7619fa72078d89802bca1
[ "BSD-3-Clause" ]
149
2015-01-10T02:07:50.000Z
2022-03-16T09:50:24.000Z
/** * @file * * @brief * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) */ #include <merge.hpp> #include <cmdline.hpp> #include <kdb.hpp> #include <keysetio.hpp> #include <modules.hpp> #include <iostream> #include <string> #include <mergehelper.hpp> #include <merging/metamergestrategy.hpp> #include <merging/threewaymerge.hpp> using namespace kdb; using namespace kdb::tools::merging; using namespace std; MergeCommand::MergeCommand () { } MergeCommand::~MergeCommand () { } int MergeCommand::execute (Cmdline const & cl) { if (cl.arguments.size () < 4) { throw invalid_argument ("wrong number of arguments, 4 needed"); } Key oursRoot = cl.createKey (0); Key theirsRoot = cl.createKey (1); Key baseRoot = cl.createKey (2); Key resultRoot = cl.createKey (3); KeySet ours; KeySet theirs; KeySet base; { KDB lkdb; lkdb.get (ours, oursRoot); ours = ours.cut (oursRoot); ours.lookup (oursRoot, KDB_O_POP); if (cl.verbose) std::cout << "we got ours: " << oursRoot << " with keys " << ours << std::endl; } { KDB lkdb; lkdb.get (theirs, theirsRoot); theirs = theirs.cut (theirsRoot); ours.lookup (oursRoot, KDB_O_POP); if (cl.verbose) std::cout << "we got theirs: " << theirsRoot << " with keys " << theirs << std::endl; } { KDB lkdb; lkdb.get (base, baseRoot); base = base.cut (baseRoot); ours.lookup (oursRoot, KDB_O_POP); if (cl.verbose) std::cout << "we got base: " << baseRoot << " with keys " << base << std::endl; } KeySet resultKeys; kdb.get (resultKeys, resultRoot); KeySet discard = resultKeys.cut (resultRoot); if (discard.size () != 0) { if (cl.force) { if (cl.verbose) { std::cout << "will remove " << discard.size () << " keys, because -f was given" << std::endl; } } else { std::cerr << discard.size () << " keys exist in merge resultpath, will quit. Use -f to override the keys there." << std::endl; } } MergeHelper helper; ThreeWayMerge merger; helper.configureMerger (cl, merger); MergeResult result = merger.mergeKeySet ( MergeTask (BaseMergeKeys (base, baseRoot), OurMergeKeys (ours, oursRoot), TheirMergeKeys (theirs, theirsRoot), resultRoot)); helper.reportResult (cl, result, cout, cerr); int ret = 0; if (!result.hasConflicts ()) { resultKeys.append (result.getMergedKeys ()); kdb.set (resultKeys, resultRoot); } else { ret = -1; } return ret; }
20.709402
126
0.654148
mirunix
f6f4fac03aec15be60d2d238c16818d25bd77b20
2,157
cpp
C++
src/library/library_task_builder.cpp
solson/lean
b13ac127fd83f3724d2f096b1fb85dc6b15e3746
[ "Apache-2.0" ]
2,232
2015-01-01T18:20:29.000Z
2022-03-30T02:35:50.000Z
src/library/library_task_builder.cpp
SNU-2D/lean
72a965986fa5aeae54062e98efb3140b2c4e79fd
[ "Apache-2.0" ]
1,187
2015-01-06T05:18:44.000Z
2019-10-31T18:45:42.000Z
src/library/library_task_builder.cpp
SNU-2D/lean
72a965986fa5aeae54062e98efb3140b2c4e79fd
[ "Apache-2.0" ]
306
2015-01-16T22:30:27.000Z
2022-03-28T02:55:51.000Z
/* Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Gabriel Ebner */ #include "library/library_task_builder.h" #include "library/message_builder.h" namespace lean { struct library_scopes_imp : public delegating_task_imp { io_state m_ios; log_tree::node m_lt; library_scopes_imp(std::unique_ptr<gtask_imp> && base, log_tree::node const & lt) : delegating_task_imp(std::forward<std::unique_ptr<gtask_imp>>(base)), m_ios(get_global_ios()), m_lt(lt) {} // TODO(gabriel): set logtree status to cancelled? void execute(void * result) override { scope_global_ios scope1(m_ios); scope_log_tree scope2(m_lt); if (m_lt) m_lt.set_state(log_tree::state::Running); try { delegating_task_imp::execute(result); } catch (interrupted) { if (m_lt) m_lt.set_state(log_tree::state::Cancelled); throw; } } }; std::unique_ptr<gtask_imp> library_scopes::operator()(std::unique_ptr<gtask_imp> && base) { return std::unique_ptr<gtask_imp>(new library_scopes_imp( std::forward<std::unique_ptr<gtask_imp>>(base), m_lt)); } struct exception_reporter_imp : public delegating_task_imp { exception_reporter_imp(std::unique_ptr<gtask_imp> && base) : delegating_task_imp(std::forward<std::unique_ptr<gtask_imp>>(base)) {} void execute(void * result) override { try { delegating_task_imp::execute(result); } catch (std::exception & ex) { message_builder(environment(), get_global_ios(), logtree().get_location().m_file_name, logtree().get_location().m_range.m_begin, ERROR) .set_exception(ex) .report(); throw; } } }; std::unique_ptr<gtask_imp> exception_reporter::operator()(std::unique_ptr<gtask_imp> && base) { return std::unique_ptr<gtask_imp>(new exception_reporter_imp( std::forward<std::unique_ptr<gtask_imp>>(base))); } }
33.184615
95
0.636069
solson
f6f509119bb84c8279e686234b80bcecd546506e
2,200
hpp
C++
native-osx/libs/boost/boost/function.hpp
CodeDistillery/myodaemon
0db901ec9ca39fcf84eb88836c6f4477c8767f25
[ "Unlicense" ]
null
null
null
native-osx/libs/boost/boost/function.hpp
CodeDistillery/myodaemon
0db901ec9ca39fcf84eb88836c6f4477c8767f25
[ "Unlicense" ]
null
null
null
native-osx/libs/boost/boost/function.hpp
CodeDistillery/myodaemon
0db901ec9ca39fcf84eb88836c6f4477c8767f25
[ "Unlicense" ]
null
null
null
// Boost.Function library // Copyright Douglas Gregor 2001-2003. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/function // William Kempf, Jesse Jones and Karl Nelson were all very helpful in the // design of this library. #include <functional> // unary_function, binary_function #include <boost/preprocessor/iterate.hpp> #include <boost/detail/workaround.hpp> #ifndef BOOST_FUNCTION_MAX_ARGS # define BOOST_FUNCTION_MAX_ARGS 10 #endif // BOOST_FUNCTION_MAX_ARGS // Include the prologue here so that the use of file-level iteration // in anything that may be included by function_template.hpp doesn't break #include <boost/function/detail/prologue.hpp> // Older Visual Age C++ version do not handle the file iteration well #if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800) # if BOOST_FUNCTION_MAX_ARGS >= 0 # include <boost/function/function0.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 1 # include <boost/function/function1.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 2 # include <boost/function/function2.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 3 # include <boost/function/function3.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 4 # include <boost/function/function4.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 5 # include <boost/function/function5.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 6 # include <boost/function/function6.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 7 # include <boost/function/function7.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 8 # include <boost/function/function8.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 9 # include <boost/function/function9.hpp> # endif # if BOOST_FUNCTION_MAX_ARGS >= 10 # include <boost/function/function10.hpp> # endif #else // What is the '3' for? # define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>)) # include BOOST_PP_ITERATE() # undef BOOST_PP_ITERATION_PARAMS_1 #endif
32.835821
114
0.749545
CodeDistillery
f6f68b5edc534714a8e0a89529eba2e546ab6570
11,329
hxx
C++
OCC/opencascade-7.2.0/x64/debug/inc/BOPTools_AlgoTools2D.hxx
jiaguobing/FastCAE
2348ab87e83fe5c704e4c998cf391229c25ac5d5
[ "BSD-3-Clause" ]
2
2020-02-21T01:04:35.000Z
2020-02-21T03:35:37.000Z
OCC/opencascade-7.2.0/x64/debug/inc/BOPTools_AlgoTools2D.hxx
Sunqia/FastCAE
cbc023fe07b6e306ceefae8b8bd7c12bc1562acb
[ "BSD-3-Clause" ]
1
2020-03-06T04:49:42.000Z
2020-03-06T04:49:42.000Z
OCC/opencascade-7.2.0/x64/debug/inc/BOPTools_AlgoTools2D.hxx
Sunqia/FastCAE
cbc023fe07b6e306ceefae8b8bd7c12bc1562acb
[ "BSD-3-Clause" ]
1
2021-11-21T13:03:26.000Z
2021-11-21T13:03:26.000Z
// Created by: Peter KURNEV // Copyright (c) 1999-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 _BOPTools_AlgoTools2D_HeaderFile #define _BOPTools_AlgoTools2D_HeaderFile #include <Standard.hxx> #include <Standard_DefineAlloc.hxx> #include <Standard_Handle.hxx> #include <Standard_Boolean.hxx> #include <Standard_Real.hxx> #include <BOPCol_ListOfShape.hxx> #include <Standard_Integer.hxx> class TopoDS_Edge; class TopoDS_Face; class gp_Vec; class Geom2d_Curve; class Geom_Curve; class BRepAdaptor_Surface; class ProjLib_ProjectedCurve; class IntTools_Context; //! The class contains handy static functions //! dealing with the topology //! This is the copy of the BOPTools_AlgoTools2D.cdl class BOPTools_AlgoTools2D { public: DEFINE_STANDARD_ALLOC //! Compute P-Curve for the edge <aE> on the face <aF>.<br> //! Raises exception Standard_ConstructionError if projection algorithm fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void BuildPCurveForEdgeOnFace (const TopoDS_Edge& aE, const TopoDS_Face& aF, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Compute tangent for the edge <aE> [in 3D] at parameter <aT> Standard_EXPORT static Standard_Boolean EdgeTangent (const TopoDS_Edge& anE, const Standard_Real aT, gp_Vec& Tau); //! Compute surface parameters <U,V> of the face <aF> //! for the point from the edge <aE> at parameter <aT>.<br> //! If <aE> has't pcurve on surface, algorithm tries to get it by //! projection and can //! raise exception Standard_ConstructionError if projection algorithm fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void PointOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF, const Standard_Real aT, Standard_Real& U, Standard_Real& V, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Get P-Curve <aC> for the edge <aE> on surface <aF> .<br> //! If the P-Curve does not exist, build it using Make2D().<br> //! [aToler] - reached tolerance //! Raises exception Standard_ConstructionError if algorithm Make2D() fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void CurveOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC, Standard_Real& aToler, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Get P-Curve <aC> for the edge <aE> on surface <aF> .<br> //! If the P-Curve does not exist, build it using Make2D().<br> //! [aFirst, aLast] - range of the P-Curve<br> //! [aToler] - reached tolerance<br> //! Raises exception Standard_ConstructionError if algorithm Make2D() fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void CurveOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC, Standard_Real& aFirst, Standard_Real& aLast, Standard_Real& aToler, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Returns TRUE if the edge <aE> has P-Curve <aC> //! on surface <aF> . //! [aFirst, aLast] - range of the P-Curve //! [aToler] - reached tolerance //! If the P-Curve does not exist, aC.IsNull()=TRUE. Standard_EXPORT static Standard_Boolean HasCurveOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC, Standard_Real& aFirst, Standard_Real& aLast, Standard_Real& aToler); //! Returns TRUE if the edge <aE> has P-Curve <aC> //! on surface <aF> . //! If the P-Curve does not exist, aC.IsNull()=TRUE. Standard_EXPORT static Standard_Boolean HasCurveOnSurface (const TopoDS_Edge& aE, const TopoDS_Face& aF); //! Adjust P-Curve <theC2D> (3D-curve <theC3D>) on surface of the face <theF>.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void AdjustPCurveOnFace (const TopoDS_Face& theF, const Handle(Geom_Curve)& theC3D, const Handle(Geom2d_Curve)& theC2D, Handle(Geom2d_Curve)& theC2DA, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .<br> //! [aT1, aT2] - range to adjust<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void AdjustPCurveOnFace (const TopoDS_Face& theF, const Standard_Real theFirst, const Standard_Real theLast, const Handle(Geom2d_Curve)& theC2D, Handle(Geom2d_Curve)& theC2DA, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> . //! [aT1, aT2] - range to adjust Standard_EXPORT static void AdjustPCurveOnSurf (const BRepAdaptor_Surface& aF, const Standard_Real aT1, const Standard_Real aT2, const Handle(Geom2d_Curve)& aC2D, Handle(Geom2d_Curve)& aC2DA); //! Compute intermediate value in between [aFirst, aLast] . Standard_EXPORT static Standard_Real IntermediatePoint (const Standard_Real aFirst, const Standard_Real aLast); //! Compute intermediate value of parameter for the edge <anE>. Standard_EXPORT static Standard_Real IntermediatePoint (const TopoDS_Edge& anE); //! Build pcurve of edge on face if the surface is plane, and update the edge. Standard_EXPORT static void BuildPCurveForEdgeOnPlane (const TopoDS_Edge& theE, const TopoDS_Face& theF); //! Build pcurve of edge on face if the surface is plane, but do not update the edge. //! The output are the pcurve and the flag telling that pcurve was built. Standard_EXPORT static void BuildPCurveForEdgeOnPlane (const TopoDS_Edge& theE, const TopoDS_Face& theF, Handle(Geom2d_Curve)& aC2D, Standard_Boolean& bToUpdate); Standard_EXPORT static void BuildPCurveForEdgesOnPlane (const BOPCol_ListOfShape& theLE, const TopoDS_Face& theF); //! Make P-Curve <aC> for the edge <aE> on surface <aF> .<br> //! [aFirst, aLast] - range of the P-Curve<br> //! [aToler] - reached tolerance<br> //! Raises exception Standard_ConstructionError if algorithm fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void Make2D (const TopoDS_Edge& aE, const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC, Standard_Real& aFirst, Standard_Real& aLast, Standard_Real& aToler, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .<br> //! [aToler] - reached tolerance<br> //! Raises exception Standard_ConstructionError if projection algorithm fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void MakePCurveOnFace (const TopoDS_Face& aF, const Handle(Geom_Curve)& C3D, Handle(Geom2d_Curve)& aC, Standard_Real& aToler, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .<br> //! [aT1, aT2] - range to build<br> //! [aToler] - reached tolerance<br> //! Raises exception Standard_ConstructionError if projection algorithm fails.<br> //! <theContext> - storage for caching the geometrical tools Standard_EXPORT static void MakePCurveOnFace (const TopoDS_Face& aF, const Handle(Geom_Curve)& C3D, const Standard_Real aT1, const Standard_Real aT2, Handle(Geom2d_Curve)& aC, Standard_Real& aToler, const Handle(IntTools_Context)& theContext = Handle(IntTools_Context)()); //! Attach P-Curve from the edge <aEold> on surface <aF> //! to the edge <aEnew> //! Returns 0 in case of success Standard_EXPORT static Standard_Integer AttachExistingPCurve (const TopoDS_Edge& aEold, const TopoDS_Edge& aEnew, const TopoDS_Face& aF, const Handle(IntTools_Context)& aCtx); //! Checks if CurveOnSurface of theE on theF matches with isoline of theF surface. //! Sets corresponding values for isTheUIso and isTheVIso variables. //! ATTENTION!!! //! This method is based on comparation between direction of //! surface (which theF is based on) iso-lines and the direction //! of the edge p-curve (on theF) in middle-point of the p-curve. //! This method should be used carefully //! (e.g. BRep_Tool::IsClosed(...) together) in order to //! avoid false classification some p-curves as isoline (e.g. circle //! on a plane). Standard_EXPORT static void IsEdgeIsoline(const TopoDS_Edge& theE, const TopoDS_Face& theF, Standard_Boolean& isTheUIso, Standard_Boolean& isTheVIso); protected: private: }; #endif // _BOPTools_AlgoTools2D_HeaderFile
48.004237
201
0.603937
jiaguobing
f6f8cdfdb709907b08d63c0dd45c4b827b2db9ef
421
cpp
C++
test/yc_306.test.cpp
kmyk/rsk0315-library
344f8f8c6c8c8951637154d6cb87cfb3dbc50376
[ "MIT" ]
7
2020-03-30T11:05:43.000Z
2022-03-24T06:18:38.000Z
test/yc_306.test.cpp
kmyk/rsk0315-library
344f8f8c6c8c8951637154d6cb87cfb3dbc50376
[ "MIT" ]
null
null
null
test/yc_306.test.cpp
kmyk/rsk0315-library
344f8f8c6c8c8951637154d6cb87cfb3dbc50376
[ "MIT" ]
2
2021-07-27T05:48:29.000Z
2022-03-24T06:18:40.000Z
#define PROBLEM "https://yukicoder.me/problems/no/306" #define ERROR 1e-6 #include <cstdio> #include <cmath> #include "algorithm/ternary_search.cpp" int main() { long double xa, ya, xb, yb; scanf("%Lf %Lf %Lf %Lf", &xa, &ya, &xb, &yb); auto f = [&](auto y) { return std::hypot(xa, y-ya) + std::hypot(xb, yb-y); }; long double y = optimize_convex(f, 0.0L, 1e3L, 1e-6L, false).first; printf("%.20Lf\n", y); }
24.764706
79
0.622328
kmyk
f6f9fd6e8b6cb50837f5a6cab7929d4d8dd12d9f
1,430
cpp
C++
src/Dijkstra.cpp
dbahrdt/path_finder
1105966e5b50590acd9aca30ceb6922b0e40c259
[ "Apache-2.0" ]
1
2021-03-12T23:18:30.000Z
2021-03-12T23:18:30.000Z
src/Dijkstra.cpp
dbahrdt/path_finder
1105966e5b50590acd9aca30ceb6922b0e40c259
[ "Apache-2.0" ]
8
2020-05-27T17:25:58.000Z
2020-05-29T10:39:54.000Z
src/Dijkstra.cpp
dbahrdt/path_finder
1105966e5b50590acd9aca30ceb6922b0e40c259
[ "Apache-2.0" ]
1
2020-10-19T09:01:09.000Z
2020-10-19T09:01:09.000Z
// // Created by sokol on 02.10.19. // #include "path_finder/routing/Dijkstra.h" #include <queue> pathFinder::Dijkstra::Dijkstra(const pathFinder::Graph &graph) : graph(graph) { costs.reserve(graph.numberOfNodes); previousNode.reserve(graph.numberOfNodes); while (costs.size() < graph.numberOfNodes) { costs.emplace_back(MAX_DISTANCE); previousNode.emplace_back(std::nullopt); } } std::optional<pathFinder::Distance> pathFinder::Dijkstra::getShortestDistance(pathFinder::NodeId source, pathFinder::NodeId target) { if (source >= graph.numberOfNodes || target >= graph.numberOfNodes) return std::nullopt; // clean up distances for (auto &nodeId : visited) { costs[nodeId] = MAX_DISTANCE; } visited.clear(); visited.emplace_back(source); costs[source] = 0; std::priority_queue<CostNode> q; q.emplace(source, 0, source); while (!q.empty()) { const auto costNode = q.top(); q.pop(); if (costNode.id == target) { return costNode.cost; } for (const auto &edge : graph.edgesFor(costNode.id)) { Distance currentCost = costNode.cost + edge.distance; if (currentCost < costs[edge.target]) { costs[edge.target] = currentCost; q.emplace(edge.target, currentCost, edge.source); visited.emplace_back(edge.target); } } } return costs[target]; }
31.086957
106
0.63986
dbahrdt
f6fa458e033f6655db3f29ef40d5a8a23a622d74
1,077
cpp
C++
BuildRoads.cpp
kshivam654/Hacktoberfest-1
0d95feb3e9f09a6feeedbd30e0cc831129fb5251
[ "MIT" ]
32
2020-05-23T07:40:31.000Z
2021-02-02T18:14:30.000Z
BuildRoads.cpp
kshivam654/Hacktoberfest-1
0d95feb3e9f09a6feeedbd30e0cc831129fb5251
[ "MIT" ]
45
2020-05-22T10:30:51.000Z
2020-12-28T08:17:13.000Z
BuildRoads.cpp
kshivam654/Hacktoberfest-1
0d95feb3e9f09a6feeedbd30e0cc831129fb5251
[ "MIT" ]
31
2020-05-22T10:18:16.000Z
2020-10-23T07:52:35.000Z
#include <iostream> #include <vector> #include<list> using namespace std; #define ll long long int #define OJ \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); bool visited[100001] = {false}; list<int> adj[100001]; void dfs(int index, list<int> *adj){ visited[index] = true; for(auto a: adj[index]){ if(visited[a] == false){ dfs(a, adj); } } } int main() { OJ; FIO; int n, r; cin >> n >> r; int a, b; for(int i=0; i<r; i++){ cin >> a >> b; adj[a].push_back(b); adj[b].push_back(a); } vector<long long int> ans; for(int i=1; i<=n; i++){ if(visited[i] == false){ ans.push_back(i); dfs(i, adj); } } cout << ans.size()-1 << endl; for(int i=1; i<ans.size(); i++){ cout << ans[i] << " " << ans[i]-1 << endl; } }
19.581818
50
0.454039
kshivam654
f6fa6180edb6616b9802607a1608881feefb080f
4,871
hpp
C++
hpc/L2/include/sw/cgSolver/cgSolverGemv.hpp
vmayoral/Vitis_Libraries
2323dc5036041e18242718287aee4ce66ba071ef
[ "Apache-2.0" ]
1
2021-09-11T01:05:01.000Z
2021-09-11T01:05:01.000Z
hpc/L2/include/sw/cgSolver/cgSolverGemv.hpp
vmayoral/Vitis_Libraries
2323dc5036041e18242718287aee4ce66ba071ef
[ "Apache-2.0" ]
null
null
null
hpc/L2/include/sw/cgSolver/cgSolverGemv.hpp
vmayoral/Vitis_Libraries
2323dc5036041e18242718287aee4ce66ba071ef
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2019 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "cgSolverKernel.hpp" #include "utils.hpp" #include "binFiles.hpp" using namespace std; template <typename t_DataType, unsigned int t_InstrBytes, unsigned int t_ParEntries, unsigned int t_NumChannels, typename t_MemInstr, typename t_CGSolverInstr> class CgSolverGemv { public: CgSolverGemv(FPGA* fpga, unsigned int p_maxIter, t_DataType p_tol) { m_fpga = fpga; m_maxIter = p_maxIter; m_tol = p_tol; m_instrSize = t_InstrBytes * (1 + p_maxIter); h_instr.resize(m_instrSize); m_kernelControl.fpga(m_fpga); m_kernelControl.getCU("krnl_control"); m_kernelGemv.fpga(m_fpga); m_kernelGemv.getCU("krnl_gemv"); m_kernelUpdatePk.fpga(m_fpga); m_kernelUpdatePk.getCU("krnl_update_pk"); m_kernelUpdateRkJacobi.fpga(m_fpga); m_kernelUpdateRkJacobi.getCU("krnl_update_rk_jacobi"); m_kernelUpdateXk.fpga(m_fpga); m_kernelUpdateXk.getCU("krnl_update_xk"); } void setA(const string filePath, unsigned int p_size) { m_matrixSize = p_size * p_size; m_vecSize = p_size; h_A.resize(m_matrixSize); h_jacobi.resize(m_vecSize); readBin(filePath, h_A.size() * sizeof(t_DataType), h_A); for (unsigned int i = 0; i < m_vecSize; i++) { h_jacobi[i] = 1.0 / h_A[i * m_vecSize + i]; } } void setB(const string filePath) { h_b.resize(m_vecSize); h_pk.resize(m_vecSize); h_Apk.resize(m_vecSize); h_xk.resize(m_vecSize); h_rk.resize(m_vecSize); h_zk.resize(m_vecSize); readBin(filePath, h_b.size() * sizeof(t_DataType), h_b); t_DataType l_dot = 0, l_rz = 0; for (unsigned int i = 0; i < m_vecSize; i++) { h_xk[i] = 0; h_Apk[i] = 0; h_rk[i] = h_b[i]; h_zk[i] = h_jacobi[i] * h_rk[i]; l_dot += h_b[i] * h_b[i]; l_rz += h_rk[i] * h_zk[i]; h_pk[i] = h_zk[i]; } m_cgInstr.setMaxIter(m_maxIter); m_cgInstr.setTols(l_dot * m_tol * m_tol); m_cgInstr.setRes(l_dot); m_cgInstr.setRZ(l_rz); m_cgInstr.setVecSize(m_vecSize); m_cgInstr.store(h_instr.data(), m_memInstr); m_kernelControl.setMem(h_instr); m_kernelGemv.setMem(h_A, h_pk, h_Apk); m_kernelUpdatePk.setMem(h_pk, h_zk); m_kernelUpdateRkJacobi.setMem(h_rk, h_zk, h_jacobi, h_Apk); m_kernelUpdateXk.setMem(h_xk, h_pk); m_kernels.push_back(m_kernelControl); m_kernels.push_back(m_kernelGemv); m_kernels.push_back(m_kernelUpdatePk); m_kernels.push_back(m_kernelUpdateXk); m_kernels.push_back(m_kernelUpdateRkJacobi); } void solve(int& lastIter, uint64_t& finalClock) { lastIter = 0; finalClock = 0; Kernel::run(m_kernels); m_kernelControl.getMem(); m_kernelUpdateRkJacobi.getMem(); m_kernelUpdateXk.getMem(); for (unsigned int i = 0; i < m_maxIter; i++) { lastIter = i; m_cgInstr.load(h_instr.data() + (i + 1) * t_InstrBytes, m_memInstr); if (m_cgInstr.getMaxIter() == 0) { break; } finalClock = m_cgInstr.getClock(); } } int verify(const string filePath) { host_buffer_t<CG_dataType> h_x(m_vecSize); readBin(filePath, h_x.size() * sizeof(t_DataType), h_x); int err = 0; compare(h_x.size(), h_x.data(), h_xk.data(), err); return err; } private: FPGA* m_fpga; vector<Kernel> m_kernels; unsigned int m_maxIter, m_instrSize; t_DataType m_tol; unsigned int m_matrixSize, m_vecSize; t_MemInstr m_memInstr; t_CGSolverInstr m_cgInstr; host_buffer_t<uint8_t> h_instr; host_buffer_t<t_DataType> h_A, h_x, h_b; host_buffer_t<t_DataType> h_pk, h_Apk, h_xk, h_rk, h_zk, h_jacobi; CGKernelControl m_kernelControl; CGKernelGemv<t_DataType, t_ParEntries, t_NumChannels> m_kernelGemv; CGKernelUpdatePk<t_DataType> m_kernelUpdatePk; CGKernelUpdateRkJacobi<t_DataType> m_kernelUpdateRkJacobi; CGKernelUpdateXk<t_DataType> m_kernelUpdateXk; };
33.136054
80
0.634572
vmayoral
f6fb385275941f0cec0ab2f473210344b6ac8ec2
2,590
hpp
C++
thirdparty/ngraph/src/nnfusion/core/graph/output.hpp
xiezhq-hermann/nnfusion
1b2c23b0732bee295e37b990811719e0c4c6e993
[ "MIT" ]
1
2021-05-14T08:10:30.000Z
2021-05-14T08:10:30.000Z
thirdparty/ngraph/src/nnfusion/core/graph/output.hpp
xiezhq-hermann/nnfusion
1b2c23b0732bee295e37b990811719e0c4c6e993
[ "MIT" ]
null
null
null
thirdparty/ngraph/src/nnfusion/core/graph/output.hpp
xiezhq-hermann/nnfusion
1b2c23b0732bee295e37b990811719e0c4c6e993
[ "MIT" ]
1
2021-02-13T08:10:55.000Z
2021-02-13T08:10:55.000Z
//***************************************************************************** // Copyright 2017-2020 Intel Corporation // // 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. //***************************************************************************** // Microsoft (c) 2019, NNFusion Team #pragma once #include <memory> #include "nnfusion/common/descriptor/tensor.hpp" namespace nnfusion { namespace graph { class Output { public: /// \param tensor The view of this tensor; where the value will be written Output(const std::shared_ptr<nnfusion::descriptor::Tensor>& tensor) : m_tensor(tensor) { } nnfusion::descriptor::Tensor& get_tensor() const { return *m_tensor; } std::shared_ptr<nnfusion::descriptor::Tensor> get_tensor_ptr() const { return m_tensor; } void set_tensor_ptr(const std::shared_ptr<nnfusion::descriptor::Tensor>& tensor) { m_tensor = tensor; } /// \return the element type of the output const nnfusion::element::Type& get_element_type() const { return m_tensor->get_element_type(); } /// \return the shape of the output const nnfusion::Shape& get_shape() const { return m_tensor->get_shape(); } const nnfusion::PartialShape& get_partial_shape() const { return m_tensor->get_partial_shape(); } void set_type_and_shape(const nnfusion::element::Type& element_type, const nnfusion::PartialShape& pshape) { m_tensor->set_tensor_type(element_type, pshape); } protected: std::shared_ptr<nnfusion::descriptor::Tensor> m_tensor; private: Output(const Output&) = delete; Output(Output&&) = delete; Output& operator=(const Output&) = delete; }; } }
33.636364
92
0.555985
xiezhq-hermann
f6fbb5a694c7825f019c6284531e19564cda1f97
7,031
cc
C++
common/point_of_sail.cc
denidoank/avalonsailing
8bc6d511e243ebd4fd90e7fb678ac7560226b5ca
[ "Apache-2.0" ]
null
null
null
common/point_of_sail.cc
denidoank/avalonsailing
8bc6d511e243ebd4fd90e7fb678ac7560226b5ca
[ "Apache-2.0" ]
null
null
null
common/point_of_sail.cc
denidoank/avalonsailing
8bc6d511e243ebd4fd90e7fb678ac7560226b5ca
[ "Apache-2.0" ]
null
null
null
// Copyright 2012 The Avalon Project Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0 // that can be found in the LICENSE file. // Author: grundmann@google.com (Steffen Grundmann) #include "common/point_of_sail.h" #include <algorithm> #include <math.h> #include <stdio.h> #include "common/angle.h" #include "common/check.h" #include "common/convert.h" #include "common/delta_angle.h" #include "common/normalize.h" #include "common/polar_diagram.h" #include "common/sign.h" extern int debug; PointOfSail::PointOfSail() { Reset(); } // We make the decision about the point of sail on the slowly // filtered true wind only. If the wind turns quickly, then we // react on that with the AntiWindGust method. // Everything in radians here. // If alpha_star and alpha_true are rate limited then the sector // output doesn't jump. Angle PointOfSail::SailableHeading( Angle alpha_star, // rate limited alpha star Angle alpha_true, // true wind vector, slowly filtered Angle previous_output, // previous output direction, needed to implement hysteresis SectorT* sector, // sector codes for state handling and maneuver Angle* target) { Angle limit1 = alpha_true.opposite() - TackZone(); Angle limit2 = alpha_true.opposite() + TackZone(); Angle limit3 = alpha_true - JibeZoneHalfWidth(); Angle limit4 = alpha_true + JibeZoneHalfWidth(); if (debug) { fprintf(stderr, "limits true : % 5.2lf % 5.2lf % 5.2lf % 5.2lf degrees\n", limit1.deg(), limit2.deg(), limit3.deg(), limit4.deg()); } // This keeps a small part of the previous output, later used in the hysteresis // calculation. The hysteresis is good for minimizing the number of maneuvers. Angle hysteresis_tack = (alpha_star - previous_output) * 0.1; // about 5 degrees Angle hysteresis_jibe = (alpha_star - previous_output) * 0.3; bool left = false; /* Sector defintion 1, 2: left and right in the tack zone 3 : Reaching with sail on starboard 4, 5: right and left in the jibe zone 6 : Reaching with sail on portside */ *target = 0; Angle alpha_star_limited = alpha_star; if (limit1 <= alpha_star && alpha_star < limit2) { // Modify if in the non-sailable tack range. alpha_star_limited = (alpha_star - hysteresis_tack).nearest(limit1, limit2, &left); *sector = left ? TackPort : TackStar; *target = left ? limit1 : limit2; } else if (limit2 <= alpha_star && alpha_star < limit3) { *sector = ReachStar; } else if ((limit3 <= alpha_star) && (alpha_star < limit4)) { // Modify if in the non-sailable jibe range. alpha_star_limited = (alpha_star - hysteresis_jibe).nearest(limit3, limit4, &left); *sector = left ? JibeStar : JibePort; *target = left ? limit3 : limit4; } else if ((limit4 <= alpha_star) && (alpha_star < limit1)) { *sector = ReachPort; } else { fprintf(stderr, "Illegal sector range: limits: %lf %lf %lf %lf alpha*: %lf degrees\n", limit1.deg(), limit2.deg(), limit3.deg(), limit4.deg(), alpha_star.deg()); limit1.print("limit1"); limit2.print("limit2"); limit3.print("limit3"); limit4.print("limit4"); alpha_star.print("alpha_star"); CHECK(0); } if (debug) { fprintf(stderr, "limits: % 5.2lf % 5.2lf % 5.2lf % 5.2lf alpha*: %lf degrees, sector %d %c\n", limit1.deg(), limit2.deg(), limit3.deg(), limit4.deg(), alpha_star.deg(), int(*sector), left?'L':'R'); } return alpha_star_limited; } // We use the apparent wind (which is not as inert as the // true wind) and react to wind gusts at the very start // of the normal controller logic. // If the sector is stable, we can calculate a bearing correction in response to fast wind // turns. Angle PointOfSail::AntiWindGust(SectorT sector, // sector codes Angle alpha_app, double mag_app_m_s) { // If the apparent wind has direct influence on the desired heading then // an instable system is created. We observed such oscillations during our // lake tests: their exact mechanism is not clear. We apply an asymmetric // change rate limitation, i.e. if we notice that we went too much into the wind then // we fall off quickly and return very slowly only. Just like a real helmsman. const Angle decay = deg(0.2 * 0.1); // 0.2 degree per second (very slow) Angle correction; if (mag_app_m_s > 0.5) { // For the apparent wind the tack zone is smaller and the jibe zone is bigger. // For the Jibe zone we do not take this into account because it will not // have much of a negative effect, but would reduce the sailable angles // a lot. const Angle kAppOffset = deg(12); // TODO: 10 degrees seems to be better. // Bigger than 0, if we are too close and have to fall off left. Angle delta1 = rad(TackZoneRad()).opposite() - kAppOffset - alpha_app; // Bigger than 0, if we shall fall off right. Angle delta2 = -rad(TackZoneRad()).opposite() + kAppOffset - alpha_app; // What do these deltas mean? It means that the normal control has failed or // that the wind turned quickly. // If delta1 is positive then the current phi_z (precisely the phi_z averaged during the // measuring period of the most recent available apparent wind) should be changed by // (-delta1). By doing that the boat would turn in such a way that it steers at the limit of the // tack zone. // If delta1 is negative it can be ignored. switch (sector) { case TackPort: case ReachPort: buffer2_ = 0; correction = -PositiveFilterOffset(delta1, decay, &buffer1_); if (debug && correction.negative()) { fprintf(stderr, "corr1 FALL OFF LEFT: % 5.2lf \n", correction.deg()); } break; case TackStar: case ReachStar: buffer1_ = 0; correction = PositiveFilterOffset(-delta2, decay, &buffer2_); if (debug && correction > 0) { fprintf(stderr, "corr2 FALL OFF RIGHT: % 5.2lf \n", correction.deg()); } break; case JibeStar: case JibePort: correction = 0; buffer1_ = 0; buffer2_ = 0; break; } } return correction; } void PointOfSail::Reset() { buffer1_ = 0; buffer2_ = 0; } Angle FilterOffset(Angle in, Angle decay, Angle* prev) { if (in.sign() != 0 && in.sign() != prev->sign()) { *prev = in; return in; } if (in.positive() || prev->positive()) { if (prev->positive()) *prev -= decay; if (in > *prev) *prev = in; } if (in.negative() || prev->negative()) { if (prev->negative()) *prev += decay; if (in < *prev) *prev = in; } return *prev; } Angle PositiveFilterOffset(Angle in, Angle decay, Angle* prev) { if (in.positive()) { // clip the correction at 45 degrees. return FilterOffset(std::min(in, deg(45)), decay, prev); } else { return FilterOffset(deg(0), decay, prev); } }
36.619792
114
0.65197
denidoank
f6fd4a2306a313f4b215afa463ff783f890b2fdc
1,537
hpp
C++
external/mapnik/include/mapnik/make_unique.hpp
baiyicanggou/mapnik_mvt
9bde52fa9958d81361c015c816858534ec0931bb
[ "Apache-2.0" ]
null
null
null
external/mapnik/include/mapnik/make_unique.hpp
baiyicanggou/mapnik_mvt
9bde52fa9958d81361c015c816858534ec0931bb
[ "Apache-2.0" ]
null
null
null
external/mapnik/include/mapnik/make_unique.hpp
baiyicanggou/mapnik_mvt
9bde52fa9958d81361c015c816858534ec0931bb
[ "Apache-2.0" ]
null
null
null
/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2015 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *****************************************************************************/ #ifndef MAPNIK_MAKE_UNIQUE_HPP #define MAPNIK_MAKE_UNIQUE_HPP #include <memory> // http://stackoverflow.com/questions/14131454/visual-studio-2012-cplusplus-and-c-11 #if defined(_MSC_VER) && _MSC_VER < 1800 || !defined(_MSC_VER) && __cplusplus <= 201103L namespace std { // C++14 backfill from http://herbsutter.com/gotw/_102/ template<typename T, typename ...Args> inline std::unique_ptr<T> make_unique(Args&& ...args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); } } #endif #endif // MAPNIK_MAKE_UNIQUE_HPP
35.744186
88
0.660377
baiyicanggou
f6ff12043e111230dcc023849f5f4b7363df3263
14,646
cpp
C++
rEFIt_UEFI/entry_scan/common.cpp
acidburn0zzz/CloverBootloader
0e91bcc0cd396f0f049d539a5d3ef516e574f1dd
[ "BSD-2-Clause" ]
1
2022-03-18T16:46:31.000Z
2022-03-18T16:46:31.000Z
rEFIt_UEFI/entry_scan/common.cpp
OlarilaHackintosh/CloverBootloader
103e3baaa353c32e05a0ac5f5acc1745667ef348
[ "BSD-2-Clause" ]
null
null
null
rEFIt_UEFI/entry_scan/common.cpp
OlarilaHackintosh/CloverBootloader
103e3baaa353c32e05a0ac5f5acc1745667ef348
[ "BSD-2-Clause" ]
null
null
null
/* * refit/scan/common.c * * Copyright (c) 2006-2010 Christoph Pfisterer * 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 Christoph Pfisterer nor the names of the * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <Platform.h> // Only use angled for Platform, else, xcode project won't compile #include "entry_scan.h" #include "../refit/menu.h" #include "../Platform/guid.h" #include "../Platform/APFS.h" #include "../Platform/cpu.h" #include "../gui/REFIT_MENU_SCREEN.h" #include "../include/OSTypes.h" #include "../libeg/XTheme.h" #ifndef DEBUG_ALL #define DEBUG_COMMON_MENU 1 #else #define DEBUG_COMMON_MENU DEBUG_ALL #endif #if DEBUG_COMMON_MENU == 0 #define DBG(...) #else #define DBG(...) DebugLog(DEBUG_COMMON_MENU, __VA_ARGS__) #endif extern CONST CHAR8* IconsNames[]; const XIcon& ScanVolumeDefaultIcon(REFIT_VOLUME *Volume, IN UINT8 OSType, const EFI_DEVICE_PATH_PROTOCOL *DevicePath) { UINTN IconNum = 0; const XIcon* IconX; // default volume icon based on disk kind switch (Volume->DiskKind) { case DISK_KIND_INTERNAL: switch (OSType) { case OSTYPE_OSX: case OSTYPE_OSX_INSTALLER: while (!IsDevicePathEndType(DevicePath) && !(DevicePathType(DevicePath) == MEDIA_DEVICE_PATH && DevicePathSubType (DevicePath) == MEDIA_VENDOR_DP)) { DevicePath = NextDevicePathNode(DevicePath); } if (DevicePathType(DevicePath) == MEDIA_DEVICE_PATH && DevicePathSubType (DevicePath) == MEDIA_VENDOR_DP) { if ( ApfsSignatureUUID == *(EFI_GUID *)((UINT8 *)DevicePath+0x04) ) { IconNum = BUILTIN_ICON_VOL_INTERNAL_APFS; } } else { IconNum = BUILTIN_ICON_VOL_INTERNAL_HFS; } break; case OSTYPE_RECOVERY: IconNum = BUILTIN_ICON_VOL_INTERNAL_REC; break; case OSTYPE_LIN: case OSTYPE_LINEFI: IconNum = BUILTIN_ICON_VOL_INTERNAL_EXT3; break; case OSTYPE_WIN: case OSTYPE_WINEFI: IconNum = BUILTIN_ICON_VOL_INTERNAL_NTFS; break; default: IconNum = BUILTIN_ICON_VOL_INTERNAL; break; } break; case DISK_KIND_EXTERNAL: IconNum = BUILTIN_ICON_VOL_EXTERNAL; break; case DISK_KIND_OPTICAL: IconNum = BUILTIN_ICON_VOL_OPTICAL; break; case DISK_KIND_FIREWIRE: IconNum = BUILTIN_ICON_VOL_FIREWIRE; break; case DISK_KIND_BOOTER: IconNum = BUILTIN_ICON_VOL_BOOTER; break; default: IconNum = BUILTIN_ICON_VOL_INTERNAL; break; } // DBG("asked IconNum = %llu Volume->DiskKind=%d OSType=%d\n", IconNum, Volume->DiskKind, OSType); IconX = &ThemeX.GetIcon(IconNum); //asked IconNum = BUILTIN_ICON_VOL_INTERNAL_HFS, got day icon if (IconX->Image.isEmpty()) { DBG("asked Icon %s not found, took internal\n", IconsNames[IconNum]); IconX = &ThemeX.GetIcon(BUILTIN_ICON_VOL_INTERNAL); //including embedded which is really present } return *IconX; } #define TO_LOWER(ch) (((ch >= L'A') && (ch <= L'Z')) ? ((ch - L'A') + L'a') : ch) INTN StrniCmp(IN CONST CHAR16 *Str1, IN CONST CHAR16 *Str2, IN UINTN Count) { CHAR16 Ch1, Ch2; if (Count == 0) { return 0; } if (Str1 == NULL) { if (Str2 == NULL) { return 0; } else { return -1; } } else if (Str2 == NULL) { return 1; } do { Ch1 = TO_LOWER(*Str1); Ch2 = TO_LOWER(*Str2); Str1++; Str2++; if (Ch1 != Ch2) { return (Ch1 - Ch2); } if (Ch1 == 0) { return 0; } } while (--Count > 0); return 0; } CONST CHAR16 *StriStr(IN CONST CHAR16 *Str, IN CONST CHAR16 *SearchFor) { CONST CHAR16 *End; UINTN Length; UINTN SearchLength; if ((Str == NULL) || (SearchFor == NULL)) { return NULL; } Length = StrLen(Str); if (Length == 0) { return NULL; } SearchLength = StrLen(SearchFor); if (SearchLength > Length) { return NULL; } End = Str + (Length - SearchLength) + 1; while (Str < End) { if (StrniCmp(Str, SearchFor, SearchLength) == 0) { return Str; } ++Str; } return NULL; } void StrToLower(IN CHAR16 *Str) { while (*Str) { *Str = TO_LOWER(*Str); ++Str; } } // TODO remove that and AlertMessage with a printf-like format STATIC void CreateInfoLines(IN CONST XStringW& Message, OUT XStringWArray* Information) { if (Message.isEmpty()) { return; } Information->setEmpty(); //TODO will fill later } #if 0 //not needed? STATIC void CreateInfoLines(IN CONST CHAR16 *Message, OUT XStringWArray* Information) { CONST CHAR16 *Ptr; // CHAR16 **Information; UINTN Index = 0, Total = 0; UINTN Length = ((Message == NULL) ? 0 : StrLen(Message)); // Check parameters if (Length == 0) { return; } // Count how many new lines Ptr = Message - 1; while (Ptr != NULL) { ++Total; Ptr = StrStr(++Ptr, L"\n"); } // // Create information // Information = (CHAR16 **)AllocatePool((Total * sizeof(CHAR16 *)) + ((Length + 1) * sizeof(CHAR16))); // if (Information == NULL) { // return NULL; // } Information->Empty(); // Copy strings CHAR16* Ptr2 = NULL; // VS2017 complains about uninitialized var. // CHAR16* Ptr2 = Information[Index++] = (CHAR16 *)(Information + Total); // StrCpyS(Ptr2, Length + 1, Message); while ((Index < Total) && ((Ptr2 = (CHAR16*)StrStr(Ptr2, L"\n")) != NULL)) { // cast is ok because FilePath is not const, and we know that StrStr returns a pointer in FilePath. Will disappear when using a string object instead of CHAR16* *Ptr2++ = 0; XStringW* s = new XStringW; s->takeValueFrom(Ptr2); Information->AddReference(s, true); // Information[Index++] = Ptr2; } // // Return the info lines // if (Count != NULL) { // *Count = Total; // } // return Information; } #endif extern REFIT_MENU_ITEM_RETURN MenuEntryReturn; // it is not good to use Options menu style for messages and one line dialogs // it can be a semitransparent rectangular at the screen centre as it was in Clover v1.0 STATIC REFIT_MENU_SCREEN AlertMessageMenu(0, XStringW(), XStringW(), &MenuEntryReturn, NULL); void AlertMessage(const XStringW& Title, const XStringW& Message) { CreateInfoLines(Message, &AlertMessageMenu.InfoLines); AlertMessageMenu.Title = Title; AlertMessageMenu.RunMenu(NULL); AlertMessageMenu.InfoLines.setEmpty(); } #define TAG_YES 1 #define TAG_NO 2 //REFIT_SIMPLE_MENU_ENTRY_TAG(CONST CHAR16 *Title_, UINTN Tag_, ACTION AtClick_) STATIC REFIT_SIMPLE_MENU_ENTRY_TAG YesMessageEntry(XStringW().takeValueFrom(L"Yes"), TAG_YES, ActionEnter); STATIC REFIT_SIMPLE_MENU_ENTRY_TAG NoMessageEntry(XStringW().takeValueFrom(L"No"), TAG_NO, ActionEnter); //REFIT_MENU_SCREEN(UINTN ID, CONST CHAR16* Title, CONST CHAR16* TimeoutText, REFIT_ABSTRACT_MENU_ENTRY* entry1, REFIT_ABSTRACT_MENU_ENTRY* entry2) STATIC REFIT_MENU_SCREEN YesNoMessageMenu(0, XStringW(), XStringW(), &YesMessageEntry, &NoMessageEntry); // Display a yes/no prompt XBool YesNoMessage(IN XStringW& Title, IN CONST XStringW& Message) { XBool Result = false; UINTN MenuExit; CreateInfoLines(Message, &YesNoMessageMenu.InfoLines); YesNoMessageMenu.Title = Title; do { REFIT_ABSTRACT_MENU_ENTRY *ChosenEntry = NULL; MenuExit = YesNoMessageMenu.RunMenu(&ChosenEntry); if ( ChosenEntry != NULL && ChosenEntry->getREFIT_SIMPLE_MENU_ENTRY_TAG() && ChosenEntry->getREFIT_SIMPLE_MENU_ENTRY_TAG()->Tag == TAG_YES && ((MenuExit == MENU_EXIT_ENTER) || (MenuExit == MENU_EXIT_DETAILS))) { Result = true; MenuExit = MENU_EXIT_ENTER; } } while (MenuExit != MENU_EXIT_ENTER); YesNoMessageMenu.InfoLines.setEmpty(); return Result; } // Ask user for file path from directory menu XBool AskUserForFilePathFromDir(const CHAR16 *Title OPTIONAL, IN REFIT_VOLUME *Volume, const CHAR16 *ParentPath OPTIONAL, const EFI_FILE *Dir, OUT EFI_DEVICE_PATH_PROTOCOL **Result) { //REFIT_MENU_SCREEN Menu = { 0, L"Please Select File...", NULL, 0, NULL, 0, NULL, // 0, NULL, false, false, 0, 0, 0, 0, { 0, 0, 0, 0 }, NULL}; // Check parameters if ((Volume == NULL) || (Dir == NULL) || (Result == NULL)) { return false; } // TODO: Generate directory menu return false; } #define TAG_OFFSET 1000 //STATIC REFIT_MENU_SCREEN InitialMenu = {0, L"Please Select File...", NULL, 0, NULL, // 0, NULL, NULL, false, false, 0, 0, 0, 0, // { 0, 0, 0, 0 }, NULL}; //STATIC REFIT_MENU_SCREEN InitialMenu(0, L"Please Select File..."_XSW, XStringW()); // Ask user for file path from volumes menu XBool AskUserForFilePathFromVolumes(const CHAR16 *Title OPTIONAL, OUT EFI_DEVICE_PATH_PROTOCOL **Result) { REFIT_MENU_SCREEN Menu(0, L"Please Select File..."_XSW, XStringW()); UINTN Index = 0, /*Count = 0,*/ MenuExit; XBool Responded = false; if (Result == NULL) { return false; } // Create volume entries for (Index = 0; Index < Volumes.size(); ++Index) { REFIT_VOLUME *Volume = &Volumes[Index]; if ((Volume == NULL) || (Volume->RootDir == NULL) || ((Volume->DevicePathString.isEmpty()) && (Volume->VolName.isEmpty()))) { continue; } REFIT_SIMPLE_MENU_ENTRY_TAG *Entry = new REFIT_SIMPLE_MENU_ENTRY_TAG(SWPrintf("%ls", (Volume->VolName.isEmpty()) ? Volume->DevicePathString.wc_str() : Volume->VolName.wc_str()), TAG_OFFSET + Index, MENU_EXIT_ENTER); Menu.Entries.AddReference(Entry, true); } // Setup menu Menu.Entries.AddReference(&MenuEntryReturn, false); Menu.Title.takeValueFrom(Title); do { REFIT_ABSTRACT_MENU_ENTRY *ChosenEntry = NULL; // Run the volume chooser menu MenuExit = Menu.RunMenu(&ChosenEntry); if ((ChosenEntry != NULL) && ChosenEntry->getREFIT_SIMPLE_MENU_ENTRY_TAG() && ((MenuExit == MENU_EXIT_ENTER) || (MenuExit == MENU_EXIT_DETAILS))) { if (ChosenEntry->getREFIT_SIMPLE_MENU_ENTRY_TAG()->Tag >= TAG_OFFSET) { Index = (ChosenEntry->getREFIT_SIMPLE_MENU_ENTRY_TAG()->Tag - TAG_OFFSET); if (Index < Volumes.size()) { // Run directory chooser menu if (!AskUserForFilePathFromDir(Title, &Volumes[Index], NULL, Volumes[Index].RootDir, Result)) { continue; } Responded = true; } } break; } } while (MenuExit != MENU_EXIT_ESCAPE); // FreePool(Entries); return Responded; } // Ask user for file path XBool AskUserForFilePath(IN CHAR16 *Title OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *Root OPTIONAL, OUT EFI_DEVICE_PATH_PROTOCOL **Result) { EFI_FILE *Dir = NULL; if (Result == NULL) { return false; } if (Root != NULL) { // Get the file path XStringW DevicePathStr = FileDevicePathToXStringW(Root); if (DevicePathStr.notEmpty()) { UINTN Index = 0; // Check the volumes for a match for (Index = 0; Index < Volumes.size(); ++Index) { REFIT_VOLUME *Volume = &Volumes[Index]; if ((Volume == NULL) || (Volume->RootDir == NULL) || (Volume->DevicePathString.isEmpty())) { continue; } if (Volume->DevicePathString.length() == 0) { continue; } // If the path begins with this volumes path it matches if (StrniCmp(DevicePathStr.wc_str(), Volume->DevicePathString.wc_str(), Volume->DevicePathString.length())) { // Need to const CHAR16 *FilePath = DevicePathStr.data(Volume->DevicePathString.length()); UINTN FileLength = StrLen(FilePath); if (FileLength == 0) { // If there is no path left then open the root return AskUserForFilePathFromDir(Title, Volume, NULL, Volume->RootDir, Result); } else { // Check to make sure this is directory if (!EFI_ERROR(Volume->RootDir->Open(Volume->RootDir, &Dir, FilePath, EFI_FILE_MODE_READ, 0)) && (Dir != NULL)) { // Get file information EFI_FILE_INFO *Info = EfiLibFileInfo(Dir); if (Info != NULL) { // Check if the file is a directory if ((Info->Attribute & EFI_FILE_DIRECTORY) == 0) { // Return the passed device path if it is a file FreePool(Info); Dir->Close(Dir); *Result = Root; return true; } else { // Ask user other wise XBool Success = AskUserForFilePathFromDir(Title, Volume, FilePath, Dir, Result); FreePool(Info); Dir->Close(Dir); return Success; } //FreePool(Info); } Dir->Close(Dir); } } } } } } return AskUserForFilePathFromVolumes(Title, Result); } // input - tsc // output - milliseconds // the caller is responsible for t1 > t0 UINT64 TimeDiff(UINT64 t0, UINT64 t1) { return DivU64x64Remainder((t1 - t0), DivU64x32(gCPUStructure.TSCFrequency, 1000), 0); }
34.13986
220
0.64154
acidburn0zzz
f6ff7fde0a308e5535d379ce468b03c1a5fa9a35
1,625
hpp
C++
include/private/coherence/component/net/extend/protocol/AcceptChannelResponse.hpp
chpatel3/coherence-cpp-extend-client
4ea5267eae32064dff1e73339aa3fbc9347ef0f6
[ "UPL-1.0", "Apache-2.0" ]
6
2020-07-01T21:38:30.000Z
2021-11-03T01:35:11.000Z
include/private/coherence/component/net/extend/protocol/AcceptChannelResponse.hpp
chpatel3/coherence-cpp-extend-client
4ea5267eae32064dff1e73339aa3fbc9347ef0f6
[ "UPL-1.0", "Apache-2.0" ]
1
2020-07-24T17:29:22.000Z
2020-07-24T18:29:04.000Z
include/private/coherence/component/net/extend/protocol/AcceptChannelResponse.hpp
chpatel3/coherence-cpp-extend-client
4ea5267eae32064dff1e73339aa3fbc9347ef0f6
[ "UPL-1.0", "Apache-2.0" ]
6
2020-07-10T18:40:58.000Z
2022-02-18T01:23:40.000Z
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ #ifndef COH_ACCEPT_CHANNEL_RESPONSE_HPP #define COH_ACCEPT_CHANNEL_RESPONSE_HPP #include "private/coherence/component/net/extend/AbstractPofResponse.hpp" COH_OPEN_NAMESPACE5(coherence,component,net,extend,protocol) using coherence::component::net::extend::AbstractPofResponse; /** * This Request is used to accept a Channel that was spawned by a peer. * * @authore nsa 2008.03.17 */ class COH_EXPORT AcceptChannelResponse : public class_spec<AcceptChannelResponse, extends<AbstractPofResponse> > { friend class factory<AcceptChannelResponse>; // ----- constructors --------------------------------------------------- protected: /** * Create a new NamedCacheProtocol instance. */ AcceptChannelResponse(); private: /** * Blocked copy constructor. */ AcceptChannelResponse(const AcceptChannelResponse&); // ----- Message interface ---------------------------------------------- public: /** * {@inheritDoc} */ virtual int32_t getTypeId() const; /** * {@inheritDoc} */ virtual void run(); // ----- constants ------------------------------------------------------ public: /** * The type identifier of this Message class. */ static const int32_t type_id = 14; }; COH_CLOSE_NAMESPACE5 #endif // COH_ACCEPT_CHANNEL_RESPONSE_HPP
23.550725
77
0.582154
chpatel3
1000a752a3d78a5e8e0d8768c934aef709d301b2
7,329
cc
C++
zircon/kernel/object/buffer_chain_tests.cc
EnderNightLord-ChromeBook/zircon-rpi
b09b1eb3aa7a127c65568229fe10edd251869283
[ "BSD-2-Clause" ]
1
2020-12-29T17:07:06.000Z
2020-12-29T17:07:06.000Z
zircon/kernel/object/buffer_chain_tests.cc
DamieFC/fuchsia
f78a4a1326f4a4bb5834500918756173c01bab4f
[ "BSD-2-Clause" ]
null
null
null
zircon/kernel/object/buffer_chain_tests.cc
DamieFC/fuchsia
f78a4a1326f4a4bb5834500918756173c01bab4f
[ "BSD-2-Clause" ]
null
null
null
// Copyright 2018 The Fuchsia Authors // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT #include <lib/unittest/unittest.h> #include <lib/unittest/user_memory.h> #include <lib/user_copy/user_ptr.h> #include <stdio.h> #include <fbl/auto_call.h> #include "object/buffer_chain.h" namespace { using testing::UserMemory; static bool alloc_free_basic() { BEGIN_TEST; // An empty chain requires one buffer BufferChain* bc = BufferChain::Alloc(0); ASSERT_NE(bc, nullptr); ASSERT_FALSE(bc->buffers()->is_empty()); ASSERT_EQ(bc->buffers()->size_slow(), 1u); BufferChain::Free(bc); // One Buffer is enough to hold one byte. bc = BufferChain::Alloc(1); ASSERT_FALSE(bc->buffers()->is_empty()); ASSERT_EQ(bc->buffers()->size_slow(), 1u); ASSERT_NE(bc, nullptr); BufferChain::Free(bc); // One Buffer is still enough. bc = BufferChain::Alloc(BufferChain::kContig); ASSERT_FALSE(bc->buffers()->is_empty()); ASSERT_EQ(bc->buffers()->size_slow(), 1u); ASSERT_NE(bc, nullptr); BufferChain::Free(bc); // Two pages allocated, only one used for the buffer. bc = BufferChain::Alloc(BufferChain::kContig + 1); ASSERT_FALSE(bc->buffers()->is_empty()); ASSERT_EQ(bc->buffers()->size_slow(), 1u); ASSERT_NE(bc, nullptr); BufferChain::Free(bc); // Several pages allocated, only one used for the buffer. bc = BufferChain::Alloc(10000 * BufferChain::kRawDataSize); ASSERT_FALSE(bc->buffers()->is_empty()); ASSERT_EQ(bc->buffers()->size_slow(), 1u); ASSERT_NE(bc, nullptr); BufferChain::Free(bc); END_TEST; } static bool append_copy_out() { BEGIN_TEST; constexpr size_t kOffset = 24; constexpr size_t kFirstCopy = BufferChain::kContig + 8; constexpr size_t kSecondCopy = BufferChain::kRawDataSize + 16; constexpr size_t kSize = kOffset + kFirstCopy + kSecondCopy; fbl::AllocChecker ac; auto buf = ktl::unique_ptr<char[]>(new (&ac) char[kSize]); ASSERT_TRUE(ac.check()); ktl::unique_ptr<UserMemory> mem = UserMemory::Create(kSize); auto mem_in = mem->user_in<char>(); auto mem_out = mem->user_out<char>(); BufferChain* bc = BufferChain::Alloc(kSize); ASSERT_NE(nullptr, bc); auto free_bc = fbl::MakeAutoCall([&bc]() { BufferChain::Free(bc); }); ASSERT_EQ(1u, bc->buffers()->size_slow()); bc->Skip(kOffset); // Fill the chain with 'A'. memset(buf.get(), 'A', kFirstCopy); ASSERT_EQ(ZX_OK, mem_out.copy_array_to_user(buf.get(), kFirstCopy)); ASSERT_EQ(ZX_OK, bc->Append(mem_in, kFirstCopy)); // Verify it. auto iter = bc->buffers()->begin(); for (size_t i = kOffset; i < BufferChain::kContig; ++i) { ASSERT_EQ('A', iter->data()[i]); } ++iter; for (size_t i = 0; i < kOffset + kFirstCopy - BufferChain::kContig; ++i) { ASSERT_EQ('A', iter->data()[i]); } // Write a chunk of 'B' straddling all three buffers. memset(buf.get(), 'B', kSecondCopy); ASSERT_EQ(ZX_OK, mem_out.copy_array_to_user(buf.get(), kSecondCopy)); ASSERT_EQ(ZX_OK, bc->Append(mem_in, kSecondCopy)); // Verify it. iter = bc->buffers()->begin(); for (size_t i = kOffset; i < BufferChain::kContig; ++i) { ASSERT_EQ('A', iter->data()[i]); } ++iter; for (size_t i = 0; i < kOffset + kFirstCopy - BufferChain::kContig; ++i) { ASSERT_EQ('A', iter->data()[i]); } for (size_t i = kOffset + kFirstCopy - BufferChain::kContig; i < BufferChain::kRawDataSize; ++i) { ASSERT_EQ('B', iter->data()[i]); } ++iter; for (size_t i = 0; i < kOffset + kFirstCopy + kSecondCopy - BufferChain::kContig - BufferChain::kRawDataSize; ++i) { if (iter->data()[i] != 'B') { ASSERT_EQ(int(i), -1); } ASSERT_EQ('B', iter->data()[i]); } ASSERT_TRUE(++iter == bc->buffers()->end()); // Copy it all out. memset(buf.get(), 0, kSize); ASSERT_EQ(ZX_OK, mem_out.copy_array_to_user(buf.get(), kSize)); ASSERT_EQ(ZX_OK, bc->CopyOut(mem_out, 0, kSize)); // Verify it. memset(buf.get(), 0, kSize); ASSERT_EQ(ZX_OK, mem_in.copy_array_from_user(buf.get(), kSize)); size_t index = kOffset; for (size_t i = 0; i < kFirstCopy; ++i) { ASSERT_EQ('A', buf[index++]); } for (size_t i = 0; i < kSecondCopy; ++i) { ASSERT_EQ('B', buf[index++]); } END_TEST; } static bool free_unused_pages() { BEGIN_TEST; constexpr size_t kSize = 8 * PAGE_SIZE; constexpr size_t kWriteSize = BufferChain::kContig + 1; fbl::AllocChecker ac; auto buf = ktl::unique_ptr<char[]>(new (&ac) char[kWriteSize]); ASSERT_TRUE(ac.check()); ktl::unique_ptr<UserMemory> mem = UserMemory::Create(kWriteSize); auto mem_in = mem->user_in<char>(); auto mem_out = mem->user_out<char>(); BufferChain* bc = BufferChain::Alloc(kSize); ASSERT_NE(nullptr, bc); auto free_bc = fbl::MakeAutoCall([&bc]() { BufferChain::Free(bc); }); ASSERT_EQ(1u, bc->buffers()->size_slow()); memset(buf.get(), 0, kWriteSize); ASSERT_EQ(ZX_OK, mem_out.copy_array_to_user(buf.get(), kWriteSize)); ASSERT_EQ(ZX_OK, bc->Append(mem_in, kWriteSize)); ASSERT_EQ(2u, bc->buffers()->size_slow()); bc->FreeUnusedBuffers(); ASSERT_EQ(2u, bc->buffers()->size_slow()); END_TEST; } static bool append_more_than_allocated() { BEGIN_TEST; constexpr size_t kAllocSize = 2 * PAGE_SIZE; constexpr size_t kWriteSize = 2 * kAllocSize; fbl::AllocChecker ac; auto buf = ktl::unique_ptr<char[]>(new (&ac) char[kWriteSize]); ASSERT_TRUE(ac.check()); ktl::unique_ptr<UserMemory> mem = UserMemory::Create(kWriteSize); auto mem_in = mem->user_in<char>(); auto mem_out = mem->user_out<char>(); BufferChain* bc = BufferChain::Alloc(kAllocSize); ASSERT_NE(nullptr, bc); auto free_bc = fbl::MakeAutoCall([&bc]() { BufferChain::Free(bc); }); ASSERT_EQ(1u, bc->buffers()->size_slow()); memset(buf.get(), 0, kWriteSize); ASSERT_EQ(ZX_OK, mem_out.copy_array_to_user(buf.get(), kWriteSize)); ASSERT_EQ(ZX_ERR_OUT_OF_RANGE, bc->Append(mem_in, kWriteSize)); END_TEST; } static bool append_after_fail_fails() { BEGIN_TEST; constexpr size_t kAllocSize = 2 * PAGE_SIZE; constexpr size_t kWriteSize = PAGE_SIZE; fbl::AllocChecker ac; auto buf = ktl::unique_ptr<char[]>(new (&ac) char[kWriteSize]); ASSERT_TRUE(ac.check()); ktl::unique_ptr<UserMemory> mem = UserMemory::Create(kWriteSize); auto mem_in = mem->user_in<char>(); auto mem_out = mem->user_out<char>(); BufferChain* bc = BufferChain::Alloc(kAllocSize); ASSERT_NE(nullptr, bc); auto free_bc = fbl::MakeAutoCall([&bc]() { BufferChain::Free(bc); }); ASSERT_EQ(1u, bc->buffers()->size_slow()); ASSERT_EQ(ZX_ERR_INVALID_ARGS, bc->Append(make_user_in_ptr(static_cast<const char*>(nullptr)), kWriteSize)); memset(buf.get(), 0, kWriteSize); ASSERT_EQ(ZX_OK, mem_out.copy_array_to_user(buf.get(), kWriteSize)); ASSERT_EQ(ZX_ERR_OUT_OF_RANGE, bc->Append(mem_in, kWriteSize)); END_TEST; } } // namespace UNITTEST_START_TESTCASE(buffer_chain_tests) UNITTEST("alloc_free_basic", alloc_free_basic) UNITTEST("append_copy_out", append_copy_out) UNITTEST("free_unused_pages", free_unused_pages) UNITTEST("append_more_than_allocated", append_more_than_allocated) UNITTEST("append_after_fail_fails", append_after_fail_fails) UNITTEST_END_TESTCASE(buffer_chain_tests, "buffer_chain", "BufferChain tests")
31.055085
100
0.682631
EnderNightLord-ChromeBook
1000c09c62ceed98bac0813f3d35ec640d46abb2
3,358
cpp
C++
src/anax/detail/EntityIdPool.cpp
shadwstalkr/anax
b0055500525c9cdf28e5325fc1583861948f692f
[ "MIT" ]
null
null
null
src/anax/detail/EntityIdPool.cpp
shadwstalkr/anax
b0055500525c9cdf28e5325fc1583861948f692f
[ "MIT" ]
null
null
null
src/anax/detail/EntityIdPool.cpp
shadwstalkr/anax
b0055500525c9cdf28e5325fc1583861948f692f
[ "MIT" ]
null
null
null
/// /// anax /// An open source C++ entity system. /// /// Copyright (C) 2013-2014 Miguel Martin (miguel@miguel-martin.com) /// /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation files (the "Software"), to deal /// in the Software without restriction, including without limitation the rights /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell /// copies of the Software, and to permit persons to whom the Software is /// furnished to do so, subject to the following conditions: /// /// The above copyright notice and this permission notice shall be included in /// all copies or substantial portions of the Software. /// /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. /// #include <anax/detail/EntityIdPool.hpp> namespace anax { namespace detail { EntityIdPool::EntityIdPool(std::size_t poolSize) : m_defaultPoolSize(poolSize), m_nextId(0), m_entities(poolSize) { } Entity::Id EntityIdPool::create() { Entity::Id id; // if we need to add more entities to the pool if(!m_freeList.empty()) { id = m_freeList.back(); m_freeList.pop_back(); // Update the ID counter before issuing //id.counter = m_entities[id.index]; } else { id.index = m_nextId++; // an ID given out cannot have a counter of 0. // 0 is an "invalid" counter, thus we must update // the counter within the pool for the corresponding // entity m_entities[id.index] = id.counter = 1; } return id; } void EntityIdPool::remove(Entity::Id id) { auto& counter = m_entities[id.index]; ++counter; // increment the counter in the cache m_freeList.emplace_back(static_cast<Entity::Id::int_type>(id.index), counter); // add the ID to the freeList } Entity::Id EntityIdPool::get(std::size_t index) const { assert(!(m_entities[index] == 0) && "Entity ID does not exist"); return Entity::Id{index, m_entities[index]}; } bool EntityIdPool::isValid(Entity::Id id) const { return id.counter == m_entities[id.index]; } std::size_t EntityIdPool::getSize() const { return m_entities.size(); } void EntityIdPool::resize(std::size_t amount) { m_entities.resize(amount); } void EntityIdPool::clear() { m_entities.clear(); m_freeList.clear(); m_nextId = 0; m_entities.resize(m_defaultPoolSize); } } }
32.601942
120
0.589637
shadwstalkr
1001e65903df0d119542540a8123ddfd2f84da3a
6,712
hpp
C++
inference-engine/include/cpp/ie_executable_network.hpp
ledmonster/openvino
c1b1e2e7afc698ac82b32bb1f502ad2e90cd1419
[ "Apache-2.0" ]
null
null
null
inference-engine/include/cpp/ie_executable_network.hpp
ledmonster/openvino
c1b1e2e7afc698ac82b32bb1f502ad2e90cd1419
[ "Apache-2.0" ]
15
2021-05-14T09:24:06.000Z
2022-02-21T13:07:57.000Z
inference-engine/include/cpp/ie_executable_network.hpp
ledmonster/openvino
c1b1e2e7afc698ac82b32bb1f502ad2e90cd1419
[ "Apache-2.0" ]
null
null
null
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // /** * @brief A header file that provides ExecutableNetwork class * * @file ie_executable_network.hpp */ #pragma once #include <ostream> #include <map> #include <memory> #include <string> #include <vector> #include "cpp/ie_cnn_network.h" #include "cpp/ie_infer_request.hpp" namespace InferenceEngine { namespace details { class SharedObjectLoader; } class IExecutableNetworkInternal; class IExecutableNetwork; /** * @brief This is an interface of an executable network */ class INFERENCE_ENGINE_API_CLASS(ExecutableNetwork) { std::shared_ptr<IExecutableNetworkInternal> _impl; std::shared_ptr<details::SharedObjectLoader> _so; ExecutableNetwork(const std::shared_ptr<IExecutableNetworkInternal>& impl, const std::shared_ptr<details::SharedObjectLoader>& so); friend class InferencePlugin; public: /** * @brief Default constructor */ ExecutableNetwork() = default; /** * @brief Default destructor */ ~ExecutableNetwork(); /** * @brief Gets the Executable network output Data node information. * * The received info is stored in the given InferenceEngine::ConstOutputsDataMap node. * This method need to be called to find output names for using them later * when calling InferenceEngine::InferRequest::GetBlob or InferenceEngine::InferRequest::SetBlob * * @return A collection that contains string as key, and const Data smart pointer as value */ ConstOutputsDataMap GetOutputsInfo() const; /** * @brief Gets the executable network input Data node information. * * The received info is stored in the given InferenceEngine::ConstInputsDataMap object. * This method need to be called to find out input names for using them later * when calling InferenceEngine::InferRequest::SetBlob * * @param inputs Reference to InferenceEngine::ConstInputsDataMap object. * @return A collection that contains string as key, and const InputInfo smart pointer as value */ ConstInputsDataMap GetInputsInfo() const; /** * @brief Creates an inference request object used to infer the network. * * The created request has allocated input and output blobs (that can be changed later). * * @return InferRequest object */ InferRequest CreateInferRequest(); /** * @brief Exports the current executable network. * * @see Core::ImportNetwork * * @param modelFileName Full path to the location of the exported file */ void Export(const std::string& modelFileName); /** * @brief Exports the current executable network. * * @see Core::ImportNetwork * * @param networkModel Network model output stream */ void Export(std::ostream& networkModel); /** * @copybrief IExecutableNetwork::GetExecGraphInfo * * Wraps IExecutableNetwork::GetExecGraphInfo. * @return CNNetwork containing Executable Graph Info */ CNNNetwork GetExecGraphInfo(); /** * @brief Sets configuration for current executable network * * @param config Map of pairs: (config parameter name, config parameter value) */ void SetConfig(const std::map<std::string, Parameter>& config); /** @brief Gets configuration for current executable network. * * The method is responsible to extract information * which affects executable network execution. The list of supported configuration values can be extracted via * ExecutableNetwork::GetMetric with the SUPPORTED_CONFIG_KEYS key, but some of these keys cannot be changed * dynamically, e.g. DEVICE_ID cannot changed if an executable network has already been compiled for particular * device. * * @param name config key, can be found in ie_plugin_config.hpp * @return Configuration parameter value */ Parameter GetConfig(const std::string& name) const; /** * @brief Gets general runtime metric for an executable network. * * It can be network name, actual device ID on * which executable network is running or all other properties which cannot be changed dynamically. * * @param name metric name to request * @return Metric parameter value */ Parameter GetMetric(const std::string& name) const; /** * @brief Returns pointer to plugin-specific shared context * on remote accelerator device that was used to create this ExecutableNetwork * @return A context */ RemoteContext::Ptr GetContext() const; /** * @brief Checks if current ExecutableNetwork object is not initialized * @return true if current ExecutableNetwork object is not initialized, false - otherwise */ bool operator!() const noexcept; /** * @brief Checks if current ExecutableNetwork object is initialized * @return true if current ExecutableNetwork object is initialized, false - otherwise */ explicit operator bool() const noexcept; IE_SUPPRESS_DEPRECATED_START /** * @deprecated The method Will be removed * @brief reset owned object to new pointer. * * Essential for cases when simultaneously loaded networks not expected. * @param newActual actual pointed object */ INFERENCE_ENGINE_DEPRECATED("The method will be removed") void reset(std::shared_ptr<IExecutableNetwork> newActual); /** * @deprecated Will be removed. Use operator bool * @brief cast operator is used when this wrapper initialized by LoadNetwork * @return A shared pointer to IExecutableNetwork interface. */ INFERENCE_ENGINE_DEPRECATED("The method will be removed. Use operator bool") operator std::shared_ptr<IExecutableNetwork>(); /** * @deprecated Use ExecutableNetwork::CreateInferRequest * @copybrief IExecutableNetwork::CreateInferRequest * * Wraps IExecutableNetwork::CreateInferRequest. * @return shared pointer on InferenceEngine::InferRequest object */ INFERENCE_ENGINE_DEPRECATED("Use ExecutableNetwork::CreateInferRequest instead") InferRequest::Ptr CreateInferRequestPtr(); /** * @deprecated Use InferRequest::QueryState instead * @brief Gets state control interface for given executable network. * * State control essential for recurrent networks * * @return A vector of Memory State objects */ INFERENCE_ENGINE_DEPRECATED("Use InferRequest::QueryState instead") std::vector<VariableState> QueryState(); IE_SUPPRESS_DEPRECATED_END }; } // namespace InferenceEngine
32.741463
115
0.701579
ledmonster
1002cec105c9f2962ed7b66d5ebe8dd85283d9f9
2,651
cpp
C++
archive/old/codeforces/675/D.cpp
irvinodjuana/acm
d111d310a6970779eb0e28f4e612c44c30eb1b41
[ "MIT" ]
null
null
null
archive/old/codeforces/675/D.cpp
irvinodjuana/acm
d111d310a6970779eb0e28f4e612c44c30eb1b41
[ "MIT" ]
null
null
null
archive/old/codeforces/675/D.cpp
irvinodjuana/acm
d111d310a6970779eb0e28f4e612c44c30eb1b41
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; // shortened type names typedef long long ll; typedef vector<int> vi; typedef pair<int, int> node; // macros #define X first #define Y second #define PB push_back #define MP make_pair #define REP(i, a, b) for (int i = a; i < b; i++) #define REPI(i, a, b) for (int i = a; i <= b; i++) void print_vector(vector<int> v) { for (int i = 0; i < v.size(); i++) { cout << v[i] << " "; } cout << "\n"; } void read_array(vector<int> & v, int n) { int num; while (n--) { cin >> num; v.push_back(num); } } int solve (node s, node f, vector<node> ims) { map<node, vector<pair<node, int>>> graph; graph[s].push_back({f, abs(s.X - f.X) + abs(s.Y - f.Y)}); for (int i = 0; i < ims.size(); i++) { node im1 = ims[i]; for (int j = i + 1; j < ims.size(); j++) { node im2 = ims[2]; graph[im1].push_back({im2, min(abs(im1.X - im2.X), abs(im1.Y - im2.Y))}); graph[im2].push_back({im1, min(abs(im1.X - im2.X), abs(im1.Y - im2.Y))}); } graph[s].push_back({im1, min(abs(s.X - im1.X), abs(s.Y - im1.Y))}); graph[im1].push_back({f, abs(f.X - im1.X) + abs(f.Y - im1.Y)}); } priority_queue<pair<int, node>, vector<pair<int, node>>, greater<pair<int,node>>> pq; set<node> visited; pq.push({0, s}); while (!pq.empty()) { auto p = pq.top(); pq.pop(); int dist = p.first; node curr = p.second; // std::cout << dist << " (" << curr.first << "," << curr.second << ")\n"; if (curr == f) return dist; if (visited.count(curr)) continue; visited.insert(curr); for (auto& edge : graph[curr]) { node nbor = edge.first; int edgeLen = edge.second; // std::cout << "nbor: " << edgeLen << " [" << nbor.X << "," << nbor.Y << "]\n"; if (visited.count(nbor)) continue; pq.push({dist + edgeLen, nbor}); } } return -1; } int main() { ios::sync_with_stdio(0); cin.tie(0); // int tests; // cin >> tests; // REP(tt, 0, tests) { // code here int n, m, sx, sy, fx, fy; cin >> n >> m; cin >> sx >> sy >> fx >> fy; node s = {sx, sy}; node f = {fx, fy}; vector<node> ims; // std::cout << f.X << " " << f.Y << endl; for (int i = 0; i < m; i++) { int x, y; cin >> x >> y; ims.push_back({x, y}); } std::cout << solve(s, f, ims) << "\n"; // } std::cout.flush(); return 0; }
22.853448
92
0.462844
irvinodjuana
1003137bdb08f5a813b64750bb6e7d0494459cb2
2,686
cpp
C++
buildcc/lib/target/src/api/include_api.cpp
coder137/build_in_cpp
296b0312eb0f4773fb2d40b01ed302f74f26f7a8
[ "Apache-2.0" ]
48
2021-06-15T08:34:42.000Z
2022-03-24T20:35:54.000Z
buildcc/lib/target/src/api/include_api.cpp
coder137/build_in_cpp
296b0312eb0f4773fb2d40b01ed302f74f26f7a8
[ "Apache-2.0" ]
100
2021-06-14T00:21:49.000Z
2022-03-29T03:59:42.000Z
buildcc/lib/target/src/api/include_api.cpp
coder137/build_in_cpp
296b0312eb0f4773fb2d40b01ed302f74f26f7a8
[ "Apache-2.0" ]
1
2021-06-17T01:03:36.000Z
2021-06-17T01:03:36.000Z
/* * Copyright 2021-2022 Niket Naidu. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "target/api/include_api.h" #include "target/target_info.h" namespace buildcc::base { template <typename T> void IncludeApi<T>::AddHeaderAbsolute(const fs::path &absolute_filepath) { T &t = static_cast<T &>(*this); t.state_.ExpectsUnlock(); t.config_.ExpectsValidHeader(absolute_filepath); t.storer_.current_header_files.user.insert(absolute_filepath); } template <typename T> void IncludeApi<T>::AddHeader(const fs::path &relative_filename, const fs::path &relative_to_target_path) { T &t = static_cast<T &>(*this); // Check Source fs::path absolute_filepath = t.env_.GetTargetRootDir() / relative_to_target_path / relative_filename; AddHeaderAbsolute(absolute_filepath); } template <typename T> void IncludeApi<T>::GlobHeaders(const fs::path &relative_to_target_path) { T &t = static_cast<T &>(*this); fs::path absolute_path = t.env_.GetTargetRootDir() / relative_to_target_path; GlobHeadersAbsolute(absolute_path); } template <typename T> void IncludeApi<T>::GlobHeadersAbsolute(const fs::path &absolute_path) { T &t = static_cast<T &>(*this); for (const auto &p : fs::directory_iterator(absolute_path)) { if (t.config_.IsValidHeader(p.path())) { AddHeaderAbsolute(p.path()); } } } template <typename T> void IncludeApi<T>::AddIncludeDir(const fs::path &relative_include_dir, bool glob_headers) { T &t = static_cast<T &>(*this); const fs::path absolute_include_dir = t.env_.GetTargetRootDir() / relative_include_dir; AddIncludeDirAbsolute(absolute_include_dir, glob_headers); } template <typename T> void IncludeApi<T>::AddIncludeDirAbsolute(const fs::path &absolute_include_dir, bool glob_headers) { T &t = static_cast<T &>(*this); t.state_.ExpectsUnlock(); t.storer_.current_include_dirs.insert(absolute_include_dir); if (glob_headers) { GlobHeadersAbsolute(absolute_include_dir); } } template class IncludeApi<TargetInfo>; } // namespace buildcc::base
30.522727
79
0.71035
coder137
1005e682e5dca863df5c1a3a0eac5c17ae1c7487
2,414
cpp
C++
dev/test/so_5/coop/coop_notify_3/main.cpp
eao197/SObjectizer
73b0d1bf5b4bdf543c24bc4969d2c408e0cea812
[ "BSD-3-Clause" ]
272
2019-05-16T11:45:54.000Z
2022-03-28T09:32:14.000Z
dev/test/so_5/coop/coop_notify_3/main.cpp
eao197/SObjectizer
73b0d1bf5b4bdf543c24bc4969d2c408e0cea812
[ "BSD-3-Clause" ]
40
2019-10-29T18:19:18.000Z
2022-03-30T09:02:49.000Z
dev/test/so_5/coop/coop_notify_3/main.cpp
eao197/SObjectizer
73b0d1bf5b4bdf543c24bc4969d2c408e0cea812
[ "BSD-3-Clause" ]
29
2019-05-16T12:05:32.000Z
2022-03-19T12:28:33.000Z
/* * A test for stardard coop reg/dereg notificators. */ #include <iostream> #include <sstream> #include <so_5/all.hpp> #include <test/3rd_party/various_helpers/time_limited_execution.hpp> struct msg_child_deregistered : public so_5::signal_t {}; class a_child_t : public so_5::agent_t { typedef so_5::agent_t base_type_t; public : a_child_t( so_5::environment_t & env ) : base_type_t( env ) { } }; class a_test_t : public so_5::agent_t { typedef so_5::agent_t base_type_t; public : a_test_t( so_5::environment_t & env ) : base_type_t( env ) , m_mbox( env.create_mbox() ) , m_cycle( 0 ) {} void so_define_agent() override { so_subscribe( m_mbox ).in( st_wait_registration ) .event( &a_test_t::evt_coop_registered ); so_subscribe( m_mbox ).in( st_wait_deregistration ) .event( &a_test_t::evt_coop_deregistered ); } void so_evt_start() override { so_change_state( st_wait_registration ); create_next_coop(); } void evt_coop_registered( mhood_t< so_5::msg_coop_registered > evt ) { std::cout << "registered: " << evt->m_coop << std::endl; so_change_state( st_wait_deregistration ); so_environment().deregister_coop( evt->m_coop, so_5::dereg_reason::normal ); } void evt_coop_deregistered( mhood_t< so_5::msg_coop_deregistered > evt ) { std::cout << "deregistered: " << evt->m_coop << std::endl; if( 5 == m_cycle ) so_environment().stop(); else { ++m_cycle; so_change_state( st_wait_registration ); create_next_coop(); } } private : const so_5::mbox_t m_mbox; int m_cycle; so_5::state_t st_wait_registration{ this }; so_5::state_t st_wait_deregistration{ this }; void create_next_coop() { auto child_coop = so_environment().make_coop( so_coop(), so_5::disp::active_obj::make_dispatcher( so_environment() ).binder() ); child_coop->add_reg_notificator( so_5::make_coop_reg_notificator( m_mbox ) ); child_coop->add_dereg_notificator( so_5::make_coop_dereg_notificator( m_mbox ) ); child_coop->make_agent< a_child_t >(); so_environment().register_coop( std::move( child_coop ) ); } }; int main() { run_with_time_limit( [] { so_5::launch( []( so_5::environment_t & env ) { env.register_agent_as_coop( env.make_agent< a_test_t >() ); } ); }, 10 ); return 0; }
18.859375
68
0.6628
eao197
100645af911c20a835e8d020943b16061bf039d5
15,343
cpp
C++
modules/platforms/cpp/thin-client/src/impl/cache/cache_client_impl.cpp
mwwx/ignite
49e063cb3ce748d4f6caa1dea66ae1f4fd21997d
[ "Apache-2.0" ]
2
2022-03-04T09:18:47.000Z
2022-03-04T09:18:52.000Z
modules/platforms/cpp/thin-client/src/impl/cache/cache_client_impl.cpp
mwwx/ignite
49e063cb3ce748d4f6caa1dea66ae1f4fd21997d
[ "Apache-2.0" ]
null
null
null
modules/platforms/cpp/thin-client/src/impl/cache/cache_client_impl.cpp
mwwx/ignite
49e063cb3ce748d4f6caa1dea66ae1f4fd21997d
[ "Apache-2.0" ]
null
null
null
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <ignite/impl/thin/writable_key.h> #include "impl/response_status.h" #include "impl/message.h" #include "impl/cache/cache_client_impl.h" #include "impl/cache/query/continuous/continuous_query_notification_handler.h" #include "impl/transactions/transactions_impl.h" using namespace ignite::impl::thin::transactions; using namespace ignite::common::concurrent; namespace ignite { namespace impl { namespace thin { namespace cache { typedef SharedPointer<TransactionImpl> SP_TransactionImpl; CacheClientImpl::CacheClientImpl( const SP_DataRouter& router, const transactions::SP_TransactionsImpl& tx, const std::string& name, int32_t id) : router(router), tx(tx), name(name), id(id), binary(false) { // No-op. } CacheClientImpl::~CacheClientImpl() { // No-op. } template<typename ReqT, typename RspT> void CacheClientImpl::SyncCacheKeyMessage(const WritableKey& key, ReqT& req, RspT& rsp) { DataRouter& router0 = *router.Get(); if (router0.IsPartitionAwarenessEnabled()) { affinity::SP_AffinityAssignment affinityInfo = router0.GetAffinityAssignment(id); if (!affinityInfo.IsValid()) { router0.RefreshAffinityMapping(id); affinityInfo = router0.GetAffinityAssignment(id); } if (!affinityInfo.IsValid() || affinityInfo.Get()->GetPartitionsNum() == 0) { router0.SyncMessage(req, rsp); } else { const Guid& guid = affinityInfo.Get()->GetNodeGuid(key); router0.SyncMessage(req, rsp, guid); } } else { router0.SyncMessage(req, rsp); } if (rsp.GetStatus() != ResponseStatus::SUCCESS) throw IgniteError(IgniteError::IGNITE_ERR_CACHE, rsp.GetError().c_str()); } template<typename ReqT, typename RspT> SP_DataChannel CacheClientImpl::SyncMessage(ReqT& req, RspT& rsp) { SP_DataChannel channel = router.Get()->SyncMessage(req, rsp); if (rsp.GetStatus() != ResponseStatus::SUCCESS) throw IgniteError(IgniteError::IGNITE_ERR_CACHE, rsp.GetError().c_str()); return channel; } template<typename ReqT, typename RspT> SP_DataChannel CacheClientImpl::SyncMessageSql(ReqT& req, RspT& rsp) { SP_DataChannel channel; try { channel = router.Get()->SyncMessage(req, rsp); } catch (IgniteError& err) { std::string msg("08001: "); msg += err.GetText(); throw IgniteError(err.GetCode(), msg.c_str()); } if (rsp.GetStatus() != ResponseStatus::SUCCESS) throw IgniteError(IgniteError::IGNITE_ERR_CACHE, rsp.GetError().c_str()); return channel; } template<typename ReqT, typename RspT> void CacheClientImpl::TransactionalSyncCacheKeyMessage(const WritableKey &key, ReqT &req, RspT &rsp) { if (!TryProcessTransactional(req, rsp)) SyncCacheKeyMessage(key, req, rsp); } template<typename ReqT, typename RspT> void CacheClientImpl::TransactionalSyncMessage(ReqT &req, RspT &rsp) { if (!TryProcessTransactional(req, rsp)) SyncMessage(req, rsp); } template<typename ReqT, typename RspT> bool CacheClientImpl::TryProcessTransactional(ReqT& req, RspT& rsp) { TransactionImpl* activeTx = tx.Get()->GetCurrent().Get(); if (!activeTx) return false; req.activeTx(true, activeTx->TxId()); SP_DataChannel channel = activeTx->GetChannel(); channel.Get()->SyncMessage(req, rsp, router.Get()->GetIoTimeout()); if (rsp.GetStatus() != ResponseStatus::SUCCESS) throw IgniteError(IgniteError::IGNITE_ERR_CACHE, rsp.GetError().c_str()); return true; } void CacheClientImpl::Put(const WritableKey& key, const Writable& value) { Cache2ValueRequest<MessageType::CACHE_PUT> req(id, binary, key, value); Response rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); } void CacheClientImpl::Get(const WritableKey& key, Readable& value) { CacheValueRequest<MessageType::CACHE_GET> req(id, binary, key); CacheValueResponse rsp(value); TransactionalSyncCacheKeyMessage(key, req, rsp); } void CacheClientImpl::PutAll(const Writable & pairs) { CacheValueRequest<MessageType::CACHE_PUT_ALL> req(id, binary, pairs); Response rsp; TransactionalSyncMessage(req, rsp); } void CacheClientImpl::GetAll(const Writable& keys, Readable& pairs) { CacheValueRequest<MessageType::CACHE_GET_ALL> req(id, binary, keys); CacheValueResponse rsp(pairs); TransactionalSyncMessage(req, rsp); } bool CacheClientImpl::Replace(const WritableKey& key, const Writable& value) { Cache2ValueRequest<MessageType::CACHE_REPLACE> req(id, binary, key, value); BoolResponse rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); return rsp.GetValue(); } bool CacheClientImpl::ContainsKey(const WritableKey& key) { CacheValueRequest<MessageType::CACHE_CONTAINS_KEY> req(id, binary, key); BoolResponse rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); return rsp.GetValue(); } bool CacheClientImpl::ContainsKeys(const Writable& keys) { CacheValueRequest<MessageType::CACHE_CONTAINS_KEYS> req(id, binary, keys); BoolResponse rsp; TransactionalSyncMessage(req, rsp); return rsp.GetValue(); } int64_t CacheClientImpl::GetSize(int32_t peekModes) { CacheGetSizeRequest req(id, binary, peekModes); Int64Response rsp; TransactionalSyncMessage(req, rsp); return rsp.GetValue(); } bool CacheClientImpl::Remove(const WritableKey& key) { CacheValueRequest<MessageType::CACHE_REMOVE_KEY> req(id, binary, key); BoolResponse rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); return rsp.GetValue(); } bool CacheClientImpl::Remove(const WritableKey& key, const Writable& val) { Cache2ValueRequest<MessageType::CACHE_REMOVE_IF_EQUALS> req(id, binary, key, val); BoolResponse rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); return rsp.GetValue(); } void CacheClientImpl::RemoveAll(const Writable& keys) { CacheValueRequest<MessageType::CACHE_REMOVE_KEYS> req(id, binary, keys); Response rsp; TransactionalSyncMessage(req, rsp); } void CacheClientImpl::RemoveAll() { CacheRequest<MessageType::CACHE_REMOVE_ALL> req(id, binary); Response rsp; TransactionalSyncMessage(req, rsp); } void CacheClientImpl::Clear(const WritableKey& key) { CacheValueRequest<MessageType::CACHE_CLEAR_KEY> req(id, binary, key); Response rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); } void CacheClientImpl::Clear() { CacheRequest<MessageType::CACHE_CLEAR> req(id, binary); Response rsp; TransactionalSyncMessage(req, rsp); } void CacheClientImpl::ClearAll(const Writable& keys) { CacheValueRequest<MessageType::CACHE_CLEAR_KEYS> req(id, binary, keys); Response rsp; TransactionalSyncMessage(req, rsp); } void CacheClientImpl::LocalPeek(const WritableKey& key, Readable& value) { CacheValueRequest<MessageType::CACHE_LOCAL_PEEK> req(id, binary, key); CacheValueResponse rsp(value); TransactionalSyncCacheKeyMessage(key, req, rsp); } bool CacheClientImpl::Replace(const WritableKey& key, const Writable& oldVal, const Writable& newVal) { Cache3ValueRequest<MessageType::CACHE_REPLACE_IF_EQUALS> req(id, binary, key, oldVal, newVal); BoolResponse rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); return rsp.GetValue(); } void CacheClientImpl::GetAndPut(const WritableKey& key, const Writable& valIn, Readable& valOut) { Cache2ValueRequest<MessageType::CACHE_GET_AND_PUT> req(id, binary, key, valIn); CacheValueResponse rsp(valOut); TransactionalSyncCacheKeyMessage(key, req, rsp); } void CacheClientImpl::GetAndRemove(const WritableKey& key, Readable& valOut) { CacheValueRequest<MessageType::CACHE_GET_AND_REMOVE> req(id, binary, key); CacheValueResponse rsp(valOut); TransactionalSyncCacheKeyMessage(key, req, rsp); } void CacheClientImpl::GetAndReplace(const WritableKey& key, const Writable& valIn, Readable& valOut) { Cache2ValueRequest<MessageType::CACHE_GET_AND_REPLACE> req(id, binary, key, valIn); CacheValueResponse rsp(valOut); TransactionalSyncCacheKeyMessage(key, req, rsp); } bool CacheClientImpl::PutIfAbsent(const WritableKey& key, const Writable& val) { Cache2ValueRequest<MessageType::CACHE_PUT_IF_ABSENT> req(id, binary, key, val); BoolResponse rsp; TransactionalSyncCacheKeyMessage(key, req, rsp); return rsp.GetValue(); } void CacheClientImpl::GetAndPutIfAbsent(const WritableKey& key, const Writable& valIn, Readable& valOut) { Cache2ValueRequest<MessageType::CACHE_GET_AND_PUT_IF_ABSENT> req(id, binary, key, valIn); CacheValueResponse rsp(valOut); TransactionalSyncCacheKeyMessage(key, req, rsp); } query::SP_QueryFieldsCursorImpl CacheClientImpl::Query( const ignite::thin::cache::query::SqlFieldsQuery &qry) { SqlFieldsQueryRequest req(id, qry); SqlFieldsQueryResponse rsp; SP_DataChannel channel = SyncMessageSql(req, rsp); query::SP_QueryFieldsCursorImpl cursorImpl( new query::QueryFieldsCursorImpl( rsp.GetCursorId(), rsp.GetColumns(), rsp.GetCursorPage(), channel, static_cast<int32_t>(qry.GetTimeout()))); return cursorImpl; } query::continuous::SP_ContinuousQueryHandleClientImpl CacheClientImpl::QueryContinuous( const query::continuous::SP_ContinuousQueryClientHolderBase& continuousQuery) { const query::continuous::ContinuousQueryClientHolderBase& cq = *continuousQuery.Get(); ContinuousQueryRequest req(id, cq.GetBufferSize(), cq.GetTimeInterval(), cq.GetIncludeExpired()); ContinuousQueryResponse rsp; SP_DataChannel channel = SyncMessage(req, rsp); query::continuous::SP_ContinuousQueryNotificationHandler handler( new query::continuous::ContinuousQueryNotificationHandler(*channel.Get(), continuousQuery)); channel.Get()->RegisterNotificationHandler(rsp.GetQueryId(), handler); return query::continuous::SP_ContinuousQueryHandleClientImpl( new query::continuous::ContinuousQueryHandleClientImpl(channel, rsp.GetQueryId())); } } } } }
38.843038
120
0.519455
mwwx
10077d08646da48db50bac94e8ee2a908644b6f6
7,138
cpp
C++
samples/daal/cpp/mpi/sources/svd_fast_distributed_mpi.cpp
cmsxbc/oneDAL
eeb8523285907dc359c84ca4894579d5d1d9f57e
[ "Apache-2.0" ]
169
2020-03-30T09:13:05.000Z
2022-03-15T11:12:36.000Z
samples/daal/cpp/mpi/sources/svd_fast_distributed_mpi.cpp
cmsxbc/oneDAL
eeb8523285907dc359c84ca4894579d5d1d9f57e
[ "Apache-2.0" ]
1,198
2020-03-24T17:26:18.000Z
2022-03-31T08:06:15.000Z
samples/daal/cpp/mpi/sources/svd_fast_distributed_mpi.cpp
cmsxbc/oneDAL
eeb8523285907dc359c84ca4894579d5d1d9f57e
[ "Apache-2.0" ]
75
2020-03-30T11:39:58.000Z
2022-03-26T05:16:20.000Z
/* file: svd_fast_distributed_mpi.cpp */ /******************************************************************************* * Copyright 2017-2021 Intel Corporation * * 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. *******************************************************************************/ /* ! Content: ! C++ sample of computing singular value decomposition (SVD) in the ! distributed processing mode !******************************************************************************/ /** * <a name="DAAL-EXAMPLE-CPP-SVD_FAST_DISTRIBUTED_MPI"></a> * \example svd_fast_distributed_mpi.cpp */ #include <mpi.h> #include "daal.h" #include "service.h" using namespace std; using namespace daal; using namespace daal::algorithms; /* Input data set parameters */ const size_t nBlocks = 4; const string datasetFileNames[] = { "./data/distributed/svd_1.csv", "./data/distributed/svd_2.csv", "./data/distributed/svd_3.csv", "./data/distributed/svd_4.csv" }; void computestep1Local(); void computeOnMasterNode(); void finalizeComputestep1Local(); int rankId; int commSize; #define mpiRoot 0 data_management::DataCollectionPtr dataFromStep1ForStep3; NumericTablePtr Sigma; NumericTablePtr V; NumericTablePtr Ui; services::SharedPtr<byte> serializedData; size_t perNodeArchLength; int main(int argc, char * argv[]) { checkArguments(argc, argv, 4, &datasetFileNames[0], &datasetFileNames[1], &datasetFileNames[2], &datasetFileNames[3]); MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &commSize); MPI_Comm_rank(MPI_COMM_WORLD, &rankId); if (nBlocks != commSize) { if (rankId == mpiRoot) { std::cout << commSize << " MPI ranks != " << nBlocks << " datasets available, so please start exactly " << nBlocks << " ranks.\n" << std::endl; } MPI_Finalize(); return 0; } computestep1Local(); if (rankId == mpiRoot) { computeOnMasterNode(); } finalizeComputestep1Local(); /* Print the results */ if (rankId == mpiRoot) { printNumericTable(Sigma, "Singular values:"); printNumericTable(V, "Right orthogonal matrix V:"); printNumericTable(Ui, "Part of left orthogonal matrix U from root node:", 10); } MPI_Finalize(); return 0; } void computestep1Local() { /* Initialize FileDataSource<CSVFeatureManager> to retrieve the input data from a .csv file */ FileDataSource<CSVFeatureManager> dataSource(datasetFileNames[rankId], DataSource::doAllocateNumericTable, DataSource::doDictionaryFromContext); /* Retrieve the input data */ dataSource.loadDataBlock(); /* Create an algorithm to compute SVD on local nodes */ svd::Distributed<step1Local> alg; alg.input.set(svd::data, dataSource.getNumericTable()); /* Compute SVD */ alg.compute(); data_management::DataCollectionPtr dataFromStep1ForStep2; dataFromStep1ForStep2 = alg.getPartialResult()->get(svd::outputOfStep1ForStep2); dataFromStep1ForStep3 = alg.getPartialResult()->get(svd::outputOfStep1ForStep3); /* Serialize partial results required by step 2 */ InputDataArchive dataArch; dataFromStep1ForStep2->serialize(dataArch); perNodeArchLength = dataArch.getSizeOfArchive(); /* Serialized data is of equal size on each node if each node called compute() equal number of times */ if (rankId == mpiRoot) { serializedData = services::SharedPtr<byte>(new byte[perNodeArchLength * nBlocks]); } byte * nodeResults = new byte[perNodeArchLength]; dataArch.copyArchiveToArray(nodeResults, perNodeArchLength); /* Transfer partial results to step 2 on the root node */ MPI_Gather(nodeResults, perNodeArchLength, MPI_CHAR, serializedData.get(), perNodeArchLength, MPI_CHAR, mpiRoot, MPI_COMM_WORLD); delete[] nodeResults; } void computeOnMasterNode() { /* Create an algorithm to compute SVD on the master node */ svd::Distributed<step2Master> alg; for (size_t i = 0; i < nBlocks; i++) { /* Deserialize partial results from step 1 */ OutputDataArchive dataArch(serializedData.get() + perNodeArchLength * i, perNodeArchLength); data_management::DataCollectionPtr dataForStep2FromStep1 = data_management::DataCollectionPtr(new data_management::DataCollection()); dataForStep2FromStep1->deserialize(dataArch); alg.input.add(svd::inputOfStep2FromStep1, i, dataForStep2FromStep1); } /* Compute SVD */ alg.compute(); svd::DistributedPartialResultPtr pres = alg.getPartialResult(); KeyValueDataCollectionPtr inputForStep3FromStep2 = pres->get(svd::outputOfStep2ForStep3); for (size_t i = 0; i < nBlocks; i++) { /* Serialize partial results to transfer to local nodes for step 3 */ InputDataArchive dataArch; (*inputForStep3FromStep2)[i]->serialize(dataArch); if (i == 0) { perNodeArchLength = dataArch.getSizeOfArchive(); /* Serialized data is of equal size for each node if it was equal in step 1 */ serializedData = services::SharedPtr<byte>(new byte[perNodeArchLength * nBlocks]); } dataArch.copyArchiveToArray(serializedData.get() + perNodeArchLength * i, perNodeArchLength); } svd::ResultPtr res = alg.getResult(); Sigma = res->get(svd::singularValues); V = res->get(svd::rightSingularMatrix); } void finalizeComputestep1Local() { /* Get the size of the serialized input */ MPI_Bcast(&perNodeArchLength, sizeof(size_t), MPI_CHAR, mpiRoot, MPI_COMM_WORLD); byte * nodeResults = new byte[perNodeArchLength]; /* Transfer partial results from the root node */ MPI_Scatter(serializedData.get(), perNodeArchLength, MPI_CHAR, nodeResults, perNodeArchLength, MPI_CHAR, mpiRoot, MPI_COMM_WORLD); /* Deserialize partial results from step 2 */ OutputDataArchive dataArch(nodeResults, perNodeArchLength); data_management::DataCollectionPtr dataFromStep2ForStep3 = data_management::DataCollectionPtr(new data_management::DataCollection()); dataFromStep2ForStep3->deserialize(dataArch); delete[] nodeResults; /* Create an algorithm to compute SVD on the master node */ svd::Distributed<step3Local> alg; alg.input.set(svd::inputOfStep3FromStep1, dataFromStep1ForStep3); alg.input.set(svd::inputOfStep3FromStep2, dataFromStep2ForStep3); /* Compute SVD */ alg.compute(); alg.finalizeCompute(); svd::ResultPtr res = alg.getResult(); Ui = res->get(svd::leftSingularMatrix); }
32.894009
148
0.67582
cmsxbc
10078e224a15ab6c61479f045a4bc0234839df60
2,506
cc
C++
examples/sdk/node/node_modules/hfc/node_modules/grpc/third_party/boringssl/tool/rand.cc
shoheigold/fabric-starter
b79bb33b3f3cff893d592cbb60c93093db61320b
[ "Apache-2.0" ]
598
2017-06-29T17:02:45.000Z
2022-03-22T16:57:13.000Z
examples/sdk/node/node_modules/hfc/node_modules/grpc/third_party/boringssl/tool/rand.cc
shoheigold/fabric-starter
b79bb33b3f3cff893d592cbb60c93093db61320b
[ "Apache-2.0" ]
26
2017-07-22T20:30:06.000Z
2021-08-03T08:16:59.000Z
examples/sdk/node/node_modules/hfc/node_modules/grpc/third_party/boringssl/tool/rand.cc
shoheigold/fabric-starter
b79bb33b3f3cff893d592cbb60c93093db61320b
[ "Apache-2.0" ]
54
2017-06-30T03:40:56.000Z
2021-12-16T11:28:33.000Z
/* Copyright (c) 2015, Google Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <string> #include <vector> #include <stdint.h> #include <stdlib.h> #include <openssl/rand.h> #include "internal.h" static const struct argument kArguments[] = { { "-hex", kBooleanArgument, "Hex encoded output." }, { "", kOptionalArgument, "", }, }; bool Rand(const std::vector<std::string> &args) { bool forever = true, hex = false; size_t len = 0; if (!args.empty()) { std::vector<std::string> args_copy(args); const std::string &last_arg = args.back(); if (last_arg.size() > 0 && last_arg[0] != '-') { char *endptr; unsigned long long num = strtoull(last_arg.c_str(), &endptr, 10); if (*endptr == 0) { len = num; forever = false; args_copy.pop_back(); } } std::map<std::string, std::string> args_map; if (!ParseKeyValueArguments(&args_map, args_copy, kArguments)) { PrintUsage(kArguments); return false; } hex = args_map.count("-hex") > 0; } uint8_t buf[4096]; uint8_t hex_buf[8192]; size_t done = 0; while (forever || done < len) { size_t todo = sizeof(buf); if (!forever && todo > len - done) { todo = len - done; } RAND_bytes(buf, todo); if (hex) { static const char hextable[] = "0123456789abdef"; for (unsigned i = 0; i < todo; i++) { hex_buf[i*2] = hextable[buf[i] >> 4]; hex_buf[i*2 + 1] = hextable[buf[i] & 0xf]; } if (fwrite(hex_buf, todo*2, 1, stdout) != 1) { return false; } } else { if (fwrite(buf, todo, 1, stdout) != 1) { return false; } } done += todo; } if (hex && fwrite("\n", 1, 1, stdout) != 1) { return false; } return true; }
26.104167
79
0.611333
shoheigold
1008a580f480d9cbf3d40839a7e2089315060b97
1,596
cpp
C++
src/ossim/base/ossimStdOutProgress.cpp
rkanavath/ossim18
d2e8204d11559a6a868755a490f2ec155407fa96
[ "MIT" ]
null
null
null
src/ossim/base/ossimStdOutProgress.cpp
rkanavath/ossim18
d2e8204d11559a6a868755a490f2ec155407fa96
[ "MIT" ]
null
null
null
src/ossim/base/ossimStdOutProgress.cpp
rkanavath/ossim18
d2e8204d11559a6a868755a490f2ec155407fa96
[ "MIT" ]
1
2019-09-25T00:43:35.000Z
2019-09-25T00:43:35.000Z
//******************************************************************* // Copyright (C) 2000 ImageLinks Inc. // // License: MIT // // See LICENSE.txt file in the top level directory for more details. // // Author: Garrett Potts // //************************************************************************* // $Id: ossimStdOutProgress.cpp 23664 2015-12-14 14:17:27Z dburken $ #include <iomanip> #include <ossim/base/ossimStdOutProgress.h> RTTI_DEF1(ossimStdOutProgress, "ossimStdOutProgress", ossimProcessListener); ossimStdOutProgress theStdOutProgress; ossimStdOutProgress::ossimStdOutProgress(ossim_uint32 precision, bool flushStream) : ossimProcessListener(), thePrecision(precision), theFlushStreamFlag(flushStream) { } void ossimStdOutProgress::processProgressEvent(ossimProcessProgressEvent& event) { if (event.getOutputMessageFlag()) { ossimString s; event.getMessage(s); if (!s.empty()) { ossimNotify(ossimNotifyLevel_NOTICE) << s.c_str() << std::endl; } return; // Don't output percentage on a message update. } double p = event.getPercentComplete(); ossimNotify(ossimNotifyLevel_NOTICE) << std::setiosflags(std::ios::fixed) << std::setprecision(thePrecision) << p << "%\r"; if(theFlushStreamFlag) { (p != 100.0) ? ossimNotify(ossimNotifyLevel_NOTICE).flush() : ossimNotify(ossimNotifyLevel_NOTICE) << "\n"; } } void ossimStdOutProgress::setFlushStreamFlag(bool flag) { theFlushStreamFlag = flag; }
25.333333
80
0.607143
rkanavath
1008fe156071b30791a1cbb289813bc5447f7d6c
13,115
cpp
C++
src/checkpoints/checkpoints.cpp
Fez29/loki
6890c5d52b906f8127a3fa71911f56ecbf4a8680
[ "BSD-3-Clause" ]
null
null
null
src/checkpoints/checkpoints.cpp
Fez29/loki
6890c5d52b906f8127a3fa71911f56ecbf4a8680
[ "BSD-3-Clause" ]
null
null
null
src/checkpoints/checkpoints.cpp
Fez29/loki
6890c5d52b906f8127a3fa71911f56ecbf4a8680
[ "BSD-3-Clause" ]
null
null
null
// Copyright (c) 2014-2019, The Monero Project // Copyright (c) 2018, The Loki Project // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors may be // used to endorse or promote products derived from this software without specific // prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "checkpoints.h" #include "common/dns_utils.h" #include "string_tools.h" #include "storages/portable_storage_template_helper.h" // epee json include #include "serialization/keyvalue_serialization.h" #include "cryptonote_core/service_node_rules.h" #include <vector> #include "syncobj.h" #include "blockchain_db/blockchain_db.h" #include "cryptonote_basic/cryptonote_format_utils.h" using namespace epee; #include "common/loki_integration_test_hooks.h" #include "common/loki.h" #undef LOKI_DEFAULT_LOG_CATEGORY #define LOKI_DEFAULT_LOG_CATEGORY "checkpoints" namespace cryptonote { bool checkpoint_t::check(crypto::hash const &hash) const { bool result = block_hash == hash; if (result) MINFO ("CHECKPOINT PASSED FOR HEIGHT " << height << " " << block_hash); else MWARNING("CHECKPOINT FAILED FOR HEIGHT " << height << ". EXPECTED HASH " << block_hash << "GIVEN HASH: " << hash); return result; } height_to_hash const HARDCODED_MAINNET_CHECKPOINTS[] = { {0, "08ff156d993012b0bdf2816c4bee47c9bbc7930593b70ee02574edddf15ee933"}, {1, "647997953a5ea9b5ab329c2291d4cbb08eed587c287e451eeeb2c79bab9b940f"}, {10, "4a7cd8b9bff380d48d6f3533a5e0509f8589cc77d18218b3f7218846e77738fc"}, {100, "01b8d33a50713ff837f8ad7146021b8e3060e0316b5e4afc407e46cdb50b6760"}, {1000, "5e3b0a1f931885bc0ab1d6ecdc625816576feae29e2f9ac94c5ccdbedb1465ac"}, {86535, "52b7c5a60b97bf1efbf0d63a0aa1a313e8f0abe4627eb354b0c5a73cb1f4391e"}, {97407, "504af73abbaba85a14ddc16634658bf4dcc241dc288b1eaad09e216836b71023"}, {98552, "2058d5c675bd91284f4996435593499c9ab84a5a0f569f57a86cde2e815e57da"}, {144650, "a1ab207afc790675070ecd7aac874eb0691eb6349ea37c44f8f58697a5d6cbc4"}, {266284, "c42801a37a41e3e9f934a266063483646072a94bfc7269ace178e93c91414b1f"}, {301187, "e23e4cf3a2fe3e9f0ffced5cc76426e5bdffd3aad822268f4ad63d82cb958559"}, }; height_to_hash const HARDCODED_TESTNET_CHECKPOINTS[] = { {127028, "83f6ea8d62601733a257d2f075fd960edd80886dc090d8751478c0a738caa09e"}, }; crypto::hash get_newest_hardcoded_checkpoint(cryptonote::network_type nettype, uint64_t *height) { crypto::hash result = crypto::null_hash; *height = 0; if (nettype != MAINNET && nettype != TESTNET) return result; if (nettype == MAINNET) { uint64_t last_index = loki::array_count(HARDCODED_MAINNET_CHECKPOINTS) - 1; height_to_hash const &entry = HARDCODED_MAINNET_CHECKPOINTS[last_index]; if (epee::string_tools::hex_to_pod(entry.hash, result)) *height = entry.height; } else { uint64_t last_index = loki::array_count(HARDCODED_TESTNET_CHECKPOINTS) - 1; height_to_hash const &entry = HARDCODED_TESTNET_CHECKPOINTS[last_index]; if (epee::string_tools::hex_to_pod(entry.hash, result)) *height = entry.height; } return result; } bool load_checkpoints_from_json(const std::string &json_hashfile_fullpath, std::vector<height_to_hash> &checkpoint_hashes) { boost::system::error_code errcode; if (! (boost::filesystem::exists(json_hashfile_fullpath, errcode))) { LOG_PRINT_L1("Blockchain checkpoints file not found"); return true; } height_to_hash_json hashes; if (!epee::serialization::load_t_from_json_file(hashes, json_hashfile_fullpath)) { MERROR("Error loading checkpoints from " << json_hashfile_fullpath); return false; } checkpoint_hashes = std::move(hashes.hashlines); return true; } bool checkpoints::get_checkpoint(uint64_t height, checkpoint_t &checkpoint) const { try { auto guard = db_rtxn_guard(m_db); return m_db->get_block_checkpoint(height, checkpoint); } catch (const std::exception &e) { MERROR("Get block checkpoint from DB failed at height: " << height << ", what = " << e.what()); return false; } } //--------------------------------------------------------------------------- bool checkpoints::add_checkpoint(uint64_t height, const std::string& hash_str) { crypto::hash h = crypto::null_hash; bool r = epee::string_tools::hex_to_pod(hash_str, h); CHECK_AND_ASSERT_MES(r, false, "Failed to parse checkpoint hash string into binary representation!"); checkpoint_t checkpoint = {}; if (get_checkpoint(height, checkpoint)) { crypto::hash const &curr_hash = checkpoint.block_hash; CHECK_AND_ASSERT_MES(h == curr_hash, false, "Checkpoint at given height already exists, and hash for new checkpoint was different!"); } else { checkpoint.type = checkpoint_type::hardcoded; checkpoint.height = height; checkpoint.block_hash = h; r = update_checkpoint(checkpoint); } return r; } bool checkpoints::update_checkpoint(checkpoint_t const &checkpoint) { // NOTE(loki): Assumes checkpoint is valid bool result = true; bool batch_started = false; try { batch_started = m_db->batch_start(); m_db->update_block_checkpoint(checkpoint); } catch (const std::exception& e) { MERROR("Failed to add checkpoint with hash: " << checkpoint.block_hash << " at height: " << checkpoint.height << ", what = " << e.what()); result = false; } if (batch_started) m_db->batch_stop(); return result; } //--------------------------------------------------------------------------- bool checkpoints::block_added(const cryptonote::block& block, const std::vector<cryptonote::transaction>& txs, checkpoint_t const *checkpoint) { uint64_t const height = get_block_height(block); if (height < service_nodes::CHECKPOINT_STORE_PERSISTENTLY_INTERVAL || block.major_version < network_version_12_checkpointing) return true; uint64_t end_cull_height = 0; { checkpoint_t immutable_checkpoint; if (m_db->get_immutable_checkpoint(&immutable_checkpoint, height + 1)) end_cull_height = immutable_checkpoint.height; } uint64_t start_cull_height = (end_cull_height < service_nodes::CHECKPOINT_STORE_PERSISTENTLY_INTERVAL) ? 0 : end_cull_height - service_nodes::CHECKPOINT_STORE_PERSISTENTLY_INTERVAL; if ((start_cull_height % service_nodes::CHECKPOINT_INTERVAL) > 0) start_cull_height += (service_nodes::CHECKPOINT_INTERVAL - (start_cull_height % service_nodes::CHECKPOINT_INTERVAL)); m_last_cull_height = std::max(m_last_cull_height, start_cull_height); auto guard = db_wtxn_guard(m_db); for (; m_last_cull_height < end_cull_height; m_last_cull_height += service_nodes::CHECKPOINT_INTERVAL) { if (m_last_cull_height % service_nodes::CHECKPOINT_STORE_PERSISTENTLY_INTERVAL == 0) continue; try { m_db->remove_block_checkpoint(m_last_cull_height); } catch (const std::exception &e) { MERROR("Pruning block checkpoint on block added failed non-trivially at height: " << m_last_cull_height << ", what = " << e.what()); } } if (checkpoint) update_checkpoint(*checkpoint); return true; } //--------------------------------------------------------------------------- void checkpoints::blockchain_detached(uint64_t height, bool /*by_pop_blocks*/) { m_last_cull_height = std::min(m_last_cull_height, height); checkpoint_t top_checkpoint; auto guard = db_wtxn_guard(m_db); if (m_db->get_top_checkpoint(top_checkpoint)) { uint64_t start_height = top_checkpoint.height; for (size_t delete_height = start_height; delete_height >= height && delete_height >= service_nodes::CHECKPOINT_INTERVAL; delete_height -= service_nodes::CHECKPOINT_INTERVAL) { try { m_db->remove_block_checkpoint(delete_height); } catch (const std::exception &e) { MERROR("Remove block checkpoint on detach failed non-trivially at height: " << delete_height << ", what = " << e.what()); } } } } //--------------------------------------------------------------------------- bool checkpoints::is_in_checkpoint_zone(uint64_t height) const { uint64_t top_checkpoint_height = 0; checkpoint_t top_checkpoint; if (m_db->get_top_checkpoint(top_checkpoint)) top_checkpoint_height = top_checkpoint.height; return height <= top_checkpoint_height; } //--------------------------------------------------------------------------- bool checkpoints::check_block(uint64_t height, const crypto::hash& h, bool* is_a_checkpoint, bool *service_node_checkpoint) const { checkpoint_t checkpoint; bool found = get_checkpoint(height, checkpoint); if (is_a_checkpoint) *is_a_checkpoint = found; if (service_node_checkpoint) *service_node_checkpoint = false; if(!found) return true; bool result = checkpoint.check(h); if (service_node_checkpoint) *service_node_checkpoint = (checkpoint.type == checkpoint_type::service_node); return result; } //--------------------------------------------------------------------------- bool checkpoints::is_alternative_block_allowed(uint64_t blockchain_height, uint64_t block_height, bool *service_node_checkpoint) { if (service_node_checkpoint) *service_node_checkpoint = false; if (0 == block_height) return false; { std::vector<checkpoint_t> const first_checkpoint = m_db->get_checkpoints_range(0, blockchain_height, 1); if (first_checkpoint.empty() || blockchain_height < first_checkpoint[0].height) return true; } checkpoint_t immutable_checkpoint; uint64_t immutable_height = 0; if (m_db->get_immutable_checkpoint(&immutable_checkpoint, blockchain_height)) { immutable_height = immutable_checkpoint.height; if (service_node_checkpoint) *service_node_checkpoint = (immutable_checkpoint.type == checkpoint_type::service_node); } m_immutable_height = std::max(immutable_height, m_immutable_height); bool result = block_height > m_immutable_height; return result; } //--------------------------------------------------------------------------- uint64_t checkpoints::get_max_height() const { uint64_t result = 0; checkpoint_t top_checkpoint; if (m_db->get_top_checkpoint(top_checkpoint)) result = top_checkpoint.height; return result; } //--------------------------------------------------------------------------- bool checkpoints::init(network_type nettype, struct BlockchainDB *db) { *this = {}; m_db = db; m_nettype = nettype; #if !defined(LOKI_ENABLE_INTEGRATION_TEST_HOOKS) if (nettype == MAINNET) { for (size_t i = 0; i < loki::array_count(HARDCODED_MAINNET_CHECKPOINTS); ++i) { height_to_hash const &checkpoint = HARDCODED_MAINNET_CHECKPOINTS[i]; ADD_CHECKPOINT(checkpoint.height, checkpoint.hash); } } else if (nettype == TESTNET) { for (size_t i = 0; i < loki::array_count(HARDCODED_TESTNET_CHECKPOINTS); ++i) { height_to_hash const &checkpoint = HARDCODED_TESTNET_CHECKPOINTS[i]; ADD_CHECKPOINT(checkpoint.height, checkpoint.hash); } } #endif return true; } }
37.686782
144
0.672817
Fez29
100940d91b663d0269562179b936cb41854b4838
453
cpp
C++
0801-0900/0884-Uncommon Words from Two Sentences/0884-Uncommon Words from Two Sentences.cpp
jiadaizhao/LeetCode
4ddea0a532fe7c5d053ffbd6870174ec99fc2d60
[ "MIT" ]
49
2018-05-05T02:53:10.000Z
2022-03-30T12:08:09.000Z
0801-0900/0884-Uncommon Words from Two Sentences/0884-Uncommon Words from Two Sentences.cpp
jolly-fellow/LeetCode
ab20b3ec137ed05fad1edda1c30db04ab355486f
[ "MIT" ]
11
2017-12-15T22:31:44.000Z
2020-10-02T12:42:49.000Z
0801-0900/0884-Uncommon Words from Two Sentences/0884-Uncommon Words from Two Sentences.cpp
jolly-fellow/LeetCode
ab20b3ec137ed05fad1edda1c30db04ab355486f
[ "MIT" ]
28
2017-12-05T10:56:51.000Z
2022-01-26T18:18:27.000Z
class Solution { public: vector<string> uncommonFromSentences(string A, string B) { stringstream ss(A + ' ' + B); string s; unordered_map<string, int> table; while (getline(ss, s, ' ')) { ++table[s]; } vector<string> result; for (auto& p : table) { if (p.second == 1) { result.push_back(p.first); } } return result; } };
23.842105
62
0.465784
jiadaizhao
100b59559ed64364ff11a6367089636feb09f5d2
4,886
cpp
C++
laser_filters/src/scan_to_scan_filter_chain.cpp
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
59
2020-08-03T04:03:04.000Z
2022-03-29T07:25:23.000Z
laser_filters/src/scan_to_scan_filter_chain.cpp
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
2
2021-09-03T06:19:13.000Z
2021-09-14T02:30:55.000Z
laser_filters/src/scan_to_scan_filter_chain.cpp
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
22
2020-08-13T07:16:12.000Z
2022-03-13T03:06:29.000Z
/* * Copyright (c) 2008, Willow Garage, 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 the Willow Garage, 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. */ #include "ros/ros.h" #include "sensor_msgs/LaserScan.h" #include "message_filters/subscriber.h" #include "tf/message_filter.h" #include "tf/transform_listener.h" #include "filters/filter_chain.h" class ScanToScanFilterChain { protected: // Our NodeHandle ros::NodeHandle nh_; ros::NodeHandle private_nh_; // Components for tf::MessageFilter tf::TransformListener *tf_; message_filters::Subscriber<sensor_msgs::LaserScan> scan_sub_; tf::MessageFilter<sensor_msgs::LaserScan> *tf_filter_; double tf_filter_tolerance_; // Filter Chain filters::FilterChain<sensor_msgs::LaserScan> filter_chain_; // Components for publishing sensor_msgs::LaserScan msg_; ros::Publisher output_pub_; // Deprecation helpers ros::Timer deprecation_timer_; bool using_filter_chain_deprecated_; public: // Constructor ScanToScanFilterChain() : private_nh_("~"), scan_sub_(nh_, "scan", 50), tf_(NULL), tf_filter_(NULL), filter_chain_("sensor_msgs::LaserScan") { // Configure filter chain using_filter_chain_deprecated_ = private_nh_.hasParam("filter_chain"); if (using_filter_chain_deprecated_) filter_chain_.configure("filter_chain", private_nh_); else filter_chain_.configure("scan_filter_chain", private_nh_); std::string tf_message_filter_target_frame; if (private_nh_.hasParam("tf_message_filter_target_frame")) { private_nh_.getParam("tf_message_filter_target_frame", tf_message_filter_target_frame); private_nh_.param("tf_message_filter_tolerance", tf_filter_tolerance_, 0.03); tf_ = new tf::TransformListener(); tf_filter_ = new tf::MessageFilter<sensor_msgs::LaserScan>(scan_sub_, *tf_, "", 50); tf_filter_->setTargetFrame(tf_message_filter_target_frame); tf_filter_->setTolerance(ros::Duration(tf_filter_tolerance_)); // Setup tf::MessageFilter generates callback tf_filter_->registerCallback(boost::bind(&ScanToScanFilterChain::callback, this, _1)); } else { // Pass through if no tf_message_filter_target_frame scan_sub_.registerCallback(boost::bind(&ScanToScanFilterChain::callback, this, _1)); } // Advertise output output_pub_ = nh_.advertise<sensor_msgs::LaserScan>("scan_filtered", 1000); // Set up deprecation printout deprecation_timer_ = nh_.createTimer(ros::Duration(5.0), boost::bind(&ScanToScanFilterChain::deprecation_warn, this, _1)); } // Destructor ~ScanToScanFilterChain() { if (tf_filter_) delete tf_filter_; if (tf_) delete tf_; } // Deprecation warning callback void deprecation_warn(const ros::TimerEvent& e) { if (using_filter_chain_deprecated_) ROS_WARN("Use of '~filter_chain' parameter in scan_to_scan_filter_chain has been deprecated. Please replace with '~scan_filter_chain'."); } // Callback void callback(const sensor_msgs::LaserScan::ConstPtr& msg_in) { // Run the filter chain if (filter_chain_.update(*msg_in, msg_)) { //only publish result if filter succeeded output_pub_.publish(msg_); } } }; int main(int argc, char **argv) { ros::init(argc, argv, "scan_to_scan_filter_chain"); ScanToScanFilterChain t; ros::spin(); return 0; }
33.465753
143
0.729636
kilinmao
100d10a26da0790c1cd139427219e95d8530dc63
53,580
cpp
C++
embree-2.0/examples/renderer/device_coi/coi_device.cpp
PetrVevoda/smallupbp
15430256733938d529a2f5c7ef4cdcd940ae4208
[ "MIT", "Apache-2.0", "Unlicense" ]
107
2015-01-27T22:01:49.000Z
2021-12-27T07:44:25.000Z
examples/renderer/device_coi/coi_device.cpp
mbdriscoll/embree
77bb760c005fb7097335da2defe4b4711c15cdd3
[ "Intel", "Apache-2.0" ]
1
2015-03-17T18:53:59.000Z
2015-03-17T18:53:59.000Z
examples/renderer/device_coi/coi_device.cpp
mbdriscoll/embree
77bb760c005fb7097335da2defe4b4711c15cdd3
[ "Intel", "Apache-2.0" ]
17
2015-03-12T19:11:30.000Z
2020-11-30T15:51:23.000Z
// ======================================================================== // // Copyright 2009-2013 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // you may not use this file except in compliance with the License. // // You may obtain a copy of the License at // // // // http://www.apache.org/licenses/LICENSE-2.0 // // // // Unless required by applicable law or agreed to in writing, software // // distributed under the License is distributed on an "AS IS" BASIS, // // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // See the License for the specific language governing permissions and // // limitations under the License. // // ======================================================================== // #include "coi_device.h" #include "sys/stl/string.h" #include "sys/sysinfo.h" #include "sys/filename.h" #include "image/image.h" namespace embree { COIDevice::COIProcess::COIProcess (int cardID, const char* executable, size_t numThreads, size_t verbose) { /* assume MIC executable to be in same folder as host executable */ FileName fname = FileName(getExecutableFileName()).path() + FileName(executable); /* get engine handle */ COIRESULT result; result = COIEngineGetHandle( COI_ISA_MIC, cardID, &engine ); if (result != COI_SUCCESS) throw std::runtime_error("Failed to load engine number " + std::stringOf(cardID) + ": " + COIResultGetName(result)); /* print info of engine */ COI_ENGINE_INFO info; result = COIEngineGetInfo(engine,sizeof(info),&info); if (result != COI_SUCCESS) throw std::runtime_error("COIEngineGetInfo failed: "+std::string(COIResultGetName(result))); std::cout << "Found Xeon Phi device with " << info.NumCores << " cores and " << (info.PhysicalMemory/1024/1024) << "MB memory" << std::endl; std::string strNumThreads = std::stringOf(numThreads); std::string strVerbose = std::stringOf(verbose); const char* argv[2] = { strNumThreads.c_str(), strVerbose.c_str() }; /* create process */ result = COIProcessCreateFromFile (engine, fname.c_str(), // The local path to the sink side binary to launch. 2, argv, // argc and argv for the sink process. false, NULL, // Environment variables to set for the sink process. true, NULL, // Enable the proxy but don't specify a proxy root path. 0, // The amount of memory to reserve for COIBuffers. NULL, // Path to search for dependencies &process // The resulting process handle. ); // if fail check loading by name if (result != COI_SUCCESS) { fname = FileName(executable); result = COIProcessCreateFromFile (engine, fname.c_str(), // The local path to the sink side binary to launch. 2, argv, // argc and argv for the sink process. false, NULL, // Environment variables to set for the sink process. true, NULL, // Enable the proxy but don't specify a proxy root path. 0, // The amount of memory to reserve for COIBuffers. NULL, // Path to search for dependencies &process // The resulting process handle. ); } if (result != COI_SUCCESS) throw std::runtime_error("Failed to create process " + std::string(executable) +": " + COIResultGetName(result)); /* create pipeline */ COI_CPU_MASK cpuMask; COIPipelineClearCPUMask(&cpuMask); COIPipelineSetCPUMask(process,info.NumCores-1,0,&cpuMask); COIPipelineSetCPUMask(process,info.NumCores-1,1,&cpuMask); COIPipelineSetCPUMask(process,info.NumCores-1,2,&cpuMask); COIPipelineSetCPUMask(process,info.NumCores-1,3,&cpuMask); result = COIPipelineCreate(process,cpuMask,0,&pipeline); if (result != COI_SUCCESS) throw std::runtime_error(std::string("Failed to create pipeline : ") + COIResultGetName(result)); /* get run functions */ const char *fctNameArray[] = { "rtNewCamera", "rtNewData", "rtNewImage", "rtNewTexture", "rtNewMaterial", "rtNewShape", "rtNewLight", "rtNewShapePrimitive", "rtNewLightPrimitive", "rtTransformPrimitive", "rtNewScene", "rtSetPrimitive", "rtNewToneMapper", "rtNewRenderer", "rtNewFrameBuffer", "rtSwapBuffers", "rtIncRef", "rtDecRef", "rtSetBool1", "rtSetBool2", "rtSetBool3", "rtSetBool4", "rtSetInt1", "rtSetInt2", "rtSetInt3", "rtSetInt4", "rtSetFloat1", "rtSetFloat2", "rtSetFloat3", "rtSetFloat4", "rtSetArray", "rtSetString", "rtSetImage", "rtSetTexture", "rtSetTransform", "rtClear", "rtCommit", "rtRenderFrame", "rtPick", "rtNewDataStart", "rtNewDataSet", "rtNewDataEnd" }; result = COIProcessGetFunctionHandles (process, sizeof(fctNameArray)/sizeof(char*), fctNameArray, &runNewCamera); if (result != COI_SUCCESS) throw std::runtime_error("COIProcessGetFunctionHandles failed: "+std::string(COIResultGetName(result))); result = COIBufferCreate(STREAM_BUFFER_SIZE,COI_BUFFER_NORMAL,0,NULL,1,&process,&stream); if (result != COI_SUCCESS) throw std::runtime_error("COIBufferCreate failed: " + std::string(COIResultGetName(result))); } void COIDevice::COIProcess::loadLibrary (const char* library) { std::cout << "Loading library from file \"" << library << "\"" << std::endl; COILIBRARY lib; COIRESULT result = COIProcessLoadLibraryFromFile(process,library,library,NULL,&lib); if (result != COI_SUCCESS) throw std::runtime_error(std::string("Failed to load libary: ") + COIResultGetName(result)); libs.push_back(lib); } COIDevice::COIProcess::~COIProcess () { for (size_t i=0; i<libs.size(); i++) { COIRESULT result = COIProcessUnloadLibrary(process,libs[i]); if (result != COI_SUCCESS) throw std::runtime_error(std::string("Unloading library failed: ") + std::string(COIResultGetName(result))); } COIRESULT result = COIProcessDestroy(process,-1,0,NULL,NULL); if (result != COI_SUCCESS) throw std::runtime_error(std::string("Destroying COI process failed: ") + std::string(COIResultGetName(result))); } void COIDevice::COIProcess::free (int id) { swapchains.erase(id); } COIRESULT COIPipelineRunFunctionSync(COIPIPELINE in_Pipeline, COIFUNCTION in_Function, uint32_t in_NumBuffers, const COIBUFFER* in_pBuffers, const COI_ACCESS_FLAGS* in_pBufferAccessFlags, uint32_t in_NumDependencies, const COIEVENT* in_pDependencies, const void* in_pMiscData, uint16_t in_MiscDataLen, void* out_pAsyncReturnValue, uint16_t in_AsyncReturnValueLen) { COIEVENT completion; COIRESULT result = COIPipelineRunFunction (in_Pipeline, in_Function, in_NumBuffers, in_pBuffers, in_pBufferAccessFlags, in_NumDependencies, in_pDependencies, in_pMiscData, in_MiscDataLen, out_pAsyncReturnValue, in_AsyncReturnValueLen, &completion); COIEventWait(1,&completion,-1,true,NULL,NULL); return result; } /******************************************************************* creation of objects *******************************************************************/ void COIDevice::COIProcess::rtNewCamera(Device::RTCamera id, const char* type) { parmsNewCamera parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewCamera, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunctionSync failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewData(Device::RTData id, const char* type, size_t bytes, const void* data) { #if 0 parmsNewData parms; parms.id = (int) (long) id; parms.bytes = bytes; COIBUFFER buffer; COIRESULT result = COIBufferCreate(max(bytes,size_t(1)),COI_BUFFER_STREAMING_TO_SINK,0,data,1,&process,&buffer); if (result != COI_SUCCESS) throw std::runtime_error("COIBufferCreate failed: " + std::string(COIResultGetName(result))); COI_ACCESS_FLAGS flag = COI_SINK_READ; result = COIPipelineRunFunctionSync (pipeline, runNewData, 1, &buffer, &flag, 0, NULL, &parms, sizeof(parms), NULL, 0); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunctionSync failed: "+std::string(COIResultGetName(result))); result = COIBufferDestroy(buffer); if (result != COI_SUCCESS) throw std::runtime_error("COIBufferDestroy failed: "+std::string(COIResultGetName(result))); #else parmsNewDataStart parms0; parms0.id = (int) (long) id; parms0.bytes = bytes; COIRESULT result = COIPipelineRunFunction (pipeline, runNewDataStart, 0, NULL, NULL, 0, NULL, &parms0, sizeof(parms0), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); for (size_t i=0; i<bytes; i+=STREAM_BUFFER_SIZE) { void* dst = NULL; size_t offset = i; size_t dbytes = min(size_t(STREAM_BUFFER_SIZE),bytes-i); COIEVENT completion; COIRESULT result = COIBufferWrite(stream,0,(char*)data+offset,dbytes,COI_COPY_USE_DMA,0,NULL,&completion); if (result != COI_SUCCESS) throw std::runtime_error("COIBufferWrite failed: "+std::string(COIResultGetName(result))); COIEventWait(1,&completion,-1,true,NULL,NULL); parmsNewDataSet parms1; parms1.offset = offset; parms1.bytes = dbytes; COI_ACCESS_FLAGS flag = COI_SINK_READ; result = COIPipelineRunFunctionSync (pipeline, runNewDataSet, 1, &stream, &flag, 0, NULL, &parms1, sizeof(parms1), NULL, 0); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } COI_ACCESS_FLAGS flag = COI_SINK_READ; result = COIPipelineRunFunction (pipeline, runNewDataEnd, 0, NULL, NULL, 0, NULL, &parms0, sizeof(parms0), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); #endif } void COIDevice::COIProcess::rtNewImage(Device::RTImage id, const char* type, size_t width, size_t height, const void* data) { parmsNewImage parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); parms.width = width; parms.height = height; size_t bytes = 0; if (!strcasecmp(type,"RGB8" )) bytes = width*height*3*sizeof(char); else if (!strcasecmp(type,"RGBA8" )) bytes = width*height*4*sizeof(char); else if (!strcasecmp(type,"RGB_FLOAT32" )) bytes = width*height*3*sizeof(float); else if (!strcasecmp(type,"RGBA_FLOAT32")) bytes = width*height*4*sizeof(float); else throw std::runtime_error("unknown image type: "+std::string(type)); COIBUFFER buffer; COIRESULT result = COIBufferCreate(max(bytes,size_t(1)),COI_BUFFER_STREAMING_TO_SINK,0,data,1,&process,&buffer); if (result != COI_SUCCESS) throw std::runtime_error("COIBufferCreate failed: " + std::string(COIResultGetName(result))); COI_ACCESS_FLAGS flag = COI_SINK_READ; result = COIPipelineRunFunctionSync (pipeline, runNewImage, 1, &buffer, &flag, 0, NULL, &parms, sizeof(parms), NULL, 0); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); result = COIBufferDestroy(buffer); if (result != COI_SUCCESS) throw std::runtime_error("COIBufferDestroy failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewTexture(Device::RTTexture id, const char* type) { parmsNewTexture parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewTexture, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewMaterial(Device::RTMaterial id, const char* type) { parmsNewMaterial parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewMaterial, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewShape(Device::RTShape id, const char* type) { parmsNewShape parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewShape, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewLight(Device::RTLight id, const char* type) { parmsNewLight parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewLight, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewShapePrimitive(Device::RTPrimitive id, Device::RTShape shape, Device::RTMaterial material, const float* transform) { parmsNewShapePrimitive parms; parms.id = (int) (long) id; parms.shape = (int) (long) shape; parms.material = (int) (long) material; if (transform) { for (size_t i=0; i<12; i++) parms.transform[i] = transform[i]; } else { parms.transform[ 0] = 1.0f; parms.transform[ 1] = 0.0f; parms.transform[ 2] = 0.0f; parms.transform[ 3] = 0.0f; parms.transform[ 4] = 1.0f; parms.transform[ 5] = 0.0f; parms.transform[ 6] = 0.0f; parms.transform[ 7] = 0.0f; parms.transform[ 8] = 1.0f; parms.transform[ 9] = 0.0f; parms.transform[10] = 0.0f; parms.transform[11] = 0.0f; } COIRESULT result = COIPipelineRunFunction (pipeline, runNewShapePrimitive, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewLightPrimitive(Device::RTPrimitive id, Device::RTLight light, Device::RTMaterial material, const float* transform) { parmsNewLightPrimitive parms; parms.id = (int) (long) id; parms.light = (int) (long) light; parms.material = (int) (long) material; if (transform) { for (size_t i=0; i<12; i++) parms.transform[i] = transform[i]; } else { parms.transform[ 0] = 1.0f; parms.transform[ 1] = 0.0f; parms.transform[ 2] = 0.0f; parms.transform[ 3] = 0.0f; parms.transform[ 4] = 1.0f; parms.transform[ 5] = 0.0f; parms.transform[ 6] = 0.0f; parms.transform[ 7] = 0.0f; parms.transform[ 8] = 1.0f; parms.transform[ 9] = 0.0f; parms.transform[10] = 0.0f; parms.transform[11] = 0.0f; } COIRESULT result = COIPipelineRunFunction (pipeline, runNewLightPrimitive, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtTransformPrimitive(Device::RTPrimitive id, Device::RTPrimitive primitive, const float* transform) { parmsTransformPrimitive parms; parms.id = (int) (long) id; parms.primitive = (int) (long) primitive; if (transform) { for (size_t i=0; i<12; i++) parms.transform[i] = transform[i]; } else { parms.transform[ 0] = 1.0f; parms.transform[ 1] = 0.0f; parms.transform[ 2] = 0.0f; parms.transform[ 3] = 0.0f; parms.transform[ 4] = 1.0f; parms.transform[ 5] = 0.0f; parms.transform[ 6] = 0.0f; parms.transform[ 7] = 0.0f; parms.transform[ 8] = 1.0f; parms.transform[ 9] = 0.0f; parms.transform[10] = 0.0f; parms.transform[11] = 0.0f; } COIRESULT result = COIPipelineRunFunction (pipeline, runTransformPrimitive, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewScene(Device::RTScene id, const char* type) { parmsNewScene parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewScene, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetPrimitive(RTScene scene, size_t slot, RTPrimitive prim) { parmsSetPrimitive parms; parms.scene = (int) (long) scene; parms.slot = slot; parms.prim = (int) (long) prim; COIRESULT result = COIPipelineRunFunction (pipeline, runSetPrimitive, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewToneMapper(Device::RTToneMapper id, const char* type) { parmsNewToneMapper parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewToneMapper, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewRenderer(Device::RTRenderer id, const char* type) { parmsNewRenderer parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runNewRenderer, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtNewFrameBuffer(Device::RTFrameBuffer id, const char* type, size_t width, size_t height, size_t numBuffers) { SwapChain* swapchain = NULL; if (!strcasecmp(type,"RGB_FLOAT32")) swapchain = new SwapChain(&process,width*height*3*sizeof(float),numBuffers); else if (!strcasecmp(type,"RGBA8" )) swapchain = new SwapChain(&process,width*height*4,numBuffers); else if (!strcasecmp(type,"RGB8" )) swapchain = new SwapChain(&process,width*height*3,numBuffers); else throw std::runtime_error("unknown framebuffer type: "+std::string(type)); swapchains[(int)(long)id] = swapchain; parmsNewFrameBuffer parms; parms.id = (int) (long) id; strncpy(parms.type,type,sizeof(parms.type)-1); parms.width = width; parms.height = height; parms.depth = numBuffers; COIRESULT result = COIPipelineRunFunction (pipeline, runNewFrameBuffer, numBuffers, swapchain->buffer, swapchain->flag, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void* COIDevice::COIProcess::rtMapFrameBuffer(RTFrameBuffer frameBuffer, int bufID) { Ref<SwapChain> swapchain = swapchains[(int)(long)frameBuffer]; if (bufID < 0) bufID = swapchain->curBuffer; return swapchain->map(bufID); } void COIDevice::COIProcess::rtUnmapFrameBuffer(RTFrameBuffer frameBuffer, int bufID) { Ref<SwapChain> swapchain = swapchains[(int)(long)frameBuffer]; if (bufID < 0) bufID = swapchain->curBuffer; return swapchain->unmap(bufID); } void COIDevice::COIProcess::rtSwapBuffers(Device::RTFrameBuffer frameBuffer) { parmsSwapBuffers parms; parms.framebuffer = (int) (long) frameBuffer; COIRESULT result = COIPipelineRunFunction (pipeline, runSwapBuffers, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); Ref<SwapChain> swapchain = swapchains[(int)(long)frameBuffer]; swapchain->swapBuffers(); } void COIDevice::COIProcess::rtIncRef(Device::RTHandle handle) { parmsIncRef parms; parms.handle = (int) (long) handle; COIRESULT result = COIPipelineRunFunction (pipeline, runIncRef, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtDecRef(Device::RTHandle handle) { parmsDecRef parms; parms.handle = (int) (long) handle; COIRESULT result = COIPipelineRunFunction (pipeline, runDecRef, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } /******************************************************************* setting of parameters *******************************************************************/ void COIDevice::COIProcess::rtSetBool1(Device::RTHandle handle, const char* property, bool x) { parmsSetBoolN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = false; parms.z = false; parms.w = false; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetBool1, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetBool2(Device::RTHandle handle, const char* property, bool x, bool y) { parmsSetBoolN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = false; parms.w = false; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetBool2, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetBool3(Device::RTHandle handle, const char* property, bool x, bool y, bool z) { parmsSetBoolN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = z; parms.w = false; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetBool3, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetBool4(Device::RTHandle handle, const char* property, bool x, bool y, bool z, bool w) { parmsSetBoolN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = z; parms.w = w; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetBool4, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetInt1(Device::RTHandle handle, const char* property, int x) { parmsSetIntN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = 0; parms.z = 0; parms.w = 0; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetInt1, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetInt2(Device::RTHandle handle, const char* property, int x, int y) { parmsSetIntN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = 0; parms.w = 0; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetInt2, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetInt3(Device::RTHandle handle, const char* property, int x, int y, int z) { parmsSetIntN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = z; parms.w = 0; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetInt3, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetInt4(Device::RTHandle handle, const char* property, int x, int y, int z, int w) { parmsSetIntN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = z; parms.w = w; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetInt4, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetFloat1(Device::RTHandle handle, const char* property, float x) { parmsSetFloatN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = 0.0f; parms.z = 0.0f; parms.w = 0.0f; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetFloat1, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetFloat2(Device::RTHandle handle, const char* property, float x, float y) { parmsSetFloatN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = 0.0f; parms.w = 0.0f; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetFloat2, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetFloat3(Device::RTHandle handle, const char* property, float x, float y, float z) { parmsSetFloatN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = z; parms.w = 0.0f; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetFloat3, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetFloat4(Device::RTHandle handle, const char* property, float x, float y, float z, float w) { parmsSetFloatN parms; parms.handle = (int) (long) handle; parms.x = x; parms.y = y; parms.z = z; parms.w = w; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetFloat4, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetArray(Device::RTHandle handle, const char* property, const char* type, Device::RTData data, size_t size, size_t stride, size_t ofs) { parmsSetArray parms; parms.handle = (int) (long) handle; strncpy(parms.property,property,sizeof(parms.property)-1); strncpy(parms.type,type,sizeof(parms.type)-1); parms.data = (int) (long) data; parms.size = size; parms.stride = stride; parms.ofs = ofs; COIRESULT result = COIPipelineRunFunction (pipeline, runSetArray, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetString(Device::RTHandle handle, const char* property, const char* str) { parmsSetString parms; parms.handle = (int) (long) handle; strncpy(parms.property,property,sizeof(parms.property)-1); strncpy(parms.str,str,sizeof(parms.str)-1); COIRESULT result = COIPipelineRunFunction (pipeline, runSetString, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetImage(Device::RTHandle handle, const char* property, Device::RTImage image) { parmsSetImage parms; parms.handle = (int) (long) handle; parms.image = (int) (long) image; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetImage, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetTexture(Device::RTHandle handle, const char* property, Device::RTTexture texture) { parmsSetTexture parms; parms.handle = (int) (long) handle; parms.texture = (int) (long) texture; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetTexture, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtSetTransform(Device::RTHandle handle, const char* property, const float* transform) { parmsSetTransform parms; parms.handle = (int) (long) handle; for (size_t i=0; i<12; i++) parms.transform[i] = transform[i]; strncpy(parms.property,property,sizeof(parms.property)-1); size_t zeros = sizeof(parms.property)-strlen(parms.property)-1; COIRESULT result = COIPipelineRunFunction (pipeline, runSetTransform, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms)-zeros, NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtClear(Device::RTHandle handle) { parmsClear parms; parms.handle = (int) (long) handle; COIRESULT result = COIPipelineRunFunction (pipeline, runClear, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } void COIDevice::COIProcess::rtCommit(Device::RTHandle handle) { parmsCommit parms; parms.handle = (int) (long) handle; COIRESULT result = COIPipelineRunFunction (pipeline, runCommit, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } /******************************************************************* render calls *******************************************************************/ void COIDevice::COIProcess::rtRenderFrame(Device::RTRenderer renderer, Device::RTCamera camera, Device::RTScene scene, Device::RTToneMapper toneMapper, Device::RTFrameBuffer frameBuffer, int accumulate) { parmsRenderFrame parms; parms.renderer = (int) (long) renderer; parms.camera = (int) (long) camera; parms.scene = (int) (long) scene; parms.toneMapper = (int) (long) toneMapper; parms.frameBuffer = (int) (long) frameBuffer; parms.accumulate = accumulate; Ref<SwapChain> swapchain = swapchains[(int)(long)frameBuffer]; COIRESULT result = COIPipelineRunFunction (pipeline, runRenderFrame, 1, &swapchain->buffer[swapchain->curBuffer], &swapchain->flag[swapchain->curBuffer], 0, NULL, &parms, sizeof(parms), NULL, 0, NULL); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); } bool COIDevice::COIProcess::rtPick(Device::RTCamera camera, float x, float y, Device::RTScene scene, float& px, float& py, float& pz) { parmsPick parms; parms.camera = (int) (long) camera; parms.x = x; parms.y = y; parms.scene = (int) (long) scene; returnPick ret; COIRESULT result = COIPipelineRunFunctionSync (pipeline, runPick, 0, NULL, NULL, 0, NULL, &parms, sizeof(parms), &ret, sizeof(ret)); if (result != COI_SUCCESS) throw std::runtime_error("COIPipelineRunFunction failed: "+std::string(COIResultGetName(result))); /*! return pick data */ px = ret.x; py = ret.y; pz = ret.z; return ret.hit; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// COIDevice::COIDevice(const char* executable, size_t numThreads, size_t verbose) : nextHandle(1), serverID(0), serverCount(1) { uint32_t engines = 0; COIEngineGetCount( COI_ISA_MIC, &engines ); if (engines == 0) throw std::runtime_error("no Xeon Phi device found"); /* initialize all devices */ for (uint32_t i=0; i<engines; i++) devices.push_back(new COIProcess(i,executable,numThreads,verbose)); /* set server ID of devices */ for (size_t i=0; i<devices.size(); i++) { int id = serverID*devices.size()+i; int count = serverCount*devices.size(); devices[i]->rtSetInt1(NULL,"serverID",id); devices[i]->rtSetInt1(NULL,"serverCount",count); } /* dummy 0 handle */ counters.push_back(0); buffers.push_back(NULL); } COIDevice::~COIDevice() { for (size_t i=0; i<devices.size(); i++) delete devices[i]; devices.clear(); } /******************************************************************* handle ID allocations *******************************************************************/ int COIDevice::allocHandle() { if (pool.empty()) { pool.push_back(nextHandle++); counters.push_back(0); buffers.push_back(NULL); } int id = pool.back(); counters[id] = 1; pool.pop_back(); return id; } void COIDevice::incRef(int id) { Lock<MutexSys> lock(handleMutex); counters[id]++; } bool COIDevice::decRef(int id) { Lock<MutexSys> lock(handleMutex); if (--counters[id] == 0) { pool.push_back((int)id); buffers[id] = null; for (size_t i=0; i<devices.size(); i++) devices[i]->free((int)id); return true; } return false; } /******************************************************************* creation of objects *******************************************************************/ Device::RTCamera COIDevice::rtNewCamera(const char* type) { Device::RTCamera id = (Device::RTCamera) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewCamera(id,type); return id; } Device::RTData COIDevice::rtNewData(const char* type, size_t bytes, const void* data) { Device::RTData id = (Device::RTData) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewData(id,type,bytes,data); if (!strcasecmp(type,"immutable_managed")) alignedFree((void*)data); return id; } Device::RTData COIDevice::rtNewDataFromFile(const char* type, const char* fileName, size_t offset, size_t bytes) { if (strcasecmp(type,"immutable")) throw std::runtime_error("unknown data type: "+(std::string)type); /*! read data from file */ FILE* file = fopen(fileName,"rb"); if (!file) throw std::runtime_error("cannot open file "+(std::string)fileName); fseek(file,(long)offset,SEEK_SET); char* data = (char*) alignedMalloc(bytes); if (bytes != fread(data,1,sizeof(bytes),file)) throw std::runtime_error("error filling data buffer from file"); fclose(file); return rtNewData("immutable_managed", bytes, data); } Device::RTImage COIDevice::rtNewImage(const char* type, size_t width, size_t height, const void* data, const bool copy) { Device::RTImage id = (Device::RTImage) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewImage(id,type,width,height,data); if (!copy) free((void*)data); return id; } Device::RTImage COIDevice::rtNewImageFromFile(const char* fileName) { /*! load image locally */ Ref<Image> image = loadImage(fileName); if (!image) throw std::runtime_error("cannot load image: "+std::string(fileName)); else if (Ref<Image3c> cimg = image.dynamicCast<Image3c>()) return rtNewImage("RGB8",cimg->width,cimg->height,cimg->steal_ptr(),false); else if (Ref<Image4c> cimg = image.dynamicCast<Image4c>()) return rtNewImage("RGBA8",cimg->width,cimg->height,cimg->steal_ptr(),false); else if (Ref<Image3f> fimg = image.dynamicCast<Image3f>()) return rtNewImage("RGB_FLOAT32",fimg->width,fimg->height,fimg->steal_ptr(),false); else if (Ref<Image4f> fimg = image.dynamicCast<Image4f>()) return rtNewImage("RGBA_FLOAT32",fimg->width,fimg->height,fimg->steal_ptr(),false); else throw std::runtime_error("unknown image type"); } Device::RTTexture COIDevice::rtNewTexture(const char* type) { Device::RTTexture id = (Device::RTTexture) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewTexture(id,type); return id; } Device::RTMaterial COIDevice::rtNewMaterial(const char* type) { Device::RTMaterial id = (Device::RTMaterial) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewMaterial(id,type); return id; } Device::RTShape COIDevice::rtNewShape(const char* type) { Device::RTShape id = (Device::RTShape) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewShape(id,type); return id; } Device::RTLight COIDevice::rtNewLight(const char* type) { Device::RTLight id = (Device::RTLight) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewLight(id,type); return id; } Device::RTPrimitive COIDevice::rtNewShapePrimitive(Device::RTShape shape, Device::RTMaterial material, const float* transform) { Device::RTPrimitive id = (Device::RTPrimitive) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewShapePrimitive(id,shape,material,transform); return id; } Device::RTPrimitive COIDevice::rtNewLightPrimitive(Device::RTLight light, Device::RTMaterial material, const float* transform) { Device::RTPrimitive id = (Device::RTPrimitive) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewLightPrimitive(id,light,material,transform); return id; } Device::RTPrimitive COIDevice::rtTransformPrimitive(Device::RTPrimitive primitive, const float* transform) { Device::RTPrimitive id = (Device::RTPrimitive) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtTransformPrimitive(id,primitive,transform); return id; } Device::RTScene COIDevice::rtNewScene(const char* type) { Device::RTScene id = (Device::RTScene) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewScene(id,type); return id; } void COIDevice::rtSetPrimitive(RTScene scene, size_t slot, RTPrimitive prim) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetPrimitive(scene,slot,prim); } Device::RTToneMapper COIDevice::rtNewToneMapper(const char* type) { Device::RTToneMapper id = (Device::RTToneMapper) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewToneMapper(id,type); return id; } Device::RTRenderer COIDevice::rtNewRenderer(const char* type) { Device::RTRenderer id = (Device::RTRenderer) allocHandle(); for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewRenderer(id,type); return id; } Device::RTFrameBuffer COIDevice::rtNewFrameBuffer(const char* type, size_t width, size_t height, size_t numBuffers, void** ptrs) { int id = allocHandle(); Device::RTFrameBuffer hid = (Device::RTFrameBuffer) id; for (size_t i=0; i<devices.size(); i++) devices[i]->rtNewFrameBuffer(hid,type,width,height,numBuffers); if (!strcasecmp(type,"RGB_FLOAT32")) buffers[id] = new SwapChain(type,width,height,numBuffers,ptrs,FrameBufferRGBFloat32::create); else if (!strcasecmp(type,"RGBA8" )) buffers[id] = new SwapChain(type,width,height,numBuffers,ptrs,FrameBufferRGBA8 ::create); else if (!strcasecmp(type,"RGB8" )) buffers[id] = new SwapChain(type,width,height,numBuffers,ptrs,FrameBufferRGB8 ::create); else throw std::runtime_error("unknown framebuffer type: "+std::string(type)); return hid; } void* COIDevice::rtMapFrameBuffer(Device::RTFrameBuffer frameBuffer, int bufID) { Ref<SwapChain>& swapChain = buffers[(size_t)frameBuffer]; if (bufID < 0) bufID = swapChain->id(); if (devices.size() == 1) return devices[0]->rtMapFrameBuffer(frameBuffer,bufID); /* map framebuffers of all devices */ std::vector<char*> ptrs(devices.size()); for (size_t i=0; i<devices.size(); i++) ptrs[i] = (char*) devices[i]->rtMapFrameBuffer(frameBuffer,bufID); /* merge images from different devices */ Ref<FrameBuffer>& buffer = swapChain->buffer(bufID); char* dptr = (char*) buffer->getData(); size_t stride = buffer->getStride(); for (size_t y=0; y<buffer->getHeight(); y++) { size_t row = y/4, subrow = y%4; size_t devRow = row/devices.size(); size_t devID = row%devices.size(); char* src = ptrs[devID]+stride*(4*devRow+subrow); char* dst = dptr+y*stride; memcpy(dst,src,stride); } /* unmap framebuffers of all devices */ for (size_t i=0; i<devices.size(); i++) devices[i]->rtUnmapFrameBuffer(frameBuffer,bufID); return dptr; } void COIDevice::rtUnmapFrameBuffer(Device::RTFrameBuffer frameBuffer, int bufID) { Ref<SwapChain>& swapChain = buffers[(size_t)frameBuffer]; if (bufID < 0) bufID = swapChain->id(); if (devices.size() == 1) devices[0]->rtUnmapFrameBuffer(frameBuffer,bufID); } void COIDevice::rtSwapBuffers(Device::RTFrameBuffer frameBuffer) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSwapBuffers(frameBuffer); Ref<SwapChain>& swapchain = buffers[(int)(long)frameBuffer]; swapchain->swapBuffers(); } void COIDevice::rtIncRef(Device::RTHandle handle) { incRef((int)(size_t)handle); } void COIDevice::rtDecRef(Device::RTHandle handle) { if (decRef((int)(size_t)handle)) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtDecRef(handle); } } /******************************************************************* setting of parameters *******************************************************************/ void COIDevice::rtSetBool1(Device::RTHandle handle, const char* property, bool x) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetBool1(handle,property,x); } void COIDevice::rtSetBool2(Device::RTHandle handle, const char* property, bool x, bool y) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetBool2(handle,property,x,y); } void COIDevice::rtSetBool3(Device::RTHandle handle, const char* property, bool x, bool y, bool z) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetBool3(handle,property,x,y,z); } void COIDevice::rtSetBool4(Device::RTHandle handle, const char* property, bool x, bool y, bool z, bool w) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetBool4(handle,property,x,y,z,w); } void COIDevice::rtSetInt1(Device::RTHandle handle, const char* property, int x) { if (!handle) { if (!strcmp(property,"serverID" )) serverID = x; else if (!strcmp(property,"serverCount")) { serverCount = x; for (size_t i=0; i<devices.size(); i++) { int id = serverID*devices.size()+i; int count = serverCount*devices.size(); devices[i]->rtSetInt1(NULL,"serverID",id); devices[i]->rtSetInt1(NULL,"serverCount",count); } } else for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetInt1(handle,property,x); } else for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetInt1(handle,property,x); } void COIDevice::rtSetInt2(Device::RTHandle handle, const char* property, int x, int y) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetInt2(handle,property,x,y); } void COIDevice::rtSetInt3(Device::RTHandle handle, const char* property, int x, int y, int z) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetInt3(handle,property,x,y,z); } void COIDevice::rtSetInt4(Device::RTHandle handle, const char* property, int x, int y, int z, int w) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetInt4(handle,property,x,y,z,w); } void COIDevice::rtSetFloat1(Device::RTHandle handle, const char* property, float x) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetFloat1(handle,property,x); } void COIDevice::rtSetFloat2(Device::RTHandle handle, const char* property, float x, float y) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetFloat2(handle,property,x,y); } void COIDevice::rtSetFloat3(Device::RTHandle handle, const char* property, float x, float y, float z) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetFloat3(handle,property,x,y,z); } void COIDevice::rtSetFloat4(Device::RTHandle handle, const char* property, float x, float y, float z, float w) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetFloat4(handle,property,x,y,z,w); } void COIDevice::rtSetArray(Device::RTHandle handle, const char* property, const char* type, Device::RTData data, size_t size, size_t stride, size_t ofs) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetArray(handle,property,type,data,size,stride,ofs); } void COIDevice::rtSetString(Device::RTHandle handle, const char* property, const char* str) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetString(handle,property,str); } void COIDevice::rtSetImage(Device::RTHandle handle, const char* property, Device::RTImage img) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetImage(handle,property,img); } void COIDevice::rtSetTexture(Device::RTHandle handle, const char* property, Device::RTTexture tex) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetTexture(handle,property,tex); } void COIDevice::rtSetTransform(Device::RTHandle handle, const char* property, const float* transform) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtSetTransform(handle,property,transform); } void COIDevice::rtClear(Device::RTHandle handle) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtClear(handle); } void COIDevice::rtCommit(Device::RTHandle handle) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtCommit(handle); } /******************************************************************* render calls *******************************************************************/ void COIDevice::rtRenderFrame(Device::RTRenderer renderer, Device::RTCamera camera, Device::RTScene scene, Device::RTToneMapper toneMapper, Device::RTFrameBuffer frameBuffer, int accumulate) { for (size_t i=0; i<devices.size(); i++) devices[i]->rtRenderFrame(renderer,camera,scene,toneMapper,frameBuffer,accumulate); } bool COIDevice::rtPick(Device::RTCamera camera, float x, float y, Device::RTScene scene, float& px, float& py, float& pz) { return devices[0]->rtPick(camera,x,y,scene,px,py,pz); } __dllexport Device* create(const char* parms, size_t numThreads, size_t verbose) { return new COIDevice(parms,numThreads,verbose); } }
41.728972
166
0.630926
PetrVevoda
100d963f8642163d678f79d96b1652b03bc2016c
3,139
cpp
C++
src/interface/uiMenu.cpp
santaclose/noose
e963138b81f380ca0f46369941cf65c4349bd4fb
[ "Apache-2.0" ]
8
2021-01-31T11:30:05.000Z
2021-09-01T07:48:34.000Z
src/interface/uiMenu.cpp
santaclose/noose
e963138b81f380ca0f46369941cf65c4349bd4fb
[ "Apache-2.0" ]
4
2021-09-01T08:17:18.000Z
2021-09-24T22:32:24.000Z
src/interface/uiMenu.cpp
santaclose/noose
e963138b81f380ca0f46369941cf65c4349bd4fb
[ "Apache-2.0" ]
1
2021-09-01T07:49:58.000Z
2021-09-01T07:49:58.000Z
#include "uiMenu.h" #include "uiSelectionBox.h" #include "uiNodeSystem.h" #include "../serializer.h" #include "../pathUtils.h" #include <iostream> #include <portable-file-dialogs.h> namespace uiMenu { sf::RenderWindow* renderWindow; const sf::Vector2i* mouseScreenPosPointer; uiSelectionBox selectionBox; std::vector<std::string> selectionBoxOptions = { "Open project", "Save project", "Clear project" }; sf::Vector2f buttonCenterPos; std::string continueMessageBoxTitle = "Alert"; std::string continueMessageBoxMessage = "The current state of the node editor will be lost, do you want to continue?"; } void uiMenu::initialize(sf::RenderWindow& window, const sf::Vector2i* mouseScreenPosPointer) { renderWindow = &window; uiMenu::mouseScreenPosPointer = mouseScreenPosPointer; selectionBox.initialize(); } void uiMenu::terminate() { selectionBox.terminate(); } void uiMenu::onPollEvent(const sf::Event& e) { switch (e.type) { case sf::Event::MouseButtonPressed: if (e.mouseButton.button != sf::Mouse::Left) break; int mouseOverIndex = selectionBox.mouseOver((sf::Vector2f)*mouseScreenPosPointer); if (mouseOverIndex > -1) { switch (mouseOverIndex) { case 0: // load { if (!uiNodeSystem::isEmpty()) { pfd::button choice = pfd::message(continueMessageBoxTitle, continueMessageBoxMessage, pfd::choice::yes_no, pfd::icon::warning).result(); if (choice == pfd::button::no) break; } std::vector<std::string> selection = pfd::open_file("Open file", "", { "Noose file (.ns)", "*.ns" }).result(); if (selection.size() == 0) { std::cout << "[UI] File not loaded\n"; break; } uiNodeSystem::clearNodeSelection(); // unselect if there is a node selected serializer::LoadFromFile(selection[0]); break; } case 1: // save { std::string destination = pfd::save_file("Save file", "", { "Noose file (.ns)", "*.ns" }).result(); if (destination.length() == 0) { std::cout << "[UI] File not saved\n"; break; } destination = destination + (pathUtils::fileHasExtension(destination.c_str(), "ns") ? "" : ".ns"); serializer::SaveIntoFile(destination); break; } case 2: // clear { if (!uiNodeSystem::isEmpty()) { pfd::button choice = pfd::message(continueMessageBoxTitle, continueMessageBoxMessage, pfd::choice::yes_no, pfd::icon::warning).result(); if (choice == pfd::button::no) break; } uiNodeSystem::clearNodeSelection(); uiNodeSystem::clearEverything(); break; } } } selectionBox.hide(); } } void uiMenu::onClickFloatingButton(const sf::Vector2f& buttonPos) { buttonCenterPos = buttonPos; selectionBox.display( buttonCenterPos, selectionBoxOptions, uiSelectionBox::DisplayMode::TopLeftCorner ); } void uiMenu::draw() { sf::FloatRect visibleArea(0, 0, renderWindow->getSize().x, renderWindow->getSize().y); renderWindow->setView(sf::View(visibleArea)); sf::Vector2f mousePos = (sf::Vector2f)*mouseScreenPosPointer; selectionBox.draw(*renderWindow, mousePos); } bool uiMenu::isActive() { return selectionBox.isVisible(); }
25.729508
141
0.677286
santaclose
100dc784f0a595b54e20f57e996fb353a9a9ea32
13,447
cpp
C++
src/codec/SkBmpStandardCodec.cpp
derp-caf/external_skia
b09dc92e00edce8366085aaad7dcce94ceb11b69
[ "BSD-3-Clause" ]
1
2019-05-29T09:54:38.000Z
2019-05-29T09:54:38.000Z
src/codec/SkBmpStandardCodec.cpp
derp-caf/external_skia
b09dc92e00edce8366085aaad7dcce94ceb11b69
[ "BSD-3-Clause" ]
null
null
null
src/codec/SkBmpStandardCodec.cpp
derp-caf/external_skia
b09dc92e00edce8366085aaad7dcce94ceb11b69
[ "BSD-3-Clause" ]
8
2019-01-12T23:06:45.000Z
2021-09-03T00:15:46.000Z
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkBmpStandardCodec.h" #include "SkCodecPriv.h" #include "SkColorData.h" #include "SkStream.h" /* * Creates an instance of the decoder * Called only by NewFromStream */ SkBmpStandardCodec::SkBmpStandardCodec(int width, int height, const SkEncodedInfo& info, std::unique_ptr<SkStream> stream, uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor, uint32_t offset, SkCodec::SkScanlineOrder rowOrder, bool isOpaque, bool inIco) : INHERITED(width, height, info, std::move(stream), bitsPerPixel, rowOrder) , fColorTable(nullptr) , fNumColors(numColors) , fBytesPerColor(bytesPerColor) , fOffset(offset) , fSwizzler(nullptr) , fIsOpaque(isOpaque) , fInIco(inIco) , fAndMaskRowBytes(fInIco ? SkAlign4(compute_row_bytes(this->getInfo().width(), 1)) : 0) {} /* * Initiates the bitmap decode */ SkCodec::Result SkBmpStandardCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options& opts, int* rowsDecoded) { if (opts.fSubset) { // Subsets are not supported. return kUnimplemented; } if (dstInfo.dimensions() != this->getInfo().dimensions()) { SkCodecPrintf("Error: scaling not supported.\n"); return kInvalidScale; } Result result = this->prepareToDecode(dstInfo, opts); if (kSuccess != result) { return result; } int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); if (rows != dstInfo.height()) { *rowsDecoded = rows; return kIncompleteInput; } return kSuccess; } /* * Process the color table for the bmp input */ bool SkBmpStandardCodec::createColorTable(SkColorType dstColorType, SkAlphaType dstAlphaType) { // Allocate memory for color table uint32_t colorBytes = 0; SkPMColor colorTable[256]; if (this->bitsPerPixel() <= 8) { // Inform the caller of the number of colors uint32_t maxColors = 1 << this->bitsPerPixel(); // Don't bother reading more than maxColors. const uint32_t numColorsToRead = fNumColors == 0 ? maxColors : SkTMin(fNumColors, maxColors); // Read the color table from the stream colorBytes = numColorsToRead * fBytesPerColor; std::unique_ptr<uint8_t[]> cBuffer(new uint8_t[colorBytes]); if (stream()->read(cBuffer.get(), colorBytes) != colorBytes) { SkCodecPrintf("Error: unable to read color table.\n"); return false; } SkColorType packColorType = dstColorType; SkAlphaType packAlphaType = dstAlphaType; if (this->colorXform()) { packColorType = kBGRA_8888_SkColorType; packAlphaType = kUnpremul_SkAlphaType; } // Choose the proper packing function bool isPremul = (kPremul_SkAlphaType == packAlphaType) && !fIsOpaque; PackColorProc packARGB = choose_pack_color_proc(isPremul, packColorType); // Fill in the color table uint32_t i = 0; for (; i < numColorsToRead; i++) { uint8_t blue = get_byte(cBuffer.get(), i*fBytesPerColor); uint8_t green = get_byte(cBuffer.get(), i*fBytesPerColor + 1); uint8_t red = get_byte(cBuffer.get(), i*fBytesPerColor + 2); uint8_t alpha; if (fIsOpaque) { alpha = 0xFF; } else { alpha = get_byte(cBuffer.get(), i*fBytesPerColor + 3); } colorTable[i] = packARGB(alpha, red, green, blue); } // To avoid segmentation faults on bad pixel data, fill the end of the // color table with black. This is the same the behavior as the // chromium decoder. for (; i < maxColors; i++) { colorTable[i] = SkPackARGB32NoCheck(0xFF, 0, 0, 0); } if (this->colorXform() && !this->xformOnDecode()) { this->applyColorXform(colorTable, colorTable, maxColors); } // Set the color table fColorTable.reset(new SkColorTable(colorTable, maxColors)); } // Bmp-in-Ico files do not use an offset to indicate where the pixel data // begins. Pixel data always begins immediately after the color table. if (!fInIco) { // Check that we have not read past the pixel array offset if(fOffset < colorBytes) { // This may occur on OS 2.1 and other old versions where the color // table defaults to max size, and the bmp tries to use a smaller // color table. This is invalid, and our decision is to indicate // an error, rather than try to guess the intended size of the // color table. SkCodecPrintf("Error: pixel data offset less than color table size.\n"); return false; } // After reading the color table, skip to the start of the pixel array if (stream()->skip(fOffset - colorBytes) != fOffset - colorBytes) { SkCodecPrintf("Error: unable to skip to image data.\n"); return false; } } // Return true on success return true; } void SkBmpStandardCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts) { // In the case of bmp-in-icos, we will report BGRA to the client, // since we may be required to apply an alpha mask after the decode. // However, the swizzler needs to know the actual format of the bmp. SkEncodedInfo encodedInfo = this->getEncodedInfo(); if (fInIco) { if (this->bitsPerPixel() <= 8) { encodedInfo = SkEncodedInfo::Make(SkEncodedInfo::kPalette_Color, encodedInfo.alpha(), this->bitsPerPixel()); } else if (this->bitsPerPixel() == 24) { encodedInfo = SkEncodedInfo::Make(SkEncodedInfo::kBGR_Color, SkEncodedInfo::kOpaque_Alpha, 8); } } // Get a pointer to the color table if it exists const SkPMColor* colorPtr = get_color_ptr(fColorTable.get()); SkImageInfo swizzlerInfo = dstInfo; SkCodec::Options swizzlerOptions = opts; if (this->colorXform()) { swizzlerInfo = swizzlerInfo.makeColorType(kXformSrcColorType); if (kPremul_SkAlphaType == dstInfo.alphaType()) { swizzlerInfo = swizzlerInfo.makeAlphaType(kUnpremul_SkAlphaType); } swizzlerOptions.fZeroInitialized = kNo_ZeroInitialized; } fSwizzler = SkSwizzler::Make(encodedInfo, colorPtr, swizzlerInfo, swizzlerOptions); SkASSERT(fSwizzler); } SkCodec::Result SkBmpStandardCodec::onPrepareToDecode(const SkImageInfo& dstInfo, const SkCodec::Options& options) { if (this->xformOnDecode()) { this->resetXformBuffer(dstInfo.width()); } // Create the color table if necessary and prepare the stream for decode // Note that if it is non-NULL, inputColorCount will be modified if (!this->createColorTable(dstInfo.colorType(), dstInfo.alphaType())) { SkCodecPrintf("Error: could not create color table.\n"); return SkCodec::kInvalidInput; } // Initialize a swizzler this->initializeSwizzler(dstInfo, options); return SkCodec::kSuccess; } /* * Performs the bitmap decoding for standard input format */ int SkBmpStandardCodec::decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options& opts) { // Iterate over rows of the image const int height = dstInfo.height(); for (int y = 0; y < height; y++) { // Read a row of the input if (this->stream()->read(this->srcBuffer(), this->srcRowBytes()) != this->srcRowBytes()) { SkCodecPrintf("Warning: incomplete input stream.\n"); return y; } // Decode the row in destination format uint32_t row = this->getDstRow(y, dstInfo.height()); void* dstRow = SkTAddOffset<void>(dst, row * dstRowBytes); if (this->xformOnDecode()) { SkASSERT(this->colorXform()); fSwizzler->swizzle(this->xformBuffer(), this->srcBuffer()); this->applyColorXform(dstRow, this->xformBuffer(), fSwizzler->swizzleWidth()); } else { fSwizzler->swizzle(dstRow, this->srcBuffer()); } } if (fInIco && fIsOpaque) { const int startScanline = this->currScanline(); if (startScanline < 0) { // We are not performing a scanline decode. // Just decode the entire ICO mask and return. decodeIcoMask(this->stream(), dstInfo, dst, dstRowBytes); return height; } // In order to perform a scanline ICO decode, we must be able // to skip ahead in the stream in order to apply the AND mask // to the requested scanlines. // We will do this by taking advantage of the fact that // SkIcoCodec always uses a SkMemoryStream as its underlying // representation of the stream. const void* memoryBase = this->stream()->getMemoryBase(); SkASSERT(nullptr != memoryBase); SkASSERT(this->stream()->hasLength()); SkASSERT(this->stream()->hasPosition()); const size_t length = this->stream()->getLength(); const size_t currPosition = this->stream()->getPosition(); // Calculate how many bytes we must skip to reach the AND mask. const int remainingScanlines = this->getInfo().height() - startScanline - height; const size_t bytesToSkip = remainingScanlines * this->srcRowBytes() + startScanline * fAndMaskRowBytes; const size_t subStreamStartPosition = currPosition + bytesToSkip; if (subStreamStartPosition >= length) { // FIXME: How can we indicate that this decode was actually incomplete? return height; } // Create a subStream to pass to decodeIcoMask(). It is useful to encapsulate // the memory base into a stream in order to safely handle incomplete images // without reading out of bounds memory. const void* subStreamMemoryBase = SkTAddOffset<const void>(memoryBase, subStreamStartPosition); const size_t subStreamLength = length - subStreamStartPosition; // This call does not transfer ownership of the subStreamMemoryBase. SkMemoryStream subStream(subStreamMemoryBase, subStreamLength, false); // FIXME: If decodeIcoMask does not succeed, is there a way that we can // indicate the decode was incomplete? decodeIcoMask(&subStream, dstInfo, dst, dstRowBytes); } return height; } void SkBmpStandardCodec::decodeIcoMask(SkStream* stream, const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes) { // BMP in ICO have transparency, so this cannot be 565. The below code depends // on the output being an SkPMColor. SkASSERT(kRGBA_8888_SkColorType == dstInfo.colorType() || kBGRA_8888_SkColorType == dstInfo.colorType() || kRGBA_F16_SkColorType == dstInfo.colorType()); // If we are sampling, make sure that we only mask the sampled pixels. // We do not need to worry about sampling in the y-dimension because that // should be handled by SkSampledCodec. const int sampleX = fSwizzler->sampleX(); const int sampledWidth = get_scaled_dimension(this->getInfo().width(), sampleX); const int srcStartX = get_start_coord(sampleX); SkPMColor* dstPtr = (SkPMColor*) dst; for (int y = 0; y < dstInfo.height(); y++) { // The srcBuffer will at least be large enough if (stream->read(this->srcBuffer(), fAndMaskRowBytes) != fAndMaskRowBytes) { SkCodecPrintf("Warning: incomplete AND mask for bmp-in-ico.\n"); return; } auto applyMask = [dstInfo](void* dstRow, int x, uint64_t bit) { if (kRGBA_F16_SkColorType == dstInfo.colorType()) { uint64_t* dst64 = (uint64_t*) dstRow; dst64[x] &= bit - 1; } else { uint32_t* dst32 = (uint32_t*) dstRow; dst32[x] &= bit - 1; } }; int row = this->getDstRow(y, dstInfo.height()); void* dstRow = SkTAddOffset<SkPMColor>(dstPtr, row * dstRowBytes); int srcX = srcStartX; for (int dstX = 0; dstX < sampledWidth; dstX++) { int quotient; int modulus; SkTDivMod(srcX, 8, &quotient, &modulus); uint32_t shift = 7 - modulus; uint64_t alphaBit = (this->srcBuffer()[quotient] >> shift) & 0x1; applyMask(dstRow, dstX, alphaBit); srcX += sampleX; } } } uint64_t SkBmpStandardCodec::onGetFillValue(const SkImageInfo& dstInfo) const { const SkPMColor* colorPtr = get_color_ptr(fColorTable.get()); if (colorPtr) { return get_color_table_fill_value(dstInfo.colorType(), dstInfo.alphaType(), colorPtr, 0, this->colorXform(), false); } return INHERITED::onGetFillValue(dstInfo); }
39.902077
99
0.620733
derp-caf
100fc140ed2f9df5e98dd798ba9e82b3a91a8bd5
11,315
cc
C++
id_theft/functions/node_modules/grpc/deps/grpc/src/core/lib/transport/metadata_batch.cc
jluisfgarza/Id-Theft-Hack2018
101ef7d6d251ee1a4cd1716fb4f8f0edc31f53bf
[ "MIT" ]
null
null
null
id_theft/functions/node_modules/grpc/deps/grpc/src/core/lib/transport/metadata_batch.cc
jluisfgarza/Id-Theft-Hack2018
101ef7d6d251ee1a4cd1716fb4f8f0edc31f53bf
[ "MIT" ]
null
null
null
id_theft/functions/node_modules/grpc/deps/grpc/src/core/lib/transport/metadata_batch.cc
jluisfgarza/Id-Theft-Hack2018
101ef7d6d251ee1a4cd1716fb4f8f0edc31f53bf
[ "MIT" ]
null
null
null
/* * * Copyright 2015 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include <grpc/support/port_platform.h> #include "src/core/lib/transport/metadata_batch.h" #include <stdbool.h> #include <string.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" static void assert_valid_list(grpc_mdelem_list* list) { #ifndef NDEBUG grpc_linked_mdelem* l; GPR_ASSERT((list->head == nullptr) == (list->tail == nullptr)); if (!list->head) return; GPR_ASSERT(list->head->prev == nullptr); GPR_ASSERT(list->tail->next == nullptr); GPR_ASSERT((list->head == list->tail) == (list->head->next == nullptr)); size_t verified_count = 0; for (l = list->head; l; l = l->next) { GPR_ASSERT(!GRPC_MDISNULL(l->md)); GPR_ASSERT((l->prev == nullptr) == (l == list->head)); GPR_ASSERT((l->next == nullptr) == (l == list->tail)); if (l->next) GPR_ASSERT(l->next->prev == l); if (l->prev) GPR_ASSERT(l->prev->next == l); verified_count++; } GPR_ASSERT(list->count == verified_count); #endif /* NDEBUG */ } static void assert_valid_callouts(grpc_metadata_batch* batch) { #ifndef NDEBUG for (grpc_linked_mdelem* l = batch->list.head; l != nullptr; l = l->next) { grpc_slice key_interned = grpc_slice_intern(GRPC_MDKEY(l->md)); grpc_metadata_batch_callouts_index callout_idx = GRPC_BATCH_INDEX_OF(key_interned); if (callout_idx != GRPC_BATCH_CALLOUTS_COUNT) { GPR_ASSERT(batch->idx.array[callout_idx] == l); } grpc_slice_unref_internal(key_interned); } #endif } #ifndef NDEBUG void grpc_metadata_batch_assert_ok(grpc_metadata_batch* batch) { assert_valid_list(&batch->list); } #endif /* NDEBUG */ void grpc_metadata_batch_init(grpc_metadata_batch* batch) { memset(batch, 0, sizeof(*batch)); batch->deadline = GRPC_MILLIS_INF_FUTURE; } void grpc_metadata_batch_destroy(grpc_metadata_batch* batch) { grpc_linked_mdelem* l; for (l = batch->list.head; l; l = l->next) { GRPC_MDELEM_UNREF(l->md); } } grpc_error* grpc_attach_md_to_error(grpc_error* src, grpc_mdelem md) { grpc_error* out = grpc_error_set_str( grpc_error_set_str(src, GRPC_ERROR_STR_KEY, grpc_slice_ref_internal(GRPC_MDKEY(md))), GRPC_ERROR_STR_VALUE, grpc_slice_ref_internal(GRPC_MDVALUE(md))); return out; } static grpc_error* maybe_link_callout(grpc_metadata_batch* batch, grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT; static grpc_error* maybe_link_callout(grpc_metadata_batch* batch, grpc_linked_mdelem* storage) { grpc_metadata_batch_callouts_index idx = GRPC_BATCH_INDEX_OF(GRPC_MDKEY(storage->md)); if (idx == GRPC_BATCH_CALLOUTS_COUNT) { return GRPC_ERROR_NONE; } if (batch->idx.array[idx] == nullptr) { if (grpc_static_callout_is_default[idx]) ++batch->list.default_count; batch->idx.array[idx] = storage; return GRPC_ERROR_NONE; } return grpc_attach_md_to_error( GRPC_ERROR_CREATE_FROM_STATIC_STRING("Unallowed duplicate metadata"), storage->md); } static void maybe_unlink_callout(grpc_metadata_batch* batch, grpc_linked_mdelem* storage) { grpc_metadata_batch_callouts_index idx = GRPC_BATCH_INDEX_OF(GRPC_MDKEY(storage->md)); if (idx == GRPC_BATCH_CALLOUTS_COUNT) { return; } if (grpc_static_callout_is_default[idx]) --batch->list.default_count; GPR_ASSERT(batch->idx.array[idx] != nullptr); batch->idx.array[idx] = nullptr; } grpc_error* grpc_metadata_batch_add_head(grpc_metadata_batch* batch, grpc_linked_mdelem* storage, grpc_mdelem elem_to_add) { GPR_ASSERT(!GRPC_MDISNULL(elem_to_add)); storage->md = elem_to_add; return grpc_metadata_batch_link_head(batch, storage); } static void link_head(grpc_mdelem_list* list, grpc_linked_mdelem* storage) { assert_valid_list(list); GPR_ASSERT(!GRPC_MDISNULL(storage->md)); storage->prev = nullptr; storage->next = list->head; if (list->head != nullptr) { list->head->prev = storage; } else { list->tail = storage; } list->head = storage; list->count++; assert_valid_list(list); } grpc_error* grpc_metadata_batch_link_head(grpc_metadata_batch* batch, grpc_linked_mdelem* storage) { assert_valid_callouts(batch); grpc_error* err = maybe_link_callout(batch, storage); if (err != GRPC_ERROR_NONE) { assert_valid_callouts(batch); return err; } link_head(&batch->list, storage); assert_valid_callouts(batch); return GRPC_ERROR_NONE; } grpc_error* grpc_metadata_batch_add_tail(grpc_metadata_batch* batch, grpc_linked_mdelem* storage, grpc_mdelem elem_to_add) { GPR_ASSERT(!GRPC_MDISNULL(elem_to_add)); storage->md = elem_to_add; return grpc_metadata_batch_link_tail(batch, storage); } static void link_tail(grpc_mdelem_list* list, grpc_linked_mdelem* storage) { assert_valid_list(list); GPR_ASSERT(!GRPC_MDISNULL(storage->md)); storage->prev = list->tail; storage->next = nullptr; storage->reserved = nullptr; if (list->tail != nullptr) { list->tail->next = storage; } else { list->head = storage; } list->tail = storage; list->count++; assert_valid_list(list); } grpc_error* grpc_metadata_batch_link_tail(grpc_metadata_batch* batch, grpc_linked_mdelem* storage) { assert_valid_callouts(batch); grpc_error* err = maybe_link_callout(batch, storage); if (err != GRPC_ERROR_NONE) { assert_valid_callouts(batch); return err; } link_tail(&batch->list, storage); assert_valid_callouts(batch); return GRPC_ERROR_NONE; } static void unlink_storage(grpc_mdelem_list* list, grpc_linked_mdelem* storage) { assert_valid_list(list); if (storage->prev != nullptr) { storage->prev->next = storage->next; } else { list->head = storage->next; } if (storage->next != nullptr) { storage->next->prev = storage->prev; } else { list->tail = storage->prev; } list->count--; assert_valid_list(list); } void grpc_metadata_batch_remove(grpc_metadata_batch* batch, grpc_linked_mdelem* storage) { assert_valid_callouts(batch); maybe_unlink_callout(batch, storage); unlink_storage(&batch->list, storage); GRPC_MDELEM_UNREF(storage->md); assert_valid_callouts(batch); } void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage, grpc_slice value) { grpc_mdelem old_mdelem = storage->md; grpc_mdelem new_mdelem = grpc_mdelem_from_slices( grpc_slice_ref_internal(GRPC_MDKEY(old_mdelem)), value); storage->md = new_mdelem; GRPC_MDELEM_UNREF(old_mdelem); } grpc_error* grpc_metadata_batch_substitute(grpc_metadata_batch* batch, grpc_linked_mdelem* storage, grpc_mdelem new_mdelem) { assert_valid_callouts(batch); grpc_error* error = GRPC_ERROR_NONE; grpc_mdelem old_mdelem = storage->md; if (!grpc_slice_eq(GRPC_MDKEY(new_mdelem), GRPC_MDKEY(old_mdelem))) { maybe_unlink_callout(batch, storage); storage->md = new_mdelem; error = maybe_link_callout(batch, storage); if (error != GRPC_ERROR_NONE) { unlink_storage(&batch->list, storage); GRPC_MDELEM_UNREF(storage->md); } } else { storage->md = new_mdelem; } GRPC_MDELEM_UNREF(old_mdelem); assert_valid_callouts(batch); return error; } void grpc_metadata_batch_clear(grpc_metadata_batch* batch) { grpc_metadata_batch_destroy(batch); grpc_metadata_batch_init(batch); } bool grpc_metadata_batch_is_empty(grpc_metadata_batch* batch) { return batch->list.head == nullptr && batch->deadline == GRPC_MILLIS_INF_FUTURE; } size_t grpc_metadata_batch_size(grpc_metadata_batch* batch) { size_t size = 0; for (grpc_linked_mdelem* elem = batch->list.head; elem != nullptr; elem = elem->next) { size += GRPC_MDELEM_LENGTH(elem->md); } return size; } static void add_error(grpc_error** composite, grpc_error* error, const char* composite_error_string) { if (error == GRPC_ERROR_NONE) return; if (*composite == GRPC_ERROR_NONE) { *composite = GRPC_ERROR_CREATE_FROM_COPIED_STRING(composite_error_string); } *composite = grpc_error_add_child(*composite, error); } grpc_error* grpc_metadata_batch_filter(grpc_metadata_batch* batch, grpc_metadata_batch_filter_func func, void* user_data, const char* composite_error_string) { grpc_linked_mdelem* l = batch->list.head; grpc_error* error = GRPC_ERROR_NONE; while (l) { grpc_linked_mdelem* next = l->next; grpc_filtered_mdelem new_mdelem = func(user_data, l->md); add_error(&error, new_mdelem.error, composite_error_string); if (GRPC_MDISNULL(new_mdelem.md)) { grpc_metadata_batch_remove(batch, l); } else if (new_mdelem.md.payload != l->md.payload) { grpc_metadata_batch_substitute(batch, l, new_mdelem.md); } l = next; } return error; } void grpc_metadata_batch_copy(grpc_metadata_batch* src, grpc_metadata_batch* dst, grpc_linked_mdelem* storage) { grpc_metadata_batch_init(dst); dst->deadline = src->deadline; size_t i = 0; for (grpc_linked_mdelem* elem = src->list.head; elem != nullptr; elem = elem->next) { grpc_error* error = grpc_metadata_batch_add_tail(dst, &storage[i++], GRPC_MDELEM_REF(elem->md)); // The only way that grpc_metadata_batch_add_tail() can fail is if // there's a duplicate entry for a callout. However, that can't be // the case here, because we would not have been allowed to create // a source batch that had that kind of conflict. GPR_ASSERT(error == GRPC_ERROR_NONE); } } void grpc_metadata_batch_move(grpc_metadata_batch* src, grpc_metadata_batch* dst) { *dst = *src; grpc_metadata_batch_init(src); }
34.287879
81
0.656209
jluisfgarza
10104565dabc53bdc1d26316795244b0ebfcbfa0
2,523
hpp
C++
boost/polygon/polygon.hpp
Ron2014/boost_1_48_0
19673f69677ffcba7c7bd6e08ec07ee3962f161c
[ "BSL-1.0" ]
76
2015-01-02T10:59:25.000Z
2022-03-08T09:43:12.000Z
boost/polygon/polygon.hpp
Ron2014/boost_1_48_0
19673f69677ffcba7c7bd6e08ec07ee3962f161c
[ "BSL-1.0" ]
4
2015-02-19T22:30:02.000Z
2018-08-31T14:58:05.000Z
boost/polygon/polygon.hpp
Ron2014/boost_1_48_0
19673f69677ffcba7c7bd6e08ec07ee3962f161c
[ "BSL-1.0" ]
26
2015-02-11T15:34:54.000Z
2021-12-02T08:20:22.000Z
/* Copyright 2008 Intel Corporation Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). */ #ifndef BOOST_POLYGON_POLYGON_HPP #define BOOST_POLYGON_POLYGON_HPP #define BOOST_POLYGON_VERSION 014401 #include "isotropy.hpp" //point #include "point_data.hpp" #include "point_traits.hpp" #include "point_concept.hpp" //point 3d #include "point_3d_data.hpp" #include "point_3d_traits.hpp" #include "point_3d_concept.hpp" #include "transform.hpp" #include "detail/transform_detail.hpp" //interval #include "interval_data.hpp" #include "interval_traits.hpp" #include "interval_concept.hpp" //rectangle #include "rectangle_data.hpp" #include "rectangle_traits.hpp" #include "rectangle_concept.hpp" //algorithms needed by polygon types #include "detail/iterator_points_to_compact.hpp" #include "detail/iterator_compact_to_points.hpp" //polygons #include "polygon_45_data.hpp" #include "polygon_data.hpp" #include "polygon_90_data.hpp" #include "polygon_90_with_holes_data.hpp" #include "polygon_45_with_holes_data.hpp" #include "polygon_with_holes_data.hpp" #include "polygon_traits.hpp" //manhattan boolean algorithms #include "detail/boolean_op.hpp" #include "detail/polygon_formation.hpp" #include "detail/rectangle_formation.hpp" #include "detail/max_cover.hpp" #include "detail/property_merge.hpp" #include "detail/polygon_90_touch.hpp" #include "detail/iterator_geometry_to_set.hpp" //45 boolean op algorithms #include "detail/boolean_op_45.hpp" #include "detail/polygon_45_formation.hpp" //polygon set data types #include "polygon_90_set_data.hpp" //polygon set trait types #include "polygon_90_set_traits.hpp" //polygon set concepts #include "polygon_90_set_concept.hpp" //boolean operator syntax #include "detail/polygon_90_set_view.hpp" //45 boolean op algorithms #include "detail/polygon_45_touch.hpp" #include "detail/property_merge_45.hpp" #include "polygon_45_set_data.hpp" #include "polygon_45_set_traits.hpp" #include "polygon_45_set_concept.hpp" #include "detail/polygon_45_set_view.hpp" //arbitrary polygon algorithms #include "detail/polygon_arbitrary_formation.hpp" #include "polygon_set_data.hpp" //general scanline #include "detail/scan_arbitrary.hpp" #include "polygon_set_traits.hpp" #include "detail/polygon_set_view.hpp" #include "polygon_set_concept.hpp" #endif
27.423913
80
0.778438
Ron2014
1012ccce9c382fa36e9cfe4642d8ff08f30f8eea
16,125
cc
C++
Boss2D/addon/_old/webrtc-qt5.11.2_for_boss/rtc_base/messagequeue.cc
Yash-Wasalwar-07/Boss2D
37c5ba0f1c83c89810359a207cabfa0905f803d2
[ "MIT" ]
null
null
null
Boss2D/addon/_old/webrtc-qt5.11.2_for_boss/rtc_base/messagequeue.cc
Yash-Wasalwar-07/Boss2D
37c5ba0f1c83c89810359a207cabfa0905f803d2
[ "MIT" ]
null
null
null
Boss2D/addon/_old/webrtc-qt5.11.2_for_boss/rtc_base/messagequeue.cc
Yash-Wasalwar-07/Boss2D
37c5ba0f1c83c89810359a207cabfa0905f803d2
[ "MIT" ]
null
null
null
/* * Copyright 2004 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include <algorithm> #include BOSS_WEBRTC_U_rtc_base__atomicops_h //original-code:"rtc_base/atomicops.h" #include BOSS_WEBRTC_U_rtc_base__checks_h //original-code:"rtc_base/checks.h" #include BOSS_WEBRTC_U_rtc_base__logging_h //original-code:"rtc_base/logging.h" #include BOSS_WEBRTC_U_rtc_base__messagequeue_h //original-code:"rtc_base/messagequeue.h" #include BOSS_WEBRTC_U_rtc_base__stringencode_h //original-code:"rtc_base/stringencode.h" #include BOSS_WEBRTC_U_rtc_base__thread_h //original-code:"rtc_base/thread.h" #include BOSS_WEBRTC_U_rtc_base__trace_event_h //original-code:"rtc_base/trace_event.h" namespace rtc { namespace { const int kMaxMsgLatency = 150; // 150 ms const int kSlowDispatchLoggingThreshold = 50; // 50 ms class RTC_SCOPED_LOCKABLE MarkProcessingCritScope { public: MarkProcessingCritScope(const CriticalSection* cs, size_t* processing) RTC_EXCLUSIVE_LOCK_FUNCTION(cs) : cs_(cs), processing_(processing) { cs_->Enter(); *processing_ += 1; } ~MarkProcessingCritScope() RTC_UNLOCK_FUNCTION() { *processing_ -= 1; cs_->Leave(); } private: const CriticalSection* const cs_; size_t* processing_; RTC_DISALLOW_COPY_AND_ASSIGN(MarkProcessingCritScope); }; } // namespace //------------------------------------------------------------------ // MessageQueueManager MessageQueueManager* MessageQueueManager::instance_ = nullptr; MessageQueueManager* MessageQueueManager::Instance() { // Note: This is not thread safe, but it is first called before threads are // spawned. if (!instance_) instance_ = new MessageQueueManager; return instance_; } bool MessageQueueManager::IsInitialized() { return instance_ != nullptr; } MessageQueueManager::MessageQueueManager() : processing_(0) {} MessageQueueManager::~MessageQueueManager() { } void MessageQueueManager::Add(MessageQueue *message_queue) { return Instance()->AddInternal(message_queue); } void MessageQueueManager::AddInternal(MessageQueue *message_queue) { CritScope cs(&crit_); // Prevent changes while the list of message queues is processed. RTC_DCHECK_EQ(processing_, 0); message_queues_.push_back(message_queue); } void MessageQueueManager::Remove(MessageQueue *message_queue) { // If there isn't a message queue manager instance, then there isn't a queue // to remove. if (!instance_) return; return Instance()->RemoveInternal(message_queue); } void MessageQueueManager::RemoveInternal(MessageQueue *message_queue) { // If this is the last MessageQueue, destroy the manager as well so that // we don't leak this object at program shutdown. As mentioned above, this is // not thread-safe, but this should only happen at program termination (when // the ThreadManager is destroyed, and threads are no longer active). bool destroy = false; { CritScope cs(&crit_); // Prevent changes while the list of message queues is processed. RTC_DCHECK_EQ(processing_, 0); std::vector<MessageQueue *>::iterator iter; iter = std::find(message_queues_.begin(), message_queues_.end(), message_queue); if (iter != message_queues_.end()) { message_queues_.erase(iter); } destroy = message_queues_.empty(); } if (destroy) { instance_ = nullptr; delete this; } } void MessageQueueManager::Clear(MessageHandler *handler) { // If there isn't a message queue manager instance, then there aren't any // queues to remove this handler from. if (!instance_) return; return Instance()->ClearInternal(handler); } void MessageQueueManager::ClearInternal(MessageHandler *handler) { // Deleted objects may cause re-entrant calls to ClearInternal. This is // allowed as the list of message queues does not change while queues are // cleared. MarkProcessingCritScope cs(&crit_, &processing_); std::vector<MessageQueue *>::iterator iter; for (MessageQueue* queue : message_queues_) { queue->Clear(handler); } } void MessageQueueManager::ProcessAllMessageQueues() { if (!instance_) { return; } return Instance()->ProcessAllMessageQueuesInternal(); } void MessageQueueManager::ProcessAllMessageQueuesInternal() { // This works by posting a delayed message at the current time and waiting // for it to be dispatched on all queues, which will ensure that all messages // that came before it were also dispatched. volatile int queues_not_done = 0; // This class is used so that whether the posted message is processed, or the // message queue is simply cleared, queues_not_done gets decremented. class ScopedIncrement : public MessageData { public: ScopedIncrement(volatile int* value) : value_(value) { AtomicOps::Increment(value_); } ~ScopedIncrement() override { AtomicOps::Decrement(value_); } private: volatile int* value_; }; { MarkProcessingCritScope cs(&crit_, &processing_); for (MessageQueue* queue : message_queues_) { if (!queue->IsProcessingMessages()) { // If the queue is not processing messages, it can // be ignored. If we tried to post a message to it, it would be dropped // or ignored. continue; } queue->PostDelayed(RTC_FROM_HERE, 0, nullptr, MQID_DISPOSE, new ScopedIncrement(&queues_not_done)); } } // Note: One of the message queues may have been on this thread, which is why // we can't synchronously wait for queues_not_done to go to 0; we need to // process messages as well. while (AtomicOps::AcquireLoad(&queues_not_done) > 0) { rtc::Thread::Current()->ProcessMessages(0); } } //------------------------------------------------------------------ // MessageQueue MessageQueue::MessageQueue(SocketServer* ss, bool init_queue) : fPeekKeep_(false), dmsgq_next_num_(0), fInitialized_(false), fDestroyed_(false), stop_(0), ss_(ss) { RTC_DCHECK(ss); // Currently, MessageQueue holds a socket server, and is the base class for // Thread. It seems like it makes more sense for Thread to hold the socket // server, and provide it to the MessageQueue, since the Thread controls // the I/O model, and MQ is agnostic to those details. Anyway, this causes // messagequeue_unittest to depend on network libraries... yuck. ss_->SetMessageQueue(this); if (init_queue) { DoInit(); } } MessageQueue::MessageQueue(std::unique_ptr<SocketServer> ss, bool init_queue) : MessageQueue(ss.get(), init_queue) { own_ss_ = std::move(ss); } MessageQueue::~MessageQueue() { DoDestroy(); } void MessageQueue::DoInit() { if (fInitialized_) { return; } fInitialized_ = true; MessageQueueManager::Add(this); } void MessageQueue::DoDestroy() { if (fDestroyed_) { return; } fDestroyed_ = true; // The signal is done from here to ensure // that it always gets called when the queue // is going away. SignalQueueDestroyed(); MessageQueueManager::Remove(this); Clear(nullptr); if (ss_) { ss_->SetMessageQueue(nullptr); } } SocketServer* MessageQueue::socketserver() { return ss_; } void MessageQueue::WakeUpSocketServer() { ss_->WakeUp(); } void MessageQueue::Quit() { AtomicOps::ReleaseStore(&stop_, 1); WakeUpSocketServer(); } bool MessageQueue::IsQuitting() { return AtomicOps::AcquireLoad(&stop_) != 0; } bool MessageQueue::IsProcessingMessages() { return !IsQuitting(); } void MessageQueue::Restart() { AtomicOps::ReleaseStore(&stop_, 0); } bool MessageQueue::Peek(Message *pmsg, int cmsWait) { if (fPeekKeep_) { *pmsg = msgPeek_; return true; } if (!Get(pmsg, cmsWait)) return false; msgPeek_ = *pmsg; fPeekKeep_ = true; return true; } bool MessageQueue::Get(Message *pmsg, int cmsWait, bool process_io) { // Return and clear peek if present // Always return the peek if it exists so there is Peek/Get symmetry if (fPeekKeep_) { *pmsg = msgPeek_; fPeekKeep_ = false; return true; } // Get w/wait + timer scan / dispatch + socket / event multiplexer dispatch int64_t cmsTotal = cmsWait; int64_t cmsElapsed = 0; int64_t msStart = TimeMillis(); int64_t msCurrent = msStart; while (true) { // Check for sent messages ReceiveSends(); // Check for posted events int64_t cmsDelayNext = kForever; bool first_pass = true; while (true) { // All queue operations need to be locked, but nothing else in this loop // (specifically handling disposed message) can happen inside the crit. // Otherwise, disposed MessageHandlers will cause deadlocks. { CritScope cs(&crit_); // On the first pass, check for delayed messages that have been // triggered and calculate the next trigger time. if (first_pass) { first_pass = false; while (!dmsgq_.empty()) { if (msCurrent < dmsgq_.top().msTrigger_) { cmsDelayNext = TimeDiff(dmsgq_.top().msTrigger_, msCurrent); break; } msgq_.push_back(dmsgq_.top().msg_); dmsgq_.pop(); } } // Pull a message off the message queue, if available. if (msgq_.empty()) { break; } else { *pmsg = msgq_.front(); msgq_.pop_front(); } } // crit_ is released here. // Log a warning for time-sensitive messages that we're late to deliver. if (pmsg->ts_sensitive) { int64_t delay = TimeDiff(msCurrent, pmsg->ts_sensitive); if (delay > 0) { RTC_LOG_F(LS_WARNING) << "id: " << pmsg->message_id << " delay: " << (delay + kMaxMsgLatency) << "ms"; } } // If this was a dispose message, delete it and skip it. if (MQID_DISPOSE == pmsg->message_id) { RTC_DCHECK(nullptr == pmsg->phandler); delete pmsg->pdata; *pmsg = Message(); continue; } return true; } if (IsQuitting()) break; // Which is shorter, the delay wait or the asked wait? int64_t cmsNext; if (cmsWait == kForever) { cmsNext = cmsDelayNext; } else { cmsNext = std::max<int64_t>(0, cmsTotal - cmsElapsed); if ((cmsDelayNext != kForever) && (cmsDelayNext < cmsNext)) cmsNext = cmsDelayNext; } { // Wait and multiplex in the meantime if (!ss_->Wait(static_cast<int>(cmsNext), process_io)) return false; } // If the specified timeout expired, return msCurrent = TimeMillis(); cmsElapsed = TimeDiff(msCurrent, msStart); if (cmsWait != kForever) { if (cmsElapsed >= cmsWait) return false; } } return false; } void MessageQueue::ReceiveSends() { } void MessageQueue::Post(const Location& posted_from, MessageHandler* phandler, uint32_t id, MessageData* pdata, bool time_sensitive) { if (IsQuitting()) return; // Keep thread safe // Add the message to the end of the queue // Signal for the multiplexer to return { CritScope cs(&crit_); Message msg; msg.posted_from = posted_from; msg.phandler = phandler; msg.message_id = id; msg.pdata = pdata; if (time_sensitive) { msg.ts_sensitive = TimeMillis() + kMaxMsgLatency; } msgq_.push_back(msg); } WakeUpSocketServer(); } void MessageQueue::PostDelayed(const Location& posted_from, int cmsDelay, MessageHandler* phandler, uint32_t id, MessageData* pdata) { return DoDelayPost(posted_from, cmsDelay, TimeAfter(cmsDelay), phandler, id, pdata); } void MessageQueue::PostAt(const Location& posted_from, uint32_t tstamp, MessageHandler* phandler, uint32_t id, MessageData* pdata) { // This should work even if it is used (unexpectedly). int64_t delay = static_cast<uint32_t>(TimeMillis()) - tstamp; return DoDelayPost(posted_from, delay, tstamp, phandler, id, pdata); } void MessageQueue::PostAt(const Location& posted_from, int64_t tstamp, MessageHandler* phandler, uint32_t id, MessageData* pdata) { return DoDelayPost(posted_from, TimeUntil(tstamp), tstamp, phandler, id, pdata); } void MessageQueue::DoDelayPost(const Location& posted_from, int64_t cmsDelay, int64_t tstamp, MessageHandler* phandler, uint32_t id, MessageData* pdata) { if (IsQuitting()) { return; } // Keep thread safe // Add to the priority queue. Gets sorted soonest first. // Signal for the multiplexer to return. { CritScope cs(&crit_); Message msg; msg.posted_from = posted_from; msg.phandler = phandler; msg.message_id = id; msg.pdata = pdata; DelayedMessage dmsg(cmsDelay, tstamp, dmsgq_next_num_, msg); dmsgq_.push(dmsg); // If this message queue processes 1 message every millisecond for 50 days, // we will wrap this number. Even then, only messages with identical times // will be misordered, and then only briefly. This is probably ok. ++dmsgq_next_num_; RTC_DCHECK_NE(0, dmsgq_next_num_); } WakeUpSocketServer(); } int MessageQueue::GetDelay() { CritScope cs(&crit_); if (!msgq_.empty()) return 0; if (!dmsgq_.empty()) { int delay = TimeUntil(dmsgq_.top().msTrigger_); if (delay < 0) delay = 0; return delay; } return kForever; } void MessageQueue::Clear(MessageHandler* phandler, uint32_t id, MessageList* removed) { CritScope cs(&crit_); // Remove messages with phandler if (fPeekKeep_ && msgPeek_.Match(phandler, id)) { if (removed) { removed->push_back(msgPeek_); } else { delete msgPeek_.pdata; } fPeekKeep_ = false; } // Remove from ordered message queue for (MessageList::iterator it = msgq_.begin(); it != msgq_.end();) { if (it->Match(phandler, id)) { if (removed) { removed->push_back(*it); } else { delete it->pdata; } it = msgq_.erase(it); } else { ++it; } } // Remove from priority queue. Not directly iterable, so use this approach PriorityQueue::container_type::iterator new_end = dmsgq_.container().begin(); for (PriorityQueue::container_type::iterator it = new_end; it != dmsgq_.container().end(); ++it) { if (it->msg_.Match(phandler, id)) { if (removed) { removed->push_back(it->msg_); } else { delete it->msg_.pdata; } } else { *new_end++ = *it; } } dmsgq_.container().erase(new_end, dmsgq_.container().end()); dmsgq_.reheap(); } void MessageQueue::Dispatch(Message *pmsg) { TRACE_EVENT2("webrtc", "MessageQueue::Dispatch", "src_file_and_line", pmsg->posted_from.file_and_line(), "src_func", pmsg->posted_from.function_name()); int64_t start_time = TimeMillis(); pmsg->phandler->OnMessage(pmsg); int64_t end_time = TimeMillis(); int64_t diff = TimeDiff(end_time, start_time); if (diff >= kSlowDispatchLoggingThreshold) { RTC_LOG(LS_INFO) << "Message took " << diff << "ms to dispatch. Posted from: " << pmsg->posted_from.ToString(); } } } // namespace rtc
29.750923
89
0.642543
Yash-Wasalwar-07
1013d979cb9a05c9b3343497013e27b161b94ddc
17,443
cpp
C++
mplapack/reference/Rorbdb.cpp
Ndersam/mplapack
f2ef54d7ce95e4028d3f101a901c75d18d3f1327
[ "BSD-3-Clause-Open-MPI" ]
26
2019-03-20T04:06:03.000Z
2022-03-02T10:21:01.000Z
mplapack/reference/Rorbdb.cpp
Ndersam/mplapack
f2ef54d7ce95e4028d3f101a901c75d18d3f1327
[ "BSD-3-Clause-Open-MPI" ]
5
2019-03-04T03:32:41.000Z
2021-12-01T07:47:25.000Z
mplapack/reference/Rorbdb.cpp
Ndersam/mplapack
f2ef54d7ce95e4028d3f101a901c75d18d3f1327
[ "BSD-3-Clause-Open-MPI" ]
5
2019-03-09T17:50:26.000Z
2022-03-10T19:46:20.000Z
/* * Copyright (c) 2021 * Nakata, Maho * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include <mpblas.h> #include <mplapack.h> void Rorbdb(const char *trans, const char *signs, INTEGER const m, INTEGER const p, INTEGER const q, REAL *x11, INTEGER const ldx11, REAL *x12, INTEGER const ldx12, REAL *x21, INTEGER const ldx21, REAL *x22, INTEGER const ldx22, REAL *theta, REAL *phi, REAL *taup1, REAL *taup2, REAL *tauq1, REAL *tauq2, REAL *work, INTEGER const lwork, INTEGER &info) { // // Test input arguments // #if defined ___MPLAPACK_BUILD_WITH_GMP___ printf("MPLAPACK ERROR Rorbdb.cpp is not supported for GMP\n"); exit(1); #endif info = 0; bool colmajor = !Mlsame(trans, "T"); const REAL realone = 1.0; REAL z1 = 0.0; REAL z2 = 0.0; REAL z3 = 0.0; REAL z4 = 0.0; if (!Mlsame(signs, "O")) { z1 = realone; z2 = realone; z3 = realone; z4 = realone; } else { z1 = realone; z2 = -realone; z3 = realone; z4 = -realone; } bool lquery = lwork == -1; // if (m < 0) { info = -3; } else if (p < 0 || p > m) { info = -4; } else if (q < 0 || q > p || q > m - p || q > m - q) { info = -5; } else if (colmajor && ldx11 < max((INTEGER)1, p)) { info = -7; } else if (!colmajor && ldx11 < max((INTEGER)1, q)) { info = -7; } else if (colmajor && ldx12 < max((INTEGER)1, p)) { info = -9; } else if (!colmajor && ldx12 < max((INTEGER)1, m - q)) { info = -9; } else if (colmajor && ldx21 < max((INTEGER)1, m - p)) { info = -11; } else if (!colmajor && ldx21 < max((INTEGER)1, q)) { info = -11; } else if (colmajor && ldx22 < max((INTEGER)1, m - p)) { info = -13; } else if (!colmajor && ldx22 < max((INTEGER)1, m - q)) { info = -13; } // // Compute workspace // INTEGER lworkopt = 0; INTEGER lworkmin = 0; if (info == 0) { lworkopt = m - q; lworkmin = m - q; work[1 - 1] = lworkopt; if (lwork < lworkmin && !lquery) { info = -21; } } if (info != 0) { Mxerbla("xORBDB", -info); return; } else if (lquery) { return; } // // Handle column-major and row-major separately // INTEGER i = 0; const REAL one = 1.0; if (colmajor) { // // Reduce columns 1, ..., Q of X11, X12, X21, and X22 // for (i = 1; i <= q; i = i + 1) { // if (i == 1) { Rscal(p - i + 1, z1, &x11[(i - 1) + (i - 1) * ldx11], 1); } else { Rscal(p - i + 1, z1 * cos(phi[(i - 1) - 1]), &x11[(i - 1) + (i - 1) * ldx11], 1); Raxpy(p - i + 1, -z1 * z3 * z4 * sin(phi[(i - 1) - 1]), &x12[(i - 1) + ((i - 1) - 1) * ldx12], 1, &x11[(i - 1) + (i - 1) * ldx11], 1); } if (i == 1) { Rscal(m - p - i + 1, z2, &x21[(i - 1) + (i - 1) * ldx21], 1); } else { Rscal(m - p - i + 1, z2 * cos(phi[(i - 1) - 1]), &x21[(i - 1) + (i - 1) * ldx21], 1); Raxpy(m - p - i + 1, -z2 * z3 * z4 * sin(phi[(i - 1) - 1]), &x22[(i - 1) + ((i - 1) - 1) * ldx22], 1, &x21[(i - 1) + (i - 1) * ldx21], 1); } // theta[i - 1] = atan2(Rnrm2(m - p - i + 1, &x21[(i - 1) + (i - 1) * ldx21], 1), Rnrm2(p - i + 1, &x11[(i - 1) + (i - 1) * ldx11], 1)); // if (p > i) { Rlarfgp(p - i + 1, x11[(i - 1) + (i - 1) * ldx11], &x11[((i + 1) - 1) + (i - 1) * ldx11], 1, taup1[i - 1]); } else if (p == i) { Rlarfgp(p - i + 1, x11[(i - 1) + (i - 1) * ldx11], &x11[(i - 1) + (i - 1) * ldx11], 1, taup1[i - 1]); } x11[(i - 1) + (i - 1) * ldx11] = one; if (m - p > i) { Rlarfgp(m - p - i + 1, x21[(i - 1) + (i - 1) * ldx21], &x21[((i + 1) - 1) + (i - 1) * ldx21], 1, taup2[i - 1]); } else if (m - p == i) { Rlarfgp(m - p - i + 1, x21[(i - 1) + (i - 1) * ldx21], &x21[(i - 1) + (i - 1) * ldx21], 1, taup2[i - 1]); } x21[(i - 1) + (i - 1) * ldx21] = one; // if (q > i) { Rlarf("L", p - i + 1, q - i, &x11[(i - 1) + (i - 1) * ldx11], 1, taup1[i - 1], &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11, work); } if (m - q + 1 > i) { Rlarf("L", p - i + 1, m - q - i + 1, &x11[(i - 1) + (i - 1) * ldx11], 1, taup1[i - 1], &x12[(i - 1) + (i - 1) * ldx12], ldx12, work); } if (q > i) { Rlarf("L", m - p - i + 1, q - i, &x21[(i - 1) + (i - 1) * ldx21], 1, taup2[i - 1], &x21[(i - 1) + ((i + 1) - 1) * ldx21], ldx21, work); } if (m - q + 1 > i) { Rlarf("L", m - p - i + 1, m - q - i + 1, &x21[(i - 1) + (i - 1) * ldx21], 1, taup2[i - 1], &x22[(i - 1) + (i - 1) * ldx22], ldx22, work); } // if (i < q) { Rscal(q - i, -z1 * z3 * sin(theta[i - 1]), &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11); Raxpy(q - i, z2 * z3 * cos(theta[i - 1]), &x21[(i - 1) + ((i + 1) - 1) * ldx21], ldx21, &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11); } Rscal(m - q - i + 1, -z1 * z4 * sin(theta[i - 1]), &x12[(i - 1) + (i - 1) * ldx12], ldx12); Raxpy(m - q - i + 1, z2 * z4 * cos(theta[i - 1]), &x22[(i - 1) + (i - 1) * ldx22], ldx22, &x12[(i - 1) + (i - 1) * ldx12], ldx12); // if (i < q) { phi[i - 1] = atan2(Rnrm2(q - i, &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11), Rnrm2(m - q - i + 1, &x12[(i - 1) + (i - 1) * ldx12], ldx12)); } // if (i < q) { if (q - i == 1) { Rlarfgp(q - i, x11[(i - 1) + ((i + 1) - 1) * ldx11], &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11, tauq1[i - 1]); } else { Rlarfgp(q - i, x11[(i - 1) + ((i + 1) - 1) * ldx11], &x11[(i - 1) + ((i + 2) - 1) * ldx11], ldx11, tauq1[i - 1]); } x11[(i - 1) + ((i + 1) - 1) * ldx11] = one; } if (q + i - 1 < m) { if (m - q == i) { Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[(i - 1) + (i - 1) * ldx12], ldx12, tauq2[i - 1]); } else { Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[(i - 1) + ((i + 1) - 1) * ldx12], ldx12, tauq2[i - 1]); } } x12[(i - 1) + (i - 1) * ldx12] = one; // if (i < q) { Rlarf("R", p - i, q - i, &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11, tauq1[i - 1], &x11[((i + 1) - 1) + ((i + 1) - 1) * ldx11], ldx11, work); Rlarf("R", m - p - i, q - i, &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11, tauq1[i - 1], &x21[((i + 1) - 1) + ((i + 1) - 1) * ldx21], ldx21, work); } if (p > i) { Rlarf("R", p - i, m - q - i + 1, &x12[(i - 1) + (i - 1) * ldx12], ldx12, tauq2[i - 1], &x12[((i + 1) - 1) + (i - 1) * ldx12], ldx12, work); } if (m - p > i) { Rlarf("R", m - p - i, m - q - i + 1, &x12[(i - 1) + (i - 1) * ldx12], ldx12, tauq2[i - 1], &x22[((i + 1) - 1) + (i - 1) * ldx22], ldx22, work); } // } // // Reduce columns Q + 1, ..., P of X12, X22 // for (i = q + 1; i <= p; i = i + 1) { // Rscal(m - q - i + 1, -z1 * z4, &x12[(i - 1) + (i - 1) * ldx12], ldx12); if (i >= m - q) { Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[(i - 1) + (i - 1) * ldx12], ldx12, tauq2[i - 1]); } else { Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[(i - 1) + ((i + 1) - 1) * ldx12], ldx12, tauq2[i - 1]); } x12[(i - 1) + (i - 1) * ldx12] = one; // if (p > i) { Rlarf("R", p - i, m - q - i + 1, &x12[(i - 1) + (i - 1) * ldx12], ldx12, tauq2[i - 1], &x12[((i + 1) - 1) + (i - 1) * ldx12], ldx12, work); } if (m - p - q >= 1) { Rlarf("R", m - p - q, m - q - i + 1, &x12[(i - 1) + (i - 1) * ldx12], ldx12, tauq2[i - 1], &x22[((q + 1) - 1) + (i - 1) * ldx22], ldx22, work); } // } // // Reduce columns P + 1, ..., M - Q of X12, X22 // for (i = 1; i <= m - p - q; i = i + 1) { // Rscal(m - p - q - i + 1, z2 * z4, &x22[((q + i) - 1) + ((p + i) - 1) * ldx22], ldx22); if (i == m - p - q) { Rlarfgp(m - p - q - i + 1, x22[((q + i) - 1) + ((p + i) - 1) * ldx22], &x22[((q + i) - 1) + ((p + i) - 1) * ldx22], ldx22, tauq2[(p + i) - 1]); } else { Rlarfgp(m - p - q - i + 1, x22[((q + i) - 1) + ((p + i) - 1) * ldx22], &x22[((q + i) - 1) + ((p + i + 1) - 1) * ldx22], ldx22, tauq2[(p + i) - 1]); } x22[((q + i) - 1) + ((p + i) - 1) * ldx22] = one; if (i < m - p - q) { Rlarf("R", m - p - q - i, m - p - q - i + 1, &x22[((q + i) - 1) + ((p + i) - 1) * ldx22], ldx22, tauq2[(p + i) - 1], &x22[((q + i + 1) - 1) + ((p + i) - 1) * ldx22], ldx22, work); } // } // } else { // // Reduce columns 1, ..., Q of X11, X12, X21, X22 // for (i = 1; i <= q; i = i + 1) { // if (i == 1) { Rscal(p - i + 1, z1, &x11[(i - 1) + (i - 1) * ldx11], ldx11); } else { Rscal(p - i + 1, z1 * cos(phi[(i - 1) - 1]), &x11[(i - 1) + (i - 1) * ldx11], ldx11); Raxpy(p - i + 1, -z1 * z3 * z4 * sin(phi[(i - 1) - 1]), &x12[((i - 1) - 1) + (i - 1) * ldx12], ldx12, &x11[(i - 1) + (i - 1) * ldx11], ldx11); } if (i == 1) { Rscal(m - p - i + 1, z2, &x21[(i - 1) + (i - 1) * ldx21], ldx21); } else { Rscal(m - p - i + 1, z2 * cos(phi[(i - 1) - 1]), &x21[(i - 1) + (i - 1) * ldx21], ldx21); Raxpy(m - p - i + 1, -z2 * z3 * z4 * sin(phi[(i - 1) - 1]), &x22[((i - 1) - 1) + (i - 1) * ldx22], ldx22, &x21[(i - 1) + (i - 1) * ldx21], ldx21); } // theta[i - 1] = atan2(Rnrm2(m - p - i + 1, &x21[(i - 1) + (i - 1) * ldx21], ldx21), Rnrm2(p - i + 1, &x11[(i - 1) + (i - 1) * ldx11], ldx11)); // Rlarfgp(p - i + 1, x11[(i - 1) + (i - 1) * ldx11], &x11[(i - 1) + ((i + 1) - 1) * ldx11], ldx11, taup1[i - 1]); x11[(i - 1) + (i - 1) * ldx11] = one; if (i == m - p) { Rlarfgp(m - p - i + 1, x21[(i - 1) + (i - 1) * ldx21], &x21[(i - 1) + (i - 1) * ldx21], ldx21, taup2[i - 1]); } else { Rlarfgp(m - p - i + 1, x21[(i - 1) + (i - 1) * ldx21], &x21[(i - 1) + ((i + 1) - 1) * ldx21], ldx21, taup2[i - 1]); } x21[(i - 1) + (i - 1) * ldx21] = one; // if (q > i) { Rlarf("R", q - i, p - i + 1, &x11[(i - 1) + (i - 1) * ldx11], ldx11, taup1[i - 1], &x11[((i + 1) - 1) + (i - 1) * ldx11], ldx11, work); } if (m - q + 1 > i) { Rlarf("R", m - q - i + 1, p - i + 1, &x11[(i - 1) + (i - 1) * ldx11], ldx11, taup1[i - 1], &x12[(i - 1) + (i - 1) * ldx12], ldx12, work); } if (q > i) { Rlarf("R", q - i, m - p - i + 1, &x21[(i - 1) + (i - 1) * ldx21], ldx21, taup2[i - 1], &x21[((i + 1) - 1) + (i - 1) * ldx21], ldx21, work); } if (m - q + 1 > i) { Rlarf("R", m - q - i + 1, m - p - i + 1, &x21[(i - 1) + (i - 1) * ldx21], ldx21, taup2[i - 1], &x22[(i - 1) + (i - 1) * ldx22], ldx22, work); } // if (i < q) { Rscal(q - i, -z1 * z3 * sin(theta[i - 1]), &x11[((i + 1) - 1) + (i - 1) * ldx11], 1); Raxpy(q - i, z2 * z3 * cos(theta[i - 1]), &x21[((i + 1) - 1) + (i - 1) * ldx21], 1, &x11[((i + 1) - 1) + (i - 1) * ldx11], 1); } Rscal(m - q - i + 1, -z1 * z4 * sin(theta[i - 1]), &x12[(i - 1) + (i - 1) * ldx12], 1); Raxpy(m - q - i + 1, z2 * z4 * cos(theta[i - 1]), &x22[(i - 1) + (i - 1) * ldx22], 1, &x12[(i - 1) + (i - 1) * ldx12], 1); // if (i < q) { phi[i - 1] = atan2(Rnrm2(q - i, &x11[((i + 1) - 1) + (i - 1) * ldx11], 1), Rnrm2(m - q - i + 1, &x12[(i - 1) + (i - 1) * ldx12], 1)); } // if (i < q) { if (q - i == 1) { Rlarfgp(q - i, x11[((i + 1) - 1) + (i - 1) * ldx11], &x11[((i + 1) - 1) + (i - 1) * ldx11], 1, tauq1[i - 1]); } else { Rlarfgp(q - i, x11[((i + 1) - 1) + (i - 1) * ldx11], &x11[((i + 2) - 1) + (i - 1) * ldx11], 1, tauq1[i - 1]); } x11[((i + 1) - 1) + (i - 1) * ldx11] = one; } if (m - q > i) { Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[((i + 1) - 1) + (i - 1) * ldx12], 1, tauq2[i - 1]); } else { Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[(i - 1) + (i - 1) * ldx12], 1, tauq2[i - 1]); } x12[(i - 1) + (i - 1) * ldx12] = one; // if (i < q) { Rlarf("L", q - i, p - i, &x11[((i + 1) - 1) + (i - 1) * ldx11], 1, tauq1[i - 1], &x11[((i + 1) - 1) + ((i + 1) - 1) * ldx11], ldx11, work); Rlarf("L", q - i, m - p - i, &x11[((i + 1) - 1) + (i - 1) * ldx11], 1, tauq1[i - 1], &x21[((i + 1) - 1) + ((i + 1) - 1) * ldx21], ldx21, work); } Rlarf("L", m - q - i + 1, p - i, &x12[(i - 1) + (i - 1) * ldx12], 1, tauq2[i - 1], &x12[(i - 1) + ((i + 1) - 1) * ldx12], ldx12, work); if (m - p - i > 0) { Rlarf("L", m - q - i + 1, m - p - i, &x12[(i - 1) + (i - 1) * ldx12], 1, tauq2[i - 1], &x22[(i - 1) + ((i + 1) - 1) * ldx22], ldx22, work); } // } // // Reduce columns Q + 1, ..., P of X12, X22 // for (i = q + 1; i <= p; i = i + 1) { // Rscal(m - q - i + 1, -z1 * z4, &x12[(i - 1) + (i - 1) * ldx12], 1); Rlarfgp(m - q - i + 1, x12[(i - 1) + (i - 1) * ldx12], &x12[((i + 1) - 1) + (i - 1) * ldx12], 1, tauq2[i - 1]); x12[(i - 1) + (i - 1) * ldx12] = one; // if (p > i) { Rlarf("L", m - q - i + 1, p - i, &x12[(i - 1) + (i - 1) * ldx12], 1, tauq2[i - 1], &x12[(i - 1) + ((i + 1) - 1) * ldx12], ldx12, work); } if (m - p - q >= 1) { Rlarf("L", m - q - i + 1, m - p - q, &x12[(i - 1) + (i - 1) * ldx12], 1, tauq2[i - 1], &x22[(i - 1) + ((q + 1) - 1) * ldx22], ldx22, work); } // } // // Reduce columns P + 1, ..., M - Q of X12, X22 // for (i = 1; i <= m - p - q; i = i + 1) { // Rscal(m - p - q - i + 1, z2 * z4, &x22[((p + i) - 1) + ((q + i) - 1) * ldx22], 1); if (m - p - q == i) { Rlarfgp(m - p - q - i + 1, x22[((p + i) - 1) + ((q + i) - 1) * ldx22], &x22[((p + i) - 1) + ((q + i) - 1) * ldx22], 1, tauq2[(p + i) - 1]); } else { Rlarfgp(m - p - q - i + 1, x22[((p + i) - 1) + ((q + i) - 1) * ldx22], &x22[((p + i + 1) - 1) + ((q + i) - 1) * ldx22], 1, tauq2[(p + i) - 1]); Rlarf("L", m - p - q - i + 1, m - p - q - i, &x22[((p + i) - 1) + ((q + i) - 1) * ldx22], 1, tauq2[(p + i) - 1], &x22[((p + i) - 1) + ((q + i + 1) - 1) * ldx22], ldx22, work); } x22[((p + i) - 1) + ((q + i) - 1) * ldx22] = one; // } // } // // End of Rorbdb // }
49.837143
354
0.362495
Ndersam
1014af167428fc32c22c10b42218f1bb5ed96ed9
4,051
cpp
C++
src/ftxui/component/radiobox_test.cpp
AetherealLlama/FTXUI
a56bb50807a6cdb9c7ad8b9851da98b3086beee1
[ "MIT" ]
null
null
null
src/ftxui/component/radiobox_test.cpp
AetherealLlama/FTXUI
a56bb50807a6cdb9c7ad8b9851da98b3086beee1
[ "MIT" ]
null
null
null
src/ftxui/component/radiobox_test.cpp
AetherealLlama/FTXUI
a56bb50807a6cdb9c7ad8b9851da98b3086beee1
[ "MIT" ]
null
null
null
#include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl #include <memory> // for __shared_ptr_access, shared_ptr, allocator #include <string> // for wstring, basic_string #include <vector> // for vector #include "ftxui/component/captured_mouse.hpp" // for ftxui #include "ftxui/component/component.hpp" // for Radiobox #include "ftxui/component/component_base.hpp" // for ComponentBase #include "ftxui/component/event.hpp" // for Event, Event::Return, Event::ArrowDown, Event::ArrowUp, Event::Tab, Event::TabReverse #include "gtest/gtest_pred_impl.h" // for EXPECT_EQ, Test, TEST using namespace ftxui; TEST(RadioboxTest, Navigation) { int selected = 0; std::vector<std::wstring> entries = {L"1", L"2", L"3"}; auto radiobox = Radiobox(&entries, &selected); // With arrow key. EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::ArrowDown); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::ArrowDown); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::ArrowDown); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::ArrowUp); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::ArrowUp); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::ArrowUp); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); // With vim like characters. EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::Character('j')); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::Character('j')); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::Character('j')); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::Character('k')); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::Character('k')); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::Character('k')); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); // With more entries entries = {L"1", L"2", L"3"}; EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::ArrowDown); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::ArrowDown); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::ArrowDown); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::ArrowUp); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::ArrowUp); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::ArrowUp); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); // With tab. EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::Tab); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::Tab); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::Tab); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::Tab); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::Tab); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::TabReverse); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::TabReverse); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 0); radiobox->OnEvent(Event::TabReverse); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 2); radiobox->OnEvent(Event::TabReverse); radiobox->OnEvent(Event::Return); EXPECT_EQ(selected, 1); radiobox->OnEvent(Event::TabReverse); radiobox->OnEvent(Event::Return); } // Copyright 2020 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in // the LICENSE file.
33.758333
130
0.712417
AetherealLlama
101677ac55f15a407b8f28b15dee4bc3c4e9a638
11,440
cpp
C++
SDK/platform/nxp_kinetis_e/driver/wdog.cpp
ghsecuritylab/CppSDK
50da768a887241d4e670b3ef73c041b21645620e
[ "Unlicense" ]
1
2019-12-15T12:26:52.000Z
2019-12-15T12:26:52.000Z
SDK/platform/nxp_kinetis_e/driver/wdog.cpp
ghsecuritylab/CppSDK
50da768a887241d4e670b3ef73c041b21645620e
[ "Unlicense" ]
null
null
null
SDK/platform/nxp_kinetis_e/driver/wdog.cpp
ghsecuritylab/CppSDK
50da768a887241d4e670b3ef73c041b21645620e
[ "Unlicense" ]
1
2020-03-07T20:47:45.000Z
2020-03-07T20:47:45.000Z
/****************************************************************************** * * Freescale Semiconductor Inc. * (c) Copyright 2013 Freescale Semiconductor, Inc. * ALL RIGHTS RESERVED. * *************************************************************************** * * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED 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 FREESCALE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * ***************************************************************************//*! * * @file wdog.c * * @author Freescale * * * @brief Provide common watchdog module routines. * ******************************************************************************/ #include "wdog.h" #include <include/derivative.h> #include "nvic.h" /****************************************************************************** * Global variables ******************************************************************************/ /****************************************************************************** * Constants and macros ******************************************************************************/ #define DisableInterrupts asm(" CPSID i"); #define EnableInterrupts asm(" CPSIE i"); /****************************************************************************** * Local types ******************************************************************************/ /****************************************************************************** * Local function prototypes ******************************************************************************/ /****************************************************************************** * Local variables ******************************************************************************/ /*! * @brief global variable to store RTC callbacks. * */ WDOG_CallbackType WDOG_Callback[1] = {(WDOG_CallbackType)(0)}; /*!< WDOG initial callback */ /****************************************************************************** * Local functions ******************************************************************************/ #ifdef __cplusplus extern "C" { #endif void WDOG_IRQHandler(void); #ifdef __cplusplus } #endif /****************************************************************************** * Global functions ******************************************************************************/ /****************************************************************************** * define watchdog API list * *//*! @addtogroup wdog_api_list * @{ *******************************************************************************/ /*****************************************************************************//*! * * @brief Watchdog timer disable routine. * * @param none * * @return none * * @ Pass/ Fail criteria: none * @see WDOG_Enable *****************************************************************************/ void WDOG_Disable(void) { uint8_t u8Cs1 = WDOG->CS1; uint8_t u8Cs2 = WDOG->CS2; uint16_t u16TOVAL = WDOG->TOVAL; uint16_t u16WIN = WDOG->WIN; u8Cs1 &= ~WDOG_CS1_EN_MASK; /* First unlock the watchdog so that we can write to registers */ WDOG_Unlock(); WDOG->CS2 = u8Cs2; WDOG->TOVAL = u16TOVAL; WDOG->WIN = u16WIN; WDOG->CS1 = u8Cs1; } /*****************************************************************************//*! * * @brief Watchdog timer disable routine with update enabled. * * Disable watchdog but the watchdog can be enabled and updated later. * * @param none * * @return none * * @ Pass/ Fail criteria: none * @see WDOG_Enable *****************************************************************************/ void WDOG_DisableWDOGEnableUpdate(void) { uint8_t u8Cs1 = WDOG->CS1; uint8_t u8Cs2 = WDOG->CS2; uint16_t u16TOVAL = WDOG->TOVAL; uint16_t u16WIN = WDOG->WIN; u8Cs1 &= ~WDOG_CS1_EN_MASK; u8Cs1 |= WDOG_CS1_UPDATE_MASK; /* First unlock the watchdog so that we can write to registers */ WDOG_Unlock(); WDOG->CS2 = u8Cs2; WDOG->TOVAL = u16TOVAL; WDOG->WIN = u16WIN; WDOG->CS1 = u8Cs1; } /*****************************************************************************//*! * * @brief Watchdog timer enable routine. * * @param none * * @return none * * @ Pass/ Fail criteria: none * @see WDOG_Disable *****************************************************************************/ void WDOG_Enable(void) { uint8_t u8Cs1 = WDOG->CS1; u8Cs1 |= WDOG_CS1_EN_MASK; /* First unlock the watchdog so that we can write to registers */ WDOG_Unlock(); WDOG->CS1 = u8Cs1; } /*****************************************************************************//*! * * @brief initialize watchdog. * * @param[in] pConfig poiner to watchdog configuration strcture. * * @return none * * @ Pass/ Fail criteria: none * * @warning make sure that WDOG is not initialized after reset or WDOG update is enabled * after reset by calling WDOG_EnableUpdate / WDOG_DisableWDOGEnableUpdate. * * @see WDOG_EnableUpdate, WDOG_DisableWDOGEnableUpdate * *****************************************************************************/ void WDOG_Init(WDOG_ConfigPtr pConfig) { uint8_t u8Cs1; uint8_t u8Cs2; uint16_t u16Toval; uint16_t u16Win; u8Cs1 = 0x80; /* default CS1 register value */ u8Cs2 = 0; u16Toval = pConfig->u16TimeOut; u16Win = pConfig->u16WinTime; if(pConfig->sBits.bDisable) { u8Cs1 &= ~WDOG_CS1_EN_MASK; } else { u8Cs1 |= WDOG_CS1_EN_MASK; } if(pConfig->sBits.bIntEnable) { u8Cs1 |= WDOG_CS1_INT_MASK; Enable_Interrupt(WDOG_IRQn); } else { u8Cs1 &= ~WDOG_CS1_INT_MASK; Disable_Interrupt(WDOG_IRQn); } if(pConfig->sBits.bStopEnable) { u8Cs1 |= WDOG_CS1_STOP_MASK; } else { u8Cs1 &= ~WDOG_CS1_STOP_MASK; } if(pConfig->sBits.bDbgEnable) { u8Cs1 |= WDOG_CS1_DBG_MASK; } else { u8Cs1 &= ~WDOG_CS1_DBG_MASK; } if(pConfig->sBits.bWaitEnable) { u8Cs1 |= WDOG_CS1_WAIT_MASK; } else { u8Cs1 &= ~WDOG_CS1_WAIT_MASK; } if(pConfig->sBits.bUpdateEnable) { u8Cs1 |= WDOG_CS1_UPDATE_MASK; } else { u8Cs1 &= ~WDOG_CS1_UPDATE_MASK; } if(pConfig->sBits.bWinEnable) { u8Cs2 |= WDOG_CS2_WIN_MASK; } else { u8Cs2 &= ~WDOG_CS2_WIN_MASK; } if(pConfig->sBits.bPrescaler) { u8Cs2 |= WDOG_CS2_PRES_MASK; } u8Cs2 |= (pConfig->sBits.bClkSrc & 0x03); /* write regisers */ WDOG_Unlock(); /* unlock watchdog first */ WDOG->CS2 = u8Cs2; WDOG->TOVAL8B.TOVALL = u16Toval; WDOG->TOVAL8B.TOVALH = u16Toval >> 8; WDOG->WIN8B.WINL = u16Win; WDOG->WIN8B.WINH = u16Win >> 8; WDOG->CS1 = u8Cs1; } /*****************************************************************************//*! * * @brief initialize watchdog to the default state. * * @param none * * @return none * * @ Pass/ Fail criteria: none * @warning make sure that WDOG update is enabled after reset by calling WDOG_EnableUpdate. * or by calling WDOG_DisableWDOGEnableUpdate. * * @see WDOG_DisableWDOGEnableUpdate, WDOG_EnableUpdate * *****************************************************************************/ void WDOG_DeInit(void) { WDOG_Unlock(); WDOG->CS2 = WDOG_CS2_DEFAULT_VALUE; WDOG->TOVAL = WDOG_TOVAL_DEFAULT_VALUE; WDOG->WIN = WDOG_WIN_DEFAULT_VALUE; WDOG->CS1 = WDOG_CS1_DEFAULT_VALUE; } /*****************************************************************************//*! * * @brief feed/refresh watchdog. * * @param none * * @return none * * @ Pass/ Fail criteria: none *****************************************************************************/ void WDOG_Feed(void) { DisableInterrupts; WDOG->CNT = 0x02A6; WDOG->CNT = 0x80B4; EnableInterrupts; } /*****************************************************************************//*! * * @brief enable update of WDOG. * * @param none * * @return none * * @ Pass/ Fail criteria: none * @warning this must be the last step of writing control bits sequence. *****************************************************************************/ void WDOG_EnableUpdate(void) { uint8_t u8Cs1 = WDOG->CS1; uint8_t u8Cs2 = WDOG->CS2; uint16_t u16TOVAL = WDOG->TOVAL; uint16_t u16WIN = WDOG->WIN; u8Cs1 |= WDOG_CS1_UPDATE_MASK; /* First unlock the watchdog so that we can write to registers */ WDOG_Unlock(); WDOG->CS2 = u8Cs2; WDOG->TOVAL = u16TOVAL; WDOG->WIN = u16WIN; WDOG->CS1 = u8Cs1; } /*****************************************************************************//*! * * @brief disable update of WDOG. * * @param none * * @return none * * @ Pass/ Fail criteria: none * @warning this must be the last step of writing control bits sequence. *****************************************************************************/ void WDOG_DisableUpdate(void) { uint8_t u8Cs1 = WDOG->CS1; uint8_t u8Cs2 = WDOG->CS2; uint16_t u16TOVAL = WDOG->TOVAL; uint16_t u16WIN = WDOG->WIN; u8Cs1 &= ~WDOG_CS1_UPDATE_MASK; /* First unlock the watchdog so that we can write to registers */ WDOG_Unlock(); WDOG->CS2 = u8Cs2; WDOG->TOVAL = u16TOVAL; WDOG->WIN = u16WIN; WDOG->CS1 = u8Cs1; } /*****************************************************************************//*! * * @brief set call back function for wdog module * * @param[in] pfnCallback point to call back function * * @return none * * @ Pass/ Fail criteria: none *****************************************************************************/ void WDOG_SetCallback(WDOG_CallbackType pfnCallback) { WDOG_Callback[0] = pfnCallback; } #ifdef __cplusplus extern "C" { #endif /*****************************************************************************//*! * * @brief WDOG module interrupt service routine * * @param none * * @return none * * @ Pass/ Fail criteria: none *****************************************************************************/ void WDOG_IRQHandler(void) { /* Clear WDOG flag*/ WDOG_CS2|=WDOG_CS2_FLG_MASK; if (WDOG_Callback[0]) { WDOG_Callback[0](); } } #ifdef __cplusplus } #endif /********************************************************************/ /*! @} End of wdog_api_list */
26
95
0.444755
ghsecuritylab
1016b9c7e038a150fe021104d85235412968ba07
11,591
cc
C++
SimRomanPot/SimFP420/src/FP420DigiMain.cc
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
SimRomanPot/SimFP420/src/FP420DigiMain.cc
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
SimRomanPot/SimFP420/src/FP420DigiMain.cc
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
/////////////////////////////////////////////////////////////////////////////// // File: FP420DigiMain.cc // Date: 12.2006 // Description: FP420DigiMain for FP420 // Modifications: /////////////////////////////////////////////////////////////////////////////// #include "SimDataFormats/TrackingHit/interface/PSimHit.h" #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" #include "SimRomanPot/SimFP420/interface/FP420DigiMain.h" #include "SimRomanPot/SimFP420/interface/ChargeDividerFP420.h" #include "SimRomanPot/SimFP420/interface/ChargeDrifterFP420.h" #include "DataFormats/FP420Digi/interface/HDigiFP420.h" #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include <gsl/gsl_sf_erf.h> #include <iostream> #include <vector> using namespace std; //#define CBOLTZ (1.38E-23) //#define e_SI (1.6E-19) FP420DigiMain::FP420DigiMain(const edm::ParameterSet &conf) : conf_(conf) { edm::LogInfo("SimRomanPotSimFP420") << "Creating a FP420DigiMain"; ndigis = 0; verbosity = conf_.getUntrackedParameter<int>("VerbosityLevel"); theElectronPerADC = conf_.getParameter<double>("ElectronFP420PerAdc"); theThreshold = conf_.getParameter<double>("AdcFP420Threshold"); noNoise = conf_.getParameter<bool>("NoFP420Noise"); addNoisyPixels = conf_.getParameter<bool>("AddNoisyPixels"); thez420 = conf_.getParameter<double>("z420"); thezD2 = conf_.getParameter<double>("zD2"); thezD3 = conf_.getParameter<double>("zD3"); theApplyTofCut = conf_.getParameter<bool>("ApplyTofCut"); tofCut = conf_.getParameter<double>("LowtofCutAndTo200ns"); // sn0 = 3;// number of stations // pn0 = 6;// number of superplanes // rn0 = 3; // number of sensors in superlayer xytype = 2; edm::LogInfo("SimRomanPotSimFP420") << "theApplyTofCut=" << theApplyTofCut << " tofCut=" << tofCut << "\n" << "FP420DigiMain theElectronPerADC=" << theElectronPerADC << " theThreshold=" << theThreshold << " noNoise=" << noNoise; // X (or Y)define type of sensor (xytype=1 or 2 used to derive it: 1-Y, 2-X) // for every type there is normal pixel size=0.05 and Wide 0.400 mm Thick300 = 0.300; // = 0.300 mm normalized to 300micron Silicon // ENC= 2160.; // EquivalentNoiseCharge300um = 2160. + // other sources of noise ENC = 960.; // EquivalentNoiseCharge300um = 2160. + other sources of // noise ldriftX = 0.050; // in mm(xytype=1) ldriftY = 0.050; // in mm(xytype=2) moduleThickness = 0.250; // mm(xytype=1)(xytype=2) pitchY = 0.050; // in mm(xytype=1) pitchX = 0.050; // in mm(xytype=2) // numStripsY = 200; // Y plate number of strips:200*0.050=10mm // (xytype=1) numStripsX = 400; // X plate number of // strips:400*0.050=20mm (xytype=2) numStripsY = 144; // Y plate number of strips:144*0.050=7.2mm (xytype=1) numStripsX = 160; // X plate number of strips:160*0.050=8.0mm (xytype=2) pitchYW = 0.400; // in mm(xytype=1) pitchXW = 0.400; // in mm(xytype=2) // numStripsYW = 50; // Y plate number of W strips:50 *0.400=20mm // (xytype=1) - W have ortogonal projection numStripsXW = 25; // X // plate number of W strips:25 *0.400=10mm (xytype=2) - W have ortogonal // projection numStripsYW = 20; // Y plate number of W strips:20 *0.400=8.0mm (xytype=1) - W // have ortogonal projection numStripsXW = 18; // X plate number of W strips:18 *0.400=7.2mm (xytype=2) - W // have ortogonal projection // tofCut = 1350.; // Cut on the particle TOF range = 1380 - 1500 elossCut = 0.00003; // Cut on the particle TOF = 100 or 50 edm::LogInfo("SimRomanPotSimFP420") << "FP420DigiMain moduleThickness=" << moduleThickness; float noiseRMS = ENC * moduleThickness / Thick300; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Y: if (xytype == 1) { numStrips = numStripsY; // Y plate number of strips:200*0.050=10mm --> // 100*0.100=10mm pitch = pitchY; ldrift = ldriftX; // because drift is in local coordinates which 90 degree // rotated ( for correct timeNormalization & noiseRMS // calculations) numStripsW = numStripsYW; // Y plate number of strips:200*0.050=10mm --> // 100*0.100=10mm pitchW = pitchYW; } // X: if (xytype == 2) { numStrips = numStripsX; // X plate number of strips:400*0.050=20mm --> // 200*0.100=20mm pitch = pitchX; ldrift = ldriftY; // because drift is in local coordinates which 90 degree // rotated ( for correct timeNormalization & noiseRMS // calculations) numStripsW = numStripsXW; // X plate number of strips:400*0.050=20mm --> // 200*0.100=20mm pitchW = pitchXW; } theHitDigitizerFP420 = new HitDigitizerFP420(moduleThickness, ldrift, ldriftY, ldriftX, thez420, thezD2, thezD3, verbosity); int numPixels = numStrips * numStripsW; theGNoiseFP420 = new GaussNoiseFP420(numPixels, noiseRMS, theThreshold, addNoisyPixels, verbosity); theZSuppressFP420 = new ZeroSuppressFP420(conf_, noiseRMS / theElectronPerADC); thePileUpFP420 = new PileUpFP420(); theDConverterFP420 = new DigiConverterFP420(theElectronPerADC, verbosity); edm::LogInfo("SimRomanPotSimFP420") << "FP420DigiMain end of constructor"; } FP420DigiMain::~FP420DigiMain() { delete theGNoiseFP420; delete theZSuppressFP420; delete theHitDigitizerFP420; delete thePileUpFP420; delete theDConverterFP420; } // Run the algorithm // ------------------ vector<HDigiFP420> FP420DigiMain::run(const std::vector<PSimHit> &input, const G4ThreeVector &bfield, unsigned int iu) { thePileUpFP420->reset(); bool first = true; // main loop // // First: loop on the SimHits // std::vector<PSimHit>::const_iterator simHitIter = input.begin(); std::vector<PSimHit>::const_iterator simHitIterEnd = input.end(); for (; simHitIter != simHitIterEnd; ++simHitIter) { const PSimHit ihit = *simHitIter; if (first) { // detID = ihit.detUnitId(); first = false; } // main part here: double losenergy = ihit.energyLoss(); float tof = ihit.tof(); if (verbosity > 1) { unsigned int unitID = ihit.detUnitId(); std::cout << " *******FP420DigiMain: intindex= " << iu << std::endl; std::cout << " tof= " << tof << " EnergyLoss= " << losenergy << " pabs= " << ihit.pabs() << std::endl; std::cout << " EntryLocalP x= " << ihit.entryPoint().x() << " EntryLocalP y= " << ihit.entryPoint().y() << std::endl; std::cout << " ExitLocalP x= " << ihit.exitPoint().x() << " ExitLocalP y= " << ihit.exitPoint().y() << std::endl; std::cout << " EntryLocalP z= " << ihit.entryPoint().z() << " ExitLocalP z= " << ihit.exitPoint().z() << std::endl; std::cout << " unitID= " << unitID << " xytype= " << xytype << " particleType= " << ihit.particleType() << " trackId= " << ihit.trackId() << std::endl; // std::cout << " det= " << det << " sector= " << sector << " zmodule= // " << zmodule << std::endl; std::cout << " bfield= " << bfield << std::endl; } if (verbosity > 0) { std::cout << " *******FP420DigiMain: theApplyTofCut= " << theApplyTofCut << std::endl; std::cout << " tof= " << tof << " EnergyLoss= " << losenergy << " pabs= " << ihit.pabs() << std::endl; std::cout << " particleType= " << ihit.particleType() << std::endl; } if ((!(theApplyTofCut) || (theApplyTofCut && abs(tof) > tofCut && abs(tof) < (tofCut + 200.))) && losenergy > elossCut) { if (verbosity > 0) std::cout << " inside tof: OK " << std::endl; HitDigitizerFP420::hit_map_type _temp = theHitDigitizerFP420->processHit( ihit, bfield, xytype, numStrips, pitch, numStripsW, pitchW, moduleThickness, verbosity); thePileUpFP420->add(_temp, ihit, verbosity); } // main part end (AZ) } // for // main loop end (AZ) PileUpFP420::signal_map_type theSignal = thePileUpFP420->dumpSignal(); PileUpFP420::HitToDigisMapType theLink = thePileUpFP420->dumpLink(); PileUpFP420::signal_map_type afterNoise; if (noNoise) { afterNoise = theSignal; } else { afterNoise = theGNoiseFP420->addNoise(theSignal); // add_noise(); } digis.clear(); push_digis(theZSuppressFP420->zeroSuppress(theDConverterFP420->convert(afterNoise), verbosity), theLink, afterNoise); return digis; // to HDigiFP420 } void FP420DigiMain::push_digis(const DigitalMapType &dm, const HitToDigisMapType &htd, const PileUpFP420::signal_map_type &afterNoise) { // if (verbosity > 0) { std::cout << " ****FP420DigiMain: push_digis start: do for loop dm.size()=" << dm.size() << std::endl; } digis.reserve(50); digis.clear(); // link_coll.clear(); for (DigitalMapType::const_iterator i = dm.begin(); i != dm.end(); i++) { // Load digis // push to digis the content of first and second words of HDigiFP420 vector // for every strip pointer (*i) digis.push_back(HDigiFP420((*i).first, (*i).second)); ndigis++; // very useful check: if (verbosity > 0) { std::cout << " ****FP420DigiMain:push_digis: ndigis = " << ndigis << std::endl; std::cout << "push_digis: strip = " << (*i).first << " adc = " << (*i).second << std::endl; } } ///////////////////////////////////////////////////////////////////////////////////////////// // reworked to access the fraction of amplitude per simhit for (HitToDigisMapType::const_iterator mi = htd.begin(); mi != htd.end(); mi++) { // if (dm.find((*mi).first) != dm.end()) { // --- For each channel, sum up the signals from a simtrack // map<const PSimHit *, Amplitude> totalAmplitudePerSimHit; for (std::vector<std::pair<const PSimHit *, Amplitude>>::const_iterator simul = (*mi).second.begin(); simul != (*mi).second.end(); simul++) { totalAmplitudePerSimHit[(*simul).first] += (*simul).second; } /* //--- include the noise as well PileUpFP420::signal_map_type& temp1 = const_cast<PileUpFP420::signal_map_type&>(afterNoise); float totalAmplitude1 = temp1[(*mi).first]; //--- digisimlink for (std::map<const PSimHit *, Amplitude>::const_iterator iter = totalAmplitudePerSimHit.begin(); iter != totalAmplitudePerSimHit.end(); iter++){ float threshold = 0.; if (totalAmplitudePerSimHit[(*iter).first]/totalAmplitude1 >= threshold) { float fraction = totalAmplitudePerSimHit[(*iter).first]/totalAmplitude1; //Noise fluctuation could make fraction>1. Unphysical, set it by hand. if(fraction >1.) fraction = 1.; link_coll.push_back(StripDigiSimLink( (*mi).first, //channel ((*iter).first)->trackId(), //simhit fraction)); //fraction }//if }//for */ // } // if } // for }
41.396429
120
0.590113
ckamtsikis
1018985615e46a1fe06030f7bdf94e3da98f7b4a
16,123
hpp
C++
src/cpu/x64/rnn/jit_uni_lstm_cell_postgemm_bwd.hpp
lznamens/oneDNN
e7d00d60ac184d18a1f18535bd6ead4468103dfb
[ "Apache-2.0" ]
null
null
null
src/cpu/x64/rnn/jit_uni_lstm_cell_postgemm_bwd.hpp
lznamens/oneDNN
e7d00d60ac184d18a1f18535bd6ead4468103dfb
[ "Apache-2.0" ]
null
null
null
src/cpu/x64/rnn/jit_uni_lstm_cell_postgemm_bwd.hpp
lznamens/oneDNN
e7d00d60ac184d18a1f18535bd6ead4468103dfb
[ "Apache-2.0" ]
null
null
null
/******************************************************************************* * Copyright 2019-2022 Intel Corporation * * 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 CPU_X64_RNN_JIT_UNI_LSTM_CELL_POSTGEMM_BWD_HPP #define CPU_X64_RNN_JIT_UNI_LSTM_CELL_POSTGEMM_BWD_HPP #include <memory> #include "common/utils.hpp" #include "cpu/x64/rnn/jit_uni_lstm_cell_postgemm.hpp" #include "cpu/x64/rnn/jit_uni_rnn_common_postgemm.hpp" namespace dnnl { namespace impl { namespace cpu { namespace x64 { template <cpu_isa_t isa, impl::data_type_t src_data_t, impl::data_type_t scratch_data_t> struct jit_uni_lstm_cell_postgemm_bwd : public jit_uni_rnn_postgemm, public jit_uni_lstm_cell_postgemm_t<isa> { DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_uni_lstm_cell_postgemm_bwd) jit_uni_lstm_cell_postgemm_bwd( const rnn_utils::rnn_conf_t &rnn, const rnn_pd_t *pd) : jit_uni_rnn_postgemm(rnn, pd, jit_name()) , jit_uni_lstm_cell_postgemm_t<isa>( this, 11 /*tmp_id_begin*/, static_cast<bool>(bf16_emu_)) {} ~jit_uni_lstm_cell_postgemm_bwd() = default; status_t init(data_type_t sdt) override { jit_uni_rnn_postgemm::init(src_data_t); // we use rax for both constant tables as they use the same table tanh_injector_ = utils::make_unique<injector_t>( this, alg_kind::eltwise_tanh, 0.0f, 0.0f, 1.0f, true, rax); return create_kernel(); } protected: using injector_t = typename jit_uni_lstm_cell_postgemm_t<isa>::injector_t; using Vmm = typename jit_uni_lstm_cell_postgemm_t<isa>::Vmm; std::unique_ptr<injector_t> tanh_injector_; // register size in bytes static constexpr size_t vlen_ = cpu_isa_traits<isa>::vlen; const size_t vlen_c_states_ = vlen_ / (sizeof(float) / cstate_dt_size_); static constexpr size_t diff_cstate_dt_size_ = sizeof(float); static constexpr size_t hstate_dt_size_ = sizeof(float); static constexpr size_t weights_peephole_dt_size_ = sizeof(float); const size_t vlen_scratch_ = vlen_ / (sizeof(float) / types::data_type_size(scratch_data_t)); const size_t gate_dt_size_ = types::data_type_size(scratch_data_t); const size_t scratch_dt_size_ = types::data_type_size(scratch_data_t); void generate() override { using namespace Xbyak; // Labels declaration Label vector_loop_start_label, vector_loop_end_label; Label rem_loop_start_label, rem_loop_end_label; Label table_label; // Register map const Reg64 table_reg(rbx); // used to load ones before the loop const Reg64 loop_cnt( rbx); // loop counter, can be aliased with table_reg // We skip vmm0 as it can be used by the injector for masks on sse4.1 const int dG0_idx = 1, dG1_idx = 2, dG2_idx = 3, dG3_idx = 4, tanhCt_idx = 5, dHt_idx = 6, dCt_idx = 7, G0_idx = 8, G1_idx = 9, one_idx = 10; const Vmm one_vmm(one_idx); const Xmm one_xmm(one_idx); // Adress maping const Address one_addr = ptr[table_reg]; // We start code generations here preamble(); // extract addresses passed as parameter const auto addr_ws_gates_reg = abi_param1; const auto addr_scratch_gates_reg = abi_param2; const auto addr_diff_states_t_lp1_reg = abi_param3; const auto addr_diff_states_tp1_l_reg = abi_param4; const auto addr_weights_peephole_reg = r12; #ifdef _WIN32 const auto addr_diff_c_states_t_l_reg = r10; const auto addr_diff_c_states_tp1_l_reg = r11; const auto addr_c_states_tm1_l_reg = rdi; const auto addr_c_states_t_l_reg = rsi; const auto base_args = get_stack_params_address(); mov(addr_diff_c_states_t_l_reg, ptr[base_args]); mov(addr_diff_c_states_tp1_l_reg, ptr[base_args + 8]); mov(addr_c_states_tm1_l_reg, ptr[base_args + 16]); mov(addr_c_states_t_l_reg, ptr[base_args + 24]); mov(addr_weights_peephole_reg, ptr[base_args + 32]); #else const auto addr_diff_c_states_t_l_reg = abi_param5; const auto addr_diff_c_states_tp1_l_reg = abi_param6; const auto addr_c_states_tm1_l_reg = r10; const auto addr_c_states_t_l_reg = r11; const auto base_args = get_stack_params_address(); mov(addr_c_states_tm1_l_reg, ptr[base_args]); mov(addr_c_states_t_l_reg, ptr[base_args + 8]); mov(addr_weights_peephole_reg, ptr[base_args + 16]); #endif // helper lambda to address the gates and biases const auto sg_addr = [&](int i) { return ptr[addr_scratch_gates_reg + i * rnn_.dhc * scratch_dt_size_]; }; const auto weights_peephole_addr = [&](int i) { return ptr[addr_weights_peephole_reg + i * rnn_.dhc * weights_peephole_dt_size_]; }; const auto wg_addr = [&](int i) { return ptr[addr_ws_gates_reg + i * rnn_.dhc * gate_dt_size_]; }; // initialize registers with addresses and constants mov(table_reg, table_label); init_regs(vlen_); uni_vmovups(one_vmm, one_addr); tanh_injector_->load_table_addr(); mov(loop_cnt, rnn_.dhc * scratch_dt_size_); cmp(loop_cnt, vlen_scratch_); jl(vector_loop_end_label, Xbyak::CodeGenerator::T_NEAR); L(vector_loop_start_label); { const Vmm dG0(dG0_idx), dG1(dG1_idx), dG2(dG2_idx), dG3(dG3_idx), tanhCt(tanhCt_idx), dHt(dHt_idx), dCt(dCt_idx), G0(G0_idx), G1(G1_idx); // TODO: if w_gates are bfloat, we have to convert them to float // datatypes summary: // - c states are all float // - h states are all src_data_t // - diff_* are all float // - scratch is src_data_t // - ws_gates is src_data_t // compute tanhCt to_float(tanhCt, ptr[addr_c_states_t_l_reg], rnn_.src_iter_c_dt, vlen_); tanh_injector_->compute_vector(tanhCt.getIdx()); // compute dHt // assumption: the diff_states_t_lp1 address is already offset by rnn.n_states uni_vmovups(dHt, ptr[addr_diff_states_t_lp1_reg]); if (!rnn_.is_lstm_projection) { this->vaddps_rhs_op_mem( dHt, dHt, ptr[addr_diff_states_tp1_l_reg]); } // compute dCt const auto tmp_dCt1 = this->get_next_tmp_vmm(); const auto tmp_dCt2 = this->get_next_tmp_vmm(); uni_vmovups(tmp_dCt1, one_vmm); uni_vmovups(tmp_dCt2, tanhCt); uni_vfnmadd231ps(tmp_dCt1, tmp_dCt2, tmp_dCt2); uni_vmulps(tmp_dCt1, tmp_dCt1, dHt); to_float(dG3, wg_addr(3), src_data_t, vlen_); uni_vmulps(tmp_dCt1, tmp_dCt1, dG3); uni_vmovups(dCt, ptr[addr_diff_c_states_tp1_l_reg]); uni_vaddps(dCt, dCt, tmp_dCt1); // compute dG3 const auto tmp_dG3 = this->get_next_tmp_vmm(); uni_vmovups(tmp_dG3, dG3); uni_vfnmadd231ps(dG3, tmp_dG3, tmp_dG3); uni_vmulps(dG3, dG3, dHt); uni_vmulps(dG3, dG3, tanhCt); // update dCt if lstm_peephole if (rnn_.is_lstm_peephole) this->vfmadd231ps_rhs_op_mem( dCt, dG3, weights_peephole_addr(2)); // compute dG0 // we will reuse G0 and G2 later for dG2 to_float(G0, wg_addr(0), src_data_t, vlen_); to_float(dG2, wg_addr(2), src_data_t, vlen_); uni_vmovups(dG0, G0); const auto tmp_g0 = this->vmm_backup(G0); uni_vfnmadd231ps(dG0, tmp_g0, tmp_g0); uni_vmulps(dG0, dG0, dCt); uni_vmulps(dG0, dG0, dG2); // compute dG1 to_float(G1, wg_addr(1), src_data_t, vlen_); uni_vmovups(dG1, G1); const auto tmp_g1 = this->vmm_backup(G1); uni_vfnmadd231ps(dG1, tmp_g1, tmp_g1); uni_vmulps(dG1, dG1, dCt); const auto tmp_c_states_tm1 = this->get_next_tmp_vmm(); to_float(tmp_c_states_tm1, ptr[addr_c_states_tm1_l_reg], rnn_.src_iter_c_dt, vlen_); this->uni_vmulps(dG1, dG1, tmp_c_states_tm1); // compute dG2 const auto tmp_dg2 = this->get_next_tmp_vmm(); uni_vmovups(tmp_dg2, one_vmm); const auto tmp_g2 = this->vmm_backup(dG2); uni_vfnmadd231ps(tmp_dg2, tmp_g2, tmp_g2); uni_vmulps(G0, G0, dCt); uni_vmulps(tmp_dg2, tmp_dg2, G0); uni_vmovups(dG2, tmp_dg2); // compute diff_state_t_l uni_vmulps(dCt, dCt, G1); if (rnn_.is_lstm_peephole) { this->vfmadd231ps_rhs_op_mem( dCt, dG0, weights_peephole_addr(0)); this->vfmadd231ps_rhs_op_mem( dCt, dG1, weights_peephole_addr(1)); } uni_vmovups(ptr[addr_diff_c_states_t_l_reg], dCt); to_src(sg_addr(0), dG0, scratch_data_t, vlen_); to_src(sg_addr(1), dG1, scratch_data_t, vlen_); to_src(sg_addr(2), dG2, scratch_data_t, vlen_); to_src(sg_addr(3), dG3, scratch_data_t, vlen_); // increment address pointers add(addr_ws_gates_reg, vlen_scratch_); add(addr_scratch_gates_reg, vlen_scratch_); add(addr_diff_states_t_lp1_reg, vlen_); add(addr_diff_states_tp1_l_reg, vlen_); add(addr_diff_c_states_t_l_reg, vlen_); add(addr_diff_c_states_tp1_l_reg, vlen_); add(addr_c_states_tm1_l_reg, vlen_c_states_); add(addr_c_states_t_l_reg, vlen_c_states_); if (rnn_.is_lstm_peephole) add(addr_weights_peephole_reg, vlen_); inc_regs(vlen_); // increment loop counter sub(loop_cnt, vlen_scratch_); cmp(loop_cnt, vlen_scratch_); jge(vector_loop_start_label); } L(vector_loop_end_label); cmp(loop_cnt, 0); je(rem_loop_end_label, Xbyak::CodeGenerator::T_NEAR); // Same code as above, we just use vmovss for accessing inputs this->reset_vmm_cnt(); L(rem_loop_start_label); { const Xmm dG0(dG0_idx), dG1(dG1_idx), dG2(dG2_idx), dG3(dG3_idx), tanhCt(tanhCt_idx), dHt(dHt_idx), dCt(dCt_idx), G0(G0_idx), G1(G1_idx); // compute tanhCt to_float(tanhCt, ptr[addr_c_states_t_l_reg], rnn_.src_iter_c_dt, sizeof(float)); tanh_injector_->compute_vector(tanhCt.getIdx()); // compute dHt // assumption: the diff_states_t_lp1 address is already offset by rnn.n_states uni_vmovss(dHt, ptr[addr_diff_states_t_lp1_reg]); if (!rnn_.is_lstm_projection) this->vaddss_rhs_op_mem( dHt, dHt, ptr[addr_diff_states_tp1_l_reg]); // compute dCt const auto tmp_dCt1 = this->get_next_tmp_xmm(); const auto tmp_dCt2 = this->get_next_tmp_xmm(); uni_vmovss(tmp_dCt1, one_xmm); // This overrides tanhCt when using Xmm uni_vmovss(tmp_dCt2, tanhCt); uni_vfnmadd231ss(tmp_dCt1, tmp_dCt2, tmp_dCt2); uni_vmulss(tmp_dCt1, tmp_dCt1, dHt); to_float(dG3, wg_addr(3), src_data_t, hstate_dt_size_); uni_vmulss(tmp_dCt1, tmp_dCt1, dG3); uni_vmovss(dCt, ptr[addr_diff_c_states_tp1_l_reg]); uni_vaddss(dCt, dCt, tmp_dCt1); // compute dG3 const auto tmp_dG3 = this->get_next_tmp_xmm(); uni_vmovss(tmp_dG3, dG3); uni_vfnmadd231ss(dG3, tmp_dG3, tmp_dG3); uni_vmulss(dG3, dG3, dHt); uni_vmulss(dG3, dG3, tanhCt); // update dCt if lstm_peephole if (rnn_.is_lstm_peephole) { this->vfmadd231ss_rhs_op_mem( dCt, dG3, weights_peephole_addr(2)); } // compute dG0 // we will reuse G0 and G2 later for dG2 to_float(G0, wg_addr(0), src_data_t, hstate_dt_size_); to_float(dG2, wg_addr(2), src_data_t, hstate_dt_size_); uni_vmovss(dG0, G0); const auto tmp_g0 = this->xmm_backup(G0); uni_vfnmadd231ss(dG0, tmp_g0, tmp_g0); uni_vmulss(dG0, dG0, dCt); uni_vmulss(dG0, dG0, dG2); // compute dG1 to_float(G1, wg_addr(1), src_data_t, hstate_dt_size_); const auto tmp_g1 = this->xmm_backup(G1); uni_vmovss(dG1, G1); uni_vfnmadd231ss(dG1, tmp_g1, tmp_g1); uni_vmulss(dG1, dG1, dCt); const auto tmp_c_states_tm1 = this->get_next_tmp_xmm(); to_float(tmp_c_states_tm1, ptr[addr_c_states_tm1_l_reg], rnn_.src_iter_c_dt, sizeof(float)); this->uni_vmulss(dG1, dG1, tmp_c_states_tm1); // compute dG2 const auto tmp_dG2 = this->get_next_tmp_xmm(); uni_vmovss(tmp_dG2, one_xmm); const auto tmp_g2 = this->xmm_backup(dG2); uni_vfnmadd231ss(tmp_dG2, tmp_g2, tmp_g2); uni_vmulss(G0, G0, dCt); uni_vmulss(tmp_dG2, tmp_dG2, G0); uni_vmovss(dG2, tmp_dG2); // compute diff_state_t_l uni_vmulss(dCt, dCt, G1); if (rnn_.is_lstm_peephole) { this->vfmadd231ss_rhs_op_mem( dCt, dG1, weights_peephole_addr(1)); this->vfmadd231ss_rhs_op_mem( dCt, dG0, weights_peephole_addr(0)); } uni_vmovss(ptr[addr_diff_c_states_t_l_reg], dCt); to_src(sg_addr(0), dG0, scratch_data_t, hstate_dt_size_); to_src(sg_addr(1), dG1, scratch_data_t, hstate_dt_size_); to_src(sg_addr(2), dG2, scratch_data_t, hstate_dt_size_); to_src(sg_addr(3), dG3, scratch_data_t, hstate_dt_size_); // increment address pointers add(addr_ws_gates_reg, scratch_dt_size_); add(addr_scratch_gates_reg, scratch_dt_size_); add(addr_diff_states_t_lp1_reg, hstate_dt_size_); add(addr_diff_states_tp1_l_reg, hstate_dt_size_); add(addr_diff_c_states_t_l_reg, diff_cstate_dt_size_); add(addr_diff_c_states_tp1_l_reg, diff_cstate_dt_size_); add(addr_c_states_tm1_l_reg, cstate_dt_size_); add(addr_c_states_t_l_reg, cstate_dt_size_); if (rnn_.is_lstm_peephole) add(addr_weights_peephole_reg, weights_peephole_dt_size_); inc_regs(hstate_dt_size_); // increment loop counter sub(loop_cnt, scratch_dt_size_); cmp(loop_cnt, 0); jg(rem_loop_start_label); } L(rem_loop_end_label); postamble(); tanh_injector_->prepare_table(); init_table(vlen_); L(table_label); { for (size_t i = 0; i < vlen_ / sizeof(float); ++i) dd(float2int(1.0f)); } } }; } // namespace x64 } // namespace cpu } // namespace impl } // namespace dnnl #endif
40.408521
90
0.610246
lznamens
10189d34c9a286171a3ab06b8801ce7fa17eae4c
8,977
hpp
C++
src/include/sweet/TimesteppingRK.hpp
pedrospeixoto/sweet
224248181e92615467c94b4e163596017811b5eb
[ "MIT" ]
null
null
null
src/include/sweet/TimesteppingRK.hpp
pedrospeixoto/sweet
224248181e92615467c94b4e163596017811b5eb
[ "MIT" ]
null
null
null
src/include/sweet/TimesteppingRK.hpp
pedrospeixoto/sweet
224248181e92615467c94b4e163596017811b5eb
[ "MIT" ]
1
2019-03-27T01:17:59.000Z
2019-03-27T01:17:59.000Z
#ifndef TIMESTEPPING_RK_HPP #define TIMESTEPPING_RK_HPP class TimesteppingRK { // runge kutta data storages DataArray<2>** RK_h_t; DataArray<2>** RK_u_t; DataArray<2>** RK_v_t; int runge_kutta_order; public: TimesteppingRK() : RK_h_t(nullptr), RK_u_t(nullptr), RK_v_t(nullptr), runge_kutta_order(-1) { } void setupBuffers( const DataArray<2> &i_test_buffer, ///< array of example data to know dimensions of buffers int i_rk_order ///< Order of Runge-Kutta method ) { if (RK_h_t != nullptr) ///< already allocated? return; runge_kutta_order = i_rk_order; int N = i_rk_order; RK_h_t = new DataArray<2>*[N]; RK_u_t = new DataArray<2>*[N]; RK_v_t = new DataArray<2>*[N]; for (int i = 0; i < N; i++) { RK_h_t[i] = new DataArray<2>(i_test_buffer.resolution); RK_u_t[i] = new DataArray<2>(i_test_buffer.resolution); RK_v_t[i] = new DataArray<2>(i_test_buffer.resolution); } } ~TimesteppingRK() { int N = runge_kutta_order; if (RK_h_t != nullptr) { for (int i = 0; i < N; i++) { delete RK_h_t[i]; delete RK_u_t[i]; delete RK_v_t[i]; } delete [] RK_h_t; delete [] RK_u_t; delete [] RK_v_t; RK_h_t = nullptr; RK_u_t = nullptr; RK_v_t = nullptr; } } /** * execute a Runge-Kutta timestep with the order * specified in the simulation variables. */ template <class BaseClass> void run_rk_timestep( BaseClass *i_baseClass, void (BaseClass::*i_compute_euler_timestep_update)( const DataArray<2> &i_P, ///< prognostic variables const DataArray<2> &i_u, ///< prognostic variables const DataArray<2> &i_v, ///< prognostic variables DataArray<2> &o_P_t, ///< time updates DataArray<2> &o_u_t, ///< time updates DataArray<2> &o_v_t, ///< time updates double &o_dt, ///< time step restriction double i_use_fixed_dt, ///< if this value is not equal to 0, ///< use this time step size instead of computing one double i_simulation_time ///< simulation time, e.g. for tidal waves ), DataArray<2> &io_h, DataArray<2> &io_u, DataArray<2> &io_v, double &o_dt, ///< return time step size for the computed time step double i_use_fixed_dt = 0, ///< If this value is not equal to 0, ///< Use this time step size instead of computing one ///< This also sets o_dt = i_use_fixed_dt int i_runge_kutta_order = 1, ///< Order of RK time stepping double i_simulation_time = -1, ///< Current simulation time. ///< This gets e.g. important for tidal waves double i_max_simulation_time = std::numeric_limits<double>::infinity() ///< limit the maximum simulation time ) { setupBuffers(io_h, i_runge_kutta_order); double &dt = o_dt; if (i_runge_kutta_order == 1) { (i_baseClass->*i_compute_euler_timestep_update)( io_h, // input io_u, io_v, *RK_h_t[0], // output *RK_u_t[0], *RK_v_t[0], dt, i_use_fixed_dt, i_simulation_time ); // padding to max simulation time if exceeding the maximum if (i_max_simulation_time >= 0) if (dt+i_simulation_time > i_max_simulation_time) dt = i_max_simulation_time-i_simulation_time; io_h += dt**RK_h_t[0]; io_u += dt**RK_u_t[0]; io_v += dt**RK_v_t[0]; } else if (i_runge_kutta_order == 2) { // See https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Explicit_Runge.E2.80.93Kutta_methods // See https://de.wikipedia.org/wiki/Runge-Kutta-Verfahren /* * c a * 0 | * 1/2 | 1/2 * -------------- * | 0 1 b */ double a2[1] = {0.5}; double b[2] = {0.0, 1.0}; double c[1] = {0.5}; double dummy_dt = -1; // STAGE 1 (i_baseClass->*i_compute_euler_timestep_update)( io_h, io_u, io_v, *RK_h_t[0], *RK_u_t[0], *RK_v_t[0], dt, i_use_fixed_dt, i_simulation_time ); // padding to max simulation time if exceeding the maximum if (i_max_simulation_time >= 0) if (dt+i_simulation_time > i_max_simulation_time) dt = i_max_simulation_time-i_simulation_time; // STAGE 2 (i_baseClass->*i_compute_euler_timestep_update)( io_h + ( dt*a2[0]*(*RK_h_t[0]) ), io_u + ( dt*a2[0]*(*RK_u_t[0]) ), io_v + ( dt*a2[0]*(*RK_v_t[0]) ), *RK_h_t[1], *RK_u_t[1], *RK_v_t[1], dummy_dt, dt, i_simulation_time + c[0]*dt ); io_h += dt*(/* b[0]*(*RK_h_t[0]) +*/ b[1]*(*RK_h_t[1]) ); io_u += dt*(/* b[0]*(*RK_u_t[0]) +*/ b[1]*(*RK_u_t[1]) ); io_v += dt*(/* b[0]*(*RK_v_t[0]) +*/ b[1]*(*RK_v_t[1]) ); } else if (i_runge_kutta_order == 3) { // See https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Explicit_Runge.E2.80.93Kutta_methods // See https://de.wikipedia.org/wiki/Runge-Kutta-Verfahren /* * c a * 0 | * 1/3 | 1/3 * 2/3 | 0 2/3 * -------------- * | 1/4 0 3/4 */ double a2[1] = {1.0/3.0}; double a3[2] = {0.0, 2.0/3.0}; double b[3] = {1.0/4.0, 0.0, 3.0/4.0}; double c[2] = {1.0/3.0, 2.0/3.0}; double dummy_dt; // STAGE 1 (i_baseClass->*i_compute_euler_timestep_update)( io_h, io_u, io_v, *RK_h_t[0], *RK_u_t[0], *RK_v_t[0], dt, i_use_fixed_dt, i_simulation_time ); // padding to max simulation time if exceeding the maximum if (i_max_simulation_time >= 0) if (dt+i_simulation_time > i_max_simulation_time) dt = i_max_simulation_time-i_simulation_time; // STAGE 2 (i_baseClass->*i_compute_euler_timestep_update)( io_h + dt*( a2[0]*(*RK_h_t[0]) ), io_u + dt*( a2[0]*(*RK_u_t[0]) ), io_v + dt*( a2[0]*(*RK_v_t[0]) ), *RK_h_t[1], *RK_u_t[1], *RK_v_t[1], dummy_dt, dt, i_simulation_time + c[0]*dt ); // STAGE 3 (i_baseClass->*i_compute_euler_timestep_update)( io_h + dt*( a3[0]*(*RK_h_t[0]) + a3[1]*(*RK_h_t[1]) ), io_u + dt*( a3[0]*(*RK_u_t[0]) + a3[1]*(*RK_u_t[1]) ), io_v + dt*( a3[0]*(*RK_v_t[0]) + a3[1]*(*RK_v_t[1]) ), *RK_h_t[2], *RK_u_t[2], *RK_v_t[2], dummy_dt, dt, i_simulation_time + c[1]*dt ); io_h += dt*( (b[0]*(*RK_h_t[0])) + (b[1]*(*RK_h_t[1])) + (b[2]*(*RK_h_t[2])) ); io_u += dt*( (b[0]*(*RK_u_t[0])) + (b[1]*(*RK_u_t[1])) + (b[2]*(*RK_u_t[2])) ); io_v += dt*( (b[0]*(*RK_v_t[0])) + (b[1]*(*RK_v_t[1])) + (b[2]*(*RK_v_t[2])) ); } else if (i_runge_kutta_order == 4) { // See https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Explicit_Runge.E2.80.93Kutta_methods // See https://de.wikipedia.org/wiki/Runge-Kutta-Verfahren /* * c a * 0 | * 1/2 | 1/2 * 1/2 | 0 1/2 * 1 | 0 0 1 * -------------- * | 1/6 1/3 1/3 1/6 */ double a2[1] = {0.5}; double a3[2] = {0.0, 0.5}; double a4[3] = {0.0, 0.0, 1.0}; double b[4] = {1.0/6.0, 1.0/3.0, 1.0/3.0, 1.0/6.0}; double c[3] = {0.5, 0.5, 1.0}; double dummy_dt; // STAGE 1 (i_baseClass->*i_compute_euler_timestep_update)( io_h, io_u, io_v, *RK_h_t[0], *RK_u_t[0], *RK_v_t[0], dt, i_use_fixed_dt, i_simulation_time ); // padding to max simulation time if exceeding the maximum if (i_max_simulation_time >= 0) if (dt+i_simulation_time > i_max_simulation_time) dt = i_max_simulation_time-i_simulation_time; // STAGE 2 (i_baseClass->*i_compute_euler_timestep_update)( io_h + dt*( a2[0]*(*RK_h_t[0]) ), io_u + dt*( a2[0]*(*RK_u_t[0]) ), io_v + dt*( a2[0]*(*RK_v_t[0]) ), *RK_h_t[1], *RK_u_t[1], *RK_v_t[1], dummy_dt, dt, i_simulation_time + c[0]*dt ); // STAGE 3 (i_baseClass->*i_compute_euler_timestep_update)( io_h + dt*( /*a3[0]*(*RK_P_t[0]) +*/ a3[1]*(*RK_h_t[1]) ), io_u + dt*( /*a3[0]*(*RK_u_t[0]) +*/ a3[1]*(*RK_u_t[1]) ), io_v + dt*( /*a3[0]*(*RK_v_t[0]) +*/ a3[1]*(*RK_v_t[1]) ), *RK_h_t[2], *RK_u_t[2], *RK_v_t[2], dummy_dt, dt, i_simulation_time + c[1]*dt ); // STAGE 4 (i_baseClass->*i_compute_euler_timestep_update)( io_h + dt*( /*a4[0]*(*RK_P_t[0]) + a4[1]*(*RK_P_t[1]) +*/ a4[2]*(*RK_h_t[2]) ), io_u + dt*( /*a4[0]*(*RK_u_t[0]) + a4[1]*(*RK_u_t[1]) +*/ a4[2]*(*RK_u_t[2]) ), io_v + dt*( /*a4[0]*(*RK_v_t[0]) + a4[1]*(*RK_v_t[1]) +*/ a4[2]*(*RK_v_t[2]) ), *RK_h_t[3], *RK_u_t[3], *RK_v_t[3], dummy_dt, dt, i_simulation_time + c[2]*dt ); io_h += dt*( (b[0]*(*RK_h_t[0])) + (b[1]*(*RK_h_t[1])) + (b[2]*(*RK_h_t[2])) + (b[3]*(*RK_h_t[3])) ); io_u += dt*( (b[0]*(*RK_u_t[0])) + (b[1]*(*RK_u_t[1])) + (b[2]*(*RK_u_t[2])) + (b[3]*(*RK_u_t[3])) ); io_v += dt*( (b[0]*(*RK_v_t[0])) + (b[1]*(*RK_v_t[1])) + (b[2]*(*RK_v_t[2])) + (b[3]*(*RK_v_t[3])) ); } else { std::cerr << "This order of the Runge-Kutta time stepping is not supported!" << std::endl; exit(-1); } } }; #endif
25.358757
112
0.562437
pedrospeixoto
1018f930528afb32bef85acec4ae6ebf39b42956
68,643
cxx
C++
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
yyxgiser/OTB
2782a5838a55890769cdc6bc3bd900b2e9f6c5cb
[ "Apache-2.0" ]
null
null
null
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
yyxgiser/OTB
2782a5838a55890769cdc6bc3bd900b2e9f6c5cb
[ "Apache-2.0" ]
null
null
null
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
yyxgiser/OTB
2782a5838a55890769cdc6bc3bd900b2e9f6c5cb
[ "Apache-2.0" ]
1
2020-10-15T09:37:30.000Z
2020-10-15T09:37:30.000Z
/* * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) * Copyright (C) 2018-2020 CS Systemes d'Information (CS SI) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <iostream> #include <fstream> #include <vector> #include "otbGDALImageIO.h" #include "otbMacro.h" #include "otbSystem.h" #include "otbStopwatch.h" #include "itksys/SystemTools.hxx" #include "otbImage.h" #include "otb_tinyxml.h" #include "otbImageKeywordlist.h" #include "itkMetaDataObject.h" #include "otbMetaDataKey.h" #include "itkRGBPixel.h" #include "itkRGBAPixel.h" #include "cpl_conv.h" #include "ogr_spatialref.h" #include "ogr_srs_api.h" #include "itksys/RegularExpression.hxx" #include "otbGDALDriverManagerWrapper.h" #include "otb_boost_string_header.h" #include "otbOGRHelpers.h" #include "otbGeometryMetadata.h" #include "otbConfigure.h" #include "stdint.h" //needed for uintptr_t inline unsigned int uint_ceildivpow2(unsigned int a, unsigned int b) { return (a + (1 << b) - 1) >> b; } namespace otb { class GDALDataTypeWrapper { public: GDALDataTypeWrapper() : pixType(GDT_Byte) { } ~GDALDataTypeWrapper() { } GDALDataTypeWrapper(const GDALDataTypeWrapper& w) { pixType = w.pixType; } GDALDataTypeWrapper& operator=(GDALDataTypeWrapper w) { pixType = w.pixType; return *this; } GDALDataType pixType; }; // end of GDALDataTypeWrapper GDALImageIO::GDALImageIO() { // By default set number of dimensions to two. this->SetNumberOfDimensions(2); // By default set pixel type to scalar. m_PixelType = SCALAR; // By default set component type to unsigned char m_ComponentType = UCHAR; m_UseCompression = false; m_CompressionLevel = 4; // Range 0-9; 0 = no file compression, 9 = maximum file compression // Set default spacing to one m_Spacing[0] = 1.0; m_Spacing[1] = 1.0; // Set default origin to half a pixel (centered pixel convention) m_Origin[0] = 0.5; m_Origin[1] = 0.5; m_IsIndexed = false; m_DatasetNumber = 0; m_NbBands = 0; m_FlagWriteImageInformation = true; m_CanStreamWrite = false; m_IsComplex = false; m_IsVectorImage = false; m_PxType = new GDALDataTypeWrapper; m_NumberOfOverviews = 0; m_ResolutionFactor = 0; m_BytePerPixel = 0; m_WriteRPCTags = true; m_epsgCode = 0; } GDALImageIO::~GDALImageIO() { delete m_PxType; } // Tell only if the file can be read with GDAL. bool GDALImageIO::CanReadFile(const char* file) { // First check the extension if (file == nullptr) { return false; } m_Dataset = GDALDriverManagerWrapper::GetInstance().Open(file); return m_Dataset.IsNotNull(); } // Used to print information about this object void GDALImageIO::PrintSelf(std::ostream& os, itk::Indent indent) const { Superclass::PrintSelf(os, indent); os << indent << "Compression Level : " << m_CompressionLevel << "\n"; os << indent << "IsComplex (otb side) : " << m_IsComplex << "\n"; os << indent << "Byte per pixel : " << m_BytePerPixel << "\n"; } // Read a 3D image (or event more bands)... not implemented yet void GDALImageIO::ReadVolume(void*) { } // Read image with GDAL void GDALImageIO::Read(void* buffer) { // Convert buffer from void * to unsigned char * unsigned char* p = static_cast<unsigned char*>(buffer); // Check if conversion succeed if (p == nullptr) { itkExceptionMacro(<< "Buffer passed to GDALImageIO for reading is NULL."); return; } // Get the origin of the region to read int lFirstLineRegion = this->GetIORegion().GetIndex()[1]; int lFirstColumnRegion = this->GetIORegion().GetIndex()[0]; // Get nb. of lines and columns of the region to read int lNbLinesRegion = this->GetIORegion().GetSize()[1]; int lNbColumnsRegion = this->GetIORegion().GetSize()[0]; // Compute the origin of the image region to read at the initial resolution int lFirstLine = lFirstLineRegion * (1 << m_ResolutionFactor); int lFirstColumn = lFirstColumnRegion * (1 << m_ResolutionFactor); // Compute the size of the image region to read at the initial resolution int lNbLines = lNbLinesRegion * (1 << m_ResolutionFactor); int lNbColumns = lNbColumnsRegion * (1 << m_ResolutionFactor); // Check if the image region is correct if (lFirstLine + lNbLines > static_cast<int>(m_OriginalDimensions[1])) lNbLines = static_cast<int>(m_OriginalDimensions[1] - lFirstLine); if (lFirstColumn + lNbColumns > static_cast<int>(m_OriginalDimensions[0])) lNbColumns = static_cast<int>(m_OriginalDimensions[0] - lFirstColumn); GDALDataset* dataset = m_Dataset->GetDataSet(); // In the indexed case, one has to retrieve the index image and the // color table, and translate p to a 4 components color values buffer if (m_IsIndexed) { // TODO: This is a very special case and seems to be working only // for unsigned char pixels. There might be a gdal method to do // the work in a cleaner way std::streamoff lNbPixels = (static_cast<std::streamoff>(lNbColumnsRegion)) * (static_cast<std::streamoff>(lNbLinesRegion)); std::streamoff lBufferSize = static_cast<std::streamoff>(m_BytePerPixel) * lNbPixels; itk::VariableLengthVector<unsigned char> value(lBufferSize); std::streamoff step = static_cast<std::streamoff>(this->GetNumberOfComponents()) * static_cast<std::streamoff>(m_BytePerPixel); otbLogMacro(Debug, << "GDAL reads [" << lFirstColumn << ", " << lFirstColumn + lNbColumns - 1 << "]x[" << lFirstLine << ", " << lFirstLine + lNbLines - 1 << "] indexed color image of type " << GDALGetDataTypeName(m_PxType->pixType) << " from file " << m_FileName); otb::Stopwatch chrono = otb::Stopwatch::StartNew(); CPLErr lCrGdal = dataset->GetRasterBand(1)->RasterIO(GF_Read, lFirstColumn, lFirstLine, lNbColumns, lNbLines, const_cast<unsigned char*>(value.GetDataPointer()), lNbColumnsRegion, lNbLinesRegion, m_PxType->pixType, 0, 0); chrono.Stop(); if (lCrGdal == CE_Failure) { itkExceptionMacro(<< "Error while reading image (GDAL format) '" << m_FileName << "' : " << CPLGetLastErrorMsg()); } otbLogMacro(Debug, << "GDAL read took " << chrono.GetElapsedMilliseconds() << " ms") // Interpret index as color std::streamoff cpt(0); GDALColorTable* colorTable = dataset->GetRasterBand(1)->GetColorTable(); for (std::streamoff i = 0; i < lBufferSize; i = i + static_cast<std::streamoff>(m_BytePerPixel)) { GDALColorEntry color; colorTable->GetColorEntryAsRGB(value[i], &color); p[cpt] = color.c1; p[cpt + 1] = color.c2; p[cpt + 2] = color.c3; p[cpt + 3] = color.c4; cpt += step; } } else { /******** Nominal case ***********/ int pixelOffset = m_BytePerPixel * m_NbBands; int lineOffset = m_BytePerPixel * m_NbBands * lNbColumnsRegion; int bandOffset = m_BytePerPixel; int nbBands = m_NbBands; // In some cases, we need to change some parameters for RasterIO if (!GDALDataTypeIsComplex(m_PxType->pixType) && m_IsComplex && m_IsVectorImage && (m_NbBands > 1)) { pixelOffset = m_BytePerPixel * 2; lineOffset = pixelOffset * lNbColumnsRegion; bandOffset = m_BytePerPixel; } // keep it for the moment otbLogMacro(Debug, << "GDAL reads [" << lFirstColumn << ", " << lFirstColumnRegion + lNbColumnsRegion - 1 << "]x[" << lFirstLineRegion << ", " << lFirstLineRegion + lNbLinesRegion - 1 << "] x " << nbBands << " bands of type " << GDALGetDataTypeName(m_PxType->pixType) << " from file " << m_FileName); otb::Stopwatch chrono = otb::Stopwatch::StartNew(); CPLErr lCrGdal = m_Dataset->GetDataSet()->RasterIO(GF_Read, lFirstColumn, lFirstLine, lNbColumns, lNbLines, p, lNbColumnsRegion, lNbLinesRegion, m_PxType->pixType, nbBands, // We want to read all bands nullptr, pixelOffset, lineOffset, bandOffset); chrono.Stop(); // Check if gdal call succeed if (lCrGdal == CE_Failure) { itkExceptionMacro(<< "Error while reading image (GDAL format) '" << m_FileName << "' : " << CPLGetLastErrorMsg()); return; } otbLogMacro(Debug, << "GDAL read took " << chrono.GetElapsedMilliseconds() << " ms") } } bool GDALImageIO::GetSubDatasetInfo(std::vector<std::string>& names, std::vector<std::string>& desc) { // Note: we assume that the subdatasets are in order : SUBDATASET_ID_NAME, SUBDATASET_ID_DESC, SUBDATASET_ID+1_NAME, SUBDATASET_ID+1_DESC char** papszMetadata; papszMetadata = m_Dataset->GetDataSet()->GetMetadata("SUBDATASETS"); // Have we find some dataSet ? // This feature is supported only for hdf4 and hdf5 file (regards to the bug 270) if ((CSLCount(papszMetadata) > 0) && ((strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(), "HDF4") == 0) || (strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(), "HDF5") == 0) || (strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(), "SENTINEL2") == 0))) { for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::string key, name; if (System::ParseHdfSubsetName(papszMetadata[cpt], key, name)) { // check if this is a dataset name if (key.find("_NAME") != std::string::npos) names.push_back(name); // check if this is a dataset descriptor if (key.find("_DESC") != std::string::npos) desc.push_back(name); } } } else { return false; } if (names.empty() || desc.empty()) return false; if (names.size() != desc.size()) { names.clear(); desc.clear(); return false; } return true; } bool GDALImageIO::GDALPixelTypeIsComplex() { return GDALDataTypeIsComplex(m_PxType->pixType); } void GDALImageIO::ReadImageInformation() { // std::ifstream file; this->InternalReadImageInformation(); } unsigned int GDALImageIO::GetOverviewsCount() { GDALDataset* dataset = m_Dataset->GetDataSet(); // JPEG2000 case : use the number of overviews actually in the dataset if (m_Dataset->IsJPEG2000()) { // Include the full resolution in overviews count return dataset->GetRasterBand(1)->GetOverviewCount() + 1; } if (dataset->GetRasterBand(1)->GetOverviewCount()) // Include the full resolution in overviews count return dataset->GetRasterBand(1)->GetOverviewCount() + 1; // default case: compute overviews until one of the dimensions is 1 bool flagStop = false; unsigned int possibleOverviewCount = 0; while (!flagStop) { unsigned int tDimX = uint_ceildivpow2(dataset->GetRasterXSize(), possibleOverviewCount); unsigned int tDimY = uint_ceildivpow2(dataset->GetRasterYSize(), possibleOverviewCount); possibleOverviewCount++; if ((tDimX == 1) || (tDimY == 1)) { flagStop = true; } } return possibleOverviewCount; } std::vector<std::string> GDALImageIO::GetOverviewsInfo() { std::vector<std::string> desc; // This should never happen, according to implementation of GetOverviewCount() if (this->GetOverviewsCount() == 0) return desc; std::ostringstream oss; // If gdal exposes actual overviews unsigned int lOverviewsCount = m_Dataset->GetDataSet()->GetRasterBand(1)->GetOverviewCount(); if (lOverviewsCount) { unsigned int x = m_OriginalDimensions[0]; unsigned int y = m_OriginalDimensions[1]; oss.str(""); oss << "Resolution: 0 (Image [w x h]: " << x << "x" << y << ")"; desc.push_back(oss.str()); for (unsigned int iOverview = 0; iOverview < lOverviewsCount; iOverview++) { x = m_Dataset->GetDataSet()->GetRasterBand(1)->GetOverview(iOverview)->GetXSize(); y = m_Dataset->GetDataSet()->GetRasterBand(1)->GetOverview(iOverview)->GetYSize(); oss.str(""); oss << "Resolution: " << iOverview + 1 << " (Image [w x h]: " << x << "x" << y << ")"; desc.push_back(oss.str()); } } else { // Fall back to gdal implicit overviews lOverviewsCount = this->GetOverviewsCount(); unsigned int originalWidth = m_OriginalDimensions[0]; unsigned int originalHeight = m_OriginalDimensions[1]; // Get the overview sizes for (unsigned int iOverview = 0; iOverview < lOverviewsCount; iOverview++) { // For each resolution we will compute the tile dim and image dim unsigned int w = uint_ceildivpow2(originalWidth, iOverview); unsigned int h = uint_ceildivpow2(originalHeight, iOverview); oss.str(""); oss << "Resolution: " << iOverview << " (Image [w x h]: " << w << "x" << h << ")"; desc.push_back(oss.str()); } } return desc; } void GDALImageIO::SetEpsgCode(const unsigned int epsgCode) { m_epsgCode = epsgCode; } void GDALImageIO::InternalReadImageInformation() { itk::ExposeMetaData<unsigned int>(this->GetMetaDataDictionary(), MetaDataKey::ResolutionFactor, m_ResolutionFactor); itk::ExposeMetaData<unsigned int>(this->GetMetaDataDictionary(), MetaDataKey::SubDatasetIndex, m_DatasetNumber); // Detecting if we are in the case of an image with subdatasets // example: hdf Modis data // in this situation, we are going to change the filename to the // supported gdal format using the m_DatasetNumber value // HDF4_SDS:UNKNOWN:"myfile.hdf":2 // and make m_Dataset point to it. if (m_Dataset->GetDataSet()->GetRasterCount() == 0 || m_DatasetNumber > 0) { // this happen in the case of a hdf file with SUBDATASETS // Note: we assume that the datasets are in order char** papszMetadata; papszMetadata = m_Dataset->GetDataSet()->GetMetadata("SUBDATASETS"); // TODO: we might want to keep the list of names somewhere, at least the number of datasets std::vector<std::string> names; if (CSLCount(papszMetadata) > 0) { for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::string key, name; if (System::ParseHdfSubsetName(papszMetadata[cpt], key, name)) { // check if this is a dataset name if (key.find("_NAME") != std::string::npos) names.push_back(name); } } } if (m_DatasetNumber < names.size()) { m_Dataset = GDALDriverManagerWrapper::GetInstance().Open(names[m_DatasetNumber]); } else { itkExceptionMacro(<< "Dataset requested does not exist (" << names.size() << " datasets)"); } } GDALDataset* dataset = m_Dataset->GetDataSet(); // Get image dimensions if (dataset->GetRasterXSize() == 0 || dataset->GetRasterYSize() == 0) { itkExceptionMacro(<< "Dimension is undefined."); } // Set image dimensions into IO m_Dimensions[0] = uint_ceildivpow2(dataset->GetRasterXSize(), m_ResolutionFactor); m_Dimensions[1] = uint_ceildivpow2(dataset->GetRasterYSize(), m_ResolutionFactor); // Keep the original dimension of the image m_OriginalDimensions.push_back(dataset->GetRasterXSize()); m_OriginalDimensions.push_back(dataset->GetRasterYSize()); // Get Number of Bands m_NbBands = dataset->GetRasterCount(); // Get the number of overviews of the file (based on the first band) m_NumberOfOverviews = dataset->GetRasterBand(1)->GetOverviewCount(); // Get the overview sizes for (unsigned int iOverview = 0; iOverview < m_NumberOfOverviews; iOverview++) { std::pair<unsigned int, unsigned int> tempSize; tempSize.first = GDALGetRasterBandXSize(dataset->GetRasterBand(1)->GetOverview(iOverview)); tempSize.second = GDALGetRasterBandYSize(dataset->GetRasterBand(1)->GetOverview(iOverview)); m_OverviewsSize.push_back(tempSize); } this->SetNumberOfComponents(m_NbBands); // Set the number of dimensions (verify for the dim ) this->SetNumberOfDimensions(2); // Automatically set the Type to Binary for GDAL data this->SetFileTypeToBinary(); // Get Data Type // Consider only the data type given by the first band // Maybe be could changed (to check) m_PxType->pixType = dataset->GetRasterBand(1)->GetRasterDataType(); if (m_PxType->pixType == GDT_Byte) { SetComponentType(UCHAR); } else if (m_PxType->pixType == GDT_UInt16) { SetComponentType(USHORT); } else if (m_PxType->pixType == GDT_Int16) { SetComponentType(SHORT); } else if (m_PxType->pixType == GDT_UInt32) { SetComponentType(UINT); } else if (m_PxType->pixType == GDT_Int32) { SetComponentType(INT); } else if (m_PxType->pixType == GDT_Float32) { SetComponentType(FLOAT); } else if (m_PxType->pixType == GDT_Float64) { SetComponentType(DOUBLE); } else if (m_PxType->pixType == GDT_CInt16) { SetComponentType(CSHORT); } else if (m_PxType->pixType == GDT_CInt32) { SetComponentType(CINT); } else if (m_PxType->pixType == GDT_CFloat32) { SetComponentType(CFLOAT); } else if (m_PxType->pixType == GDT_CFloat64) { SetComponentType(CDOUBLE); } else { itkExceptionMacro(<< "Pixel type unknown"); } if (this->GetComponentType() == CHAR) { m_BytePerPixel = 1; } else if (this->GetComponentType() == UCHAR) { m_BytePerPixel = 1; } else if (this->GetComponentType() == USHORT) { m_BytePerPixel = 2; } else if (this->GetComponentType() == SHORT) { m_BytePerPixel = 2; } else if (this->GetComponentType() == INT) { m_BytePerPixel = 4; } else if (this->GetComponentType() == UINT) { m_BytePerPixel = 4; } else if (this->GetComponentType() == LONG) { m_BytePerPixel = sizeof(long); } else if (this->GetComponentType() == ULONG) { m_BytePerPixel = sizeof(unsigned long); } else if (this->GetComponentType() == FLOAT) { m_BytePerPixel = 4; } else if (this->GetComponentType() == DOUBLE) { m_BytePerPixel = 8; } else if (this->GetComponentType() == CSHORT) { m_BytePerPixel = sizeof(std::complex<short>); } else if (this->GetComponentType() == CINT) { m_BytePerPixel = sizeof(std::complex<int>); } else if (this->GetComponentType() == CFLOAT) { /*if (m_PxType->pixType == GDT_CInt16) m_BytePerPixel = sizeof(std::complex<short>); else if (m_PxType->pixType == GDT_CInt32) m_BytePerPixel = sizeof(std::complex<int>); else*/ m_BytePerPixel = sizeof(std::complex<float>); } else if (this->GetComponentType() == CDOUBLE) { m_BytePerPixel = sizeof(std::complex<double>); } else { itkExceptionMacro(<< "Component type unknown"); } /******************************************************************/ // Set the pixel type with some special cases linked to the fact // we read some data with complex type. if (GDALDataTypeIsComplex(m_PxType->pixType)) // Try to read data with complex type with GDAL { if (!m_IsComplex && m_IsVectorImage) { // we are reading a complex data set into an image where the pixel // type is Vector<real>: we have to double the number of component // for that to work otbLogMacro(Warning, << "Encoding of file (" << m_FileName << ") is complex but will be read as a VectorImage of scalar type, with twice the number of bands."); this->SetNumberOfComponents(m_NbBands * 2); this->SetPixelType(VECTOR); } else { this->SetPixelType(COMPLEX); } } else // Try to read data with scalar type with GDAL { this->SetNumberOfComponents(m_NbBands); if (this->GetNumberOfComponents() == 1) { this->SetPixelType(SCALAR); } else { this->SetPixelType(VECTOR); } } // get list of other files part of the same dataset char** datasetFileList = dataset->GetFileList(); m_AttachedFileNames.clear(); if (datasetFileList != nullptr) { char** currentFile = datasetFileList; while (*currentFile != nullptr) { if (m_FileName.compare(*currentFile) != 0) { m_AttachedFileNames.emplace_back(*currentFile); otbLogMacro(Debug, << "Found attached file : " << *currentFile); } currentFile++; } CSLDestroy(datasetFileList); } /*----------------------------------------------------------------------*/ /*-------------------------- METADATA ----------------------------------*/ /*----------------------------------------------------------------------*/ // Now initialize the itk dictionary itk::MetaDataDictionary& dict = this->GetMetaDataDictionary(); // Initialize the ImageMetadata structure ImageMetadata imd; m_Imd = imd; // Report the typical block size if possible if (dataset->GetRasterCount() > 0) { int blockSizeX = 0; int blockSizeY = 0; dataset->GetRasterBand(1)->GetBlockSize(&blockSizeX, &blockSizeY); if (blockSizeX > 0 && blockSizeY > 0) { blockSizeX = uint_ceildivpow2(blockSizeX, m_ResolutionFactor); if (m_Dataset->IsJPEG2000()) { // Jpeg2000 case : use the real block size Y blockSizeY = uint_ceildivpow2(blockSizeY, m_ResolutionFactor); } else { // Try to keep the GDAL block memory constant blockSizeY = blockSizeY * (1 << m_ResolutionFactor); } itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::TileHintX, blockSizeX); itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::TileHintY, blockSizeY); m_Imd.NumericKeys[MDNum::TileHintX] = blockSizeX; m_Imd.NumericKeys[MDNum::TileHintY] = blockSizeY; } } /* -------------------------------------------------------------------- */ /* Get Pixel type */ /* -------------------------------------------------------------------- */ itk::EncapsulateMetaData<IOComponentType>(dict, MetaDataKey::DataType, this->GetComponentType()); m_Imd.NumericKeys[MDNum::DataType] = this->GetComponentType(); /* -------------------------------------------------------------------- */ /* Get Spacing */ /* -------------------------------------------------------------------- */ // Default Spacing m_Spacing[0] = 1; m_Spacing[1] = 1; // Reset origin to GDAL convention default m_Origin[0] = 0.0; m_Origin[1] = 0.0; // flag to detect images in sensor geometry bool isSensor = false; if (m_NumberOfDimensions == 3) m_Spacing[2] = 1; char** papszMetadata = dataset->GetMetadata(nullptr); /* -------------------------------------------------------------------- */ /* Report general info. */ /* -------------------------------------------------------------------- */ GDALDriverH hDriver; hDriver = dataset->GetDriver(); std::string driverShortName = static_cast<std::string>(GDALGetDriverShortName(hDriver)); std::string driverLongName = static_cast<std::string>(GDALGetDriverLongName(hDriver)); itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::DriverShortNameKey, driverShortName); itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::DriverLongNameKey, driverLongName); if (m_Dataset->IsJPEG2000()) { // store the cache size used for Jpeg2000 files itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::CacheSizeInBytes, GDALGetCacheMax64()); } /* -------------------------------------------------------------------- */ /* Get the projection coordinate system of the image : ProjectionRef */ /* -------------------------------------------------------------------- */ const char* pszProjection = dataset->GetProjectionRef(); if (pszProjection != nullptr && !std::string(pszProjection).empty()) { OGRSpatialReferenceH pSR = OSRNewSpatialReference(nullptr); if (strncmp(pszProjection, "LOCAL_CS",8) == 0) { // skip local coordinate system as they will cause crashed later // In GDAL 3, they begin to do special processing for Transmercator local // coordinate system otbLogMacro(Debug, << "Skipping LOCAL_CS projection") } else if (OSRImportFromWkt(pSR, (char**)(&pszProjection)) == OGRERR_NONE) { char* pszPrettyWkt = nullptr; OSRExportToPrettyWkt(pSR, &pszPrettyWkt, FALSE); itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, static_cast<std::string>(pszPrettyWkt)); m_Imd.Add(MDGeom::ProjectionWKT, std::string(pszPrettyWkt)); CPLFree(pszPrettyWkt); } else { itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, static_cast<std::string>(pszProjection)); m_Imd.Add(MDGeom::ProjectionWKT, std::string(pszProjection)); } if (pSR != nullptr) { OSRRelease(pSR); pSR = nullptr; } } else { // Special case for Jpeg2000 files : try to read the origin in the GML box if (m_Dataset->IsJPEG2000()) { isSensor = GetOriginFromGMLBox(m_Origin); } } /* -------------------------------------------------------------------- */ /* Get the GCP projection coordinates of the image : GCPProjection */ /* -------------------------------------------------------------------- */ unsigned int gcpCount = 0; gcpCount = dataset->GetGCPCount(); if (gcpCount > 0) { std::string gcpProjectionKey; Projection::GCPParam gcps; { // Declare gcpProj in local scope. So, it won't be available outside. const char* gcpProj = dataset->GetGCPProjection(); // assert( gcpProj!=NULL ); if (gcpProj != nullptr) gcpProjectionKey = gcpProj; } itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::GCPProjectionKey, gcpProjectionKey); gcps.GCPProjection = gcpProjectionKey; if (gcpProjectionKey.empty()) { gcpCount = 0; // fix for uninitialized gcpCount in gdal (when // reading Palsar image) } std::string key; itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::GCPCountKey, gcpCount); for (unsigned int cpt = 0; cpt < gcpCount; ++cpt) { const GDAL_GCP* psGCP; psGCP = dataset->GetGCPs() + cpt; GCP pOtbGCP; pOtbGCP.m_Id = std::string(psGCP->pszId); pOtbGCP.m_Info = std::string(psGCP->pszInfo); pOtbGCP.m_GCPRow = psGCP->dfGCPLine; pOtbGCP.m_GCPCol = psGCP->dfGCPPixel; pOtbGCP.m_GCPX = psGCP->dfGCPX; pOtbGCP.m_GCPY = psGCP->dfGCPY; pOtbGCP.m_GCPZ = psGCP->dfGCPZ; // Complete the key with the GCP number : GCP_i std::ostringstream lStream; lStream << MetaDataKey::GCPParametersKey << cpt; key = lStream.str(); itk::EncapsulateMetaData<GCP>(dict, key, pOtbGCP); gcps.GCPs.push_back(pOtbGCP); } m_Imd.Add(MDGeom::GCP, gcps); } /* -------------------------------------------------------------------- */ /* Get the six coefficients of affine geoTtransform */ /* -------------------------------------------------------------------- */ double adfGeoTransform[6]; MetaDataKey::VectorType VadfGeoTransform; if (dataset->GetGeoTransform(adfGeoTransform) == CE_None) { for (int cpt = 0; cpt < 6; ++cpt) { VadfGeoTransform.push_back(adfGeoTransform[cpt]); //~ m_Imd.GeoTransform[cpt] = adfGeoTransform[cpt]; } itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::GeoTransformKey, VadfGeoTransform); if (!isSensor) { /// retrieve origin and spacing from the geo transform m_Spacing[0] = VadfGeoTransform[1]; m_Spacing[1] = VadfGeoTransform[5]; if (m_Spacing[0] == 0 || m_Spacing[1] == 0) { // Manage case where axis are not standard if (VadfGeoTransform[2] != 0 && VadfGeoTransform[4] != 0) { m_Spacing[0] = VadfGeoTransform[2]; m_Spacing[1] = VadfGeoTransform[4]; } else { otbLogMacro(Warning, << "Geotransform reported by GDAL is invalid (spacing = 0)"); m_Spacing[0] = 1; m_Spacing[1] = 1; } } // Geotransforms with a non-null rotation are not supported // Beware : GDAL origin is at the corner of the top-left pixel // whereas OTB/ITK origin is at the centre of the top-left pixel // The origin computed here is in GDAL convention for now m_Origin[0] = VadfGeoTransform[0]; m_Origin[1] = VadfGeoTransform[3]; } } // Compute final spacing with the resolution factor m_Spacing[0] *= std::pow(2.0, static_cast<double>(m_ResolutionFactor)); m_Spacing[1] *= std::pow(2.0, static_cast<double>(m_ResolutionFactor)); // Now that the spacing is known, apply the half-pixel shift m_Origin[0] += 0.5 * m_Spacing[0]; m_Origin[1] += 0.5 * m_Spacing[1]; /* -------------------------------------------------------------------- */ /* Report metadata. */ /* -------------------------------------------------------------------- */ papszMetadata = dataset->GetMetadata(nullptr); if (CSLCount(papszMetadata) > 0) { std::string key; for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::ostringstream lStream; lStream << MetaDataKey::MetadataKey << cpt; key = lStream.str(); itk::EncapsulateMetaData<std::string>(dict, key, static_cast<std::string>(papszMetadata[cpt])); } } /* Special case for JPEG2000, also look in the GML boxes */ if (m_Dataset->IsJPEG2000()) { char** gmlMetadata = nullptr; GDALJP2Metadata jp2Metadata; if (jp2Metadata.ReadAndParse(m_FileName.c_str())) { gmlMetadata = jp2Metadata.papszGMLMetadata; } if (gmlMetadata) { if (CSLCount(gmlMetadata) > 0) { std::string key; int cptOffset = CSLCount(papszMetadata); for (int cpt = 0; gmlMetadata[cpt] != nullptr; ++cpt) { std::ostringstream lStream; lStream << MetaDataKey::MetadataKey << (cpt + cptOffset); key = lStream.str(); itk::EncapsulateMetaData<std::string>(dict, key, static_cast<std::string>(gmlMetadata[cpt])); } } } } /* -------------------------------------------------------------------- */ /* Report subdatasets. */ /* -------------------------------------------------------------------- */ papszMetadata = dataset->GetMetadata("SUBDATASETS"); if (CSLCount(papszMetadata) > 0) { std::string key; for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::ostringstream lStream; lStream << MetaDataKey::SubMetadataKey << cpt; key = lStream.str(); itk::EncapsulateMetaData<std::string>(dict, key, static_cast<std::string>(papszMetadata[cpt])); } } /* -------------------------------------------------------------------- */ /* Report corners */ /* -------------------------------------------------------------------- */ double GeoX(0), GeoY(0); MetaDataKey::VectorType VGeo; GDALInfoReportCorner("Upper Left", 0.0, 0.0, GeoX, GeoY); VGeo.push_back(GeoX); VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::UpperLeftCornerKey, VGeo); //~ m_Imd.ULX = GeoX; //~ m_Imd.ULY = GeoY; VGeo.clear(); GDALInfoReportCorner("Upper Right", m_Dimensions[0], 0.0, GeoX, GeoY); VGeo.push_back(GeoX); VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::UpperRightCornerKey, VGeo); //~ m_Imd.URX = GeoX; //~ m_Imd.URY = GeoY; VGeo.clear(); GDALInfoReportCorner("Lower Left", 0.0, m_Dimensions[1], GeoX, GeoY); VGeo.push_back(GeoX); VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::LowerLeftCornerKey, VGeo); //~ m_Imd.LLX = GeoX; //~ m_Imd.LLY = GeoY; VGeo.clear(); GDALInfoReportCorner("Lower Right", m_Dimensions[0], m_Dimensions[1], GeoX, GeoY); VGeo.push_back(GeoX); VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::LowerRightCornerKey, VGeo); //~ m_Imd.LRX = GeoX; //~ m_Imd.LRY = GeoY; VGeo.clear(); /* -------------------------------------------------------------------- */ /* Color Table */ /* -------------------------------------------------------------------- */ for (int iBand = 0; iBand < dataset->GetRasterCount(); iBand++) { GDALColorTableH hTable; GDALRasterBandH hBand; hBand = GDALGetRasterBand(dataset, iBand + 1); if ((GDALGetRasterColorInterpretation(hBand) == GCI_PaletteIndex) && (hTable = GDALGetRasterColorTable(hBand)) != nullptr) { // Mantis: 1049 : OTB does not handle tif with NBITS=1 properly // When a palette is available and pixel type is Byte, the image is // automatically read as a color image (using the palette). Perhaps this // behaviour should be restricted. Comment color table interpretation in // gdalimageio // FIXME: Better support of color table in OTB // - disable palette conversion in GDALImageIO (the comments in this part // of the code are rather careful) // - GDALImageIO should report the palette to ImageFileReader (as a metadata ? // a kind of LUT ?). // - ImageFileReader should use a kind of adapter filter to convert the mono // image into color. // Do not set indexed image attribute to true // m_IsIndexed = true; unsigned int ColorEntryCount = GDALGetColorEntryCount(hTable); itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ColorTableNameKey, static_cast<std::string>(GDALGetPaletteInterpretationName(GDALGetPaletteInterpretation(hTable)))); itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::ColorEntryCountKey, ColorEntryCount); for (int i = 0; i < GDALGetColorEntryCount(hTable); ++i) { GDALColorEntry sEntry; MetaDataKey::VectorType VColorEntry; GDALGetColorEntryAsRGB(hTable, i, &sEntry); VColorEntry.push_back(sEntry.c1); VColorEntry.push_back(sEntry.c2); VColorEntry.push_back(sEntry.c3); VColorEntry.push_back(sEntry.c4); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::ColorEntryAsRGBKey, VColorEntry); } } } if (m_IsIndexed) { m_NbBands *= 4; this->SetNumberOfComponents(m_NbBands); this->SetPixelType(VECTOR); } // Read no data value if present std::vector<bool> isNoDataAvailable(dataset->GetRasterCount(), false); std::vector<double> noDataValues(dataset->GetRasterCount(), 0); bool noDataFound = false; ImageMetadataBase bmd; for (int iBand = 0; iBand < dataset->GetRasterCount(); iBand++) { GDALRasterBandH hBand = GDALGetRasterBand(dataset, iBand + 1); int success; double ndv = GDALGetRasterNoDataValue(hBand, &success); if (success) { noDataFound = true; isNoDataAvailable[iBand] = true; noDataValues[iBand] = ndv; bmd.Add(MDNum::NoData, ndv); } m_Imd.Bands.push_back(bmd); } if (noDataFound) { itk::EncapsulateMetaData<MetaDataKey::BoolVectorType>(dict, MetaDataKey::NoDataValueAvailable, isNoDataAvailable); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::NoDataValue, noDataValues); } } bool GDALImageIO::CanWriteFile(const char* name) { // First check the filename if (name == nullptr) { return false; } m_FileName = name; // Get the GDAL format ID from the name std::string gdalDriverShortName = FilenameToGdalDriverShortName(name); if (gdalDriverShortName == "NOT-FOUND") { return false; } // Check the driver for support of Create or at least CreateCopy GDALDriver* driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName(gdalDriverShortName); if (GDALGetMetadataItem(driver, GDAL_DCAP_CREATE, nullptr) == nullptr && GDALGetMetadataItem(driver, GDAL_DCAP_CREATECOPY, nullptr) == nullptr) { otbLogMacro(Warning, << "GDAL driver " << GDALGetDriverShortName(driver) << " does not support writing"); return false; } return true; } bool GDALImageIO::CanStreamWrite() { // Get the GDAL format ID from the name std::string gdalDriverShortName = FilenameToGdalDriverShortName(m_FileName); GDALDriver* driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName(gdalDriverShortName); if (driver == nullptr) { m_CanStreamWrite = false; } if (GDALGetMetadataItem(driver, GDAL_DCAP_CREATE, nullptr) != nullptr) { m_CanStreamWrite = true; } else { m_CanStreamWrite = false; } return m_CanStreamWrite; } void GDALImageIO::Write(const void* buffer) { // Check if we have to write the image information if (m_FlagWriteImageInformation == true) { this->InternalWriteImageInformation(buffer); m_FlagWriteImageInformation = false; } // Check if conversion succeed if (buffer == nullptr) { itkExceptionMacro(<< "Null buffer passed to GDALImageIO for writing."); return; } // Compute offset and size unsigned int lNbLines = this->GetIORegion().GetSize()[1]; unsigned int lNbColumns = this->GetIORegion().GetSize()[0]; int lFirstLine = this->GetIORegion().GetIndex()[1]; // [1... ] int lFirstColumn = this->GetIORegion().GetIndex()[0]; // [1... ] // Particular case: checking that the written region is the same size // of the entire image // starting at offset 0 (when no streaming) if ((lNbLines == m_Dimensions[1]) && (lNbColumns == m_Dimensions[0])) { lFirstLine = 0; lFirstColumn = 0; } // If needed, set the coordinate reference if (m_epsgCode != 0) { auto spatialReference = SpatialReference::FromEPSG(m_epsgCode); m_Dataset->GetDataSet()->SetProjection(spatialReference.ToWkt().c_str()); } // Convert buffer from void * to unsigned char * // unsigned char *p = static_cast<unsigned char*>( const_cast<void *>(buffer)); // printDataBuffer(p, m_PxType->pixType, m_NbBands, 10*2); // Buffer incorrect // If driver supports streaming if (m_CanStreamWrite) { otbLogMacro(Debug, << "GDAL writes [" << lFirstColumn << ", " << lFirstColumn + lNbColumns - 1 << "]x[" << lFirstLine << ", " << lFirstLine + lNbLines - 1 << "] x " << m_NbBands << " bands of type " << GDALGetDataTypeName(m_PxType->pixType) << " to file " << m_FileName); otb::Stopwatch chrono = otb::Stopwatch::StartNew(); CPLErr lCrGdal = m_Dataset->GetDataSet()->RasterIO(GF_Write, lFirstColumn, lFirstLine, lNbColumns, lNbLines, const_cast<void*>(buffer), lNbColumns, lNbLines, m_PxType->pixType, m_NbBands, // We want to write all bands nullptr, // Pixel offset // is nbComp * BytePerPixel m_BytePerPixel * m_NbBands, // Line offset // is pixelOffset * nbColumns m_BytePerPixel * m_NbBands * lNbColumns, // Band offset is BytePerPixel m_BytePerPixel); chrono.Stop(); // Check if writing succeed if (lCrGdal == CE_Failure) { itkExceptionMacro(<< "Error while writing image (GDAL format) '" << m_FileName << "' : " << CPLGetLastErrorMsg()); } otbLogMacro(Debug, << "GDAL write took " << chrono.GetElapsedMilliseconds() << " ms") // Flush dataset cache m_Dataset->GetDataSet() ->FlushCache(); } else { // We only wrote data to the memory dataset // Now write it to the real file with CreateCopy() std::string gdalDriverShortName = FilenameToGdalDriverShortName(m_FileName); std::string realFileName = GetGdalWriteImageFileName(gdalDriverShortName, m_FileName); GDALDriver* driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName(gdalDriverShortName); if (driver == nullptr) { itkExceptionMacro(<< "Unable to instantiate driver " << gdalDriverShortName << " to write " << m_FileName); } GDALCreationOptionsType creationOptions = m_CreationOptions; GDALDataset* hOutputDS = driver->CreateCopy(realFileName.c_str(), m_Dataset->GetDataSet(), FALSE, otb::ogr::StringListConverter(creationOptions).to_ogr(), nullptr, nullptr); if (!hOutputDS) { itkExceptionMacro(<< "Error while writing image (GDAL format) '" << m_FileName << "' : " << CPLGetLastErrorMsg()); } else { GDALClose(hOutputDS); } } if (lFirstLine + lNbLines == m_Dimensions[1] && lFirstColumn + lNbColumns == m_Dimensions[0]) { // Last pixel written // Reinitialize to close the file m_Dataset = GDALDatasetWrapperPointer(); } } /** TODO : Methode WriteImageInformation non implementee */ void GDALImageIO::WriteImageInformation() { } void GDALImageIO::InternalWriteImageInformation(const void* buffer) { // char ** papszOptions = NULL; std::string driverShortName; m_NbBands = this->GetNumberOfComponents(); // If the band mapping is different from the one of the input (e.g. because an extended filename // has been set, the bands in the imageMetadata object needs to be reorganized. if (!m_BandList.empty()) { ImageMetadata::ImageMetadataBandsType bandRangeMetadata; for (auto elem: m_BandList) { bandRangeMetadata.push_back(m_Imd.Bands[elem]); } m_Imd.Bands = bandRangeMetadata; } // TODO : this should be a warning instead of an exception // For complex pixels the number of bands is twice the number of compnents (in GDAL sense) if ( !m_Imd.Bands.empty() && static_cast<std::size_t>(m_NbBands) != m_Imd.Bands.size() && !((m_Imd.Bands.size() == static_cast<std::size_t>(2 * m_NbBands)) && this->GetPixelType() == COMPLEX)) { itkExceptionMacro(<< "Number of bands in metadata inconsistent with actual image."); } if ((m_Dimensions[0] == 0) && (m_Dimensions[1] == 0)) { itkExceptionMacro(<< "Dimensions are not defined."); } if ((this->GetPixelType() == COMPLEX) /*&& (m_NbBands / 2 > 0)*/) { // m_NbBands /= 2; if (this->GetComponentType() == CSHORT) { m_BytePerPixel = 4; m_PxType->pixType = GDT_CInt16; } else if (this->GetComponentType() == CINT) { m_BytePerPixel = 8; m_PxType->pixType = GDT_CInt32; } else if (this->GetComponentType() == CFLOAT) { m_BytePerPixel = 8; m_PxType->pixType = GDT_CFloat32; } else if (this->GetComponentType() == CDOUBLE) { m_BytePerPixel = 16; m_PxType->pixType = GDT_CFloat64; } else { itkExceptionMacro(<< "This complex type is not defined :" << ImageIOBase::GetPixelTypeAsString(this->GetPixelType())); } } else { if (this->GetComponentType() == CHAR) { m_BytePerPixel = 1; m_PxType->pixType = GDT_Byte; } else if (this->GetComponentType() == UCHAR) { m_BytePerPixel = 1; m_PxType->pixType = GDT_Byte; } else if (this->GetComponentType() == USHORT) { m_BytePerPixel = 2; m_PxType->pixType = GDT_UInt16; } else if (this->GetComponentType() == SHORT) { m_BytePerPixel = 2; m_PxType->pixType = GDT_Int16; } else if (this->GetComponentType() == INT) { m_BytePerPixel = 4; m_PxType->pixType = GDT_Int32; } else if (this->GetComponentType() == UINT) { m_BytePerPixel = 4; m_PxType->pixType = GDT_UInt32; } else if (this->GetComponentType() == LONG) { m_BytePerPixel = sizeof(long); if (m_BytePerPixel == 8) { itkWarningMacro(<< "Cast a long (64 bits) image into an int (32 bits) one.") } m_PxType->pixType = GDT_Int32; } else if (this->GetComponentType() == ULONG) { m_BytePerPixel = sizeof(unsigned long); if (m_BytePerPixel == 8) { itkWarningMacro(<< "Cast an unsigned long (64 bits) image into an unsigned int (32 bits) one.") } m_PxType->pixType = GDT_UInt32; } else if (this->GetComponentType() == FLOAT) { m_BytePerPixel = 4; m_PxType->pixType = GDT_Float32; } else if (this->GetComponentType() == DOUBLE) { m_BytePerPixel = 8; m_PxType->pixType = GDT_Float64; } else { m_BytePerPixel = 1; m_PxType->pixType = GDT_Byte; } } // Automatically set the Type to Binary for GDAL data this->SetFileTypeToBinary(); driverShortName = FilenameToGdalDriverShortName(m_FileName); if (driverShortName == "NOT-FOUND") { itkExceptionMacro(<< "GDAL Writing failed: the image file name '" << m_FileName << "' is not recognized by GDAL."); } if (m_CanStreamWrite) { GDALCreationOptionsType creationOptions = m_CreationOptions; m_Dataset = GDALDriverManagerWrapper::GetInstance().Create(driverShortName, GetGdalWriteImageFileName(driverShortName, m_FileName), m_Dimensions[0], m_Dimensions[1], m_NbBands, m_PxType->pixType, otb::ogr::StringListConverter(creationOptions).to_ogr()); } else { // buffer casted in unsigned long cause under Win32 the address // doesn't begin with 0x, the address in not interpreted as // hexadecimal but alpha numeric value, then the conversion to // integer make us pointing to an non allowed memory block => Crash. // use intptr_t to cast void* to unsigned long. included stdint.h for // uintptr_t typedef. std::ostringstream stream; stream << "MEM:::" << "DATAPOINTER=" << (uintptr_t)(buffer) << "," << "PIXELS=" << m_Dimensions[0] << "," << "LINES=" << m_Dimensions[1] << "," << "BANDS=" << m_NbBands << "," << "DATATYPE=" << GDALGetDataTypeName(m_PxType->pixType) << "," << "PIXELOFFSET=" << m_BytePerPixel * m_NbBands << "," << "LINEOFFSET=" << m_BytePerPixel * m_NbBands * m_Dimensions[0] << "," << "BANDOFFSET=" << m_BytePerPixel; m_Dataset = GDALDriverManagerWrapper::GetInstance().Open(stream.str()); } if (m_Dataset.IsNull()) { itkExceptionMacro(<< CPLGetLastErrorMsg()); } /*----------------------------------------------------------------------*/ /*-------------------------- METADATA ----------------------------------*/ /*----------------------------------------------------------------------*/ std::ostringstream oss; GDALDataset* dataset = m_Dataset->GetDataSet(); // In OTB we can have simultaneously projection ref, sensor keywordlist, GCPs // but GDAL can't handle both geotransform and GCP (see issue #303). Here is the priority // order we will be using in OTB: // [ProjRef+geotransform] > [SensorKeywordlist+geotransform] > [GCPs] /* -------------------------------------------------------------------- */ /* Pre-compute geotransform */ /* -------------------------------------------------------------------- */ const double Epsilon = 1E-10; double geoTransform[6]; geoTransform[0] = m_Origin[0] - 0.5 * m_Spacing[0] * m_Direction[0][0]; geoTransform[3] = m_Origin[1] - 0.5 * m_Spacing[1] * m_Direction[1][1]; geoTransform[1] = m_Spacing[0] * m_Direction[0][0]; geoTransform[5] = m_Spacing[1] * m_Direction[1][1]; // FIXME: Here component 1 and 4 should be replaced by the orientation parameters geoTransform[2] = 0.; geoTransform[4] = 0.; // only write geotransform if it has non-default values bool writeGeotransform = std::abs(geoTransform[0]) > Epsilon || std::abs(geoTransform[1] - 1.0) > Epsilon || std::abs(geoTransform[2]) > Epsilon || std::abs(geoTransform[3]) > Epsilon || std::abs(geoTransform[4]) > Epsilon || std::abs(geoTransform[5] - 1.0) > Epsilon; itk::MetaDataDictionary& dict = this->GetMetaDataDictionary(); ImageKeywordlist otb_kwl; itk::ExposeMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, otb_kwl); /* -------------------------------------------------------------------- */ /* Case 1: Set the projection coordinate system of the image */ /* -------------------------------------------------------------------- */ if (m_Imd.Has(MDGeom::ProjectionWKT)) { std::string projectionRef( m_Imd.GetProjectionWKT() ); dataset->SetProjection(projectionRef.c_str()); } /* -------------------------------------------------------------------- */ /* Case 2: Sensor geometry */ /* -------------------------------------------------------------------- */ else if (m_Imd.HasSensorGeometry()) { /* -------------------------------------------------------------------- */ /* Set the RPC coeffs (since GDAL 1.10.0) */ /* -------------------------------------------------------------------- */ if (m_WriteRPCTags && m_Imd.Has(MDGeom::RPC)) { const Projection::RPCParam & rpc = boost::any_cast<const Projection::RPCParam&>(m_Imd[MDGeom::RPC]); otbLogMacro(Debug, << "Saving RPC to file (" << m_FileName << ")") GDALRPCInfo gdalRpcStruct; gdalRpcStruct.dfSAMP_OFF = rpc.SampleOffset; gdalRpcStruct.dfLINE_OFF = rpc.LineOffset; gdalRpcStruct.dfSAMP_SCALE = rpc.SampleScale; gdalRpcStruct.dfLINE_SCALE = rpc.LineScale; gdalRpcStruct.dfLAT_OFF = rpc.LatOffset; gdalRpcStruct.dfLONG_OFF = rpc.LonOffset; gdalRpcStruct.dfHEIGHT_OFF = rpc.HeightOffset; gdalRpcStruct.dfLAT_SCALE = rpc.LatScale; gdalRpcStruct.dfLONG_SCALE = rpc.LonScale; gdalRpcStruct.dfHEIGHT_SCALE = rpc.HeightScale; memcpy(gdalRpcStruct.adfLINE_NUM_COEFF, rpc.LineNum, sizeof(double) * 20); memcpy(gdalRpcStruct.adfLINE_DEN_COEFF, rpc.LineDen, sizeof(double) * 20); memcpy(gdalRpcStruct.adfSAMP_NUM_COEFF, rpc.SampleNum, sizeof(double) * 20); memcpy(gdalRpcStruct.adfSAMP_DEN_COEFF, rpc.SampleDen, sizeof(double) * 20); char** rpcMetadata = RPCInfoToMD(&gdalRpcStruct); dataset->SetMetadata(rpcMetadata, "RPC"); CSLDestroy(rpcMetadata); } } // ToDo : remove this part. This case is here for compatibility for images // that still use Ossim for managing the sensor model (with OSSIMKeywordList). else if (otb_kwl.GetSize()) { /* -------------------------------------------------------------------- */ /* Set the RPC coeffs (since GDAL 1.10.0) */ /* -------------------------------------------------------------------- */ if (m_WriteRPCTags) { GDALRPCInfo gdalRpcStruct; if (otb_kwl.convertToGDALRPC(gdalRpcStruct)) { otbLogMacro(Debug, << "Saving RPC to file (" << m_FileName << ")") char** rpcMetadata = RPCInfoToMD(&gdalRpcStruct); dataset->SetMetadata(rpcMetadata, "RPC"); CSLDestroy(rpcMetadata); } } } /* -------------------------------------------------------------------- */ /* Case 3: Set the GCPs */ /* -------------------------------------------------------------------- */ else if (m_Imd.Has(MDGeom::GCP)) { otbLogMacro(Debug, << "Saving GCPs to file (" << m_FileName << ")") const Projection::GCPParam & gcpPrm = boost::any_cast<const Projection::GCPParam&>(m_Imd[MDGeom::GCP]); std::vector<GDAL_GCP> gdalGcps(gcpPrm.GCPs.size()); for (unsigned int gcpIndex = 0; gcpIndex < gdalGcps.size(); ++gcpIndex) { const GCP &gcp = gcpPrm.GCPs[gcpIndex]; gdalGcps[gcpIndex].pszId = const_cast<char*>(gcp.m_Id.c_str()); gdalGcps[gcpIndex].pszInfo = const_cast<char*>(gcp.m_Info.c_str()); gdalGcps[gcpIndex].dfGCPPixel = gcp.m_GCPCol; gdalGcps[gcpIndex].dfGCPLine = gcp.m_GCPRow; gdalGcps[gcpIndex].dfGCPX = gcp.m_GCPX; gdalGcps[gcpIndex].dfGCPY = gcp.m_GCPY; gdalGcps[gcpIndex].dfGCPZ = gcp.m_GCPZ; if (writeGeotransform) { // we need to transform GCP col and row accordingly // WARNING: assume no rotation is there gdalGcps[gcpIndex].dfGCPPixel = (gcp.m_GCPCol - geoTransform[0]) / geoTransform[1]; gdalGcps[gcpIndex].dfGCPLine = (gcp.m_GCPRow - geoTransform[3]) / geoTransform[5]; } } const std::string & gcpProjectionRef = gcpPrm.GCPProjection; dataset->SetGCPs(gdalGcps.size(), gdalGcps.data(), gcpProjectionRef.c_str()); // disable geotransform with GCP writeGeotransform = false; } /* -------------------------------------------------------------------- */ /* Save geotransform if needed. */ /* -------------------------------------------------------------------- */ if (writeGeotransform) { if ( driverShortName == "ENVI" && geoTransform[5] > 0.) { // Error if writing to a ENVI file with a positive Y spacing itkExceptionMacro(<< "Can not write to ENVI file format with a positive Y spacing (" << m_FileName << ")"); } dataset->SetGeoTransform(geoTransform); } /* -------------------------------------------------------------------- */ /* Report metadata. */ /* -------------------------------------------------------------------- */ ExportMetadata(); /* -------------------------------------------------------------------- */ /* No Data. */ /* -------------------------------------------------------------------- */ // Write no-data flags from ImageMetadata int iBand = 0; for (auto const& bandMD : m_Imd.Bands) { if (bandMD.Has(MDNum::NoData)) { dataset->GetRasterBand(iBand + 1)->SetNoDataValue(bandMD[MDNum::NoData]); } ++iBand; } // Write no-data flags from extended filenames for (auto const& noData : m_NoDataList) dataset->GetRasterBand(noData.first)->SetNoDataValue(noData.second); } std::string GDALImageIO::FilenameToGdalDriverShortName(const std::string& name) const { std::string extension; std::string gdalDriverShortName; // Get extension in lowercase extension = itksys::SystemTools::LowerCase(itksys::SystemTools::GetFilenameLastExtension(name)); if (extension == ".tif" || extension == ".tiff") gdalDriverShortName = "GTiff"; else if (extension == ".hdr") gdalDriverShortName = "ENVI"; else if (extension == ".img") gdalDriverShortName = "HFA"; else if (extension == ".ntf") gdalDriverShortName = "NITF"; else if (extension == ".png") gdalDriverShortName = "PNG"; else if (extension == ".jpg" || extension == ".jpeg") gdalDriverShortName = "JPEG"; else if (extension == ".pix") gdalDriverShortName = "PCIDSK"; else if (extension == ".lbl" || extension == ".pds") gdalDriverShortName = "ISIS2"; else if (extension == ".j2k" || extension == ".jp2" || extension == ".jpx") { // Try different JPEG2000 drivers GDALDriver* driver = nullptr; driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2OpenJPEG"); if (driver) { gdalDriverShortName = "JP2OpenJPEG"; } if (!driver) { driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2KAK"); if (driver) { gdalDriverShortName = "JP2KAK"; } } if (!driver) { driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2ECW"); if (driver) { gdalDriverShortName = "JP2ECW"; } } if (!driver) { gdalDriverShortName = "NOT-FOUND"; } } else gdalDriverShortName = "NOT-FOUND"; return gdalDriverShortName; } bool GDALImageIO::GetOriginFromGMLBox(std::vector<double>& origin) { GDALJP2Metadata jp2Metadata; if (!jp2Metadata.ReadAndParse(m_FileName.c_str())) { return false; } if (!jp2Metadata.papszGMLMetadata) { return false; } std::string gmlString = static_cast<std::string>(jp2Metadata.papszGMLMetadata[0]); gmlString.erase(0, 18); // We need to remove first part to create a true xml stream TiXmlDocument doc; doc.Parse(gmlString.c_str()); // Create xml doc from a string TiXmlHandle docHandle(&doc); TiXmlElement* originTag = docHandle.FirstChild("gml:FeatureCollection") .FirstChild("gml:featureMember") .FirstChild("gml:FeatureCollection") .FirstChild("gml:featureMember") .FirstChild("gml:GridCoverage") .FirstChild("gml:gridDomain") .FirstChild("gml:Grid") .FirstChild("gml:limits") .FirstChild("gml:GridEnvelope") .FirstChild("gml:low") .ToElement(); if (!originTag) { return false; } std::vector<itksys::String> originValues; originValues = itksys::SystemTools::SplitString(originTag->GetText(), ' ', false); // Compute origin in GDAL convention (the half-pixel shift is applied later) std::istringstream ss0(originValues[0]); std::istringstream ss1(originValues[1]); ss0 >> origin[1]; ss1 >> origin[0]; origin[0] += -1.0; origin[1] += -1.0; return true; } std::string GDALImageIO::GetGdalWriteImageFileName(const std::string& gdalDriverShortName, const std::string& filename) const { std::string gdalFileName; gdalFileName = filename; // Suppress hdr extension for ENVI format if (gdalDriverShortName == "ENVI") { gdalFileName = System::GetRootName(filename); } return gdalFileName; } bool GDALImageIO::GDALInfoReportCorner(const char* /*corner_name*/, double x, double y, double& GeoX, double& GeoY) const { double adfGeoTransform[6]; bool IsTrue; /* -------------------------------------------------------------------- */ /* Transform the point into georeferenced coordinates. */ /* -------------------------------------------------------------------- */ if (m_Dataset->GetDataSet()->GetGeoTransform(adfGeoTransform) == CE_None) { GeoX = adfGeoTransform[0] + adfGeoTransform[1] * x + adfGeoTransform[2] * y; GeoY = adfGeoTransform[3] + adfGeoTransform[4] * x + adfGeoTransform[5] * y; IsTrue = true; } else { GeoX = x; GeoY = y; IsTrue = false; } return IsTrue; } bool GDALImageIO::CreationOptionContains(std::string partialOption) const { size_t i; for (i = 0; i < m_CreationOptions.size(); ++i) { if (boost::algorithm::starts_with(m_CreationOptions[i], partialOption)) { break; } } return (i != m_CreationOptions.size()); } std::string GDALImageIO::GetGdalPixelTypeAsString() const { std::string name = GDALGetDataTypeName(m_PxType->pixType); return name; } int GDALImageIO::GetNbBands() const { return m_Dataset->GetDataSet()->GetRasterCount(); } std::string GDALImageIO::GetResourceFile(std::string str) const { if (str.empty()) return m_FileName; itksys::RegularExpression reg; reg.compile(str); for (auto & filename : GetResourceFiles()) if (reg.find(filename)) return filename; return std::string(""); } std::vector<std::string> GDALImageIO::GetResourceFiles() const { std::vector<std::string> result; for (char ** file = this->m_Dataset->GetDataSet()->GetFileList() ; *file != nullptr ; ++ file) result.push_back(*file); return result; } std::string GDALImageIO::GetMetadataValue(const std::string path, bool& hasValue, int band) const { // detect namespace if any std::string domain(""); std::string key(path); std::size_t found = path.find_first_of("/"); if (found != std::string::npos) { domain = path.substr(0, found); key = path.substr(found + 1); } const char* ret; if (band >= 0) ret = m_Dataset->GetDataSet()->GetRasterBand(band+1)->GetMetadataItem(key.c_str(), domain.c_str()); else ret = m_Dataset->GetDataSet()->GetMetadataItem(key.c_str(), domain.c_str()); if (ret) hasValue = true; else { hasValue = false; ret = ""; } return std::string(ret); } void GDALImageIO::SetMetadataValue(const char * path, const char * value, int band) { // detect namespace if any const char *slash = strchr(path,'/'); std::string domain(""); const char *domain_c = nullptr; std::string key(path); if (slash) { domain = std::string(path, (slash-path)); domain_c = domain.c_str(); key = std::string(slash+1); } if (band >= 0) { m_Dataset->GetDataSet()->GetRasterBand(band+1)->SetMetadataItem(key.c_str(), value, domain_c); } else { m_Dataset->GetDataSet()->SetMetadataItem(key.c_str(), value, domain_c); } } void GDALImageIO::ExportMetadata() { SetMetadataValue("METADATATYPE", "OTB"); SetMetadataValue("OTB_VERSION", OTB_VERSION_STRING ); // TODO: finish implementation: filter the keys MDGeom::SensorGeometry that // will be exported as '<typename>' (boost::any). The (future) SensorModelFactory should // be used to detect and export properly the field MDGeom::SensorGeometry into a string // keywordlist. Note that the keys generated for this sensor geometry should // be prefixed by: MDGeomNames[MDGeom::SensorGeometry] + '.' ImageMetadataBase::Keywordlist kwl; m_Imd.ToKeywordlist(kwl); KeywordlistToMetadata(kwl); int bIdx = 0; for (const auto& band : m_Imd.Bands) { band.ToKeywordlist(kwl); KeywordlistToMetadata(kwl, bIdx); ++bIdx; } } void GDALImageIO::ImportMetadata() { // TODO // Check special value METADATATYPE=OTB before continue processing // Keys Starting with: MDGeomNames[MDGeom::SensorGeometry] + '.' should // be decoded by the (future) SensorModelFactory. // Use ImageMetadataBase::FromKeywordlist to ingest the metadata bool hasValue; if (std::string(GetMetadataValue("METADATATYPE", hasValue)) != "OTB") return; ImageMetadataBase::Keywordlist kwl; GDALMetadataToKeywordlist(m_Dataset->GetDataSet()->GetMetadata(), kwl); m_Imd.FromKeywordlist(kwl); // GCPs are imported directly in the ImageMetadata. m_Imd.Add(MDGeom::GCP, m_Dataset->GetGCPParam()); // Parsing the bands for (int band = 0 ; band < m_NbBands ; ++band) { kwl.clear(); GDALMetadataToKeywordlist(m_Dataset->GetDataSet()->GetRasterBand(band+1)->GetMetadata(), kwl); m_Imd.Bands[band].FromKeywordlist(kwl); } } void GDALImageIO::KeywordlistToMetadata(ImageMetadataBase::Keywordlist kwl, int band) { for (const auto& kv : kwl) { if (kv.first == MetaData::MDGeomNames.left.at(MDGeom::SensorGeometry)) { SetMetadataValue("MDGeomNames[MDGeom::SensorGeometry].", kv.second.c_str(), band); } else if (kv.first == MetaData::MDGeomNames.left.at(MDGeom::RPC)) { // RPC Models are exported directly from the ImageMetadata. Projection::RPCParam rpcStruct = boost::any_cast<Projection::RPCParam>(m_Imd[MDGeom::RPC]); this->SetAs("RPC/LINE_OFF", rpcStruct.LineOffset); this->SetAs("RPC/SAMP_OFF", rpcStruct.SampleOffset); this->SetAs("RPC/LAT_OFF", rpcStruct.LatOffset); this->SetAs("RPC/LONG_OFF", rpcStruct.LonOffset); this->SetAs("RPC/HEIGHT_OFF", rpcStruct.HeightOffset); this->SetAs("RPC/LINE_SCALE", rpcStruct.LineScale); this->SetAs("RPC/SAMP_SCALE", rpcStruct.SampleScale); this->SetAs("RPC/LAT_SCALE", rpcStruct.LatScale); this->SetAs("RPC/LONG_SCALE", rpcStruct.LonScale); this->SetAs("RPC/HEIGHT_SCALE", rpcStruct.HeightScale); this->SetAsVector("RPC/LINE_NUM_COEFF", std::vector<double> (rpcStruct.LineNum, rpcStruct.LineNum + 20 / sizeof(double)), ' '); this->SetAsVector("RPC/LINE_DEN_COEFF", std::vector<double> (rpcStruct.LineDen, rpcStruct.LineDen + 20 / sizeof(double)), ' '); this->SetAsVector("RPC/SAMP_NUM_COEFF", std::vector<double> (rpcStruct.SampleNum, rpcStruct.SampleNum + 20 / sizeof(double)), ' '); this->SetAsVector("RPC/SAMP_DEN_COEFF", std::vector<double> (rpcStruct.SampleDen, rpcStruct.SampleDen + 20 / sizeof(double)), ' '); } // Note that GCPs have already been exported SetMetadataValue(kv.first.c_str(), kv.second.c_str(), band); } } void GDALImageIO::GDALMetadataToKeywordlist(const char* const* metadataList, ImageMetadataBase::Keywordlist &kwl) { // The GDAL metadata string list is formatted as a “Name=value” list with the last pointer value being NULL. for ( ; *metadataList != nullptr ; ++metadataList ) { std::string metadataLine = std::string(*metadataList); // The key and the value are separated by the '=' symbol std::string::size_type pos = metadataLine.find('='); std::string fieldName = metadataLine.substr(0, pos); std::string fieldValue = metadataLine.substr(pos+1); if((fieldName.size() > 36) && (fieldName.substr(0, 36) == "MDGeomNames[MDGeom::SensorGeometry].")) { // Sensor Geometry is imported directly in the ImageMetadata. // TODO: Keys Starting with: MDGeomNames[MDGeom::SensorGeometry] + '.' should // be decoded by the (future) SensorModelFactory. } else if (fieldName == MetaData::MDGeomNames.left.at(MDGeom::RPC)) { // RPC Models are imported directly in the ImageMetadata. Projection::RPCParam rpcStruct; rpcStruct.LineOffset = this->GetAs<double>("RPC/LINE_OFF"); rpcStruct.SampleOffset = this->GetAs<double>("RPC/SAMP_OFF"); rpcStruct.LatOffset = this->GetAs<double>("RPC/LAT_OFF"); rpcStruct.LonOffset = this->GetAs<double>("RPC/LONG_OFF"); rpcStruct.HeightOffset = this->GetAs<double>("RPC/HEIGHT_OFF"); rpcStruct.LineScale = this->GetAs<double>("RPC/LINE_SCALE"); rpcStruct.SampleScale = this->GetAs<double>("RPC/SAMP_SCALE"); rpcStruct.LatScale = this->GetAs<double>("RPC/LAT_SCALE"); rpcStruct.LonScale = this->GetAs<double>("RPC/LONG_SCALE"); rpcStruct.HeightScale = this->GetAs<double>("RPC/HEIGHT_SCALE"); std::vector<double> coeffs(20); coeffs = this->GetAsVector<double>("RPC/LINE_NUM_COEFF",' ',20); std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineNum); coeffs = this->GetAsVector<double>("RPC/LINE_DEN_COEFF",' ',20); std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineDen); coeffs = this->GetAsVector<double>("RPC/SAMP_NUM_COEFF",' ',20); std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleNum); coeffs = this->GetAsVector<double>("RPC/SAMP_DEN_COEFF",' ',20); std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleDen); m_Imd.Add(MDGeom::RPC, rpcStruct); } else kwl.emplace(fieldName, fieldValue); } } } // end namespace otb
33.93129
159
0.60685
yyxgiser
10199b36c9396fda4869b2998fbe8f691af2a4bb
2,817
cpp
C++
Sem2/C++/Assignment 1/bank.cpp
nsudhanva/mca-code
812348ce53edbe0f42f85a9c362bfc8aad64e1e7
[ "MIT" ]
null
null
null
Sem2/C++/Assignment 1/bank.cpp
nsudhanva/mca-code
812348ce53edbe0f42f85a9c362bfc8aad64e1e7
[ "MIT" ]
null
null
null
Sem2/C++/Assignment 1/bank.cpp
nsudhanva/mca-code
812348ce53edbe0f42f85a9c362bfc8aad64e1e7
[ "MIT" ]
2
2018-10-12T06:38:14.000Z
2019-01-30T04:38:03.000Z
#include <iostream> #include <cstring> using namespace std; class Bank{ public: char name[20]; char account_no[20]; char type[10]; float bal; Bank() { bal = 0; } void deposit(); void withdraw(); void balance(); }; void Bank::deposit() { float amount; cout << "Enter the amount to deposit: " << endl; cin >> amount; bal = bal + amount; cout << "Amount " << amount << " deposited" << endl; } void Bank::withdraw() { float amount; cout << "Enter the amount to withdraw: " << endl; cin >> amount; if(bal < amount){ cout << "Insufficient Balance.." << endl; } else{ bal = bal - amount; cout << "Amount " << amount << " withdrawn" << endl; } } void Bank::balance() { cout << "Balance = " << bal << endl; } int main() { Bank customers[20]; int n; cout << "Enter no of customers: " << endl; cin >> n; for (int i = 0; i < n; i++) { cout << "Enter customer " << i + 1 << " details: " << endl; cout << "Enter name: " << endl; cin >> customers[i].name; cout << "Enter account number: " << endl; cin >> customers[i].account_no; cout << "Enter account type: " << endl; cin >> customers[i].type; } int choice; char acc_num[20]; while(1){ cout << "Enter what operation to be performed: " << endl; cout << "1. Deposit" << endl; cout << "2. Withdraw" << endl; cout << "3. Balance" << endl; cin >> choice; if(choice == 0){ break; } cout << "Enter account no: " << endl; cin >> acc_num; switch(choice) { case 1: for (int i = 0; i < n; i++) { if (!strcmp(acc_num, customers[i].account_no)) { customers[i].deposit(); break; } } break; case 2: for (int i = 0; i < n; i++) { if (!strcmp(acc_num, customers[i].account_no)) { customers[i].withdraw(); break; } } break; case 3: for (int i = 0; i < n; i++) { if (!strcmp(acc_num, customers[i].account_no)) { customers[i].balance(); break; } } break; default: cout << "Invalid option.." << endl; } } }
22.357143
67
0.392261
nsudhanva
101a6a2ecf7b509437247786d83a1ea6b1b78fe2
992,789
cxx
C++
src/tpetra/src/fortpetraFORTRAN_wrap.cxx
sethrj/ForTrilinos
f25352a6910297ddb97369288b51734cde0ab1b5
[ "BSD-3-Clause" ]
null
null
null
src/tpetra/src/fortpetraFORTRAN_wrap.cxx
sethrj/ForTrilinos
f25352a6910297ddb97369288b51734cde0ab1b5
[ "BSD-3-Clause" ]
null
null
null
src/tpetra/src/fortpetraFORTRAN_wrap.cxx
sethrj/ForTrilinos
f25352a6910297ddb97369288b51734cde0ab1b5
[ "BSD-3-Clause" ]
null
null
null
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.0 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ /* * Copyright 2017, UT-Battelle, LLC * * SPDX-License-Identifier: BSD-3-Clause * License-Filename: LICENSE */ #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template<typename T> class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); SwigValueWrapper(const SwigValueWrapper<T>& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template <typename T> T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if defined(__GNUC__) # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 #endif /* Intel's compiler complains if a variable which was never initialised is * cast to void, which is a common idiom which we use to indicate that we * are aware a variable isn't used. So we just silence that warning. * See: https://github.com/swig/swig/issues/192 for more discussion. */ #ifdef __INTEL_COMPILER # pragma warning disable 592 #endif #ifndef SWIGEXTERN #ifdef __cplusplus #define SWIGEXTERN extern #else #define SWIGEXTERN #endif #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 // Default exception handler #define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \ throw std::logic_error("In " DECL ": " MSG); RETURNNULL; /* Contract support */ #define SWIG_contract_assert(RETURNNULL, EXPR, MSG) \ if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); } #undef SWIG_exception_impl #define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \ SWIG_store_exception(DECL, CODE, MSG); RETURNNULL; void SWIG_check_unhandled_exception_impl(const char* decl); void SWIG_store_exception(const char* decl, int errcode, const char *msg); #define SWIG_check_sp_nonnull(INPUT, TYPENAME, FNAME, FUNCNAME, RETURNNULL) \ if (!(INPUT)) { \ SWIG_exception_impl(FUNCNAME, SWIG_TypeError, \ "Cannot pass null " TYPENAME " (class " FNAME ") " \ "as a reference", RETURNNULL); \ } #if __cplusplus >= 201103L #define SWIG_assign(LEFTTYPE, LEFT, RIGHTTYPE, RIGHT, FLAGS) \ SWIG_assign_impl<LEFTTYPE , RIGHTTYPE, swig::assignment_flags<LEFTTYPE >() >( \ LEFT, RIGHT); #else #define SWIG_assign(LEFTTYPE, LEFT, RIGHTTYPE, RIGHT, FLAGS) \ SWIG_assign_impl<LEFTTYPE , RIGHTTYPE, FLAGS >(LEFT, RIGHT); #endif #define SWIG_check_nonnull(SWIG_CLASS_WRAPPER, TYPENAME, FNAME, FUNCNAME, RETURNNULL) \ if ((SWIG_CLASS_WRAPPER).mem == SWIG_NULL) { \ SWIG_exception_impl(FUNCNAME, SWIG_TypeError, \ "Cannot pass null " TYPENAME " (class " FNAME ") " \ "as a reference", RETURNNULL); \ } #define SWIG_check_mutable(SWIG_CLASS_WRAPPER, TYPENAME, FNAME, FUNCNAME, RETURNNULL) \ if ((SWIG_CLASS_WRAPPER).mem == SWIG_CREF) { \ SWIG_exception_impl(FUNCNAME, SWIG_TypeError, \ "Cannot pass const " TYPENAME " (class " FNAME ") " \ "as a mutable reference", \ RETURNNULL); \ } #define SWIG_check_mutable_nonnull(SWIG_CLASS_WRAPPER, TYPENAME, FNAME, FUNCNAME, RETURNNULL) \ SWIG_check_nonnull(SWIG_CLASS_WRAPPER, TYPENAME, FNAME, FUNCNAME, RETURNNULL); \ SWIG_check_mutable(SWIG_CLASS_WRAPPER, TYPENAME, FNAME, FUNCNAME, RETURNNULL); #define SWIGVERSION 0x040000 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include <stdexcept> #include <utility> #include <string> #include "Tpetra_ConfigDefs.hpp" typedef double SC; typedef int LO; typedef long long GO; typedef Kokkos::Compat::KokkosSerialWrapperNode NO; typedef char Packet; enum SwigMemState { SWIG_NULL = 0, SWIG_OWN, SWIG_MOVE, SWIG_REF, SWIG_CREF }; struct SwigClassWrapper { void* ptr; SwigMemState mem; }; SWIGINTERN SwigClassWrapper SwigClassWrapper_uninitialized() { SwigClassWrapper result; result.ptr = NULL; result.mem = SWIG_NULL; return result; } struct SwigArrayWrapper { void* data; std::size_t size; }; SWIGINTERN SwigArrayWrapper SwigArrayWrapper_uninitialized() { SwigArrayWrapper result; result.data = NULL; result.size = 0; return result; } #include "Teuchos_RCP.hpp" #include "Tpetra_Map.hpp" #define SWIG_NO_NULL_DELETER_0 , Teuchos::RCP_WEAK_NO_DEALLOC #define SWIG_NO_NULL_DELETER_1 #define SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW #define SWIG_NO_NULL_DELETER_SWIG_POINTER_OWN SWIGINTERN SwigArrayWrapper SWIG_store_string(const std::string& str) { static std::string* temp = NULL; SwigArrayWrapper result; if (str.empty()) { // Result is empty result.data = NULL; result.size = 0; } else { if (!temp) { // Allocate a new temporary string temp = new std::string(str); } else { // Assign the string *temp = str; } result.data = &(*(temp->begin())); result.size = temp->size(); } return result; } SWIGINTERN Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_1(Tpetra::global_size_t numGlobalElements,Teuchos::RCP< Teuchos::Comm< int > const > const &comm,Tpetra::LocalGlobal lg=Tpetra::GloballyDistributed){ return new Tpetra::Map<LO,GO,NO>(numGlobalElements, 1/*indexBase*/, comm, lg); } SWIGINTERN Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_3(Tpetra::global_size_t numGlobalElements,size_t numLocalElements,Teuchos::RCP< Teuchos::Comm< int > const > const &comm){ return new Tpetra::Map<LO,GO,NO>(numGlobalElements, numLocalElements, 1/*indexBase*/, comm); } SWIGINTERN Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_4(Tpetra::global_size_t const numGlobalElements,std::pair< GO const *,std::size_t > indexList,Teuchos::RCP< Teuchos::Comm< int > const > const &comm){ Teuchos::ArrayView<const GO> indexListView = Teuchos::arrayView(indexList.first, indexList.second); return new Tpetra::Map<LO,GO,NO>(numGlobalElements, indexListView, 1/*indexBase*/, comm); } SWIGINTERN Tpetra::LookupStatus Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg__getRemoteIndexList__SWIG_0(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *self,std::pair< GO const *,std::size_t > GIDList,std::pair< int *,std::size_t > nodeIDList,std::pair< LO *,std::size_t > LIDList){ Teuchos::ArrayView<const GO> GIDListView = Teuchos::arrayView(GIDList.first, GIDList.second); Teuchos::ArrayView<int> nodeIDListView = Teuchos::arrayView(nodeIDList.first, nodeIDList.second); Teuchos::ArrayView<LO> LIDListView = Teuchos::arrayView(LIDList.first, LIDList.second); return self->getRemoteIndexList(GIDListView, nodeIDListView, LIDListView); } SWIGINTERN Tpetra::LookupStatus Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg__getRemoteIndexList__SWIG_1(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *self,std::pair< GO const *,std::size_t > GIDList,std::pair< int *,std::size_t > nodeIDList){ Teuchos::ArrayView<const GO> GIDListView = Teuchos::arrayView(GIDList.first, GIDList.second); Teuchos::ArrayView<int> nodeIDListView = Teuchos::arrayView(nodeIDList.first, nodeIDList.second); return self->getRemoteIndexList(GIDListView, nodeIDListView); } SWIGINTERN std::pair< GO const *,std::size_t > Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg__getNodeElementList(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *self){ auto view = self->getNodeElementList(); return std::make_pair<const GO*,size_t>(view.getRawPtr(), view.size()); } namespace swig { enum AssignmentFlags { IS_DESTR = 0x01, IS_COPY_CONSTR = 0x02, IS_COPY_ASSIGN = 0x04, IS_MOVE_CONSTR = 0x08, IS_MOVE_ASSIGN = 0x10 }; // Define our own switching struct to support pre-c++11 builds template<bool Val> struct bool_constant {}; typedef bool_constant<true> true_type; typedef bool_constant<false> false_type; // Deletion template<class T> SWIGINTERN void destruct_impl(T* self, true_type) { delete self; } template<class T> SWIGINTERN T* destruct_impl(T* , false_type) { SWIG_exception_impl("assignment", SWIG_TypeError, "Invalid assignment: class type has no destructor", return NULL); } // Copy construction and assignment template<class T, class U> SWIGINTERN T* copy_construct_impl(const U* other, true_type) { return new T(*other); } template<class T, class U> SWIGINTERN void copy_assign_impl(T* self, const U* other, true_type) { *self = *other; } // Disabled construction and assignment template<class T, class U> SWIGINTERN T* copy_construct_impl(const U* , false_type) { SWIG_exception_impl("assignment", SWIG_TypeError, "Invalid assignment: class type has no copy constructor", return NULL); } template<class T, class U> SWIGINTERN void copy_assign_impl(T* , const U* , false_type) { SWIG_exception_impl("assignment", SWIG_TypeError, "Invalid assignment: class type has no copy assignment", return); } #if __cplusplus >= 201103L #include <utility> #include <type_traits> // Move construction and assignment template<class T, class U> SWIGINTERN T* move_construct_impl(U* other, true_type) { return new T(std::move(*other)); } template<class T, class U> SWIGINTERN void move_assign_impl(T* self, U* other, true_type) { *self = std::move(*other); } // Disabled move construction and assignment template<class T, class U> SWIGINTERN T* move_construct_impl(U*, false_type) { SWIG_exception_impl("assignment", SWIG_TypeError, "Invalid assignment: class type has no move constructor", return NULL); } template<class T, class U> SWIGINTERN void move_assign_impl(T*, U*, false_type) { SWIG_exception_impl("assignment", SWIG_TypeError, "Invalid assignment: class type has no move assignment", return); } template<class T> constexpr int assignment_flags() { return (std::is_destructible<T>::value ? IS_DESTR : 0) | (std::is_copy_constructible<T>::value ? IS_COPY_CONSTR : 0) | (std::is_copy_assignable<T>::value ? IS_COPY_ASSIGN : 0) | (std::is_move_constructible<T>::value ? IS_MOVE_CONSTR : 0) | (std::is_move_assignable<T>::value ? IS_MOVE_ASSIGN : 0); } #endif template<class T, int Flags> struct AssignmentTraits { static void destruct(T* self) { destruct_impl<T>(self, bool_constant<Flags & IS_DESTR>()); } template<class U> static T* copy_construct(const U* other) { return copy_construct_impl<T,U>(other, bool_constant<bool(Flags & IS_COPY_CONSTR)>()); } template<class U> static void copy_assign(T* self, const U* other) { copy_assign_impl<T,U>(self, other, bool_constant<bool(Flags & IS_COPY_ASSIGN)>()); } #if __cplusplus >= 201103L template<class U> static T* move_construct(U* other) { return move_construct_impl<T,U>(other, bool_constant<bool(Flags & IS_MOVE_CONSTR)>()); } template<class U> static void move_assign(T* self, U* other) { move_assign_impl<T,U>(self, other, bool_constant<bool(Flags & IS_MOVE_ASSIGN)>()); } #else template<class U> static T* move_construct(U* other) { return copy_construct_impl<T,U>(other, bool_constant<bool(Flags & IS_COPY_CONSTR)>()); } template<class U> static void move_assign(T* self, U* other) { copy_assign_impl<T,U>(self, other, bool_constant<bool(Flags & IS_COPY_ASSIGN)>()); } #endif }; } // end namespace swig template<class T1, class T2, int AFlags> SWIGINTERN void SWIG_assign_impl(SwigClassWrapper* self, SwigClassWrapper* other) { typedef swig::AssignmentTraits<T1, AFlags> Traits_t; T1* pself = static_cast<T1*>(self->ptr); T2* pother = static_cast<T2*>(other->ptr); switch (self->mem) { case SWIG_NULL: /* LHS is unassigned */ switch (other->mem) { case SWIG_NULL: /* null op */ break; case SWIG_MOVE: /* capture pointer from RHS */ self->ptr = other->ptr; other->ptr = NULL; self->mem = SWIG_OWN; other->mem = SWIG_NULL; break; case SWIG_OWN: /* copy from RHS */ self->ptr = Traits_t::copy_construct(pother); self->mem = SWIG_OWN; break; case SWIG_REF: /* pointer to RHS */ case SWIG_CREF: self->ptr = other->ptr; self->mem = other->mem; break; } break; case SWIG_OWN: /* LHS owns memory */ switch (other->mem) { case SWIG_NULL: /* Delete LHS */ Traits_t::destruct(pself); self->ptr = NULL; self->mem = SWIG_NULL; break; case SWIG_MOVE: /* Move RHS into LHS; delete RHS */ Traits_t::move_assign(pself, pother); Traits_t::destruct(pother); other->ptr = NULL; other->mem = SWIG_NULL; break; case SWIG_OWN: case SWIG_REF: case SWIG_CREF: /* Copy RHS to LHS */ Traits_t::copy_assign(pself, pother); break; } break; case SWIG_MOVE: SWIG_exception_impl("assignment", SWIG_RuntimeError, "Left-hand side of assignment should never be in a 'MOVE' state", return); break; case SWIG_REF: /* LHS is a reference */ switch (other->mem) { case SWIG_NULL: /* Remove LHS reference */ self->ptr = NULL; self->mem = SWIG_NULL; break; case SWIG_MOVE: /* Move RHS into LHS; delete RHS. The original ownership stays the * same. */ Traits_t::move_assign(pself, pother); Traits_t::destruct(pother); other->ptr = NULL; other->mem = SWIG_NULL; break; case SWIG_OWN: case SWIG_REF: case SWIG_CREF: /* Copy RHS to LHS */ Traits_t::copy_assign(pself, pother); break; } case SWIG_CREF: switch (other->mem) { case SWIG_NULL: /* Remove LHS reference */ self->ptr = NULL; self->mem = SWIG_NULL; default: SWIG_exception_impl("assignment", SWIG_RuntimeError, "Cannot assign to a const reference", return); break; } } } #include "Tpetra_Export.hpp" #include "Tpetra_Import.hpp" #include "Tpetra_MultiVector.hpp" SWIGINTERN Tpetra::MultiVector< SC,LO,GO,NO > *new_Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_7(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &map,std::pair< SC const *,std::size_t > A,size_t const LDA,size_t const NumVectors){ Teuchos::ArrayView<const SC> AView = Teuchos::arrayView(A.first, A.second); return new Tpetra::MultiVector<SC,LO,GO,NO>(map, AView, LDA, NumVectors); } SWIGINTERN std::pair< SC const *,std::size_t > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getData(Tpetra::MultiVector< SC,LO,GO,NO > const *self,size_t j){ Teuchos::ArrayRCP<const SC> a = self->getData(j); return std::make_pair<const SC*,size_t>(a.get(), a.size()); } SWIGINTERN std::pair< SC *,std::size_t > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getDataNonConst(Tpetra::MultiVector< SC,LO,GO,NO > *self,size_t j){ Teuchos::ArrayRCP<SC> a = self->getDataNonConst(j); return std::make_pair<SC*,size_t>(a.get(), a.size()); } SWIGINTERN Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__subCopy(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< std::size_t const *,std::size_t > cols){ Teuchos::Array<size_t> colsArray(cols.second); for (int i = 0; i < colsArray.size(); i++) colsArray[i] = cols.first[i]-1; return self->subCopy(colsArray); } SWIGINTERN Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__subView(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< std::size_t const *,std::size_t > cols){ Teuchos::Array<size_t> colsArray(cols.second); for (int i = 0; i < colsArray.size(); i++) colsArray[i] = cols.first[i]-1; return self->subView(colsArray); } SWIGINTERN Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__subViewNonConst(Tpetra::MultiVector< SC,LO,GO,NO > *self,std::pair< std::size_t const *,std::size_t > cols){ Teuchos::Array<size_t> colsArray(cols.second); for (int i = 0; i < colsArray.size(); i++) colsArray[i] = cols.first[i]-1; return self->subViewNonConst(colsArray); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__dot(Tpetra::MultiVector< SC,LO,GO,NO > const *self,Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &A,std::pair< SC *,std::size_t > dots){ Teuchos::ArrayView<SC> dotsView = Teuchos::arrayView(dots.first, dots.second); return self->dot(A, dotsView); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__norm1(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< SC *,std::size_t > norms){ Teuchos::ArrayView<SC> normsView = Teuchos::arrayView(norms.first, norms.second); return self->norm1(normsView); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__norm2(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< SC *,std::size_t > norms){ Teuchos::ArrayView<SC> normsView = Teuchos::arrayView(norms.first, norms.second); return self->norm2(normsView); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__normInf(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< SC *,std::size_t > norms){ Teuchos::ArrayView<SC> normsView = Teuchos::arrayView(norms.first, norms.second); return self->normInf(normsView); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__scale__SWIG_2(Tpetra::MultiVector< SC,LO,GO,NO > *self,std::pair< SC const *,std::size_t > alpha){ Teuchos::ArrayView<const SC> alphaView = Teuchos::arrayView(alpha.first, alpha.second); self->scale(alphaView); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__meanValue(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< SC *,std::size_t > means){ Teuchos::ArrayView<SC> meansView = Teuchos::arrayView(means.first, means.second); self->meanValue(meansView); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__get1dCopy(Tpetra::MultiVector< SC,LO,GO,NO > const *self,std::pair< SC *,std::size_t > A,size_t const LDA){ Teuchos::ArrayView<SC> AView = Teuchos::arrayView(A.first, A.second); self->get1dCopy(AView, LDA); } SWIGINTERN std::pair< SC const *,std::size_t > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__get1dView(Tpetra::MultiVector< SC,LO,GO,NO > const *self){ auto a = self->get1dView(); return std::make_pair<const SC*,size_t>(a.getRawPtr(), a.size()); } SWIGINTERN std::pair< SC *,std::size_t > Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__get1dViewNonConst(Tpetra::MultiVector< SC,LO,GO,NO > *self){ auto a = self->get1dViewNonConst(); return std::make_pair<SC*,size_t>(a.getRawPtr(), a.size()); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_0(Tpetra::MultiVector< SC,LO,GO,NO > *self,Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Import< LO,GO,NO > const &importer,Tpetra::CombineMode CM){ self->doImport(source, importer, CM); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_1(Tpetra::MultiVector< SC,LO,GO,NO > *self,Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Export< LO,GO,NO > const &exporter,Tpetra::CombineMode CM){ self->doImport(source, exporter, CM); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_0(Tpetra::MultiVector< SC,LO,GO,NO > *self,Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Export< LO,GO,NO > const &exporter,Tpetra::CombineMode CM){ self->doExport(source, exporter, CM); } SWIGINTERN void Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_1(Tpetra::MultiVector< SC,LO,GO,NO > *self,Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Import< LO,GO,NO > const &importer,Tpetra::CombineMode CM){ self->doExport(source, importer, CM); } #include "Tpetra_CrsGraph.hpp" SWIGINTERN Tpetra::CrsGraph< LO,GO,NO > *new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_6(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &rowMap,std::pair< std::size_t const *,std::size_t > numEntPerRow,Tpetra::ProfileType const pftype=Tpetra::DynamicProfile,Teuchos::RCP< Teuchos::ParameterList > const &params=Teuchos::null){ Teuchos::ArrayRCP<const size_t> numEntPerRowRCP(numEntPerRow.first, 0, numEntPerRow.second, false/*has_ownership*/); return new Tpetra::CrsGraph<LO,GO,NO>(rowMap, numEntPerRowRCP, pftype, params); } SWIGINTERN Tpetra::CrsGraph< LO,GO,NO > *new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_9(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &rowMap,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &colMap,std::pair< std::size_t const *,std::size_t > numEntPerRow,Tpetra::ProfileType const pftype=Tpetra::DynamicProfile,Teuchos::RCP< Teuchos::ParameterList > const &params=Teuchos::null){ Teuchos::ArrayRCP<const size_t> numEntPerRowRCP(numEntPerRow.first, 0, numEntPerRow.second, false/*has_ownership*/); return new Tpetra::CrsGraph<LO,GO,NO>(rowMap, colMap, numEntPerRowRCP, pftype, params); } SWIGINTERN Tpetra::CrsGraph< LO,GO,NO > *new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_12(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &rowMap,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &colMap,std::pair< std::size_t *,std::size_t > rowPointers,std::pair< LO *,std::size_t > columnIndices,Teuchos::RCP< Teuchos::ParameterList > const &params=Teuchos::null){ Teuchos::Array<size_t> rowPointersArray(rowPointers.second); for (size_t i = 0; i < rowPointers.second; i++) rowPointersArray[i] = rowPointers.first[i]-1; Teuchos::Array<LO> columnIndicesArray(columnIndices.second); for (size_t i = 0; i < columnIndices.second; i++) columnIndicesArray[i] = columnIndices.first[i]-1; return new Tpetra::CrsGraph<LO,GO,NO>(rowMap, colMap, Teuchos::arcpFromArray(rowPointersArray), Teuchos::arcpFromArray(columnIndicesArray), params); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__insertGlobalIndices__SWIG_1(Tpetra::CrsGraph< LO,GO,NO > *self,GO const globalRow,std::pair< GO const *,std::size_t > indices){ Teuchos::ArrayView<const GO> indicesView = Teuchos::arrayView(indices.first, indices.second); self->insertGlobalIndices(globalRow, indicesView); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__insertLocalIndices(Tpetra::CrsGraph< LO,GO,NO > *self,LO const localRow,std::pair< LO const *,std::size_t > indices){ Teuchos::Array<LO> indicesArray(indices.second); for (size_t i = 0; i < indicesArray.size(); i++) indicesArray[i] = indices.first[i]-1; self->insertLocalIndices(localRow, indicesArray); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getGlobalRowCopy(Tpetra::CrsGraph< LO,GO,NO > const *self,GO GlobalRow,std::pair< GO *,std::size_t > Indices,size_t &NumIndices){ Teuchos::ArrayView<GO> IndicesView = Teuchos::arrayView(Indices.first, Indices.second); self->getGlobalRowCopy(GlobalRow, IndicesView, NumIndices); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getLocalRowCopy(Tpetra::CrsGraph< LO,GO,NO > const *self,LO localRow,std::pair< LO *,std::size_t > indices,size_t &NumIndices){ Teuchos::ArrayView<LO> indicesView = Teuchos::arrayView(indices.first, indices.second); self->getLocalRowCopy(localRow, indicesView, NumIndices); for (int i = 0; i < indicesView.size(); i++) indicesView[i]++; } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getgblRowView(Tpetra::CrsGraph< LO,GO,NO > const *self,GO const gblRow,std::pair< GO const *,std::size_t > lclColInds){ Teuchos::ArrayView<const GO> lclColIndsView = Teuchos::arrayView(lclColInds.first, lclColInds.second); self->getGlobalRowView(gblRow, lclColIndsView); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__setAllIndices(Tpetra::CrsGraph< LO,GO,NO > *self,std::pair< std::size_t *,std::size_t > rowPointers,std::pair< LO *,std::size_t > columnIndices,std::pair< SC *,std::size_t > val){ Teuchos::ArrayRCP<size_t> rowPointersArrayRCP(rowPointers.second); for (int i = 0; i < rowPointersArrayRCP.size(); i++) rowPointersArrayRCP[i] = rowPointers.first[i]-1; Teuchos::ArrayRCP<LO> columnIndicesArrayRCP(columnIndices.second); for (int i = 0; i < columnIndicesArrayRCP.size(); i++) columnIndicesArrayRCP[i] = columnIndices.first[i]-1; self->setAllIndices(rowPointersArrayRCP, columnIndicesArrayRCP); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getNodeRowPtrs(Tpetra::CrsGraph< LO,GO,NO > const *self,std::pair< std::size_t *,std::size_t > rowPointers){ auto rowPointersArrayRCP = self->getNodeRowPtrs(); TEUCHOS_TEST_FOR_EXCEPTION(rowPointersArrayRCP.size() != rowPointers.second, std::runtime_error, "Wrong rowPointers size"); auto n = rowPointers.second; for (int i = 0; i < n; i++) rowPointers.first[i] = rowPointersArrayRCP[i]+1; } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getNodePackedIndices(Tpetra::CrsGraph< LO,GO,NO > const *self,std::pair< std::size_t *,std::size_t > columnIndices){ auto columnIndicesArrayRCP = self->getNodeRowPtrs(); TEUCHOS_TEST_FOR_EXCEPTION(columnIndicesArrayRCP.size() != columnIndices.second, std::runtime_error, "Wrong columnIndices size"); auto nnz = columnIndices.second; for (int i = 0; i < nnz; i++) columnIndices.first[i] = columnIndicesArrayRCP[i]+1; } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getLocalDiagOffsets(Tpetra::CrsGraph< LO,GO,NO > const *self,std::pair< std::size_t *,std::size_t > offsets){ TEUCHOS_TEST_FOR_EXCEPTION(self->getNodeNumRows() != offsets.second, std::runtime_error, "Wrong offsets size"); Teuchos::ArrayRCP<size_t> offsetsArrayRCP(offsets.first, 0, offsets.second, false/*has_ownership*/); self->getLocalDiagOffsets(offsetsArrayRCP); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_0(Tpetra::CrsGraph< LO,GO,NO > *self,Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &source,Tpetra::Import< LO,GO,NO > const &importer,Tpetra::CombineMode CM){ self->doImport(source, importer, CM); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_1(Tpetra::CrsGraph< LO,GO,NO > *self,Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &source,Tpetra::Export< LO,GO,NO > const &exporter,Tpetra::CombineMode CM){ self->doImport(source, exporter, CM); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_0(Tpetra::CrsGraph< LO,GO,NO > *self,Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &source,Tpetra::Export< LO,GO,NO > const &exporter,Tpetra::CombineMode CM){ self->doExport(source, exporter, CM); } SWIGINTERN void Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_1(Tpetra::CrsGraph< LO,GO,NO > *self,Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &source,Tpetra::Import< LO,GO,NO > const &importer,Tpetra::CombineMode CM){ self->doExport(source, importer, CM); } #include "Tpetra_CrsMatrix.hpp" SWIGINTERN Tpetra::CrsMatrix< SC,LO,GO,NO > *new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_8(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &rowMap,std::pair< std::size_t const *,std::size_t > NumEntriesPerRowToAlloc,Tpetra::ProfileType pftype=Tpetra::DynamicProfile,Teuchos::RCP< Teuchos::ParameterList > const &params=Teuchos::null){ Teuchos::ArrayRCP<const size_t> NumEntriesPerRowToAllocArrayRCP(NumEntriesPerRowToAlloc.first, 0, NumEntriesPerRowToAlloc.second, false/*has_ownership*/); return new Tpetra::CrsMatrix<SC,LO,GO,NO>(rowMap, NumEntriesPerRowToAllocArrayRCP, pftype, params); } SWIGINTERN Tpetra::CrsMatrix< SC,LO,GO,NO > *new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_11(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &rowMap,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &colMap,std::pair< std::size_t const *,std::size_t > NumEntriesPerRowToAlloc,Tpetra::ProfileType pftype=Tpetra::DynamicProfile,Teuchos::RCP< Teuchos::ParameterList > const &params=Teuchos::null){ Teuchos::ArrayRCP<const size_t> NumEntriesPerRowToAllocArrayRCP(NumEntriesPerRowToAlloc.first, 0, NumEntriesPerRowToAlloc.second, false/*has_ownership*/); return new Tpetra::CrsMatrix<SC,LO,GO,NO>(rowMap, colMap, NumEntriesPerRowToAllocArrayRCP, pftype, params); } SWIGINTERN Tpetra::CrsMatrix< SC,LO,GO,NO > *new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_14(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &rowMap,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &colMap,std::pair< std::size_t *,std::size_t > rowPointers,std::pair< LO *,std::size_t > columnIndices,std::pair< SC *,std::size_t > values,Teuchos::RCP< Teuchos::ParameterList > const &params=Teuchos::null){ Teuchos::ArrayRCP<size_t> rowPointersArrayRCP(rowPointers.second); for (int i = 0; i < rowPointersArrayRCP.size(); i++) rowPointersArrayRCP[i] = rowPointers.first[i]-1; Teuchos::ArrayRCP<LO> columnIndicesArrayRCP(columnIndices.second); for (int i = 0; i < columnIndicesArrayRCP.size(); i++) columnIndicesArrayRCP[i] = columnIndices.first[i]-1; Teuchos::ArrayRCP<SC> valuesArrayRCP(values.first, 0, values.second, false/*has_ownership*/); return new Tpetra::CrsMatrix<SC,LO,GO,NO>(rowMap, colMap, rowPointersArrayRCP, columnIndicesArrayRCP, valuesArrayRCP, params); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__insertGlobalValues(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,GO const globalRow,std::pair< GO const *,std::size_t > cols,std::pair< SC const *,std::size_t > vals){ Teuchos::ArrayView<const GO> colsView = Teuchos::arrayView(cols.first, cols.second); Teuchos::ArrayView<const SC> valsView = Teuchos::arrayView(vals.first, vals.second); self->insertGlobalValues(globalRow, colsView, valsView); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__insertLocalValues(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,LO const localRow,std::pair< LO const *,std::size_t > cols,std::pair< SC const *,std::size_t > vals){ Teuchos::Array<LO> colsArray(cols.second); for (int i = 0; i < colsArray.size(); i++) colsArray[i] = cols.first[i] - 1; Teuchos::ArrayView<const SC> valsView = Teuchos::arrayView(vals.first, vals.second); self->insertLocalValues(localRow, colsArray, valsView); } SWIGINTERN LO Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__replaceGlobalValues(Tpetra::CrsMatrix< SC,LO,GO,NO > const *self,GO const globalRow,std::pair< GO const *,std::size_t > cols,std::pair< SC const *,std::size_t > vals){ Teuchos::ArrayView<const GO> colsView = Teuchos::arrayView(cols.first, cols.second); Teuchos::ArrayView<const SC> valsView = Teuchos::arrayView(vals.first, vals.second); return self->replaceGlobalValues(globalRow, colsView, valsView); } SWIGINTERN LO Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__sumIntoGlobalValues(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,GO const globalRow,std::pair< GO const *,std::size_t > cols,std::pair< SC const *,std::size_t > vals){ Teuchos::ArrayView<const GO> colsView = Teuchos::arrayView(cols.first, cols.second); Teuchos::ArrayView<const SC> valsView = Teuchos::arrayView(vals.first, vals.second); return self->sumIntoGlobalValues(globalRow, colsView, valsView, false); // TODO: for now, we only run in serial, no atomics necessary } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__setAllValues(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,std::pair< std::size_t *,std::size_t > ptr,std::pair< LO *,std::size_t > ind,std::pair< SC *,std::size_t > val){ Teuchos::ArrayRCP<size_t> ptrArrayRCP(ptr.second); for (int i = 0; i < ptrArrayRCP.size(); i++) ptrArrayRCP[i] = ptr.first[i]-1; Teuchos::ArrayRCP<LO> indArrayRCP(ind.second); for (int i = 0; i < indArrayRCP.size(); i++) indArrayRCP[i] = ind.first[i]-1; Teuchos::ArrayRCP<SC> valArrayRCP(val.first, 0, val.second, false/*has_ownership*/); self->setAllValues(ptrArrayRCP, indArrayRCP, valArrayRCP); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getAllValues(Tpetra::CrsMatrix< SC,LO,GO,NO > const *self,std::pair< std::size_t *,std::size_t > rowPointers,std::pair< LO *,std::size_t > columnIndices,std::pair< SC *,std::size_t > values){ Teuchos::ArrayRCP<const size_t> rowPointersArrayRCP; Teuchos::ArrayRCP<const LO> columnIndicesArrayRCP; Teuchos::ArrayRCP<const SC> valuesArrayRCP; self->getAllValues(rowPointersArrayRCP, columnIndicesArrayRCP, valuesArrayRCP); TEUCHOS_TEST_FOR_EXCEPTION(rowPointersArrayRCP.size() != rowPointers.second, std::runtime_error, "Wrong rowPointers size"); TEUCHOS_TEST_FOR_EXCEPTION(columnIndicesArrayRCP.size() != columnIndices.second, std::runtime_error, "Wrong columnIndices size"); TEUCHOS_TEST_FOR_EXCEPTION(valuesArrayRCP.size() != values.second, std::runtime_error, "Wrong values size"); auto n = rowPointers.second; for (int i = 0; i < n; i++) rowPointers.first[i] = rowPointersArrayRCP[i]+1; auto nnz = columnIndices.second; for (int i = 0; i < nnz; i++) { columnIndices.first[i] = columnIndicesArrayRCP[i]+1; values .first[i] = valuesArrayRCP[i]; } } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getGlobalRowCopy(Tpetra::CrsMatrix< SC,LO,GO,NO > const *self,GO GlobalRow,std::pair< GO *,std::size_t > Indices,std::pair< SC *,std::size_t > Values,size_t &NumIndices){ Teuchos::ArrayView<GO> IndicesView = Teuchos::arrayView(Indices.first, Indices.second); Teuchos::ArrayView<SC> ValuesView = Teuchos::arrayView(Values.first, Values.second); self->getGlobalRowCopy(GlobalRow, IndicesView, ValuesView, NumIndices); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getLocalRowCopy(Tpetra::CrsMatrix< SC,LO,GO,NO > const *self,LO localRow,std::pair< LO *,std::size_t > colInds,std::pair< SC *,std::size_t > vals,size_t &NumIndices){ Teuchos::ArrayView<LO> colIndsView = Teuchos::arrayView(colInds.first, colInds.second); Teuchos::ArrayView<SC> valsView = Teuchos::arrayView(vals.first, vals.second); self->getLocalRowCopy(localRow, colIndsView, valsView, NumIndices); for (int i = 0; i < colIndsView.size(); i++) colIndsView[i]++; } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getGlobalRowView(Tpetra::CrsMatrix< SC,LO,GO,NO > const *self,GO GlobalRow,std::pair< GO const *,std::size_t > Indices,std::pair< SC const *,std::size_t > values){ Teuchos::ArrayView<const GO> IndicesView = Teuchos::arrayView(Indices.first, Indices.second); Teuchos::ArrayView<const SC> valuesView = Teuchos::arrayView(values.first, values.second); self->getGlobalRowView(GlobalRow, IndicesView, valuesView); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getLocalDiagOffsets(Tpetra::CrsMatrix< SC,LO,GO,NO > const *self,std::pair< std::size_t *,std::size_t > offsets){ TEUCHOS_TEST_FOR_EXCEPTION(self->getNodeNumRows() != offsets.second, std::runtime_error, "Wrong offsets size"); Teuchos::ArrayRCP<size_t> offsetsArrayRCP(offsets.first, 0, offsets.second, false/*has_ownership*/); self->getLocalDiagOffsets(offsetsArrayRCP); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_0(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Import< LO,GO,NO > const &importer,Tpetra::CombineMode CM){ self->doImport(source, importer, CM); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_1(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Export< LO,GO,NO > const &exporter,Tpetra::CombineMode CM){ self->doImport(source, exporter, CM); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_0(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Export< LO,GO,NO > const &exporter,Tpetra::CombineMode CM){ self->doExport(source, exporter, CM); } SWIGINTERN void Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_1(Tpetra::CrsMatrix< SC,LO,GO,NO > *self,Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &source,Tpetra::Import< LO,GO,NO > const &importer,Tpetra::CombineMode CM){ self->doExport(source, importer, CM); } #include "Teuchos_RCP.hpp" #include "MatrixMarket_Tpetra.hpp" typedef Tpetra::CrsMatrix<SC,LO,GO,NO> CMT; SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &filename,Teuchos::RCP< Teuchos::Comm< int > const > const &pComm,bool const callFillComplete=true,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readSparseGraphFile(filename, pComm, callFillComplete, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &filename,Teuchos::RCP< Teuchos::Comm< int > const > const &pComm,Teuchos::RCP< Teuchos::ParameterList > const &constructorParams,Teuchos::RCP< Teuchos::ParameterList > const &fillCompleteParams,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readSparseGraphFile(filename, pComm, constructorParams, fillCompleteParams, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &rowMap,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &colMap,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &domainMap,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &rangeMap,bool const callFillComplete=true,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readSparseGraphFile(filename, rowMap, colMap, domainMap, rangeMap, callFillComplete, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &filename,Teuchos::RCP< Teuchos::Comm< int > const > const &pComm,bool const callFillComplete=true,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readSparseFile(filename, pComm, callFillComplete, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &filename,Teuchos::RCP< Teuchos::Comm< int > const > const &pComm,Teuchos::RCP< Teuchos::ParameterList > const &constructorParams,Teuchos::RCP< Teuchos::ParameterList > const &fillCompleteParams,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readSparseFile(filename, pComm, constructorParams, fillCompleteParams, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &rowMap,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &colMap,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &domainMap,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &rangeMap,bool const callFillComplete=true,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readSparseFile(filename, rowMap, colMap, domainMap, rangeMap, callFillComplete, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::multivector_type > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &comm,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &map,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readDenseFile(filename, comm, map, tolerant, debug); } SWIGINTERN Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &comm,bool const tolerant=false,bool const debug=false){ return Tpetra::MatrixMarket::Reader<CMT>::readMapFile(filename, comm, tolerant, debug); } SWIGINTERN void Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &pMatrix,std::string const &matrixName,std::string const &matrixDescription,bool const debug=false){ Tpetra::MatrixMarket::Writer<CMT>::writeSparseFile(filename, pMatrix, matrixName, matrixDescription, debug); } SWIGINTERN void Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &pMatrix,bool const debug=false){ Tpetra::MatrixMarket::Writer<CMT>::writeSparseFile(filename, pMatrix, debug); } SWIGINTERN void Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &pGraph,std::string const &graphName,std::string const &graphDescription,bool const debug=false){ Tpetra::MatrixMarket::Writer<CMT>::writeSparseGraphFile(filename, pGraph, graphName, graphDescription, debug); } SWIGINTERN void Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &filename,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &pGraph,bool const debug=false){ Tpetra::MatrixMarket::Writer<CMT>::writeSparseGraphFile(filename, pGraph, debug); } SWIGINTERN void Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile(std::string const &filename,Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type const &map){ Tpetra::MatrixMarket::Writer<CMT>::writeMapFile(filename, map); } #include "Teuchos_RCP.hpp" #include "TpetraExt_MatrixMatrix.hpp" #ifdef __cplusplus extern "C" { #endif SWIGEXPORT void swigc_setCombineModeParameter(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Teuchos::ParameterList *arg1 = 0 ; std::string *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *smartarg1 ; std::string tempstr2 ; SWIG_check_sp_nonnull(farg1, "Teuchos::ParameterList *", "ParameterList", "Tpetra::setCombineModeParameter(Teuchos::ParameterList &,std::string const &)", return ) smartarg1 = static_cast< Teuchos::RCP< Teuchos::ParameterList >* >(farg1->ptr); arg1 = smartarg1->get(); tempstr2 = std::string(static_cast<const char*>(farg2->data), farg2->size); arg2 = &tempstr2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::setCombineModeParameter(Teuchos::ParameterList &,std::string const &)");; try { // Attempt the wrapped function call Tpetra::setCombineModeParameter(*arg1,(std::string const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::setCombineModeParameter(Teuchos::ParameterList &,std::string const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::setCombineModeParameter(Teuchos::ParameterList &,std::string const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::setCombineModeParameter(Teuchos::ParameterList &,std::string const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMap__SWIG_0() { SwigClassWrapper fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *result = 0 ; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map()");; try { // Attempt the wrapped function call result = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *)new Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map()", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map()", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map()", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraMap(SwigClassWrapper const *farg1) { Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::~Map()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::~Map()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::~Map()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::~Map()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT bool swigc_TpetraMap_isOneToOne(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isOneToOne() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isOneToOne(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isOneToOne() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isOneToOne() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isOneToOne() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraMap_getGlobalNumElements(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalNumElements() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getGlobalNumElements(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalNumElements() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalNumElements() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalNumElements() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraMap_getNodeNumElements(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeNumElements() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getNodeNumElements(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeNumElements() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeNumElements() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeNumElements() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT int swigc_TpetraMap_getMinLocalIndex(SwigClassWrapper const *farg1) { int fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; int result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinLocalIndex() const");; try { // Attempt the wrapped function call result = (int)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getMinLocalIndex(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinLocalIndex() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinLocalIndex() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinLocalIndex() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result + 1; return fresult; } SWIGEXPORT int swigc_TpetraMap_getMaxLocalIndex(SwigClassWrapper const *farg1) { int fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; int result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxLocalIndex() const");; try { // Attempt the wrapped function call result = (int)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getMaxLocalIndex(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxLocalIndex() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxLocalIndex() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxLocalIndex() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result + 1; return fresult; } SWIGEXPORT long long swigc_TpetraMap_getMinGlobalIndex(SwigClassWrapper const *farg1) { long long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; long long result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinGlobalIndex() const");; try { // Attempt the wrapped function call result = (long long)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getMinGlobalIndex(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinGlobalIndex() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinGlobalIndex() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinGlobalIndex() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT long long swigc_TpetraMap_getMaxGlobalIndex(SwigClassWrapper const *farg1) { long long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; long long result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxGlobalIndex() const");; try { // Attempt the wrapped function call result = (long long)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getMaxGlobalIndex(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxGlobalIndex() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxGlobalIndex() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxGlobalIndex() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT long long swigc_TpetraMap_getMinAllGlobalIndex(SwigClassWrapper const *farg1) { long long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; long long result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinAllGlobalIndex() const");; try { // Attempt the wrapped function call result = (long long)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getMinAllGlobalIndex(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinAllGlobalIndex() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinAllGlobalIndex() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMinAllGlobalIndex() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT long long swigc_TpetraMap_getMaxAllGlobalIndex(SwigClassWrapper const *farg1) { long long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; long long result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxAllGlobalIndex() const");; try { // Attempt the wrapped function call result = (long long)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getMaxAllGlobalIndex(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxAllGlobalIndex() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxAllGlobalIndex() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getMaxAllGlobalIndex() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT int swigc_TpetraMap_getLocalElement(SwigClassWrapper const *farg1, long long const *farg2) { int fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; long long arg2 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; int result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getLocalElement(long long) const");; try { // Attempt the wrapped function call result = (int)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getLocalElement(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getLocalElement(long long) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getLocalElement(long long) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getLocalElement(long long) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result + 1; return fresult; } SWIGEXPORT long long swigc_TpetraMap_getGlobalElement(SwigClassWrapper const *farg1, int const *farg2) { long long fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; int arg2 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; long long result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalElement(int) const");; try { // Attempt the wrapped function call result = (long long)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getGlobalElement(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalElement(int) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalElement(int) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getGlobalElement(int) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isNodeLocalElement(SwigClassWrapper const *farg1, int const *farg2) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; int arg2 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeLocalElement(int) const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isNodeLocalElement(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeLocalElement(int) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeLocalElement(int) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeLocalElement(int) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isNodeGlobalElement(SwigClassWrapper const *farg1, long long const *farg2) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; long long arg2 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeGlobalElement(long long) const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isNodeGlobalElement(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeGlobalElement(long long) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeGlobalElement(long long) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isNodeGlobalElement(long long) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isUniform(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isUniform() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isUniform(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isUniform() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isUniform() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isUniform() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isContiguous(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isContiguous() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isContiguous(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isContiguous() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isContiguous() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isContiguous() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isDistributed(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isDistributed() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isDistributed(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isDistributed() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isDistributed() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isDistributed() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isCompatible(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg2 = 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg2 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraMap", "Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isCompatible(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", return 0) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isCompatible(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isCompatible((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isCompatible(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isCompatible(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isCompatible(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_isSameAs(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg2 = 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg2 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraMap", "Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isSameAs(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", return 0) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isSameAs(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->isSameAs((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isSameAs(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isSameAs(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::isSameAs(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMap_locallySameAs(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { bool fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > *arg2 = 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg2 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > *", "TpetraMap", "Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::locallySameAs(Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > const &) const", return 0) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::locallySameAs(Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > const &) const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->locallySameAs((Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::locallySameAs(Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > const &) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::locallySameAs(Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > const &) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::locallySameAs(Tpetra::Map< int,long long,Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::node_type > const &) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMap_getComm(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Teuchos::RCP< Teuchos::Comm< int > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getComm() const");; try { // Attempt the wrapped function call result = ((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->getComm(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getComm() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getComm() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getComm() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Teuchos::Comm<int> >(static_cast< const Teuchos::RCP<const Teuchos::Comm<int> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraMap_description(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; std::string result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::description() const");; try { // Attempt the wrapped function call result = ((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->description(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::description() const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::description() const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::description() const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult = SWIG_store_string(result); return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMap_removeEmptyProcesses(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::removeEmptyProcesses() const");; try { // Attempt the wrapped function call result = ((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->removeEmptyProcesses(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::removeEmptyProcesses() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::removeEmptyProcesses() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::removeEmptyProcesses() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMap_replaceCommWithSubset(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::replaceCommWithSubset(Teuchos::RCP< Teuchos::Comm< int > const > const &) const");; try { // Attempt the wrapped function call result = ((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1)->replaceCommWithSubset((Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::replaceCommWithSubset(Teuchos::RCP< Teuchos::Comm< int > const > const &) const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::replaceCommWithSubset(Teuchos::RCP< Teuchos::Comm< int > const > const &) const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::replaceCommWithSubset(Teuchos::RCP< Teuchos::Comm< int > const > const &) const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMap__SWIG_1(unsigned long const *farg1, SwigClassWrapper const *farg2, int const *farg3) { SwigClassWrapper fresult ; Tpetra::global_size_t arg1 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Tpetra::LocalGlobal arg3 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *result = 0 ; arg1 = *farg1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = static_cast< Tpetra::LocalGlobal >(*farg3); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &,Tpetra::LocalGlobal)");; try { // Attempt the wrapped function call result = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *)new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_1(arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &,Tpetra::LocalGlobal)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &,Tpetra::LocalGlobal)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &,Tpetra::LocalGlobal)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMap__SWIG_2(unsigned long const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Tpetra::global_size_t arg1 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *result = 0 ; arg1 = *farg1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *)new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_1(arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMap__SWIG_3(unsigned long const *farg1, unsigned long const *farg2, SwigClassWrapper const *farg3) { SwigClassWrapper fresult ; Tpetra::global_size_t arg1 ; size_t arg2 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg3 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull3 ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *result = 0 ; arg1 = *farg1; arg2 = *farg2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *)new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_3(arg1,arg2,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t,size_t,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMap__SWIG_4(unsigned long const *farg1, SwigArrayWrapper *farg2, SwigClassWrapper const *farg3) { SwigClassWrapper fresult ; Tpetra::global_size_t arg1 ; std::pair< GO const *,std::size_t > arg2 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg3 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull3 ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *result = 0 ; arg1 = *farg1; (&arg2)->first = static_cast<const long long*>(farg2->data); (&arg2)->second = farg2->size; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t const,std::pair< GO const *,std::size_t >,Teuchos::RCP< Teuchos::Comm< int > const > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *)new_Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg___SWIG_4(arg1,arg2,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t const,std::pair< GO const *,std::size_t >,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t const,std::pair< GO const *,std::size_t >,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::Map(Tpetra::global_size_t const,std::pair< GO const *,std::size_t >,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT int swigc_TpetraMap_getRemoteIndexList__SWIG_0(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { int fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; std::pair< GO const *,std::size_t > arg2 ; std::pair< int *,std::size_t > arg3 ; std::pair< LO *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Tpetra::LookupStatus result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<const long long*>(farg2->data); (&arg2)->second = farg2->size; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<int*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >,std::pair< LO *,std::size_t >) const");; try { // Attempt the wrapped function call result = (Tpetra::LookupStatus)Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg__getRemoteIndexList__SWIG_0((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >,std::pair< LO *,std::size_t >) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >,std::pair< LO *,std::size_t >) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >,std::pair< LO *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = static_cast< int >(result); return fresult; } SWIGEXPORT int swigc_TpetraMap_getRemoteIndexList__SWIG_1(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3) { int fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; std::pair< GO const *,std::size_t > arg2 ; std::pair< int *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; Tpetra::LookupStatus result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<const long long*>(farg2->data); (&arg2)->second = farg2->size; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >) const");; try { // Attempt the wrapped function call result = (Tpetra::LookupStatus)Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg__getRemoteIndexList__SWIG_1((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getRemoteIndexList(std::pair< GO const *,std::size_t >,std::pair< int *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = static_cast< int >(result); return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraMap_getNodeElementList(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = (Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *) 0 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg1 ; std::pair< GO const *,std::size_t > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeElementList() const");; try { // Attempt the wrapped function call result = Tpetra_Map_Sl_int_Sc_long_SS_long_Sc_Kokkos_Compat_KokkosSerialWrapperNode_Sg__getNodeElementList((Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeElementList() const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeElementList() const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::getNodeElementList() const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult.data = const_cast<long long*>((&result)->first); fresult.size = (&result)->second; return fresult; } SWIGEXPORT void swigc_assignment_TpetraMap(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR); } SWIGEXPORT SwigClassWrapper swigc_new_TpetraExport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Tpetra::Export< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Export< LO,GO,NO > *)new Tpetra::Export< LO,GO,NO >((Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Export<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraExport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Tpetra::Export< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Export< LO,GO,NO > *)new Tpetra::Export< LO,GO,NO >((Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Export<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraExport__SWIG_2(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; Tpetra::Export< LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraExport", "Tpetra::Export< LO,GO,NO >::Export(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Export< LO,GO,NO > *)new Tpetra::Export< LO,GO,NO >((Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Export<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraExport__SWIG_3(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; Tpetra::Export< LO,GO,NO > *result = 0 ; SWIG_check_nonnull(*farg1, "Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &", "TpetraImport", "Tpetra::Export< LO,GO,NO >::Export(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", return SwigClassWrapper_uninitialized()); arg1 = static_cast< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > * >(farg1->ptr); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Export< LO,GO,NO > *)new Tpetra::Export< LO,GO,NO >((Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::Export(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Export<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraExport(SwigClassWrapper const *farg1) { Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::~Export()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::~Export()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::~Export()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::~Export()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraExport_setParameterList(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->setParameterList((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT unsigned long swigc_TpetraExport_getNumSameIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::getNumSameIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Export< LO,GO,NO > const *)arg1)->getNumSameIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumSameIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumSameIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumSameIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraExport_getNumPermuteIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::getNumPermuteIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Export< LO,GO,NO > const *)arg1)->getNumPermuteIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumPermuteIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumPermuteIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumPermuteIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraExport_getNumRemoteIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::getNumRemoteIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Export< LO,GO,NO > const *)arg1)->getNumRemoteIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumRemoteIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumRemoteIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumRemoteIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraExport_getNumExportIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::getNumExportIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Export< LO,GO,NO > const *)arg1)->getNumExportIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumExportIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumExportIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getNumExportIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraExport_getSourceMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::getSourceMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::Export< LO,GO,NO > const *)arg1)->getSourceMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getSourceMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getSourceMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getSourceMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraExport_getTargetMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::getTargetMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::Export< LO,GO,NO > const *)arg1)->getTargetMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getTargetMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getTargetMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::getTargetMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT bool swigc_TpetraExport_isLocallyComplete(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::Export< LO,GO,NO > *arg1 = (Tpetra::Export< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Export< LO,GO,NO >::isLocallyComplete() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Export< LO,GO,NO > const *)arg1)->isLocallyComplete(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::isLocallyComplete() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::isLocallyComplete() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Export< LO,GO,NO >::isLocallyComplete() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT void swigc_assignment_TpetraExport(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::Export<LO,GO,NO> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR | swig::IS_COPY_ASSIGN); } SWIGEXPORT SwigClassWrapper swigc_new_TpetraImport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Tpetra::Import< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Import< LO,GO,NO > *)new Tpetra::Import< LO,GO,NO >((Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Import<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraImport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Tpetra::Import< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Import< LO,GO,NO > *)new Tpetra::Import< LO,GO,NO >((Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Import<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraImport__SWIG_2(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; Tpetra::Import< LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraImport", "Tpetra::Import< LO,GO,NO >::Import(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Import< LO,GO,NO > *)new Tpetra::Import< LO,GO,NO >((Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Import<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraImport__SWIG_3(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg1 ; Tpetra::Import< LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraExport", "Tpetra::Import< LO,GO,NO >::Import(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg1->ptr); arg1 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg1->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)");; try { // Attempt the wrapped function call result = (Tpetra::Import< LO,GO,NO > *)new Tpetra::Import< LO,GO,NO >((Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::Import(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::Import<LO,GO,NO> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraImport(SwigClassWrapper const *farg1) { Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::~Import()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::~Import()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::~Import()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::~Import()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraImport_setParameterList(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->setParameterList((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT unsigned long swigc_TpetraImport_getNumSameIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::getNumSameIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Import< LO,GO,NO > const *)arg1)->getNumSameIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumSameIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumSameIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumSameIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraImport_getNumPermuteIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::getNumPermuteIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Import< LO,GO,NO > const *)arg1)->getNumPermuteIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumPermuteIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumPermuteIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumPermuteIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraImport_getNumRemoteIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::getNumRemoteIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Import< LO,GO,NO > const *)arg1)->getNumRemoteIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumRemoteIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumRemoteIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumRemoteIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraImport_getNumExportIDs(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::getNumExportIDs() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::Import< LO,GO,NO > const *)arg1)->getNumExportIDs(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumExportIDs() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumExportIDs() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getNumExportIDs() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraImport_getSourceMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::getSourceMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::Import< LO,GO,NO > const *)arg1)->getSourceMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getSourceMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getSourceMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getSourceMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraImport_getTargetMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::getTargetMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::Import< LO,GO,NO > const *)arg1)->getTargetMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getTargetMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getTargetMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::getTargetMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT bool swigc_TpetraImport_isLocallyComplete(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::isLocallyComplete() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::Import< LO,GO,NO > const *)arg1)->isLocallyComplete(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::isLocallyComplete() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::isLocallyComplete() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::isLocallyComplete() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraImport_setUnion__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg2 = 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraImport", "Tpetra::Import< LO,GO,NO >::setUnion(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", return SwigClassWrapper_uninitialized()) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const");; try { // Attempt the wrapped function call result = ((Tpetra::Import< LO,GO,NO > const *)arg1)->setUnion((Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &) const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >(static_cast< const Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraImport_setUnion__SWIG_1(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion() const");; try { // Attempt the wrapped function call result = ((Tpetra::Import< LO,GO,NO > const *)arg1)->setUnion(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::setUnion() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >(static_cast< const Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraImport_createRemoteOnlyImport(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Tpetra::Import< LO,GO,NO > *arg1 = (Tpetra::Import< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg1 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::Import< LO,GO,NO >::createRemoteOnlyImport(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &) const");; try { // Attempt the wrapped function call result = ((Tpetra::Import< LO,GO,NO > const *)arg1)->createRemoteOnlyImport((Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::createRemoteOnlyImport(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &) const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::createRemoteOnlyImport(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &) const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::Import< LO,GO,NO >::createRemoteOnlyImport(Teuchos::RCP< Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &) const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >(static_cast< const Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_assignment_TpetraImport(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::Import<LO,GO,NO> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR | swig::IS_COPY_ASSIGN); } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_0() { SwigClassWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector()");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector()", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector()", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector()", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_1(SwigClassWrapper const *farg1, unsigned long const *farg2, bool const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; bool arg3 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,bool const)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_2(SwigClassWrapper const *farg1, unsigned long const *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_3(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg1 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_4(SwigClassWrapper const *farg1, int const *farg2) { SwigClassWrapper fresult ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg1 = 0 ; Teuchos::DataAccess arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Teuchos::DataAccess const)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = static_cast< Teuchos::DataAccess >(*farg2); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Teuchos::DataAccess const)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Teuchos::DataAccess const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Teuchos::DataAccess const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Teuchos::DataAccess const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_5(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3) { SwigClassWrapper fresult ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg1 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type *arg2 = 0 ; size_t arg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg2 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &,size_t const)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type *", "TpetraMap", "Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &,size_t const)", return SwigClassWrapper_uninitialized()) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg2->get()); arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &,size_t const)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &,size_t const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &,size_t const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &,size_t const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_6(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg1 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg2 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; SWIG_check_sp_nonnull(farg1, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)", return SwigClassWrapper_uninitialized()) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type *", "TpetraMap", "Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)", return SwigClassWrapper_uninitialized()) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new Tpetra::MultiVector< SC,LO,GO,NO >((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraMultiVector(SwigClassWrapper const *farg1) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::~MultiVector()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::~MultiVector()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::~MultiVector()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::~MultiVector()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_replaceGlobalValue(SwigClassWrapper const *farg1, long long const *farg2, unsigned long const *farg3, double const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; long long arg2 ; size_t arg3 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type *arg4 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; arg3 = *farg3 - 1; arg4 = reinterpret_cast< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type * >(const_cast< double* >(farg4)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const");; try { // Attempt the wrapped function call ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->replaceGlobalValue(arg2,arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_sumIntoGlobalValue__SWIG_0(SwigClassWrapper const *farg1, long long const *farg2, unsigned long const *farg3, double const *farg4, bool const *farg5) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; long long arg2 ; size_t arg3 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type *arg4 = 0 ; bool arg5 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; arg3 = *farg3 - 1; arg4 = reinterpret_cast< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type * >(const_cast< double* >(farg4)); arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const");; try { // Attempt the wrapped function call ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->sumIntoGlobalValue(arg2,arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_sumIntoGlobalValue__SWIG_1(SwigClassWrapper const *farg1, long long const *farg2, unsigned long const *farg3, double const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; long long arg2 ; size_t arg3 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type *arg4 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; arg3 = *farg3 - 1; arg4 = reinterpret_cast< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type * >(const_cast< double* >(farg4)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const");; try { // Attempt the wrapped function call ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->sumIntoGlobalValue(arg2,arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoGlobalValue(long long const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_replaceLocalValue(SwigClassWrapper const *farg1, int const *farg2, unsigned long const *farg3, double const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; int arg2 ; size_t arg3 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type *arg4 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; arg3 = *farg3 - 1; arg4 = reinterpret_cast< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type * >(const_cast< double* >(farg4)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const");; try { // Attempt the wrapped function call ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->replaceLocalValue(arg2,arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_sumIntoLocalValue__SWIG_0(SwigClassWrapper const *farg1, int const *farg2, unsigned long const *farg3, double const *farg4, bool const *farg5) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; int arg2 ; size_t arg3 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type *arg4 = 0 ; bool arg5 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; arg3 = *farg3 - 1; arg4 = reinterpret_cast< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type * >(const_cast< double* >(farg4)); arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const");; try { // Attempt the wrapped function call ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->sumIntoLocalValue(arg2,arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &,bool const) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_sumIntoLocalValue__SWIG_1(SwigClassWrapper const *farg1, int const *farg2, unsigned long const *farg3, double const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; int arg2 ; size_t arg3 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type *arg4 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; arg3 = *farg3 - 1; arg4 = reinterpret_cast< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type * >(const_cast< double* >(farg4)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const");; try { // Attempt the wrapped function call ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->sumIntoLocalValue(arg2,arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::sumIntoLocalValue(int const,size_t const,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::impl_scalar_type const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_putScalar(SwigClassWrapper const *farg1, double const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::putScalar(double const &)");; try { // Attempt the wrapped function call (arg1)->putScalar((double const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::putScalar(double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::putScalar(double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::putScalar(double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_randomize__SWIG_0(SwigClassWrapper const *farg1) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize()");; try { // Attempt the wrapped function call (arg1)->randomize(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_randomize__SWIG_1(SwigClassWrapper const *farg1, double const *farg2, double const *farg3) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; double *arg3 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); arg3 = reinterpret_cast< double * >(const_cast< double* >(farg3)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize(double const &,double const &)");; try { // Attempt the wrapped function call (arg1)->randomize((double const &)*arg2,(double const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize(double const &,double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize(double const &,double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::randomize(double const &,double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_replaceMap(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceMap(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->replaceMap((Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceMap(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceMap(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::replaceMap(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_reduce(SwigClassWrapper const *farg1) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reduce()");; try { // Attempt the wrapped function call (arg1)->reduce(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reduce()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reduce()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reduce()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_TpetraMultiVector_offsetView(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3) { SwigClassWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; size_t arg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetView(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const) const");; try { // Attempt the wrapped function call result = ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->offsetView((Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetView(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const) const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetView(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const) const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetView(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const) const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMultiVector_offsetViewNonConst(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3) { SwigClassWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; size_t arg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > result; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetViewNonConst(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const)");; try { // Attempt the wrapped function call result = (arg1)->offsetViewNonConst((Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetViewNonConst(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetViewNonConst(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::offsetViewNonConst(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,size_t const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_TpetraMultiVector_abs(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::abs(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::abs(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)");; try { // Attempt the wrapped function call (arg1)->abs((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::abs(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::abs(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::abs(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_reciprocal(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::reciprocal(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reciprocal(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)");; try { // Attempt the wrapped function call (arg1)->reciprocal((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reciprocal(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reciprocal(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::reciprocal(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_scale__SWIG_0(SwigClassWrapper const *farg1, double const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &)");; try { // Attempt the wrapped function call (arg1)->scale((double const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_scale__SWIG_1(SwigClassWrapper const *farg1, double const *farg2, SwigClassWrapper const *farg3) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)");; try { // Attempt the wrapped function call (arg1)->scale((double const &)*arg2,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_update__SWIG_0(SwigClassWrapper const *farg1, double const *farg2, SwigClassWrapper const *farg3, double const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; double *arg4 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); arg4 = reinterpret_cast< double * >(const_cast< double* >(farg4)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)");; try { // Attempt the wrapped function call (arg1)->update((double const &)*arg2,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg3,(double const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_update__SWIG_1(SwigClassWrapper const *farg1, double const *farg2, SwigClassWrapper const *farg3, double const *farg4, SwigClassWrapper const *farg5, double const *farg6) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; double *arg4 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg5 = 0 ; double *arg6 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg5 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); arg4 = reinterpret_cast< double * >(const_cast< double* >(farg4)); SWIG_check_sp_nonnull(farg5, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", return ) smartarg5 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg5->ptr); arg5 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg5->get()); arg6 = reinterpret_cast< double * >(const_cast< double* >(farg6)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)");; try { // Attempt the wrapped function call (arg1)->update((double const &)*arg2,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg3,(double const &)*arg4,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg5,(double const &)*arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::update(double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_multiply(SwigClassWrapper const *farg1, int const *farg2, int const *farg3, double const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6, double const *farg7) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::ETransp arg2 ; Teuchos::ETransp arg3 ; double *arg4 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg5 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg6 = 0 ; double *arg7 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg5 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg6 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = static_cast< Teuchos::ETransp >(*farg2); arg3 = static_cast< Teuchos::ETransp >(*farg3); arg4 = reinterpret_cast< double * >(const_cast< double* >(farg4)); SWIG_check_sp_nonnull(farg5, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::multiply(Teuchos::ETransp,Teuchos::ETransp,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", return ) smartarg5 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg5->ptr); arg5 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg5->get()); SWIG_check_sp_nonnull(farg6, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::multiply(Teuchos::ETransp,Teuchos::ETransp,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", return ) smartarg6 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg6->ptr); arg6 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg6->get()); arg7 = reinterpret_cast< double * >(const_cast< double* >(farg7)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::multiply(Teuchos::ETransp,Teuchos::ETransp,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)");; try { // Attempt the wrapped function call (arg1)->multiply(arg2,arg3,(double const &)*arg4,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg5,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg6,(double const &)*arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::multiply(Teuchos::ETransp,Teuchos::ETransp,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::multiply(Teuchos::ETransp,Teuchos::ETransp,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::multiply(Teuchos::ETransp,Teuchos::ETransp,double const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT unsigned long swigc_TpetraMultiVector_getNumVectors(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getNumVectors() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->getNumVectors(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getNumVectors() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getNumVectors() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getNumVectors() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraMultiVector_getLocalLength(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getLocalLength() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->getLocalLength(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getLocalLength() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getLocalLength() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getLocalLength() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraMultiVector_getGlobalLength(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getGlobalLength() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->getGlobalLength(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getGlobalLength() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getGlobalLength() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getGlobalLength() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraMultiVector_getStride(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getStride() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->getStride(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getStride() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getStride() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getStride() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraMultiVector_isConstantStride(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::isConstantStride() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->isConstantStride(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::isConstantStride() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::isConstantStride() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::isConstantStride() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraMultiVector_description(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; std::string result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::description() const");; try { // Attempt the wrapped function call result = ((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->description(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::description() const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::description() const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::description() const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult = SWIG_store_string(result); return fresult; } SWIGEXPORT void swigc_TpetraMultiVector_removeEmptyProcessesInPlace(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->removeEmptyProcessesInPlace((Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_setCopyOrView(SwigClassWrapper const *farg1, int const *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::DataAccess arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = static_cast< Teuchos::DataAccess >(*farg2); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::setCopyOrView(Teuchos::DataAccess const)");; try { // Attempt the wrapped function call (arg1)->setCopyOrView(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::setCopyOrView(Teuchos::DataAccess const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::setCopyOrView(Teuchos::DataAccess const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::setCopyOrView(Teuchos::DataAccess const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT int swigc_TpetraMultiVector_getCopyOrView(SwigClassWrapper const *farg1) { int fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::DataAccess result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getCopyOrView() const");; try { // Attempt the wrapped function call result = (Teuchos::DataAccess)((Tpetra::MultiVector< SC,LO,GO,NO > const *)arg1)->getCopyOrView(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getCopyOrView() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getCopyOrView() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getCopyOrView() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = static_cast< int >(result); return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraMultiVector__SWIG_7(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, unsigned long const *farg3, unsigned long const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< SC const *,std::size_t > arg2 ; size_t arg3 ; size_t arg4 ; Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Tpetra::MultiVector< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const double*>(farg2->data); (&arg2)->second = farg2->size; arg3 = *farg3; arg4 = *farg4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< SC const *,std::size_t >,size_t const,size_t const)");; try { // Attempt the wrapped function call result = (Tpetra::MultiVector< SC,LO,GO,NO > *)new_Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_7((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< SC const *,std::size_t >,size_t const,size_t const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< SC const *,std::size_t >,size_t const,size_t const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::MultiVector(Teuchos::RCP< Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< SC const *,std::size_t >,size_t const,size_t const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraMultiVector_getData(SwigClassWrapper const *farg1, unsigned long const *farg2) { SwigArrayWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; size_t arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; std::pair< SC const *,std::size_t > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getData(size_t) const");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getData((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getData(size_t) const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getData(size_t) const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getData(size_t) const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult.data = const_cast<double*>((&result)->first); fresult.size = (&result)->second; return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraMultiVector_getDataNonConst(SwigClassWrapper const *farg1, unsigned long const *farg2) { SwigArrayWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; size_t arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; std::pair< SC *,std::size_t > result; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getDataNonConst(size_t)");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getDataNonConst(arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getDataNonConst(size_t)", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getDataNonConst(size_t)", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::getDataNonConst(size_t)", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult.data = (&result)->first; fresult.size = (&result)->second; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMultiVector_subCopy(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { SwigClassWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subCopy(std::pair< std::size_t const *,std::size_t >) const");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__subCopy((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subCopy(std::pair< std::size_t const *,std::size_t >) const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subCopy(std::pair< std::size_t const *,std::size_t >) const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subCopy(std::pair< std::size_t const *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMultiVector_subView(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { SwigClassWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subView(std::pair< std::size_t const *,std::size_t >) const");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__subView((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subView(std::pair< std::size_t const *,std::size_t >) const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subView(std::pair< std::size_t const *,std::size_t >) const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subView(std::pair< std::size_t const *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraMultiVector_subViewNonConst(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { SwigClassWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > result; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subViewNonConst(std::pair< std::size_t const *,std::size_t >)");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__subViewNonConst(arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subViewNonConst(std::pair< std::size_t const *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subViewNonConst(std::pair< std::size_t const *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::subViewNonConst(std::pair< std::size_t const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_TpetraMultiVector_dot(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; std::pair< SC *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::dot(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,std::pair< SC *,std::size_t >) const", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); (&arg3)->first = static_cast<double*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::dot(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,std::pair< SC *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__dot((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::dot(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,std::pair< SC *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::dot(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,std::pair< SC *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::dot(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,std::pair< SC *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_norm1(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< SC *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<double*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm1(std::pair< SC *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__norm1((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm1(std::pair< SC *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm1(std::pair< SC *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm1(std::pair< SC *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_norm2(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< SC *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<double*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm2(std::pair< SC *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__norm2((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm2(std::pair< SC *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm2(std::pair< SC *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::norm2(std::pair< SC *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_normInf(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< SC *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<double*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::normInf(std::pair< SC *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__normInf((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::normInf(std::pair< SC *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::normInf(std::pair< SC *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::normInf(std::pair< SC *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_scale__SWIG_2(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< SC const *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; (&arg2)->first = static_cast<const double*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(std::pair< SC const *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__scale__SWIG_2(arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(std::pair< SC const *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(std::pair< SC const *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::scale(std::pair< SC const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_meanValue(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< SC *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<double*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::meanValue(std::pair< SC *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__meanValue((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::meanValue(std::pair< SC *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::meanValue(std::pair< SC *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::meanValue(std::pair< SC *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_get1dCopy(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, unsigned long const *farg3) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; std::pair< SC *,std::size_t > arg2 ; size_t arg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<double*>(farg2->data); (&arg2)->second = farg2->size; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dCopy(std::pair< SC *,std::size_t >,size_t const) const");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__get1dCopy((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dCopy(std::pair< SC *,std::size_t >,size_t const) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dCopy(std::pair< SC *,std::size_t >,size_t const) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dCopy(std::pair< SC *,std::size_t >,size_t const) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigArrayWrapper swigc_TpetraMultiVector_get1dView(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; std::pair< SC const *,std::size_t > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dView() const");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__get1dView((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dView() const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dView() const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dView() const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult.data = const_cast<double*>((&result)->first); fresult.size = (&result)->second; return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraMultiVector_get1dViewNonConst(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; std::pair< SC *,std::size_t > result; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dViewNonConst()");; try { // Attempt the wrapped function call result = Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__get1dViewNonConst(arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dViewNonConst()", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dViewNonConst()", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::get1dViewNonConst()", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult.data = (&result)->first; fresult.size = (&result)->second; return fresult; } SWIGEXPORT void swigc_TpetraMultiVector_doImport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Import< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Import< LO,GO,NO > *", "TpetraImport", "Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_0(arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_doImport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Export< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Export< LO,GO,NO > *", "TpetraExport", "Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_1(arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doImport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_doExport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Export< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Export< LO,GO,NO > *", "TpetraExport", "Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_0(arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMultiVector_doExport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::MultiVector< SC,LO,GO,NO > *arg1 = (Tpetra::MultiVector< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Import< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > *", "TpetraMultiVector", "Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Import< LO,GO,NO > *", "TpetraImport", "Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_MultiVector_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_1(arg1,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MultiVector< SC,LO,GO,NO >::doExport(Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_assignment_TpetraMultiVector(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Tpetra::MultiVector< SC,LO,GO,NO > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR | swig::IS_COPY_ASSIGN); } SWIGEXPORT void swigc_set_RowInfo_localRow(SwigClassWrapper const *farg1, unsigned long const *farg2) { Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t arg2 ; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::localRow", return ); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); arg2 = *farg2; if (arg1) (arg1)->localRow = arg2; } SWIGEXPORT unsigned long swigc_get_RowInfo_localRow(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t result; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::localRow", return 0); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); result = (size_t) ((arg1)->localRow); fresult = result; return fresult; } SWIGEXPORT void swigc_set_RowInfo_allocSize(SwigClassWrapper const *farg1, unsigned long const *farg2) { Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t arg2 ; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::allocSize", return ); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); arg2 = *farg2; if (arg1) (arg1)->allocSize = arg2; } SWIGEXPORT unsigned long swigc_get_RowInfo_allocSize(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t result; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::allocSize", return 0); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); result = (size_t) ((arg1)->allocSize); fresult = result; return fresult; } SWIGEXPORT void swigc_set_RowInfo_numEntries(SwigClassWrapper const *farg1, unsigned long const *farg2) { Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t arg2 ; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::numEntries", return ); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); arg2 = *farg2; if (arg1) (arg1)->numEntries = arg2; } SWIGEXPORT unsigned long swigc_get_RowInfo_numEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t result; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::numEntries", return 0); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); result = (size_t) ((arg1)->numEntries); fresult = result; return fresult; } SWIGEXPORT void swigc_set_RowInfo_offset1D(SwigClassWrapper const *farg1, unsigned long const *farg2) { Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t arg2 ; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::offset1D", return ); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); arg2 = *farg2; if (arg1) (arg1)->offset1D = arg2; } SWIGEXPORT unsigned long swigc_get_RowInfo_offset1D(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; size_t result; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::offset1D", return 0); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); result = (size_t) ((arg1)->offset1D); fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_RowInfo() { SwigClassWrapper fresult ; Tpetra::RowInfo *result = 0 ; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::RowInfo::RowInfo()");; try { // Attempt the wrapped function call result = (Tpetra::RowInfo *)new Tpetra::RowInfo(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::RowInfo::RowInfo()", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::RowInfo::RowInfo()", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::RowInfo::RowInfo()", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result; fresult.mem = (1 ? SWIG_MOVE : SWIG_REF); return fresult; } SWIGEXPORT void swigc_delete_RowInfo(SwigClassWrapper const *farg1) { Tpetra::RowInfo *arg1 = (Tpetra::RowInfo *) 0 ; SWIG_check_mutable_nonnull(*farg1, "Tpetra::RowInfo *", "RowInfo", "Tpetra::RowInfo::~RowInfo()", return ); arg1 = static_cast< Tpetra::RowInfo * >(farg1->ptr); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::RowInfo::~RowInfo()");; try { // Attempt the wrapped function call delete arg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::RowInfo::~RowInfo()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::RowInfo::~RowInfo()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::RowInfo::~RowInfo()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_assignment_RowInfo(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Tpetra::RowInfo swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR); } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_0(SwigClassWrapper const *farg1, unsigned long const *farg2, int const *farg3, SwigClassWrapper const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; arg3 = static_cast< Tpetra::ProfileType >(*farg3); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new Tpetra::CrsGraph< LO,GO,NO >((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2,arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_1(SwigClassWrapper const *farg1, unsigned long const *farg2, int const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; arg3 = static_cast< Tpetra::ProfileType >(*farg3); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new Tpetra::CrsGraph< LO,GO,NO >((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_2(SwigClassWrapper const *farg1, unsigned long const *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new Tpetra::CrsGraph< LO,GO,NO >((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_3(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3, int const *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; size_t arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Teuchos::ParameterList > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull5 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = static_cast< Tpetra::ProfileType >(*farg4); arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new Tpetra::CrsGraph< LO,GO,NO >((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,arg3,arg4,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_4(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3, int const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; size_t arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = static_cast< Tpetra::ProfileType >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new Tpetra::CrsGraph< LO,GO,NO >((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const,Tpetra::ProfileType const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_5(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; size_t arg3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new Tpetra::CrsGraph< LO,GO,NO >((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraCrsGraph(SwigClassWrapper const *farg1) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::~CrsGraph()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::~CrsGraph()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::~CrsGraph()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::~CrsGraph()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_setParameterList(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->setParameterList((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getValidParameters(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getValidParameters() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getValidParameters(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getValidParameters() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getValidParameters() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getValidParameters() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Teuchos::ParameterList >(static_cast< const Teuchos::RCP<const Teuchos::ParameterList >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_TpetraCrsGraph_insertGlobalIndices__SWIG_0(SwigClassWrapper const *farg1, long long const *farg2, int const *farg3, long long *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; long long arg2 ; int arg3 ; long long *arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2; arg3 = *farg3; arg4 = reinterpret_cast< long long * >(farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(long long const,int const,long long const [])");; try { // Attempt the wrapped function call (arg1)->insertGlobalIndices(arg2,arg3,(long long const (*))arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(long long const,int const,long long const [])", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(long long const,int const,long long const [])", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(long long const,int const,long long const [])", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_removeLocalIndices(SwigClassWrapper const *farg1, int const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; int arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeLocalIndices(int)");; try { // Attempt the wrapped function call (arg1)->removeLocalIndices(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeLocalIndices(int)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeLocalIndices(int)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeLocalIndices(int)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_globalAssemble(SwigClassWrapper const *farg1) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::globalAssemble()");; try { // Attempt the wrapped function call (arg1)->globalAssemble(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::globalAssemble()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::globalAssemble()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::globalAssemble()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_resumeFill__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->resumeFill((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_resumeFill__SWIG_1(SwigClassWrapper const *farg1) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill()");; try { // Attempt the wrapped function call (arg1)->resumeFill(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::resumeFill()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_fillComplete__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->fillComplete((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_fillComplete__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->fillComplete((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_fillComplete__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->fillComplete((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_fillComplete__SWIG_3(SwigClassWrapper const *farg1) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete()");; try { // Attempt the wrapped function call (arg1)->fillComplete(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::fillComplete()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_expertStaticFillComplete__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > *arg5 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg6 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > tempnull5 ; Teuchos::RCP< Teuchos::ParameterList > tempnull6 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > * >(farg5->ptr) : &tempnull5; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg6->ptr) : &tempnull6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)*arg5,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_expertStaticFillComplete__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > tempnull5 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_expertStaticFillComplete__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_expertStaticFillComplete__SWIG_3(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getComm(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Teuchos::Comm< int > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getComm() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getComm(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getComm() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getComm() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getComm() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Teuchos::Comm<int> >(static_cast< const Teuchos::RCP<const Teuchos::Comm<int> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getRowMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRowMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getRowMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRowMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRowMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRowMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getColMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getColMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getColMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getColMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getColMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getColMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getDomainMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getDomainMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getDomainMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getDomainMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getDomainMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getDomainMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getRangeMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRangeMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getRangeMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRangeMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRangeMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getRangeMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getImporter(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getImporter() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getImporter(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getImporter() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getImporter() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getImporter() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >(static_cast< const Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsGraph_getExporter(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::export_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getExporter() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getExporter(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getExporter() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getExporter() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getExporter() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >(static_cast< const Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getGlobalNumRows(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumRows() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getGlobalNumRows(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumRows() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumRows() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumRows() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getGlobalNumCols(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumCols() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getGlobalNumCols(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumCols() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumCols() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumCols() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNodeNumRows(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumRows() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNodeNumRows(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumRows() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumRows() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumRows() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNodeNumCols(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumCols() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNodeNumCols(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumCols() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumCols() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumCols() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getGlobalNumEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumEntries() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getGlobalNumEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNodeNumEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumEntries() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNodeNumEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNumEntriesInGlobalRow(SwigClassWrapper const *farg1, long long const *farg2) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; long long arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInGlobalRow(long long) const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNumEntriesInGlobalRow(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInGlobalRow(long long) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInGlobalRow(long long) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInGlobalRow(long long) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNumEntriesInLocalRow(SwigClassWrapper const *farg1, int const *farg2) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; int arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInLocalRow(int) const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNumEntriesInLocalRow(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInLocalRow(int) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInLocalRow(int) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumEntriesInLocalRow(int) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNodeAllocationSize(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeAllocationSize() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNodeAllocationSize(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeAllocationSize() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeAllocationSize() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeAllocationSize() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNumAllocatedEntriesInGlobalRow(SwigClassWrapper const *farg1, long long const *farg2) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; long long arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInGlobalRow(long long) const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNumAllocatedEntriesInGlobalRow(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInGlobalRow(long long) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInGlobalRow(long long) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInGlobalRow(long long) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNumAllocatedEntriesInLocalRow(SwigClassWrapper const *farg1, int const *farg2) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; int arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInLocalRow(int) const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNumAllocatedEntriesInLocalRow(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInLocalRow(int) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInLocalRow(int) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNumAllocatedEntriesInLocalRow(int) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getGlobalNumDiags(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumDiags() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getGlobalNumDiags(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumDiags() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumDiags() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalNumDiags() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNodeNumDiags(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumDiags() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNodeNumDiags(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumDiags() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumDiags() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeNumDiags() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getGlobalMaxNumRowEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalMaxNumRowEntries() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getGlobalMaxNumRowEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalMaxNumRowEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalMaxNumRowEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalMaxNumRowEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsGraph_getNodeMaxNumRowEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeMaxNumRowEntries() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getNodeMaxNumRowEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeMaxNumRowEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeMaxNumRowEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeMaxNumRowEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_hasColMap(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::hasColMap() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->hasColMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::hasColMap() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::hasColMap() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::hasColMap() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isLowerTriangular(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLowerTriangular() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isLowerTriangular(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLowerTriangular() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLowerTriangular() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLowerTriangular() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isUpperTriangular(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isUpperTriangular() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isUpperTriangular(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isUpperTriangular() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isUpperTriangular() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isUpperTriangular() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isLocallyIndexed(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLocallyIndexed() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isLocallyIndexed(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLocallyIndexed() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLocallyIndexed() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isLocallyIndexed() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isGloballyIndexed(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isGloballyIndexed() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isGloballyIndexed(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isGloballyIndexed() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isGloballyIndexed() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isGloballyIndexed() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isFillComplete(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillComplete() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isFillComplete(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillComplete() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillComplete() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillComplete() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isFillActive(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillActive() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isFillActive(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillActive() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillActive() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isFillActive() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isSorted(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isSorted() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isSorted(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isSorted() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isSorted() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isSorted() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_isStorageOptimized(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isStorageOptimized() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->isStorageOptimized(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isStorageOptimized() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isStorageOptimized() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::isStorageOptimized() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT int swigc_TpetraCrsGraph_getProfileType(SwigClassWrapper const *farg1) { int fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::ProfileType result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getProfileType() const");; try { // Attempt the wrapped function call result = (Tpetra::ProfileType)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->getProfileType(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getProfileType() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getProfileType() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getProfileType() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = static_cast< int >(result); return fresult; } SWIGEXPORT bool swigc_TpetraCrsGraph_supportsRowViews(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::supportsRowViews() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->supportsRowViews(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::supportsRowViews() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::supportsRowViews() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::supportsRowViews() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigArrayWrapper swigc_TpetraCrsGraph_description(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; std::string result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::description() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->description(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::description() const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::description() const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::description() const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult = SWIG_store_string(result); return fresult; } SWIGEXPORT void swigc_TpetraCrsGraph_replaceColMap(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->replaceColMap((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_reindexColumns__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, bool const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg3 = 0 ; bool arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg3->ptr) : &tempnull3; arg4 = *farg4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)");; try { // Attempt the wrapped function call (arg1)->reindexColumns((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_reindexColumns__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)");; try { // Attempt the wrapped function call (arg1)->reindexColumns((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_reindexColumns__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->reindexColumns((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::reindexColumns(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_replaceDomainMapAndImporter(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)");; try { // Attempt the wrapped function call (arg1)->replaceDomainMapAndImporter((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_removeEmptyProcessesInPlace(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->removeEmptyProcessesInPlace((Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT bool swigc_TpetraCrsGraph_haveGlobalConstants(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::haveGlobalConstants() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsGraph< LO,GO,NO > const *)arg1)->haveGlobalConstants(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::haveGlobalConstants() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::haveGlobalConstants() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::haveGlobalConstants() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT void swigc_TpetraCrsGraph_computeGlobalConstants(SwigClassWrapper const *farg1) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::computeGlobalConstants()");; try { // Attempt the wrapped function call (arg1)->computeGlobalConstants(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::computeGlobalConstants()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::computeGlobalConstants()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::computeGlobalConstants()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_6(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, int const *farg3, SwigClassWrapper const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; arg3 = static_cast< Tpetra::ProfileType >(*farg3); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_6((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2,arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_7(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, int const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; arg3 = static_cast< Tpetra::ProfileType >(*farg3); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_6((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_8(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_6((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_9(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, int const *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t const *,std::size_t > arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Teuchos::ParameterList > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull5 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<const size_t*>(farg3->data); (&arg3)->second = farg3->size; arg4 = static_cast< Tpetra::ProfileType >(*farg4); arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_9((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_10(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, int const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t const *,std::size_t > arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<const size_t*>(farg3->data); (&arg3)->second = farg3->size; arg4 = static_cast< Tpetra::ProfileType >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_9((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_11(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t const *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<const size_t*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_9((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_12(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t *,std::size_t > arg3 ; std::pair< LO *,std::size_t > arg4 ; Teuchos::RCP< Teuchos::ParameterList > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull5 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<size_t*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<int*>(farg4->data); (&arg4)->second = farg4->size; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_12((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsGraph__SWIG_13(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t *,std::size_t > arg3 ; std::pair< LO *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Tpetra::CrsGraph< LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<size_t*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<int*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >)");; try { // Attempt the wrapped function call result = (Tpetra::CrsGraph< LO,GO,NO > *)new_Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg___SWIG_12((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::CrsGraph(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_TpetraCrsGraph_insertGlobalIndices__SWIG_1(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO const *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2; (&arg3)->first = static_cast<const long long*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(GO const,std::pair< GO const *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__insertGlobalIndices__SWIG_1(arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(GO const,std::pair< GO const *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(GO const,std::pair< GO const *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertGlobalIndices(GO const,std::pair< GO const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_insertLocalIndices(SwigClassWrapper const *farg1, int const *farg2, SwigArrayWrapper *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; LO arg2 ; std::pair< LO const *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2 - 1; (&arg3)->first = static_cast<const int*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertLocalIndices(LO const,std::pair< LO const *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__insertLocalIndices(arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertLocalIndices(LO const,std::pair< LO const *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertLocalIndices(LO const,std::pair< LO const *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::insertLocalIndices(LO const,std::pair< LO const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_getGlobalRowCopy(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3, unsigned long *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO *,std::size_t > arg3 ; size_t *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; (&arg3)->first = static_cast<long long*>(farg3->data); (&arg3)->second = farg3->size; arg4 = reinterpret_cast< size_t * >(farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,size_t &) const");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getGlobalRowCopy((Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,size_t &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,size_t &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,size_t &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_getLocalRowCopy(SwigClassWrapper const *farg1, int const *farg2, SwigArrayWrapper *farg3, unsigned long *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; LO arg2 ; std::pair< LO *,std::size_t > arg3 ; size_t *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; arg4 = reinterpret_cast< size_t * >(farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,size_t &) const");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getLocalRowCopy((Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,size_t &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,size_t &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,size_t &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_getgblRowView(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO const *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; (&arg3)->first = static_cast<const long long*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getgblRowView(GO const,std::pair< GO const *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getgblRowView((Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getgblRowView(GO const,std::pair< GO const *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getgblRowView(GO const,std::pair< GO const *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getgblRowView(GO const,std::pair< GO const *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_setAllIndices(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; std::pair< LO *,std::size_t > arg3 ; std::pair< SC *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setAllIndices(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__setAllIndices(arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setAllIndices(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setAllIndices(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::setAllIndices(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_getNodeRowPtrs(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeRowPtrs(std::pair< std::size_t *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getNodeRowPtrs((Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeRowPtrs(std::pair< std::size_t *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeRowPtrs(std::pair< std::size_t *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodeRowPtrs(std::pair< std::size_t *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_getNodePackedIndices(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodePackedIndices(std::pair< std::size_t *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getNodePackedIndices((Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodePackedIndices(std::pair< std::size_t *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodePackedIndices(std::pair< std::size_t *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getNodePackedIndices(std::pair< std::size_t *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_getLocalDiagOffsets(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__getLocalDiagOffsets((Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_doImport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Tpetra::CrsGraph< LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Import< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsGraph< LO,GO,NO,NO::classic > *", "TpetraCrsGraph", "Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Import< LO,GO,NO > *", "TpetraImport", "Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_0(arg1,(Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_doImport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Tpetra::CrsGraph< LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Export< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsGraph< LO,GO,NO,NO::classic > *", "TpetraCrsGraph", "Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Export< LO,GO,NO > *", "TpetraExport", "Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_1(arg1,(Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doImport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_doExport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Tpetra::CrsGraph< LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Export< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsGraph< LO,GO,NO,NO::classic > *", "TpetraCrsGraph", "Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Export< LO,GO,NO > *", "TpetraExport", "Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_0(arg1,(Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsGraph_doExport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsGraph< LO,GO,NO > *arg1 = (Tpetra::CrsGraph< LO,GO,NO > *) 0 ; Tpetra::CrsGraph< LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Import< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsGraph< LO,GO,NO,NO::classic > *", "TpetraCrsGraph", "Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsGraph<LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Import< LO,GO,NO > *", "TpetraImport", "Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsGraph_Sl_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_1(arg1,(Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsGraph< LO,GO,NO >::doExport(Tpetra::CrsGraph< LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_assignment_TpetraCrsGraph(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR); } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_0(SwigClassWrapper const *farg1, unsigned long const *farg2, int const *farg3, SwigClassWrapper const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; arg3 = static_cast< Tpetra::ProfileType >(*farg3); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2,arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_1(SwigClassWrapper const *farg1, unsigned long const *farg2, int const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; arg3 = static_cast< Tpetra::ProfileType >(*farg3); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_2(SwigClassWrapper const *farg1, unsigned long const *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; size_t arg2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_3(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3, int const *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; size_t arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Teuchos::ParameterList > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull5 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = static_cast< Tpetra::ProfileType >(*farg4); arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,arg3,arg4,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_4(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3, int const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; size_t arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = static_cast< Tpetra::ProfileType >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t,Tpetra::ProfileType)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_5(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, unsigned long const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > *arg2 = 0 ; size_t arg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > tempnull2 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::map_type const > const &,size_t)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_6(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > *arg1 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > tempnull1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &)*arg1,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_7(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > tempnull1 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > * >(farg1->ptr) : &tempnull1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new Tpetra::CrsMatrix< SC,LO,GO,NO >((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &)*arg1); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraCrsMatrix(SwigClassWrapper const *farg1) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::~CrsMatrix()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::~CrsMatrix()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::~CrsMatrix()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::~CrsMatrix()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_setAllToScalar(SwigClassWrapper const *farg1, double const *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllToScalar(double const &)");; try { // Attempt the wrapped function call (arg1)->setAllToScalar((double const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllToScalar(double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllToScalar(double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllToScalar(double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_scale(SwigClassWrapper const *farg1, double const *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; double *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = reinterpret_cast< double * >(const_cast< double* >(farg2)); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::scale(double const &)");; try { // Attempt the wrapped function call (arg1)->scale((double const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::scale(double const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::scale(double const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::scale(double const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_globalAssemble(SwigClassWrapper const *farg1) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::globalAssemble()");; try { // Attempt the wrapped function call (arg1)->globalAssemble(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::globalAssemble()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::globalAssemble()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::globalAssemble()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_resumeFill__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->resumeFill((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_resumeFill__SWIG_1(SwigClassWrapper const *farg1) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill()");; try { // Attempt the wrapped function call (arg1)->resumeFill(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::resumeFill()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_fillComplete__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->fillComplete((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_fillComplete__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->fillComplete((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_fillComplete__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->fillComplete((Teuchos::RCP< Teuchos::ParameterList > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete(Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_fillComplete__SWIG_3(SwigClassWrapper const *farg1) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete()");; try { // Attempt the wrapped function call (arg1)->fillComplete(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::fillComplete()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_expertStaticFillComplete__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > *arg5 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg6 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > tempnull5 ; Teuchos::RCP< Teuchos::ParameterList > tempnull6 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > * >(farg5->ptr) : &tempnull5; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg6->ptr) : &tempnull6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)*arg5,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_expertStaticFillComplete__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > tempnull5 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_expertStaticFillComplete__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_expertStaticFillComplete__SWIG_3(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->expertStaticFillComplete((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::expertStaticFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_replaceColMap(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->replaceColMap((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceColMap(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_reindexColumns__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, bool const *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *arg2 = (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *) (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *)0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; bool arg5 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; smartarg2 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = smartarg2 ? smartarg2->get() : NULL; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)");; try { // Attempt the wrapped function call (arg1)->reindexColumns(arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_reindexColumns__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *arg2 = (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *) (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *)0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; smartarg2 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = smartarg2 ? smartarg2->get() : NULL; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)");; try { // Attempt the wrapped function call (arg1)->reindexColumns(arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_reindexColumns__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *arg2 = (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *) (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *)0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsGraph< LO,GO,NO,NO::classic > > *smartarg2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; smartarg2 = static_cast< Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = smartarg2 ? smartarg2->get() : NULL; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->reindexColumns(arg2,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::reindexColumns(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::crs_graph_type *const,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_replaceDomainMapAndImporter(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > tempnull3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > &)");; try { // Attempt the wrapped function call (arg1)->replaceDomainMapAndImporter((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2,*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceDomainMapAndImporter(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::import_type const > &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_removeEmptyProcessesInPlace(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)");; try { // Attempt the wrapped function call (arg1)->removeEmptyProcessesInPlace((Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::removeEmptyProcessesInPlace(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsMatrix_getComm(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Teuchos::Comm< int > const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getComm() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getComm(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getComm() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getComm() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getComm() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Teuchos::Comm<int> >(static_cast< const Teuchos::RCP<const Teuchos::Comm<int> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsMatrix_getRowMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRowMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getRowMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRowMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRowMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRowMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsMatrix_getColMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getColMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getColMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getColMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getColMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getColMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsMatrix_getCrsGraph(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::crs_graph_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getCrsGraph() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getCrsGraph(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getCrsGraph() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getCrsGraph() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getCrsGraph() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP<const Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getGlobalNumRows(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumRows() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getGlobalNumRows(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumRows() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumRows() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumRows() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getGlobalNumCols(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumCols() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getGlobalNumCols(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumCols() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumCols() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumCols() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNodeNumRows(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumRows() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNodeNumRows(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumRows() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumRows() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumRows() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNodeNumCols(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumCols() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNodeNumCols(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumCols() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumCols() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumCols() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getGlobalNumEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumEntries() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getGlobalNumEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNodeNumEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumEntries() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNodeNumEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNumEntriesInGlobalRow(SwigClassWrapper const *farg1, long long const *farg2) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; long long arg2 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInGlobalRow(long long) const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNumEntriesInGlobalRow(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInGlobalRow(long long) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInGlobalRow(long long) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInGlobalRow(long long) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNumEntriesInLocalRow(SwigClassWrapper const *farg1, int const *farg2) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; int arg2 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInLocalRow(int) const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNumEntriesInLocalRow(arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInLocalRow(int) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInLocalRow(int) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNumEntriesInLocalRow(int) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getGlobalNumDiags(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::global_size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumDiags() const");; try { // Attempt the wrapped function call result = (Tpetra::global_size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getGlobalNumDiags(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumDiags() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumDiags() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalNumDiags() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNodeNumDiags(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumDiags() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNodeNumDiags(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumDiags() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumDiags() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeNumDiags() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getGlobalMaxNumRowEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalMaxNumRowEntries() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getGlobalMaxNumRowEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalMaxNumRowEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalMaxNumRowEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalMaxNumRowEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT unsigned long swigc_TpetraCrsMatrix_getNodeMaxNumRowEntries(SwigClassWrapper const *farg1) { unsigned long fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; size_t result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeMaxNumRowEntries() const");; try { // Attempt the wrapped function call result = (size_t)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getNodeMaxNumRowEntries(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeMaxNumRowEntries() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeMaxNumRowEntries() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getNodeMaxNumRowEntries() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_hasColMap(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasColMap() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->hasColMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasColMap() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasColMap() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasColMap() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isLowerTriangular(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLowerTriangular() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isLowerTriangular(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLowerTriangular() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLowerTriangular() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLowerTriangular() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isUpperTriangular(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isUpperTriangular() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isUpperTriangular(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isUpperTriangular() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isUpperTriangular() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isUpperTriangular() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isLocallyIndexed(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLocallyIndexed() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isLocallyIndexed(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLocallyIndexed() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLocallyIndexed() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isLocallyIndexed() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isGloballyIndexed(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isGloballyIndexed() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isGloballyIndexed(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isGloballyIndexed() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isGloballyIndexed() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isGloballyIndexed() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isFillComplete(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillComplete() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isFillComplete(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillComplete() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillComplete() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillComplete() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isFillActive(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillActive() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isFillActive(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillActive() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillActive() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isFillActive() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isStorageOptimized(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStorageOptimized() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isStorageOptimized(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStorageOptimized() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStorageOptimized() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStorageOptimized() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT int swigc_TpetraCrsMatrix_getProfileType(SwigClassWrapper const *farg1) { int fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::ProfileType result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getProfileType() const");; try { // Attempt the wrapped function call result = (Tpetra::ProfileType)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getProfileType(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getProfileType() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getProfileType() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getProfileType() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = static_cast< int >(result); return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_isStaticGraph(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStaticGraph() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->isStaticGraph(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStaticGraph() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStaticGraph() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::isStaticGraph() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT double swigc_TpetraCrsMatrix_getFrobeniusNorm(SwigClassWrapper const *farg1) { double fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::mag_type result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getFrobeniusNorm() const");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::mag_type)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getFrobeniusNorm(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getFrobeniusNorm() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getFrobeniusNorm() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getFrobeniusNorm() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT bool swigc_TpetraCrsMatrix_supportsRowViews(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::supportsRowViews() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->supportsRowViews(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::supportsRowViews() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::supportsRowViews() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::supportsRowViews() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT void swigc_TpetraCrsMatrix_apply__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4, double const *farg5, double const *farg6) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Teuchos::ETransp arg4 ; double arg5 ; double arg6 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double,double) const", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double,double) const", return ) smartarg3 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = smartarg3->get(); arg4 = static_cast< Teuchos::ETransp >(*farg4); arg5 = *farg5; arg6 = *farg6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double,double) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->apply((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2,*arg3,arg4,arg5,arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double,double) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double,double) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double,double) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_apply__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4, double const *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Teuchos::ETransp arg4 ; double arg5 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double) const", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double) const", return ) smartarg3 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = smartarg3->get(); arg4 = static_cast< Teuchos::ETransp >(*farg4); arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->apply((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2,*arg3,arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp,double) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_apply__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Teuchos::ETransp arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp) const", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp) const", return ) smartarg3 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = smartarg3->get(); arg4 = static_cast< Teuchos::ETransp >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->apply((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2,*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Teuchos::ETransp) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_apply__SWIG_3(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &) const", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &) const", return ) smartarg3 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = smartarg3->get(); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->apply((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2,*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::apply(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT bool swigc_TpetraCrsMatrix_hasTransposeApply(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasTransposeApply() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->hasTransposeApply(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasTransposeApply() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasTransposeApply() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::hasTransposeApply() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsMatrix_getDomainMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getDomainMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getDomainMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getDomainMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getDomainMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getDomainMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraCrsMatrix_getRangeMap(SwigClassWrapper const *farg1) { SwigClassWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRangeMap() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->getRangeMap(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRangeMap() const", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRangeMap() const", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getRangeMap() const", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_TpetraCrsMatrix_gaussSeidel(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, double const *farg5, int const *farg6, int const *farg7) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg4 = 0 ; double *arg5 = 0 ; Tpetra::ESweepDirection arg6 ; int arg7 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg4 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const", return ) smartarg3 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = smartarg3->get(); SWIG_check_sp_nonnull(farg4, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const", return ) smartarg4 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg4->ptr); arg4 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg4->get()); arg5 = reinterpret_cast< double * >(const_cast< double* >(farg5)); arg6 = static_cast< Tpetra::ESweepDirection >(*farg6); arg7 = *farg7; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->gaussSeidel((Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg2,*arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg4,(double const &)*arg5,arg6,arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidel(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_gaussSeidelCopy(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, double const *farg5, int const *farg6, int const *farg7, bool const *farg8) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg2 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg3 = 0 ; Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *arg4 = 0 ; double *arg5 = 0 ; Tpetra::ESweepDirection arg6 ; int arg7 ; bool arg8 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > > *smartarg2 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; Teuchos::RCP< Tpetra::MultiVector< SC,LO,GO,NO,NO::classic > const > *smartarg4 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const", return ) smartarg2 = static_cast< Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = smartarg2->get(); SWIG_check_sp_nonnull(farg3, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); SWIG_check_sp_nonnull(farg4, "Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > *", "TpetraMultiVector", "Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const", return ) smartarg4 = static_cast< Teuchos::RCP<const Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >* >(farg4->ptr); arg4 = const_cast<Tpetra::MultiVector<SC,LO,GO,NO,NO::classic>*>(smartarg4->get()); arg5 = reinterpret_cast< double * >(const_cast< double* >(farg5)); arg6 = static_cast< Tpetra::ESweepDirection >(*farg6); arg7 = *farg7; arg8 = *farg8; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->gaussSeidelCopy(*arg2,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg3,(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &)*arg4,(double const &)*arg5,arg6,arg7,arg8); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::gaussSeidelCopy(Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,Tpetra::MultiVector< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > const &,double const &,Tpetra::ESweepDirection const,int const,bool const) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigArrayWrapper swigc_TpetraCrsMatrix_description(SwigClassWrapper const *farg1) { SwigArrayWrapper fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; std::string result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::description() const");; try { // Attempt the wrapped function call result = ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->description(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::description() const", SWIG_IndexError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::description() const", SWIG_RuntimeError, e.what(), return SwigArrayWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::description() const", SWIG_UnknownError, "An unknown exception occurred", return SwigArrayWrapper_uninitialized()); } } fresult = SWIG_store_string(result); return fresult; } SWIGEXPORT void swigc_TpetraCrsMatrix_importAndFillComplete__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg5 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg6 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull5 ; Teuchos::RCP< Teuchos::ParameterList > tempnull6 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *", "TpetraImport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg6->ptr) : &tempnull6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->importAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg5,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_importAndFillComplete__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull5 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *", "TpetraImport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->importAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_importAndFillComplete__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6, SwigClassWrapper const *farg7) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *arg3 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg6 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg7 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull6 ; Teuchos::RCP< Teuchos::ParameterList > tempnull7 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *", "TpetraImport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); SWIG_check_sp_nonnull(farg4, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type *", "TpetraImport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", return ) smartarg4 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg4->ptr); arg4 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg4->get()); arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg6->ptr) : &tempnull6; arg7 = farg7->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg7->ptr) : &tempnull7; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->importAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &)*arg3,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg5,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg6,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::importAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::import_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_exportAndFillComplete__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg5 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg6 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull5 ; Teuchos::RCP< Teuchos::ParameterList > tempnull6 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg6->ptr) : &tempnull6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->exportAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg5,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_exportAndFillComplete__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull5 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->exportAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_exportAndFillComplete__SWIG_2(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull4 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->exportAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &)*arg3,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_exportAndFillComplete__SWIG_3(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *arg3 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->exportAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &)*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_exportAndFillComplete__SWIG_4(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, SwigClassWrapper const *farg6, SwigClassWrapper const *farg7) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > *arg2 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *arg3 = 0 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg6 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg7 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > tempnull2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull6 ; Teuchos::RCP< Teuchos::ParameterList > tempnull7 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > * >(farg2->ptr) : &tempnull2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); SWIG_check_sp_nonnull(farg4, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", return ) smartarg4 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg4->ptr); arg4 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg4->get()); arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg6->ptr) : &tempnull6; arg7 = farg7->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg7->ptr) : &tempnull7; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const");; try { // Attempt the wrapped function call ((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->exportAndFillComplete(*arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &)*arg3,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &)*arg4,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg5,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &)*arg6,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::exportAndFillComplete(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,NO::classic > > &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode >::export_type const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Teuchos::ParameterList > const &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT bool swigc_TpetraCrsMatrix_haveGlobalConstants(SwigClassWrapper const *farg1) { bool fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; bool result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::haveGlobalConstants() const");; try { // Attempt the wrapped function call result = (bool)((Tpetra::CrsMatrix< SC,LO,GO,NO > const *)arg1)->haveGlobalConstants(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::haveGlobalConstants() const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::haveGlobalConstants() const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::haveGlobalConstants() const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_8(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, int const *farg3, SwigClassWrapper const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; arg3 = static_cast< Tpetra::ProfileType >(*farg3); arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_8((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2,arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_9(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, int const *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Tpetra::ProfileType arg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; arg3 = static_cast< Tpetra::ProfileType >(*farg3); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_8((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_10(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; std::pair< std::size_t const *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; (&arg2)->first = static_cast<const size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_8((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_11(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, int const *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t const *,std::size_t > arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Teuchos::ParameterList > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull5 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<const size_t*>(farg3->data); (&arg3)->second = farg3->size; arg4 = static_cast< Tpetra::ProfileType >(*farg4); arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_11((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_12(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, int const *farg4) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t const *,std::size_t > arg3 ; Tpetra::ProfileType arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<const size_t*>(farg3->data); (&arg3)->second = farg3->size; arg4 = static_cast< Tpetra::ProfileType >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_11((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >,Tpetra::ProfileType)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_13(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t const *,std::size_t > arg3 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<const size_t*>(farg3->data); (&arg3)->second = farg3->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_11((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_14(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, SwigArrayWrapper *farg5, SwigClassWrapper const *farg6) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t *,std::size_t > arg3 ; std::pair< LO *,std::size_t > arg4 ; std::pair< SC *,std::size_t > arg5 ; Teuchos::RCP< Teuchos::ParameterList > *arg6 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull6 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<size_t*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<int*>(farg4->data); (&arg4)->second = farg4->size; (&arg5)->first = static_cast<double*>(farg5->data); (&arg5)->second = farg5->size; arg6 = farg6->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg6->ptr) : &tempnull6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_14((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4,arg5,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraCrsMatrix__SWIG_15(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, SwigArrayWrapper *farg5) { SwigClassWrapper fresult ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg1 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > *arg2 = 0 ; std::pair< std::size_t *,std::size_t > arg3 ; std::pair< LO *,std::size_t > arg4 ; std::pair< SC *,std::size_t > arg5 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull1 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > tempnull2 ; Tpetra::CrsMatrix< SC,LO,GO,NO > *result = 0 ; arg1 = farg1->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg1->ptr) : &tempnull1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > * >(farg2->ptr) : &tempnull2; (&arg3)->first = static_cast<size_t*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<int*>(farg4->data); (&arg4)->second = farg4->size; (&arg5)->first = static_cast<double*>(farg5->data); (&arg5)->second = farg5->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)");; try { // Attempt the wrapped function call result = (Tpetra::CrsMatrix< SC,LO,GO,NO > *)new_Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg___SWIG_14((Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3,arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::CrsMatrix(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic >::map_type const > const &,std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_TpetraCrsMatrix_insertGlobalValues(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO const *,std::size_t > arg3 ; std::pair< SC const *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2; (&arg3)->first = static_cast<const long long*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<const double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__insertGlobalValues(arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_insertLocalValues(SwigClassWrapper const *farg1, int const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; LO arg2 ; std::pair< LO const *,std::size_t > arg3 ; std::pair< SC const *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2 - 1; (&arg3)->first = static_cast<const int*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<const double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertLocalValues(LO const,std::pair< LO const *,std::size_t >,std::pair< SC const *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__insertLocalValues(arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertLocalValues(LO const,std::pair< LO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertLocalValues(LO const,std::pair< LO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::insertLocalValues(LO const,std::pair< LO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT int swigc_TpetraCrsMatrix_replaceGlobalValues(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { int fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO const *,std::size_t > arg3 ; std::pair< SC const *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; LO result; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; (&arg3)->first = static_cast<const long long*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<const double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const");; try { // Attempt the wrapped function call result = (LO)Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__replaceGlobalValues((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::replaceGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT int swigc_TpetraCrsMatrix_sumIntoGlobalValues(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { int fresult ; Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO const *,std::size_t > arg3 ; std::pair< SC const *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; LO result; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; arg2 = *farg2; (&arg3)->first = static_cast<const long long*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<const double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::sumIntoGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)");; try { // Attempt the wrapped function call result = (LO)Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__sumIntoGlobalValues(arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::sumIntoGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_IndexError, e.what(), return 0); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::sumIntoGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_RuntimeError, e.what(), return 0); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::sumIntoGlobalValues(GO const,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return 0); } } fresult = result; return fresult; } SWIGEXPORT void swigc_TpetraCrsMatrix_setAllValues(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; std::pair< LO *,std::size_t > arg3 ; std::pair< SC *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__setAllValues(arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::setAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_getAllValues(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; std::pair< LO *,std::size_t > arg3 ; std::pair< SC *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getAllValues((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getAllValues(std::pair< std::size_t *,std::size_t >,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_getGlobalRowCopy(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, unsigned long *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO *,std::size_t > arg3 ; std::pair< SC *,std::size_t > arg4 ; size_t *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; (&arg3)->first = static_cast<long long*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<double*>(farg4->data); (&arg4)->second = farg4->size; arg5 = reinterpret_cast< size_t * >(farg5); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getGlobalRowCopy((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,arg4,*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowCopy(GO,std::pair< GO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_getLocalRowCopy(SwigClassWrapper const *farg1, int const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, unsigned long *farg5) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; LO arg2 ; std::pair< LO *,std::size_t > arg3 ; std::pair< SC *,std::size_t > arg4 ; size_t *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2 - 1; (&arg3)->first = static_cast<int*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<double*>(farg4->data); (&arg4)->second = farg4->size; arg5 = reinterpret_cast< size_t * >(farg5); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getLocalRowCopy((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,arg4,*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalRowCopy(LO,std::pair< LO *,std::size_t >,std::pair< SC *,std::size_t >,size_t &) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_getGlobalRowView(SwigClassWrapper const *farg1, long long const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; GO arg2 ; std::pair< GO const *,std::size_t > arg3 ; std::pair< SC const *,std::size_t > arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; arg2 = *farg2; (&arg3)->first = static_cast<const long long*>(farg3->data); (&arg3)->second = farg3->size; (&arg4)->first = static_cast<const double*>(farg4->data); (&arg4)->second = farg4->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowView(GO,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getGlobalRowView((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowView(GO,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowView(GO,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getGlobalRowView(GO,std::pair< GO const *,std::size_t >,std::pair< SC const *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_getLocalDiagOffsets(SwigClassWrapper const *farg1, SwigArrayWrapper *farg2) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; std::pair< std::size_t *,std::size_t > arg2 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()) : NULL; (&arg2)->first = static_cast<size_t*>(farg2->data); (&arg2)->second = farg2->size; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__getLocalDiagOffsets((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const *)arg1,arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::getLocalDiagOffsets(std::pair< std::size_t *,std::size_t >) const", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_doImport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Import< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *", "TpetraCrsMatrix", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Import< LO,GO,NO > *", "TpetraImport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_0(arg1,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_doImport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Export< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *", "TpetraCrsMatrix", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Export< LO,GO,NO > *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doImport__SWIG_1(arg1,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doImport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_doExport__SWIG_0(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Export< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Export< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *", "TpetraCrsMatrix", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Export< LO,GO,NO > *", "TpetraExport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Export<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Export<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_0(arg1,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Export< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Export< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraCrsMatrix_doExport__SWIG_1(SwigClassWrapper const *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, int const *farg4) { Tpetra::CrsMatrix< SC,LO,GO,NO > *arg1 = (Tpetra::CrsMatrix< SC,LO,GO,NO > *) 0 ; Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *arg2 = 0 ; Tpetra::Import< LO,GO,NO > *arg3 = 0 ; Tpetra::CombineMode arg4 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg2 ; Teuchos::RCP< Tpetra::Import< LO,GO,NO > const > *smartarg3 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; SWIG_check_sp_nonnull(farg2, "Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > *", "TpetraCrsMatrix", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg2->ptr); arg2 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg2->get()); SWIG_check_sp_nonnull(farg3, "Tpetra::Import< LO,GO,NO > *", "TpetraImport", "Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::Import<LO,GO,NO> >* >(farg3->ptr); arg3 = const_cast<Tpetra::Import<LO,GO,NO>*>(smartarg3->get()); arg4 = static_cast< Tpetra::CombineMode >(*farg4); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)");; try { // Attempt the wrapped function call Tpetra_CrsMatrix_Sl_SC_Sc_LO_Sc_GO_Sc_NO_Sg__doExport__SWIG_1(arg1,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const &)*arg2,(Tpetra::Import< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::CrsMatrix< SC,LO,GO,NO >::doExport(Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const &,Tpetra::Import< LO,GO,NO > const &,Tpetra::CombineMode)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_assignment_TpetraCrsMatrix(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0); } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_0(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3, bool const *farg4, bool const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; bool arg3 ; bool arg4 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = *farg4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3,arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_1(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3, bool const *farg4) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; bool arg3 ; bool arg4 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = *farg4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_2(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; bool arg3 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_3(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_4(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, bool const *farg5, bool const *farg6) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; bool arg5 ; bool arg6 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; arg5 = *farg5; arg6 = *farg6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4,arg5,arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_5(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, bool const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_6(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_7(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, bool const *farg6, bool const *farg7, bool const *farg8) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; bool arg6 ; bool arg7 ; bool arg8 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = *farg6; arg7 = *farg7; arg8 = *farg8; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5,arg6,arg7,arg8); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_8(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, bool const *farg6, bool const *farg7) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; bool arg6 ; bool arg7 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = *farg6; arg7 = *farg7; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5,arg6,arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_9(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, bool const *farg6) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; bool arg6 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = *farg6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5,arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseGraphFile__SWIG_10(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_graph_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseGraphFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsGraph<LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_0(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3, bool const *farg4, bool const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; bool arg3 ; bool arg4 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = *farg4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3,arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_1(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3, bool const *farg4) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; bool arg3 ; bool arg4 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = *farg4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_2(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; bool arg3 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_3(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_4(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, bool const *farg5, bool const *farg6) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; bool arg5 ; bool arg6 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; arg5 = *farg5; arg6 = *farg6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4,arg5,arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_5(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, bool const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_6(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Teuchos::Comm< int > const > *arg2 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg3 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg4 = 0 ; std::string tempstr1 ; Teuchos::RCP< Teuchos::Comm< int > const > tempnull2 ; Teuchos::RCP< Teuchos::ParameterList > tempnull3 ; Teuchos::RCP< Teuchos::ParameterList > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Teuchos::Comm< int > const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg4->ptr) : &tempnull4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg3,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_4(std::string const &,Teuchos::RCP< Teuchos::Comm< int > const > const &,Teuchos::RCP< Teuchos::ParameterList > const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_7(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, bool const *farg6, bool const *farg7, bool const *farg8) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; bool arg6 ; bool arg7 ; bool arg8 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = *farg6; arg7 = *farg7; arg8 = *farg8; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5,arg6,arg7,arg8); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_8(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, bool const *farg6, bool const *farg7) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; bool arg6 ; bool arg7 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = *farg6; arg7 = *farg7; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5,arg6,arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_9(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5, bool const *farg6) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; bool arg6 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; arg6 = *farg6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5,arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readSparseFile__SWIG_10(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, SwigClassWrapper const *farg4, SwigClassWrapper const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg4 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg5 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull4 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull5 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::sparse_matrix_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = farg4->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg4->ptr) : &tempnull4; arg5 = farg5->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg5->ptr) : &tempnull5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7((std::string const &)*arg1,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,*arg3,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg4,(Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readSparseFile__SWIG_7(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readDenseFile__SWIG_0(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, bool const *farg4, bool const *farg5) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; bool arg4 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::multivector_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = *farg4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,*arg3,arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readDenseFile__SWIG_1(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3, bool const *farg4) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; bool arg4 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::multivector_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; arg4 = *farg4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,*arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readDenseFile__SWIG_2(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigClassWrapper const *farg3) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > *arg2 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > *arg3 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > tempnull3 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::multivector_type > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > * >(farg2->ptr) : &tempnull2; arg3 = farg3->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > * >(farg3->ptr) : &tempnull3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,*arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readDenseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >(static_cast< const Teuchos::RCP< Tpetra::MultiVector<SC,LO,GO,NO,NO::classic> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readMapFile__SWIG_0(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3, bool const *farg4) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > *arg2 = 0 ; bool arg3 ; bool arg4 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; arg4 = *farg4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3,arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readMapFile__SWIG_1(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > *arg2 = 0 ; bool arg3 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_TpetraReader_readMapFile__SWIG_2(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2) { SwigClassWrapper fresult ; std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > *arg2 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > tempnull2 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::map_type const > result; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &)");; try { // Attempt the wrapped function call result = Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Teuchos::Comm< int > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &)", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &)", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Tpetra_MatrixMarket_Reader_Sl_CMT_Sg__readMapFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Reader< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > >::comm_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = (new Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >(static_cast< const Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >& >(result))); fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT SwigClassWrapper swigc_new_TpetraReader() { SwigClassWrapper fresult ; Tpetra::MatrixMarket::Reader< CMT > *result = 0 ; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Reader()");; try { // Attempt the wrapped function call result = (Tpetra::MatrixMarket::Reader< CMT > *)new Tpetra::MatrixMarket::Reader< CMT >(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Reader()", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Reader()", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::Reader()", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MatrixMarket::Reader<CMT> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraReader(SwigClassWrapper const *farg1) { Tpetra::MatrixMarket::Reader< CMT > *arg1 = (Tpetra::MatrixMarket::Reader< CMT > *) 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Reader< CMT > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Reader<CMT> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::~Reader()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::~Reader()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::~Reader()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Reader< CMT >::~Reader()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_assignment_TpetraReader(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::MatrixMarket::Reader<CMT> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR); } SWIGEXPORT void swigc_TpetraWriter_writeSparseFile__SWIG_0(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, bool const *farg5) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > *arg2 = 0 ; std::string *arg3 = 0 ; std::string *arg4 = 0 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > tempnull2 ; std::string tempstr3 ; std::string tempstr4 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > * >(farg2->ptr) : &tempnull2; tempstr3 = std::string(static_cast<const char*>(farg3->data), farg3->size); arg3 = &tempstr3; tempstr4 = std::string(static_cast<const char*>(farg4->data), farg4->size); arg4 = &tempstr4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &,bool const)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const > const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &,bool const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &,bool const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseFile__SWIG_1(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > *arg2 = 0 ; std::string *arg3 = 0 ; std::string *arg4 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > tempnull2 ; std::string tempstr3 ; std::string tempstr4 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > * >(farg2->ptr) : &tempnull2; tempstr3 = std::string(static_cast<const char*>(farg3->data), farg3->size); arg3 = &tempstr3; tempstr4 = std::string(static_cast<const char*>(farg4->data), farg4->size); arg4 = &tempstr4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const > const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,std::string const &,std::string const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseFile__SWIG_2(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > *arg2 = 0 ; bool arg3 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > tempnull2 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,bool const)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,bool const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseFile__SWIG_3(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > *arg2 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > tempnull2 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::sparse_matrix_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseGraphFile__SWIG_0(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4, bool const *farg5) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > *arg2 = 0 ; std::string *arg3 = 0 ; std::string *arg4 = 0 ; bool arg5 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > tempnull2 ; std::string tempstr3 ; std::string tempstr4 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > * >(farg2->ptr) : &tempnull2; tempstr3 = std::string(static_cast<const char*>(farg3->data), farg3->size); arg3 = &tempstr3; tempstr4 = std::string(static_cast<const char*>(farg4->data), farg4->size); arg4 = &tempstr4; arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &,bool const)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &,bool const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &,bool const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseGraphFile__SWIG_1(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, SwigArrayWrapper *farg3, SwigArrayWrapper *farg4) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > *arg2 = 0 ; std::string *arg3 = 0 ; std::string *arg4 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > tempnull2 ; std::string tempstr3 ; std::string tempstr4 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > * >(farg2->ptr) : &tempnull2; tempstr3 = std::string(static_cast<const char*>(farg3->data), farg3->size); arg3 = &tempstr3; tempstr4 = std::string(static_cast<const char*>(farg4->data), farg4->size); arg4 = &tempstr4; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_0(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,std::string const &,std::string const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseGraphFile__SWIG_2(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2, bool const *farg3) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > *arg2 = 0 ; bool arg3 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > tempnull2 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > * >(farg2->ptr) : &tempnull2; arg3 = *farg3; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,bool const)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2,arg3); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,bool const)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,bool const)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &,bool const)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeSparseGraphFile__SWIG_3(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2) { std::string *arg1 = 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > *arg2 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > tempnull2 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; arg2 = farg2->ptr ? static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > * >(farg2->ptr) : &tempnull2; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2((std::string const &)*arg1,(Teuchos::RCP< Tpetra::CrsGraph< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeSparseGraphFile__SWIG_2(std::string const &,Teuchos::RCP< Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::crs_graph_type const > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraWriter_writeMapFile(SwigArrayWrapper *farg1, SwigClassWrapper const *farg2) { std::string *arg1 = 0 ; Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type *arg2 = 0 ; std::string tempstr1 ; Teuchos::RCP< Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const > *smartarg2 ; tempstr1 = std::string(static_cast<const char*>(farg1->data), farg1->size); arg1 = &tempstr1; SWIG_check_sp_nonnull(farg2, "Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type *", "TpetraMap", "Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile(std::string const &,Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type const &)", return ) smartarg2 = static_cast< Teuchos::RCP<const Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode> >* >(farg2->ptr); arg2 = const_cast<Tpetra::Map<int,long long,Kokkos::Compat::KokkosSerialWrapperNode>*>(smartarg2->get()); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile(std::string const &,Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type const &)");; try { // Attempt the wrapped function call Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile((std::string const &)*arg1,(Tpetra::Map< int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg2); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile(std::string const &,Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile(std::string const &,Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Tpetra_MatrixMarket_Writer_Sl_CMT_Sg__writeMapFile(std::string const &,Tpetra::MatrixMarket::Writer< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode,Kokkos::Compat::KokkosSerialWrapperNode::classic > >::map_type const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT SwigClassWrapper swigc_new_TpetraWriter() { SwigClassWrapper fresult ; Tpetra::MatrixMarket::Writer< CMT > *result = 0 ; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Writer()");; try { // Attempt the wrapped function call result = (Tpetra::MatrixMarket::Writer< CMT > *)new Tpetra::MatrixMarket::Writer< CMT >(); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Writer()", SWIG_IndexError, e.what(), return SwigClassWrapper_uninitialized()); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Writer()", SWIG_RuntimeError, e.what(), return SwigClassWrapper_uninitialized()); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::Writer()", SWIG_UnknownError, "An unknown exception occurred", return SwigClassWrapper_uninitialized()); } } fresult.ptr = result ? new Teuchos::RCP< Tpetra::MatrixMarket::Writer<CMT> >(result SWIG_NO_NULL_DELETER_1) : NULL; fresult.mem = SWIG_MOVE; return fresult; } SWIGEXPORT void swigc_delete_TpetraWriter(SwigClassWrapper const *farg1) { Tpetra::MatrixMarket::Writer< CMT > *arg1 = (Tpetra::MatrixMarket::Writer< CMT > *) 0 ; Teuchos::RCP< Tpetra::MatrixMarket::Writer< CMT > > *smartarg1 ; smartarg1 = static_cast< Teuchos::RCP< Tpetra::MatrixMarket::Writer<CMT> >* >(farg1->ptr); arg1 = smartarg1 ? smartarg1->get() : NULL; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::~Writer()");; try { // Attempt the wrapped function call (void)arg1; delete smartarg1; } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::~Writer()", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::~Writer()", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMarket::Writer< CMT >::~Writer()", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_assignment_TpetraWriter(SwigClassWrapper * self, SwigClassWrapper const * other) { typedef Teuchos::RCP< Tpetra::MatrixMarket::Writer<CMT> > swig_lhs_classtype; SWIG_assign(swig_lhs_classtype, self, swig_lhs_classtype, const_cast<SwigClassWrapper*>(other), 0 | swig::IS_COPY_CONSTR); } SWIGEXPORT void swigc_TpetraMatrixMatrixMultiply__SWIG_0(SwigClassWrapper const *farg1, bool const *farg2, SwigClassWrapper const *farg3, bool const *farg4, SwigClassWrapper const *farg5, bool const *farg6, SwigArrayWrapper *farg7, SwigClassWrapper const *farg8) { Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; bool arg2 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg3 = 0 ; bool arg4 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg5 = 0 ; bool arg6 ; std::string *arg7 = 0 ; Teuchos::RCP< Teuchos::ParameterList > *arg8 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg5 ; std::string tempstr7 ; Teuchos::RCP< Teuchos::ParameterList > tempnull8 ; SWIG_check_sp_nonnull(farg1, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)", return ) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = *farg2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); arg4 = *farg4; SWIG_check_sp_nonnull(farg5, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)", return ) smartarg5 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg5->ptr); arg5 = smartarg5->get(); arg6 = *farg6; tempstr7 = std::string(static_cast<const char*>(farg7->data), farg7->size); arg7 = &tempstr7; arg8 = farg8->ptr ? static_cast< Teuchos::RCP< Teuchos::ParameterList > * >(farg8->ptr) : &tempnull8; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)");; try { // Attempt the wrapped function call Tpetra::MatrixMatrix::SWIGTEMPLATEDISAMBIGUATOR Multiply< SC,LO,GO,NO >((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1,arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4,*arg5,arg6,(std::string const &)*arg7,(Teuchos::RCP< Teuchos::ParameterList > const &)*arg8); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &,Teuchos::RCP< Teuchos::ParameterList > const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMatrixMatrixMultiply__SWIG_1(SwigClassWrapper const *farg1, bool const *farg2, SwigClassWrapper const *farg3, bool const *farg4, SwigClassWrapper const *farg5, bool const *farg6, SwigArrayWrapper *farg7) { Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; bool arg2 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg3 = 0 ; bool arg4 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg5 = 0 ; bool arg6 ; std::string *arg7 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg5 ; std::string tempstr7 ; SWIG_check_sp_nonnull(farg1, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)", return ) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = *farg2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); arg4 = *farg4; SWIG_check_sp_nonnull(farg5, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)", return ) smartarg5 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg5->ptr); arg5 = smartarg5->get(); arg6 = *farg6; tempstr7 = std::string(static_cast<const char*>(farg7->data), farg7->size); arg7 = &tempstr7; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)");; try { // Attempt the wrapped function call Tpetra::MatrixMatrix::SWIGTEMPLATEDISAMBIGUATOR Multiply< SC,LO,GO,NO >((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1,arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4,*arg5,arg6,(std::string const &)*arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool,std::string const &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMatrixMatrixMultiply__SWIG_2(SwigClassWrapper const *farg1, bool const *farg2, SwigClassWrapper const *farg3, bool const *farg4, SwigClassWrapper const *farg5, bool const *farg6) { Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; bool arg2 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg3 = 0 ; bool arg4 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg5 = 0 ; bool arg6 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg5 ; SWIG_check_sp_nonnull(farg1, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)", return ) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = *farg2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); arg4 = *farg4; SWIG_check_sp_nonnull(farg5, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)", return ) smartarg5 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg5->ptr); arg5 = smartarg5->get(); arg6 = *farg6; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)");; try { // Attempt the wrapped function call Tpetra::MatrixMatrix::SWIGTEMPLATEDISAMBIGUATOR Multiply< SC,LO,GO,NO >((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1,arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4,*arg5,arg6); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,bool)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMatrixMatrixMultiply__SWIG_3(SwigClassWrapper const *farg1, bool const *farg2, SwigClassWrapper const *farg3, bool const *farg4, SwigClassWrapper const *farg5) { Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; bool arg2 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg3 = 0 ; bool arg4 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg5 = 0 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg3 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg5 ; SWIG_check_sp_nonnull(farg1, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)", return ) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = *farg2; SWIG_check_sp_nonnull(farg3, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)", return ) smartarg3 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg3->ptr); arg3 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg3->get()); arg4 = *farg4; SWIG_check_sp_nonnull(farg5, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)", return ) smartarg5 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg5->ptr); arg5 = smartarg5->get(); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)");; try { // Attempt the wrapped function call Tpetra::MatrixMatrix::SWIGTEMPLATEDISAMBIGUATOR Multiply< SC,LO,GO,NO >((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1,arg2,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg3,arg4,*arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMatrix::Multiply< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMatrixMatrixAdd__SWIG_0(SwigClassWrapper const *farg1, bool const *farg2, double const *farg3, SwigClassWrapper const *farg4, double const *farg5) { Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; bool arg2 ; double arg3 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg4 = 0 ; double arg5 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > > *smartarg4 ; SWIG_check_sp_nonnull(farg1, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,double)", return ) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = *farg2; arg3 = *farg3; SWIG_check_sp_nonnull(farg4, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,double)", return ) smartarg4 = static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg4->ptr); arg4 = smartarg4->get(); arg5 = *farg5; { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,double)");; try { // Attempt the wrapped function call Tpetra::MatrixMatrix::SWIGTEMPLATEDISAMBIGUATOR Add< SC,LO,GO,NO >((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1,arg2,arg3,*arg4,arg5); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,double)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,double)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > &,double)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } SWIGEXPORT void swigc_TpetraMatrixMatrixAdd__SWIG_1(SwigClassWrapper const *farg1, bool const *farg2, double const *farg3, SwigClassWrapper const *farg4, bool const *farg5, double const *farg6, SwigClassWrapper const *farg7) { Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg1 = 0 ; bool arg2 ; double arg3 ; Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *arg4 = 0 ; bool arg5 ; double arg6 ; Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > > arg7 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg1 ; Teuchos::RCP< Tpetra::CrsMatrix< SC,LO,GO,NO,NO::classic > const > *smartarg4 ; SWIG_check_sp_nonnull(farg1, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > >)", return ) smartarg1 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg1->ptr); arg1 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg1->get()); arg2 = *farg2; arg3 = *farg3; SWIG_check_sp_nonnull(farg4, "Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > *", "TpetraCrsMatrix", "Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > >)", return ) smartarg4 = static_cast< Teuchos::RCP<const Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg4->ptr); arg4 = const_cast<Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic>*>(smartarg4->get()); arg5 = *farg5; arg6 = *farg6; if (farg7->ptr) arg7 = *static_cast< Teuchos::RCP< Tpetra::CrsMatrix<SC,LO,GO,NO,NO::classic> >* >(farg7->ptr); { // Make sure no unhandled exceptions exist before performing a new action SWIG_check_unhandled_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > >)");; try { // Attempt the wrapped function call Tpetra::MatrixMatrix::SWIGTEMPLATEDISAMBIGUATOR Add< SC,LO,GO,NO >((Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg1,arg2,arg3,(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &)*arg4,arg5,arg6,arg7); } catch (const std::range_error& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > >)", SWIG_IndexError, e.what(), return ); } catch (const std::exception& e) { // Store a C++ exception SWIG_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > >)", SWIG_RuntimeError, e.what(), return ); } catch (...) { SWIG_exception_impl("Tpetra::MatrixMatrix::Add< SC,LO,GO,NO >(Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > const &,bool,double,Teuchos::RCP< Tpetra::CrsMatrix< double,int,long long,Kokkos::Compat::KokkosSerialWrapperNode > >)", SWIG_UnknownError, "An unknown exception occurred", return ); } } } #ifdef __cplusplus } #endif
65.57391
901
0.715788
sethrj
101a7a297c6a1cf8e3b2907fa469ff6d5a23cf8b
178
cpp
C++
src/Hooks.cpp
colinswrath/BladeAndBlunt-
624aaf42fc8d1ac4eebd7766905caddd1109144d
[ "MIT" ]
1
2022-01-13T00:23:10.000Z
2022-01-13T00:23:10.000Z
src/Hooks.cpp
colinswrath/BladeAndBlunt-
624aaf42fc8d1ac4eebd7766905caddd1109144d
[ "MIT" ]
1
2021-12-03T05:17:10.000Z
2022-02-09T21:33:45.000Z
src/Hooks.cpp
colinswrath/BladeAndBlunt-
624aaf42fc8d1ac4eebd7766905caddd1109144d
[ "MIT" ]
1
2022-01-13T00:23:13.000Z
2022-01-13T00:23:13.000Z
#include "UpdateManager.h" namespace Hooks { void Install() { UpdateManager::Install(); UpdateManager::InstallScalePatch(); logger::info("Update hook installed."); } }
14.833333
41
0.702247
colinswrath
101ca5a3c4e75bf9bf317303735beee47e741c38
6,432
cpp
C++
dev/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.cpp
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
2
2020-12-22T01:02:01.000Z
2020-12-22T01:02:05.000Z
dev/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.cpp
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
null
null
null
dev/Gems/ScriptEvents/Code/Source/ScriptEventsSystemComponent.cpp
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
null
null
null
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #include "precompiled.h" #include "ScriptEventsSystemComponent.h" #include <AzCore/Component/ComponentApplicationBus.h> #include <AzCore/Component/EntityId.h> #include <AzCore/EBus/EBus.h> #include <AzCore/Math/Color.h> #include <AzCore/RTTI/TypeInfo.h> #include <AzCore/RTTI/BehaviorContext.h> #include <AzCore/Serialization/SerializeContext.h> #include <AzCore/Serialization/EditContext.h> #include <AzCore/std/smart_ptr/make_shared.h> #include <AzCore/std/string/string.h> #include <AzCore/std/sort.h> #include <AzCore/IO/Device.h> #include <AzFramework/Asset/GenericAssetHandler.h> #include <ScriptEvents/ScriptEventsAsset.h> #include <ScriptEvents/ScriptEventsAssetRef.h> #include <ScriptEvents/ScriptEventDefinition.h> #include <ScriptEvents/ScriptEventFundamentalTypes.h> namespace ScriptEvents { void SystemComponent::Reflect(AZ::ReflectContext* context) { using namespace ScriptEvents; if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context)) { serialize->Class<SystemComponent, AZ::Component>() ->Version(1) // ScriptEvents avoids a use dependency on the AssetBuilderSDK. Therefore the Crc is used directly to register this component with the Gem builder ->Attribute(AZ::Edit::Attributes::SystemComponentTags, AZStd::vector<AZ::Crc32>({ AZ_CRC("AssetBuilder", 0xc739c7d7) })); ; } ScriptEventData::VersionedProperty::Reflect(context); Parameter::Reflect(context); Method::Reflect(context); ScriptEvent::Reflect(context); ScriptEvents::ScriptEventsAsset::Reflect(context); ScriptEvents::ScriptEventsAssetRef::Reflect(context); } void SystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { provided.push_back(AZ_CRC("ScriptEventsService", 0x6897c23b)); } void SystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { incompatible.push_back(AZ_CRC("ScriptEventsService", 0x6897c23b)); } void SystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) { AZ_UNUSED(required); } void SystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) { AZ_UNUSED(dependent); } void SystemComponent::Init() { } void SystemComponent::Activate() { ScriptEvents::ScriptEventBus::Handler::BusConnect(); if (AZ::Data::AssetManager::IsReady()) { RegisterAssetHandler(); } } void SystemComponent::Deactivate() { ScriptEvents::ScriptEventBus::Handler::BusDisconnect(); UnregisterAssetHandler(); } AZStd::intrusive_ptr<Internal::ScriptEvent> SystemComponent::RegisterScriptEvent(const AZ::Data::AssetId& assetId, AZ::u32 version) { AZ_Assert(assetId.IsValid(), "Unable to register Script Event with invalid asset Id"); ScriptEventKey key(assetId, 0); if (m_scriptEvents.find(key) == m_scriptEvents.end()) { m_scriptEvents[key] = AZStd::intrusive_ptr<ScriptEvents::Internal::ScriptEvent>(aznew ScriptEvents::Internal::ScriptEvent(assetId)); } return m_scriptEvents[key]; } void SystemComponent::RegisterScriptEventFromDefinition(const ScriptEvents::ScriptEvent& definition) { AZ::BehaviorContext* behaviorContext = nullptr; AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationBus::Events::GetBehaviorContext); const AZStd::string& busName = definition.GetName(); const auto& ebusIterator = behaviorContext->m_ebuses.find(busName); if (ebusIterator != behaviorContext->m_ebuses.end()) { AZ_Warning("Script Events", false, "A Script Event by the name of %s already exists, this definition will be ignored. Do not call Register for Script Events referenced by asset.", busName.c_str()); return; } const AZ::Uuid& assetId = AZ::Uuid::CreateName(busName.c_str()); ScriptEventKey key(assetId, 0); if (m_scriptEvents.find(key) == m_scriptEvents.end()) { AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> assetData = AZ::Data::AssetManager::Instance().CreateAsset<ScriptEvents::ScriptEventsAsset>(assetId); // Install the definition that's coming from Lua ScriptEvents::ScriptEventsAsset* scriptAsset = assetData.Get(); scriptAsset->m_definition = definition; m_scriptEvents[key] = AZStd::intrusive_ptr<ScriptEvents::Internal::ScriptEvent>(aznew ScriptEvents::Internal::ScriptEvent(assetId)); m_scriptEvents[key]->CompleteRegistration(assetData); } } void SystemComponent::UnregisterScriptEventFromDefinition(const ScriptEvents::ScriptEvent& definition) { const AZStd::string& busName = definition.GetName(); const AZ::Uuid& assetId = AZ::Uuid::CreateName(busName.c_str()); AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> assetData = AZ::Data::AssetManager::Instance().FindAsset<ScriptEvents::ScriptEventsAsset>(assetId); if (assetData) { assetData.Release(); } } AZStd::intrusive_ptr<ScriptEvents::Internal::ScriptEvent> SystemComponent::GetScriptEvent(const AZ::Data::AssetId& assetId, AZ::u32 version) { ScriptEventKey key(assetId, 0); if (m_scriptEvents.find(key) != m_scriptEvents.end()) { return m_scriptEvents[key]; } AZ_Warning("Script Events", false, "Script event with asset Id %s was not found (version %d)", assetId.ToString<AZStd::string>().c_str(), version); return nullptr; } }
38.059172
209
0.691231
jeikabu
101dfff37a7ac85a5de077fd0cb8e69851045194
4,171
hpp
C++
airesources/C++/hlt/map.hpp
snaar/Halite-II-pre-launch
14bafe38bfa2e3062f3daceb29049098a0744b30
[ "MIT" ]
null
null
null
airesources/C++/hlt/map.hpp
snaar/Halite-II-pre-launch
14bafe38bfa2e3062f3daceb29049098a0744b30
[ "MIT" ]
14
2021-01-28T21:06:14.000Z
2022-02-26T08:01:15.000Z
airesources/C++/hlt/map.hpp
xinnosuke/Halite-II-pre-launch
1091f85d5e02de29e16980302771ea1f0e0376a5
[ "MIT" ]
1
2019-07-01T04:46:47.000Z
2019-07-01T04:46:47.000Z
#ifndef HLT_H #define HLT_H #ifdef _WIN32 #define _USE_MATH_DEFINES #endif #include <list> #include <cmath> #include <vector> #include <random> #include <algorithm> #include <functional> #include <iostream> #include <fstream> #include <sstream> #include <assert.h> #include <array> #include <unordered_map> #include "constants.hpp" #include "log.hpp" #include "entity.hpp" #include "move.hpp" namespace hlt { template<typename T> using entity_map = std::unordered_map<EntityIndex, T>; class Map { public: std::unordered_map<PlayerId, entity_map<Ship>> ships; entity_map<Planet> planets; unsigned short map_width, map_height; Map(); Map(const Map& other_map); Map(unsigned short width, unsigned short height); auto is_valid(EntityId entity_id) -> bool; auto within_bounds(const Location& location) const -> bool; auto get_ship(PlayerId player, EntityIndex entity) -> Ship&; auto get_ship(PlayerId player, EntityIndex entity) const -> const Ship&; auto get_ship(EntityId entity_id) -> Ship&; auto get_planet(EntityId entity_id) -> Planet&; auto get_entity(EntityId entity_id) -> Entity&; auto get_distance(Location l1, Location l2) const -> double; /** * Create a location with an offset applied, checking if the location * is within bounds. If not, the second member of the pair will be * false. * @param location * @param dx * @param dy * @return */ auto location_with_delta(const Location& location, double dx, double dy) -> possibly<Location>; auto test(const Location& location, double radius) -> std::vector<EntityId>; constexpr static auto FORECAST_STEPS = 64; constexpr static auto FORECAST_DELTA = 1.0 / FORECAST_STEPS; /** * Checks if there is a valid straight-line path between the two * locations. Does not account for collisions with ships, but does * account for planets. * @param start * @param target * @param fudge How much distance to leave between planets and the path * @return */ auto pathable(const Location& start, const Location& target, double fudge) const -> bool; /** * Check if a collision might occur if a ship at the given location * were to move to the target position. * * Does not account for the ship's current velocity, so it is only * useful for sub-inertial speeds. Does not account for the movements * of other ships. */ auto forecast_collision(const Location& start, const Location& target) -> bool; /** * Try to avoid forecasted collisions (as predicted by * forecast_collision()) by adjusting the direction of travel. * * All caveats of forecast_collision() apply. Additionally, it does * not try and predict the movements of other ships, and it may not * be able to avert a collision. In such cases, it will still try and * move, though it may move in a particularly suboptimal direction. * @param start * @param angle * @param thrust * @param tries * @return */ auto adjust_for_collision( const Location& start, double angle, unsigned short thrust, int tries=25) -> std::pair<double, unsigned short>; /** * Find the closest point at the minimum given distance (radius) to the * given target point from the given start point. * @param start * @param target * @param radius * @return */ auto closest_point(const Location& start, const Location& target, double radius) -> std::pair<Location, bool> { auto angle = start.angle_to(target) + M_PI; auto dx = radius * std::cos(angle); auto dy = radius * std::sin(angle); return this->location_with_delta(target, dx, dy); } }; } #endif
33.637097
103
0.614721
snaar
101e017628bccea963b9aee80d88beee4a5adf68
18,303
cpp
C++
test/homework_test/tic_tac_toe_test/tic_tac_toe_test.cpp
acc-cosc-1337-spring-2021/acc-cosc-1337-spring-2021-Joshua-18
9c0733afa337f35b2e067d2f7c3c83204700c225
[ "MIT" ]
null
null
null
test/homework_test/tic_tac_toe_test/tic_tac_toe_test.cpp
acc-cosc-1337-spring-2021/acc-cosc-1337-spring-2021-Joshua-18
9c0733afa337f35b2e067d2f7c3c83204700c225
[ "MIT" ]
null
null
null
test/homework_test/tic_tac_toe_test/tic_tac_toe_test.cpp
acc-cosc-1337-spring-2021/acc-cosc-1337-spring-2021-Joshua-18
9c0733afa337f35b2e067d2f7c3c83204700c225
[ "MIT" ]
null
null
null
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" #include "tic_tac_toe.h" #include "tic_tac_toe_manager.h" #include "tic_tac_toe_3.h" #include "tic_tac_toe_4.h" TEST_CASE("Verify Test Configuration", "verification") { REQUIRE(true == true); } TEST_CASE("Test game over if 9 slots are selected") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("X"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "C"); } TEST_CASE("Test first player set to X") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("x"); REQUIRE(game->get_player() == "x"); } TEST_CASE("Test first player set to O") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("o"); REQUIRE(game->get_player() == "o"); } TEST_CASE("Test win by first column", "set positions for first player X to 1,4,7.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("x"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("Test win by second column", "set positions for first player X to 2,5,8.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("x"); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("Test win by third column", "set positions for first player O to 3,6,9.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("o"); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "o"); } TEST_CASE("Test win by first row", "set positions for first player X to 1,2,3.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("x"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("Test win by second row", "set positions for first player X to 4,5,6.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("x"); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("Test win by third row", "set positions for first player O to 7,8,9.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("o"); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "o"); } TEST_CASE("Test win diagonally from top left", "set positions for first player X to 1,5,9.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("x"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("Test win diagonally from bottom left", "set positions for first player O to 7,5,3.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_3>(); game->start_game("o"); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "o"); } TEST_CASE("Test the get_winner class function") { int o = 0; int x = 0; int ties = 0; TicTacToeManager manager; unique_ptr<tic_tac_toe> game1 = make_unique<tic_tac_toe_3>(); //x wins game1->start_game("x"); game1->mark_board(7); REQUIRE(game1->game_over() == false); game1->mark_board(5); REQUIRE(game1->game_over() == false); game1->mark_board(8); REQUIRE(game1->game_over() == false); game1->mark_board(1); REQUIRE(game1->game_over() == false); game1->mark_board(9); REQUIRE(game1->game_over() == true); REQUIRE(game1->get_winner() == "x"); manager.save_game(game1); manager.get_winner_total(o, x, ties); //o wins unique_ptr<tic_tac_toe> game2 = make_unique<tic_tac_toe_3>(); game2->start_game("o"); game2->mark_board(1); REQUIRE(game2->game_over() == false); game2->mark_board(9); REQUIRE(game2->game_over() == false); game2->mark_board(2); REQUIRE(game2->game_over() == false); game2->mark_board(7); REQUIRE(game2->game_over() == false); game2->mark_board(3); REQUIRE(game2->game_over() == true); REQUIRE(game2->get_winner() == "o"); manager.save_game(game2); manager.get_winner_total(o, x, ties); //tie unique_ptr<tic_tac_toe> game3 = make_unique<tic_tac_toe_3>(); game3->mark_board(1); REQUIRE(game3->game_over() == false); game3->mark_board(2); REQUIRE(game3->game_over() == false); game3->mark_board(3); REQUIRE(game3->game_over() == false); game3->mark_board(4); REQUIRE(game3->game_over() == false); game3->mark_board(5); REQUIRE(game3->game_over() == false); game3->mark_board(7); REQUIRE(game3->game_over() == false); game3->mark_board(6); REQUIRE(game3->game_over() == false); game3->mark_board(9); REQUIRE(game3->game_over() == false); game3->mark_board(8); REQUIRE(game3->game_over() == true); REQUIRE(game3->get_winner() == "C"); manager.save_game(game3); manager.get_winner_total(o, x, ties); REQUIRE(x == 1); REQUIRE(o == 1); REQUIRE(ties == 1); } /********************************************************************************************** * * * TEST TIC TAC TOE4! * * * **********************************************************************************************/ TEST_CASE("4 Test game over if 9 slots are selected") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("X"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(10); REQUIRE(game->game_over() == false); game->mark_board(11); REQUIRE(game->game_over() == false); game->mark_board(12); REQUIRE(game->game_over() == false); game->mark_board(14); REQUIRE(game->game_over() == false); game->mark_board(13); REQUIRE(game->game_over() == false); game->mark_board(16); REQUIRE(game->game_over() == false); game->mark_board(15); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "C"); } TEST_CASE("4 Test first player set to X") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); REQUIRE(game->get_player() == "x"); } TEST_CASE("4 Test first player set to O") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("o"); REQUIRE(game->get_player() == "o"); } TEST_CASE("4 Test win by first column", "set positions for first player X to 0 , 4 , 8, 12.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == false); game->mark_board(13); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win by second column", "set positions for first player X to 1, 5, 9, 13.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(10); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == false); game->mark_board(14); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win by third column", "set positions for first player O to 2, 6, 10, 14") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("o"); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(11); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(15); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "o"); } TEST_CASE("4 Test win by fourth column", "set positions for first player X to 3, 7, 11, 15.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(12); REQUIRE(game->game_over() == false); game->mark_board(10); REQUIRE(game->game_over() == false); game->mark_board(16); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win by first row", "set positions for first player X to 0, 1, 2, 3.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win by second row", "set positions for first player O to 4, 5, 6, 7.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("o"); game->mark_board(5); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(8); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "o"); } TEST_CASE("4 Test win by third row", "set positions for first player x to 8, 9, 10, 11.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(9); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(10); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(11); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(12); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win by forth row", "set positions for first player O to 12, 13, 14, 15.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(13); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(14); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(15); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(16); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win diagonally from top left", "set positions for first player X to 0, 5, 10, 15.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("x"); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(6); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(11); REQUIRE(game->game_over() == false); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(16); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "x"); } TEST_CASE("4 Test win diagonally from bottom left", "set positions for first player O to 3, 6, 9, 12.") { unique_ptr<tic_tac_toe> game = make_unique<tic_tac_toe_4>(); game->start_game("o"); game->mark_board(4); REQUIRE(game->game_over() == false); game->mark_board(1); REQUIRE(game->game_over() == false); game->mark_board(7); REQUIRE(game->game_over() == false); game->mark_board(2); REQUIRE(game->game_over() == false); game->mark_board(10); REQUIRE(game->game_over() == false); game->mark_board(3); REQUIRE(game->game_over() == false); game->mark_board(13); REQUIRE(game->game_over() == true); REQUIRE(game->get_winner() == "o"); } TEST_CASE("4 Test the get_winner class function") { int o = 0; int x = 0; int ties = 0; TicTacToeManager manager; unique_ptr<tic_tac_toe> game1 = make_unique<tic_tac_toe_4>(); //x wins game1->start_game("x"); game1->mark_board(1); REQUIRE(game1->game_over() == false); game1->mark_board(9); REQUIRE(game1->game_over() == false); game1->mark_board(6); REQUIRE(game1->game_over() == false); game1->mark_board(2); REQUIRE(game1->game_over() == false); game1->mark_board(11); REQUIRE(game1->game_over() == false); game1->mark_board(3); REQUIRE(game1->game_over() == false); game1->mark_board(16); REQUIRE(game1->game_over() == true); REQUIRE(game1->get_winner() == "x"); manager.save_game(game1); manager.get_winner_total(o, x, ties); //o wins unique_ptr<tic_tac_toe> game2 = make_unique<tic_tac_toe_4>(); game2->start_game("o"); game2->mark_board(4); REQUIRE(game2->game_over() == false); game2->mark_board(1); REQUIRE(game2->game_over() == false); game2->mark_board(7); REQUIRE(game2->game_over() == false); game2->mark_board(2); REQUIRE(game2->game_over() == false); game2->mark_board(10); REQUIRE(game2->game_over() == false); game2->mark_board(3); REQUIRE(game2->game_over() == false); game2->mark_board(13); REQUIRE(game2->game_over() == true); REQUIRE(game2->get_winner() == "o"); manager.save_game(game2); manager.get_winner_total(o, x, ties); //tie unique_ptr<tic_tac_toe> game3 = make_unique<tic_tac_toe_4>(); game3->mark_board(1); REQUIRE(game3->game_over() == false); game3->mark_board(2); REQUIRE(game3->game_over() == false); game3->mark_board(3); REQUIRE(game3->game_over() == false); game3->mark_board(4); REQUIRE(game3->game_over() == false); game3->mark_board(5); REQUIRE(game3->game_over() == false); game3->mark_board(6); REQUIRE(game3->game_over() == false); game3->mark_board(7); REQUIRE(game3->game_over() == false); game3->mark_board(8); REQUIRE(game3->game_over() == false); game3->mark_board(9); REQUIRE(game3->game_over() == false); game3->mark_board(10); REQUIRE(game3->game_over() == false); game3->mark_board(11); REQUIRE(game3->game_over() == false); game3->mark_board(12); REQUIRE(game3->game_over() == false); game3->mark_board(14); REQUIRE(game3->game_over() == false); game3->mark_board(15); REQUIRE(game3->game_over() == false); game3->mark_board(16); REQUIRE(game3->game_over() == false); game3->mark_board(13); REQUIRE(game3->game_over() == true); REQUIRE(game3->get_winner() == "C"); manager.save_game(game3); manager.get_winner_total(o, x, ties); REQUIRE(x == 1); REQUIRE(o == 1); REQUIRE(ties == 1); }
27.399701
103
0.665956
acc-cosc-1337-spring-2021
101ff64d0585f68bb033ae455ed9e2d5f60bae56
901
hh
C++
elements/tcpudp/settcpchecksum.hh
BorisPis/asplos22-nicmem-fastclick
ab4df08ee056ed48a4c534ec5f8536a958f756b5
[ "BSD-3-Clause-Clear" ]
129
2015-10-08T14:38:35.000Z
2022-03-06T14:54:44.000Z
elements/tcpudp/settcpchecksum.hh
BorisPis/asplos22-nicmem-fastclick
ab4df08ee056ed48a4c534ec5f8536a958f756b5
[ "BSD-3-Clause-Clear" ]
241
2016-02-17T16:17:58.000Z
2022-03-15T09:08:33.000Z
elements/tcpudp/settcpchecksum.hh
BorisPis/asplos22-nicmem-fastclick
ab4df08ee056ed48a4c534ec5f8536a958f756b5
[ "BSD-3-Clause-Clear" ]
61
2015-12-17T01:46:58.000Z
2022-02-07T22:25:19.000Z
#ifndef CLICK_SETTCPCHECKSUM_HH #define CLICK_SETTCPCHECKSUM_HH #include <click/batchelement.hh> #include <click/glue.hh> CLICK_DECLS /* * =c * SetTCPChecksum([FIXOFF]) * =s tcp * sets TCP packets' checksums * =d * Input packets should be TCP in IP. * * Calculates the TCP header's checksum and sets the checksum header field. * Uses the IP header fields to generate the pseudo-header. * * =a CheckTCPHeader, SetIPChecksum, CheckIPHeader, SetUDPChecksum */ class SetTCPChecksum : public SimpleElement<SetTCPChecksum> { public: SetTCPChecksum() CLICK_COLD; ~SetTCPChecksum() CLICK_COLD; const char *class_name() const override { return "SetTCPChecksum"; } const char *port_count() const override { return PORTS_1_1; } int configure(Vector<String> &conf, ErrorHandler *errh) CLICK_COLD; Packet *simple_action(Packet *); private: bool _fixoff; }; CLICK_ENDDECLS #endif
23.710526
75
0.744728
BorisPis
102217186aed80fbda1811f8df254351e73c26c5
836
cpp
C++
c++ practice projects/arathimatic.cpp
adityamuley29/c-plus-plus-exercise-projects
034ab4b9f0a853bacb37e2ad7683c27bc2cc0dac
[ "MIT" ]
null
null
null
c++ practice projects/arathimatic.cpp
adityamuley29/c-plus-plus-exercise-projects
034ab4b9f0a853bacb37e2ad7683c27bc2cc0dac
[ "MIT" ]
null
null
null
c++ practice projects/arathimatic.cpp
adityamuley29/c-plus-plus-exercise-projects
034ab4b9f0a853bacb37e2ad7683c27bc2cc0dac
[ "MIT" ]
null
null
null
#include<iostream.h> class arith { private: int a,b,r; char op; public: void getdata(); void operate(); void display(); }; void arith::getdata() { cout<<"Enter Values of a & b"<<endl; cin>>a>>b; } void arith::operate() { do { cout<<"Enter your choice + or - or * or / or Exit:"<<endl; cin>>op; switch(op) { case '+':r=a+b; display(); break; case '-':r=a-b; display(); break; case '*':r=a*b; display(); break; case '/':r=a/b; display(); break; default : cout<<"Wrong Choice"<<endl; break; } }while(op!='x'); } void arith::display() { cout<<"Result ="<<r<<endl; } int main() { arith ar; ar.getdata(); ar.operate(); return 0; }
11.942857
60
0.453349
adityamuley29
10247715cd1c79d42150a0c9948738e4cde51c23
27,938
cc
C++
net/socket/tcp_socket_posix.cc
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
1
2020-09-15T08:43:34.000Z
2020-09-15T08:43:34.000Z
net/socket/tcp_socket_posix.cc
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
null
null
null
net/socket/tcp_socket_posix.cc
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/socket/tcp_socket.h" #include <errno.h> #include <netinet/tcp.h> #include <sys/socket.h> #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" #include "base/posix/eintr_wrapper.h" #include "base/profiler/scoped_tracker.h" #include "base/task_runner_util.h" #include "base/threading/worker_pool.h" #include "base/time/default_tick_clock.h" #include "net/base/address_list.h" #include "net/base/connection_type_histograms.h" #include "net/base/io_buffer.h" #include "net/base/ip_endpoint.h" #include "net/base/net_errors.h" #include "net/base/network_activity_monitor.h" #include "net/base/network_change_notifier.h" #include "net/base/sockaddr_storage.h" #include "net/socket/socket_net_log_params.h" #include "net/socket/socket_posix.h" // If we don't have a definition for TCPI_OPT_SYN_DATA, create one. #ifndef TCPI_OPT_SYN_DATA #define TCPI_OPT_SYN_DATA 32 #endif namespace net { namespace { // True if OS supports TCP FastOpen. bool g_tcp_fastopen_supported = false; // True if TCP FastOpen is user-enabled for all connections. // TODO(jri): Change global variable to param in HttpNetworkSession::Params. bool g_tcp_fastopen_user_enabled = false; // True if TCP FastOpen connect-with-write has failed at least once. bool g_tcp_fastopen_has_failed = false; // SetTCPKeepAlive sets SO_KEEPALIVE. bool SetTCPKeepAlive(int fd, bool enable, int delay) { // Enabling TCP keepalives is the same on all platforms. int on = enable ? 1 : 0; if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on))) { PLOG(ERROR) << "Failed to set SO_KEEPALIVE on fd: " << fd; return false; } // If we disabled TCP keep alive, our work is done here. if (!enable) return true; #if defined(OS_LINUX) || defined(OS_ANDROID) // Setting the keepalive interval varies by platform. // Set seconds until first TCP keep alive. if (setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; return false; } // Set seconds between TCP keep alives. if (setsockopt(fd, SOL_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; return false; } #elif defined(OS_MACOSX) || defined(OS_IOS) if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay))) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } #endif return true; } #if defined(OS_LINUX) || defined(OS_ANDROID) // Checks if the kernel supports TCP FastOpen. bool SystemSupportsTCPFastOpen() { const base::FilePath::CharType kTCPFastOpenProcFilePath[] = "/proc/sys/net/ipv4/tcp_fastopen"; std::string system_supports_tcp_fastopen; if (!base::ReadFileToString(base::FilePath(kTCPFastOpenProcFilePath), &system_supports_tcp_fastopen)) { return false; } // The read from /proc should return '1' if TCP FastOpen is enabled in the OS. if (system_supports_tcp_fastopen.empty() || (system_supports_tcp_fastopen[0] != '1')) { return false; } return true; } void RegisterTCPFastOpenIntentAndSupport(bool user_enabled, bool system_supported) { g_tcp_fastopen_supported = system_supported; g_tcp_fastopen_user_enabled = user_enabled; } #endif #if defined(TCP_INFO) bool GetTcpInfo(SocketDescriptor fd, tcp_info* info) { socklen_t info_len = sizeof(tcp_info); return getsockopt(fd, IPPROTO_TCP, TCP_INFO, info, &info_len) == 0 && info_len == sizeof(tcp_info); } #endif // defined(TCP_INFO) } // namespace //----------------------------------------------------------------------------- bool IsTCPFastOpenSupported() { return g_tcp_fastopen_supported; } bool IsTCPFastOpenUserEnabled() { return g_tcp_fastopen_user_enabled; } // This is asynchronous because it needs to do file IO, and it isn't allowed to // do that on the IO thread. void CheckSupportAndMaybeEnableTCPFastOpen(bool user_enabled) { #if defined(OS_LINUX) || defined(OS_ANDROID) base::PostTaskAndReplyWithResult( base::WorkerPool::GetTaskRunner(/*task_is_slow=*/false).get(), FROM_HERE, base::Bind(SystemSupportsTCPFastOpen), base::Bind(RegisterTCPFastOpenIntentAndSupport, user_enabled)); #endif } TCPSocketPosix::TCPSocketPosix( std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher, NetLog* net_log, const NetLog::Source& source) : socket_performance_watcher_(std::move(socket_performance_watcher)), tick_clock_(new base::DefaultTickClock()), rtt_notifications_minimum_interval_(base::TimeDelta::FromSeconds(1)), use_tcp_fastopen_(false), tcp_fastopen_write_attempted_(false), tcp_fastopen_connected_(false), tcp_fastopen_status_(TCP_FASTOPEN_STATUS_UNKNOWN), logging_multiple_connect_attempts_(false), net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_SOCKET)) { net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE, source.ToEventParametersCallback()); } TCPSocketPosix::~TCPSocketPosix() { net_log_.EndEvent(NetLog::TYPE_SOCKET_ALIVE); Close(); } int TCPSocketPosix::Open(AddressFamily family) { DCHECK(!socket_); socket_.reset(new SocketPosix); int rv = socket_->Open(ConvertAddressFamily(family)); if (rv != OK) socket_.reset(); return rv; } int TCPSocketPosix::AdoptConnectedSocket(int socket_fd, const IPEndPoint& peer_address) { DCHECK(!socket_); SockaddrStorage storage; if (!peer_address.ToSockAddr(storage.addr, &storage.addr_len) && // For backward compatibility, allows the empty address. !(peer_address == IPEndPoint())) { return ERR_ADDRESS_INVALID; } socket_.reset(new SocketPosix); int rv = socket_->AdoptConnectedSocket(socket_fd, storage); if (rv != OK) socket_.reset(); return rv; } int TCPSocketPosix::Bind(const IPEndPoint& address) { DCHECK(socket_); SockaddrStorage storage; if (!address.ToSockAddr(storage.addr, &storage.addr_len)) return ERR_ADDRESS_INVALID; return socket_->Bind(storage); } int TCPSocketPosix::Listen(int backlog) { DCHECK(socket_); return socket_->Listen(backlog); } int TCPSocketPosix::Accept(std::unique_ptr<TCPSocketPosix>* tcp_socket, IPEndPoint* address, const CompletionCallback& callback) { DCHECK(tcp_socket); DCHECK(!callback.is_null()); DCHECK(socket_); DCHECK(!accept_socket_); net_log_.BeginEvent(NetLog::TYPE_TCP_ACCEPT); int rv = socket_->Accept( &accept_socket_, base::Bind(&TCPSocketPosix::AcceptCompleted, base::Unretained(this), tcp_socket, address, callback)); if (rv != ERR_IO_PENDING) rv = HandleAcceptCompleted(tcp_socket, address, rv); return rv; } int TCPSocketPosix::Connect(const IPEndPoint& address, const CompletionCallback& callback) { DCHECK(socket_); if (!logging_multiple_connect_attempts_) LogConnectBegin(AddressList(address)); net_log_.BeginEvent(NetLog::TYPE_TCP_CONNECT_ATTEMPT, CreateNetLogIPEndPointCallback(&address)); SockaddrStorage storage; if (!address.ToSockAddr(storage.addr, &storage.addr_len)) return ERR_ADDRESS_INVALID; if (use_tcp_fastopen_) { // With TCP FastOpen, we pretend that the socket is connected. DCHECK(!tcp_fastopen_write_attempted_); socket_->SetPeerAddress(storage); return OK; } int rv = socket_->Connect(storage, base::Bind(&TCPSocketPosix::ConnectCompleted, base::Unretained(this), callback)); if (rv != ERR_IO_PENDING) rv = HandleConnectCompleted(rv); return rv; } bool TCPSocketPosix::IsConnected() const { if (!socket_) return false; if (use_tcp_fastopen_ && !tcp_fastopen_write_attempted_ && socket_->HasPeerAddress()) { // With TCP FastOpen, we pretend that the socket is connected. // This allows GetPeerAddress() to return peer_address_. return true; } return socket_->IsConnected(); } bool TCPSocketPosix::IsConnectedAndIdle() const { // TODO(wtc): should we also handle the TCP FastOpen case here, // as we do in IsConnected()? return socket_ && socket_->IsConnectedAndIdle(); } int TCPSocketPosix::Read(IOBuffer* buf, int buf_len, const CompletionCallback& callback) { DCHECK(socket_); DCHECK(!callback.is_null()); int rv = socket_->Read( buf, buf_len, base::Bind(&TCPSocketPosix::ReadCompleted, // Grab a reference to |buf| so that ReadCompleted() can still // use it when Read() completes, as otherwise, this transfers // ownership of buf to socket. base::Unretained(this), make_scoped_refptr(buf), callback)); if (rv != ERR_IO_PENDING) rv = HandleReadCompleted(buf, rv); return rv; } int TCPSocketPosix::Write(IOBuffer* buf, int buf_len, const CompletionCallback& callback) { DCHECK(socket_); DCHECK(!callback.is_null()); CompletionCallback write_callback = base::Bind(&TCPSocketPosix::WriteCompleted, // Grab a reference to |buf| so that WriteCompleted() can still // use it when Write() completes, as otherwise, this transfers // ownership of buf to socket. base::Unretained(this), make_scoped_refptr(buf), callback); int rv; if (use_tcp_fastopen_ && !tcp_fastopen_write_attempted_) { rv = TcpFastOpenWrite(buf, buf_len, write_callback); } else { rv = socket_->Write(buf, buf_len, write_callback); } if (rv != ERR_IO_PENDING) rv = HandleWriteCompleted(buf, rv); return rv; } int TCPSocketPosix::GetLocalAddress(IPEndPoint* address) const { DCHECK(address); if (!socket_) return ERR_SOCKET_NOT_CONNECTED; SockaddrStorage storage; int rv = socket_->GetLocalAddress(&storage); if (rv != OK) return rv; if (!address->FromSockAddr(storage.addr, storage.addr_len)) return ERR_ADDRESS_INVALID; return OK; } int TCPSocketPosix::GetPeerAddress(IPEndPoint* address) const { DCHECK(address); if (!IsConnected()) return ERR_SOCKET_NOT_CONNECTED; SockaddrStorage storage; int rv = socket_->GetPeerAddress(&storage); if (rv != OK) return rv; if (!address->FromSockAddr(storage.addr, storage.addr_len)) return ERR_ADDRESS_INVALID; return OK; } int TCPSocketPosix::SetDefaultOptionsForServer() { DCHECK(socket_); return SetAddressReuse(true); } void TCPSocketPosix::SetDefaultOptionsForClient() { DCHECK(socket_); // This mirrors the behaviour on Windows. See the comment in // tcp_socket_win.cc after searching for "NODELAY". // If SetTCPNoDelay fails, we don't care. SetTCPNoDelay(socket_->socket_fd(), true); // TCP keep alive wakes up the radio, which is expensive on mobile. Do not // enable it there. It's useful to prevent TCP middleboxes from timing out // connection mappings. Packets for timed out connection mappings at // middleboxes will either lead to: // a) Middleboxes sending TCP RSTs. It's up to higher layers to check for this // and retry. The HTTP network transaction code does this. // b) Middleboxes just drop the unrecognized TCP packet. This leads to the TCP // stack retransmitting packets per TCP stack retransmission timeouts, which // are very high (on the order of seconds). Given the number of // retransmissions required before killing the connection, this can lead to // tens of seconds or even minutes of delay, depending on OS. #if !defined(OS_ANDROID) && !defined(OS_IOS) const int kTCPKeepAliveSeconds = 45; SetTCPKeepAlive(socket_->socket_fd(), true, kTCPKeepAliveSeconds); #endif } int TCPSocketPosix::SetAddressReuse(bool allow) { DCHECK(socket_); // SO_REUSEADDR is useful for server sockets to bind to a recently unbound // port. When a socket is closed, the end point changes its state to TIME_WAIT // and wait for 2 MSL (maximum segment lifetime) to ensure the remote peer // acknowledges its closure. For server sockets, it is usually safe to // bind to a TIME_WAIT end point immediately, which is a widely adopted // behavior. // // Note that on *nix, SO_REUSEADDR does not enable the TCP socket to bind to // an end point that is already bound by another socket. To do that one must // set SO_REUSEPORT instead. This option is not provided on Linux prior // to 3.9. // // SO_REUSEPORT is provided in MacOS X and iOS. int boolean_value = allow ? 1 : 0; int rv = setsockopt(socket_->socket_fd(), SOL_SOCKET, SO_REUSEADDR, &boolean_value, sizeof(boolean_value)); if (rv < 0) return MapSystemError(errno); return OK; } int TCPSocketPosix::SetReceiveBufferSize(int32_t size) { DCHECK(socket_); int rv = setsockopt(socket_->socket_fd(), SOL_SOCKET, SO_RCVBUF, reinterpret_cast<const char*>(&size), sizeof(size)); return (rv == 0) ? OK : MapSystemError(errno); } int TCPSocketPosix::SetSendBufferSize(int32_t size) { DCHECK(socket_); int rv = setsockopt(socket_->socket_fd(), SOL_SOCKET, SO_SNDBUF, reinterpret_cast<const char*>(&size), sizeof(size)); return (rv == 0) ? OK : MapSystemError(errno); } bool TCPSocketPosix::SetKeepAlive(bool enable, int delay) { DCHECK(socket_); return SetTCPKeepAlive(socket_->socket_fd(), enable, delay); } bool TCPSocketPosix::SetNoDelay(bool no_delay) { DCHECK(socket_); return SetTCPNoDelay(socket_->socket_fd(), no_delay); } void TCPSocketPosix::Close() { socket_.reset(); // Record and reset TCP FastOpen state. if (tcp_fastopen_write_attempted_ || tcp_fastopen_status_ == TCP_FASTOPEN_PREVIOUSLY_FAILED) { UMA_HISTOGRAM_ENUMERATION("Net.TcpFastOpenSocketConnection", tcp_fastopen_status_, TCP_FASTOPEN_MAX_VALUE); } use_tcp_fastopen_ = false; tcp_fastopen_connected_ = false; tcp_fastopen_write_attempted_ = false; tcp_fastopen_status_ = TCP_FASTOPEN_STATUS_UNKNOWN; } void TCPSocketPosix::EnableTCPFastOpenIfSupported() { if (!IsTCPFastOpenSupported()) return; // Do not enable TCP FastOpen if it had previously failed. // This check conservatively avoids middleboxes that may blackhole // TCP FastOpen SYN+Data packets; on such a failure, subsequent sockets // should not use TCP FastOpen. if (!g_tcp_fastopen_has_failed) use_tcp_fastopen_ = true; else tcp_fastopen_status_ = TCP_FASTOPEN_PREVIOUSLY_FAILED; } bool TCPSocketPosix::IsValid() const { return socket_ != NULL && socket_->socket_fd() != kInvalidSocket; } void TCPSocketPosix::DetachFromThread() { socket_->DetachFromThread(); } void TCPSocketPosix::StartLoggingMultipleConnectAttempts( const AddressList& addresses) { if (!logging_multiple_connect_attempts_) { logging_multiple_connect_attempts_ = true; LogConnectBegin(addresses); } else { NOTREACHED(); } } void TCPSocketPosix::EndLoggingMultipleConnectAttempts(int net_error) { if (logging_multiple_connect_attempts_) { LogConnectEnd(net_error); logging_multiple_connect_attempts_ = false; } else { NOTREACHED(); } } void TCPSocketPosix::SetTickClockForTesting( std::unique_ptr<base::TickClock> tick_clock) { tick_clock_ = std::move(tick_clock); } void TCPSocketPosix::AcceptCompleted( std::unique_ptr<TCPSocketPosix>* tcp_socket, IPEndPoint* address, const CompletionCallback& callback, int rv) { DCHECK_NE(ERR_IO_PENDING, rv); callback.Run(HandleAcceptCompleted(tcp_socket, address, rv)); } int TCPSocketPosix::HandleAcceptCompleted( std::unique_ptr<TCPSocketPosix>* tcp_socket, IPEndPoint* address, int rv) { if (rv == OK) rv = BuildTcpSocketPosix(tcp_socket, address); if (rv == OK) { net_log_.EndEvent(NetLog::TYPE_TCP_ACCEPT, CreateNetLogIPEndPointCallback(address)); } else { net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_ACCEPT, rv); } return rv; } int TCPSocketPosix::BuildTcpSocketPosix( std::unique_ptr<TCPSocketPosix>* tcp_socket, IPEndPoint* address) { DCHECK(accept_socket_); SockaddrStorage storage; if (accept_socket_->GetPeerAddress(&storage) != OK || !address->FromSockAddr(storage.addr, storage.addr_len)) { accept_socket_.reset(); return ERR_ADDRESS_INVALID; } tcp_socket->reset( new TCPSocketPosix(nullptr, net_log_.net_log(), net_log_.source())); (*tcp_socket)->socket_.reset(accept_socket_.release()); return OK; } void TCPSocketPosix::ConnectCompleted(const CompletionCallback& callback, int rv) { DCHECK_NE(ERR_IO_PENDING, rv); callback.Run(HandleConnectCompleted(rv)); } int TCPSocketPosix::HandleConnectCompleted(int rv) { // Log the end of this attempt (and any OS error it threw). if (rv != OK) { net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT_ATTEMPT, NetLog::IntCallback("os_error", errno)); } else { net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT_ATTEMPT); NotifySocketPerformanceWatcher(); } // Give a more specific error when the user is offline. if (rv == ERR_ADDRESS_UNREACHABLE && NetworkChangeNotifier::IsOffline()) rv = ERR_INTERNET_DISCONNECTED; if (!logging_multiple_connect_attempts_) LogConnectEnd(rv); return rv; } void TCPSocketPosix::LogConnectBegin(const AddressList& addresses) const { net_log_.BeginEvent(NetLog::TYPE_TCP_CONNECT, addresses.CreateNetLogCallback()); } void TCPSocketPosix::LogConnectEnd(int net_error) const { if (net_error != OK) { net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_CONNECT, net_error); return; } UpdateConnectionTypeHistograms(CONNECTION_ANY); SockaddrStorage storage; int rv = socket_->GetLocalAddress(&storage); if (rv != OK) { PLOG(ERROR) << "GetLocalAddress() [rv: " << rv << "] error: "; NOTREACHED(); net_log_.EndEventWithNetErrorCode(NetLog::TYPE_TCP_CONNECT, rv); return; } net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, CreateNetLogSourceAddressCallback(storage.addr, storage.addr_len)); } void TCPSocketPosix::ReadCompleted(const scoped_refptr<IOBuffer>& buf, const CompletionCallback& callback, int rv) { DCHECK_NE(ERR_IO_PENDING, rv); callback.Run(HandleReadCompleted(buf.get(), rv)); } int TCPSocketPosix::HandleReadCompleted(IOBuffer* buf, int rv) { if (tcp_fastopen_write_attempted_ && !tcp_fastopen_connected_) { // A TCP FastOpen connect-with-write was attempted. This read was a // subsequent read, which either succeeded or failed. If the read // succeeded, the socket is considered connected via TCP FastOpen. // If the read failed, TCP FastOpen is (conservatively) turned off for all // subsequent connections. TCP FastOpen status is recorded in both cases. // TODO (jri): This currently results in conservative behavior, where TCP // FastOpen is turned off on _any_ error. Implement optimizations, // such as turning off TCP FastOpen on more specific errors, and // re-attempting TCP FastOpen after a certain amount of time has passed. if (rv >= 0) tcp_fastopen_connected_ = true; else g_tcp_fastopen_has_failed = true; UpdateTCPFastOpenStatusAfterRead(); } if (rv < 0) { net_log_.AddEvent(NetLog::TYPE_SOCKET_READ_ERROR, CreateNetLogSocketErrorCallback(rv, errno)); return rv; } // Notify the watcher only if at least 1 byte was read. if (rv > 0) NotifySocketPerformanceWatcher(); net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED, rv, buf->data()); NetworkActivityMonitor::GetInstance()->IncrementBytesReceived(rv); return rv; } void TCPSocketPosix::WriteCompleted(const scoped_refptr<IOBuffer>& buf, const CompletionCallback& callback, int rv) { DCHECK_NE(ERR_IO_PENDING, rv); callback.Run(HandleWriteCompleted(buf.get(), rv)); } int TCPSocketPosix::HandleWriteCompleted(IOBuffer* buf, int rv) { if (rv < 0) { if (tcp_fastopen_write_attempted_ && !tcp_fastopen_connected_) { // TCP FastOpen connect-with-write was attempted, and the write failed // for unknown reasons. Record status and (conservatively) turn off // TCP FastOpen for all subsequent connections. // TODO (jri): This currently results in conservative behavior, where TCP // FastOpen is turned off on _any_ error. Implement optimizations, // such as turning off TCP FastOpen on more specific errors, and // re-attempting TCP FastOpen after a certain amount of time has passed. tcp_fastopen_status_ = TCP_FASTOPEN_ERROR; g_tcp_fastopen_has_failed = true; } net_log_.AddEvent(NetLog::TYPE_SOCKET_WRITE_ERROR, CreateNetLogSocketErrorCallback(rv, errno)); return rv; } // Notify the watcher only if at least 1 byte was written. if (rv > 0) NotifySocketPerformanceWatcher(); net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, rv, buf->data()); NetworkActivityMonitor::GetInstance()->IncrementBytesSent(rv); return rv; } int TCPSocketPosix::TcpFastOpenWrite(IOBuffer* buf, int buf_len, const CompletionCallback& callback) { SockaddrStorage storage; int rv = socket_->GetPeerAddress(&storage); if (rv != OK) return rv; int flags = 0x20000000; // Magic flag to enable TCP_FASTOPEN. #if defined(OS_LINUX) || defined(OS_ANDROID) // sendto() will fail with EPIPE when the system doesn't implement TCP // FastOpen, and with EOPNOTSUPP when the system implements TCP FastOpen // but it is disabled. Theoretically these shouldn't happen // since the caller should check for system support on startup, but // users may dynamically disable TCP FastOpen via sysctl. flags |= MSG_NOSIGNAL; #endif // defined(OS_LINUX) || defined(OS_ANDROID) rv = HANDLE_EINTR(sendto(socket_->socket_fd(), buf->data(), buf_len, flags, storage.addr, storage.addr_len)); tcp_fastopen_write_attempted_ = true; if (rv >= 0) { tcp_fastopen_status_ = TCP_FASTOPEN_FAST_CONNECT_RETURN; return rv; } DCHECK_NE(EPIPE, errno); // If errno == EINPROGRESS, that means the kernel didn't have a cookie // and would block. The kernel is internally doing a connect() though. // Remap EINPROGRESS to EAGAIN so we treat this the same as our other // asynchronous cases. Note that the user buffer has not been copied to // kernel space. if (errno == EINPROGRESS) { rv = ERR_IO_PENDING; } else { rv = MapSystemError(errno); } if (rv != ERR_IO_PENDING) { // TCP FastOpen connect-with-write was attempted, and the write failed // since TCP FastOpen was not implemented or disabled in the OS. // Record status and turn off TCP FastOpen for all subsequent connections. // TODO (jri): This is almost certainly too conservative, since it blanket // turns off TCP FastOpen on any write error. Two things need to be done // here: (i) record a histogram of write errors; in particular, record // occurrences of EOPNOTSUPP and EPIPE, and (ii) afterwards, consider // turning off TCP FastOpen on more specific errors. tcp_fastopen_status_ = TCP_FASTOPEN_ERROR; g_tcp_fastopen_has_failed = true; return rv; } tcp_fastopen_status_ = TCP_FASTOPEN_SLOW_CONNECT_RETURN; return socket_->WaitForWrite(buf, buf_len, callback); } void TCPSocketPosix::NotifySocketPerformanceWatcher() { #if defined(TCP_INFO) // TODO(tbansal): Remove ScopedTracker once crbug.com/590254 is fixed. tracked_objects::ScopedTracker tracking_profile( FROM_HERE_WITH_EXPLICIT_FUNCTION( "590254 TCPSocketPosix::NotifySocketPerformanceWatcher")); const base::TimeTicks now_ticks = tick_clock_->NowTicks(); // Do not notify |socket_performance_watcher_| if the last notification was // recent than |rtt_notifications_minimum_interval_| ago. This helps in // reducing the overall overhead of the tcp_info syscalls. if (now_ticks - last_rtt_notification_ < rtt_notifications_minimum_interval_) return; // Check if |socket_performance_watcher_| is interested in receiving a RTT // update notification. if (!socket_performance_watcher_ || !socket_performance_watcher_->ShouldNotifyUpdatedRTT()) { return; } tcp_info info; if (!GetTcpInfo(socket_->socket_fd(), &info)) return; // Only notify the |socket_performance_watcher_| if the RTT in |tcp_info| // struct was populated. A value of 0 may be valid in certain cases // (on very fast networks), but it is discarded. This means that // some of the RTT values may be missed, but the values that are kept are // guaranteed to be correct. if (info.tcpi_rtt == 0 && info.tcpi_rttvar == 0) return; socket_performance_watcher_->OnUpdatedRTTAvailable( base::TimeDelta::FromMicroseconds(info.tcpi_rtt)); last_rtt_notification_ = now_ticks; #endif // defined(TCP_INFO) } void TCPSocketPosix::UpdateTCPFastOpenStatusAfterRead() { DCHECK(tcp_fastopen_status_ == TCP_FASTOPEN_FAST_CONNECT_RETURN || tcp_fastopen_status_ == TCP_FASTOPEN_SLOW_CONNECT_RETURN); if (tcp_fastopen_write_attempted_ && !tcp_fastopen_connected_) { // TCP FastOpen connect-with-write was attempted, and failed. tcp_fastopen_status_ = (tcp_fastopen_status_ == TCP_FASTOPEN_FAST_CONNECT_RETURN ? TCP_FASTOPEN_FAST_CONNECT_READ_FAILED : TCP_FASTOPEN_SLOW_CONNECT_READ_FAILED); return; } bool getsockopt_success = false; bool server_acked_data = false; #if defined(TCP_INFO) // Probe to see the if the socket used TCP FastOpen. tcp_info info; getsockopt_success = GetTcpInfo(socket_->socket_fd(), &info); server_acked_data = getsockopt_success && (info.tcpi_options & TCPI_OPT_SYN_DATA); #endif // defined(TCP_INFO) if (getsockopt_success) { if (tcp_fastopen_status_ == TCP_FASTOPEN_FAST_CONNECT_RETURN) { tcp_fastopen_status_ = (server_acked_data ? TCP_FASTOPEN_SYN_DATA_ACK : TCP_FASTOPEN_SYN_DATA_NACK); } else { tcp_fastopen_status_ = (server_acked_data ? TCP_FASTOPEN_NO_SYN_DATA_ACK : TCP_FASTOPEN_NO_SYN_DATA_NACK); } } else { tcp_fastopen_status_ = (tcp_fastopen_status_ == TCP_FASTOPEN_FAST_CONNECT_RETURN ? TCP_FASTOPEN_SYN_DATA_GETSOCKOPT_FAILED : TCP_FASTOPEN_NO_SYN_DATA_GETSOCKOPT_FAILED); } } bool TCPSocketPosix::GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const { DCHECK(out_rtt); if (!socket_) return false; #if defined(TCP_INFO) tcp_info info; if (GetTcpInfo(socket_->socket_fd(), &info)) { // tcpi_rtt is zero when the kernel doesn't have an RTT estimate, // and possibly in other cases such as connections to localhost. if (info.tcpi_rtt > 0) { *out_rtt = base::TimeDelta::FromMicroseconds(info.tcpi_rtt); return true; } } #endif // defined(TCP_INFO) return false; } } // namespace net
33.864242
80
0.697724
maidiHaitai
10255145601a2b44a40a2adeeea522971a0f5e8d
2,634
cpp
C++
src/Solution.cpp
rugleb/finite-element-method
3bd97c9ede76a7cd27e633a2d1b74d1c3c44615e
[ "MIT" ]
1
2019-12-10T00:11:06.000Z
2019-12-10T00:11:06.000Z
src/Solution.cpp
rugleb/finite-element-method
3bd97c9ede76a7cd27e633a2d1b74d1c3c44615e
[ "MIT" ]
2
2018-12-14T18:23:01.000Z
2019-05-02T17:20:45.000Z
src/Solution.cpp
rugleb/finite-element-method
3bd97c9ede76a7cd27e633a2d1b74d1c3c44615e
[ "MIT" ]
null
null
null
#include "Solution.h" #include <cmath> #include <fstream> Solution::Solution(const std::string& n, Element* e, std::size_t elements) { name = n; element = e; elementsCount = elements; auto size = elementsCount * (e->getDimension() - 1) + 1; solution = Vector(size, 0.); load_vector = Vector(size, 0.); stiffness_matrix = Matrix(size, Vector(size, 0.)); } double Solution::getAnalyticalSolution(double x) { return -1.11 * pow(10., -9.) * exp(5. * x / 4.) + x - 6.; } void Solution::calculate() { assembling(); setConditions(); solve(); } void Solution::assembling() { Vector local_load_vector = element->getLoadVector(); Matrix local_stiffness_matrix = element->getStiffnessMatrix(); std::size_t local_dimension = element->getDimension(); for (std::size_t i = 0, j = 0; i < elementsCount; i++, j += local_dimension - 1) { for (std::size_t ii = 0; ii < local_dimension; ii++) { for (std::size_t jj = 0; jj < local_dimension; jj++) { // fill global stiffness matrix stiffness_matrix[j + ii][j + jj] += local_stiffness_matrix[ii][jj]; } // fill global load vector load_vector[j + ii] += local_load_vector[ii]; } } } void Solution::setConditions() { // set border condition on the right end: u(19) = -10 for (std::size_t i = 0; i < load_vector.size(); i++) { load_vector[i] -= -10 * stiffness_matrix[i].back(); stiffness_matrix[i].back() = 0.; } stiffness_matrix.back().back() = 4.; // Set border condition on the left end: u(1) = -5 for (std::size_t i = 0; i < load_vector.size(); i++) { load_vector[i] -= -5 * stiffness_matrix[i][0]; stiffness_matrix[i][0] = 0.; } stiffness_matrix[0][0] = -4.; } void Solution::solve() { Vector system = gauss(stiffness_matrix, load_vector); for (std::size_t i = 0, j = 0; i < system.size(); i += element->getDimension() - 1, j++) { solution[j] = system[i]; } } void Solution::report(double x) { double max_error = 0.; std::ofstream file(name + ".txt"); for (std::size_t i = 0; i < elementsCount; i++) { auto analytic = getAnalyticalSolution(x); auto error = fabs((solution[i] - analytic) / analytic); max_error = fmax(error, max_error); file << x << "\t" << analytic << "\t" << solution[i] << std::endl; x += element->getLength(); } file.close(); std::cout << name << " solution:" << std::endl; std::cout << "---- Max error: " << max_error << "%" << std::endl; }
25.326923
94
0.569856
rugleb
1025a518d141c22180ff9b29c7090ba5ae769117
10,479
cpp
C++
arduino/libraries/HMC5883L/HMC5883LCalibratable.cpp
nowireless/ros_nav6
49c0f485afeb656df20008144fc618d29b4937bb
[ "MIT" ]
null
null
null
arduino/libraries/HMC5883L/HMC5883LCalibratable.cpp
nowireless/ros_nav6
49c0f485afeb656df20008144fc618d29b4937bb
[ "MIT" ]
null
null
null
arduino/libraries/HMC5883L/HMC5883LCalibratable.cpp
nowireless/ros_nav6
49c0f485afeb656df20008144fc618d29b4937bb
[ "MIT" ]
null
null
null
/* ============================================================================= Nav6 source code is placed under the MIT license Copyright (c) 2013 Kauai Labs Portions of this work are based upon the FreeIMU Library by Fabio Varesano. (www.freeimu.com) which is open-source licensed under the GPL v3 License. This work is also based upon the Arduino software library which is licensed under a Creative Commons license. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ============================================================================= */ #include "HMC5883LCalibratable.h" #define DEBUG_PRINT(s) Serial.println(s) const int counts_per_milligauss[8]={ 1370, 1090, 820, 660, 440, 390, 330, 230 }; /** Default constructor */ HMC5883LCalibratable::HMC5883LCalibratable() : HMC5883L() { x_scale=1.0F; y_scale=1.0F; z_scale=1.0F; } // gain is a value from 0-7, corresponding to counts_per_milligaus void HMC5883LCalibratable::calibrate(unsigned char gain) { x_scale=1; // get actual values y_scale=1; z_scale=1; I2Cdev::writeByte(devAddr,HMC5883L_RA_CONFIG_A, 0x010 + HMC5883L_BIAS_POSITIVE); // Reg A DOR=0x010 + MS1,MS0 set to pos bias setGain(gain); float x, y, z, mx=0, my=0, mz=0, t=10; for (int i=0; i<(int)t; i++) { setMode(1); getValues(&x,&y,&z); if (x>mx) mx=x; if (y>my) my=y; if (z>mz) mz=z; } float max=0; if (mx>max) max=mx; if (my>max) max=my; if (mz>max) max=mz; x_max=mx; y_max=my; z_max=mz; x_scale=max/mx; // calc scales y_scale=max/my; z_scale=max/mz; I2Cdev::writeByte(devAddr,HMC5883L_RA_CONFIG_A, 0x010); // set RegA/DOR back to default } // calibrate(). /*! \brief Calibrate using the self test operation. Average the values using bias mode to obtain the scale factors. \param gain [in] Gain setting for the sensor. See data sheet. \param n_samples [in] Number of samples to average together while applying the positive and negative bias. \return Returns false if any of the following occurs: # Invalid input parameters. (gain>7 or n_samples=0). # Id registers are wrong for the compiled device. Unfortunately, we can't distinguish between HMC5843 and HMC5883L. # Calibration saturates during the positive or negative bias on any of the readings. # Readings are outside of the expected range for bias current. */ bool HMC5883LCalibratable::calibrate(unsigned char gain,unsigned int n_samples) { int xyz[3]; // 16 bit integer values for each axis. long int xyz_total[3]={0,0,0}; // 32 bit totals so they won't overflow. bool bret=true; // Function return value. Will return false if the wrong identifier is returned, saturation is detected or response is out of range to self test bias. char id[3]; // Three identification registers should return 'H43'. long int low_limit, high_limit; /* Make sure we are talking to the correct device. Hard to believe Honeywell didn't change the identifier. */ if ((8>gain) && (0<n_samples)) // Notice this allows gain setting of 7 which the data sheet warns against. { id[0] = getIDA(); id[1] = getIDB(); id[2] = getIDC(); if (('H' == id[0]) && ('4' == id[1]) && ('3' == id[2])) { /* Use the positive bias current to impose a known field on each axis. This field depends on the device and the axis. */ I2Cdev::writeByte(devAddr,HMC5883L_RA_CONFIG_A, 0x010 + HMC5883L_BIAS_POSITIVE); // Reg A DOR=0x010 + MS1,MS0 set to pos bias /* Note that the very first measurement after a gain change maintains the same gain as the previous setting. The new gain setting is effective from the second measurement and on. */ setGain(gain); setMode(HMC5883L_MODE_SINGLE); // Change to single measurement mode. getHeading(&xyz[0],&xyz[1],&xyz[2]); // Get the raw values and ignore since this reading may use previous gain. for (unsigned int i=0; i<n_samples; i++) { setMode(1); getHeading(&xyz[0],&xyz[1],&xyz[2]); // Get the raw values in case the scales have already been changed. /* Since the measurements are noisy, they should be averaged rather than taking the max. */ xyz_total[0]+=xyz[0]; xyz_total[1]+=xyz[1]; xyz_total[2]+=xyz[2]; /* Detect saturation. */ if (-(1<<12) >= min(xyz[0],min(xyz[1],xyz[2]))) { DEBUG_PRINT("HMC58x3 Self test saturated. Increase range."); bret=false; break; // Breaks out of the for loop. No sense in continuing if we saturated. } } /* Apply the negative bias. (Same gain) */ I2Cdev::writeByte(devAddr,HMC5883L_RA_CONFIG_A, 0x010 + HMC5883L_BIAS_NEGATIVE); // Reg A DOR=0x010 + MS1,MS0 set to negative bias. for (unsigned int i=0; i<n_samples; i++) { setMode(1); getHeading(&xyz[0],&xyz[1],&xyz[2]); // Get the raw values in case the scales have already been changed. /* Since the measurements are noisy, they should be averaged. */ xyz_total[0]-=xyz[0]; xyz_total[1]-=xyz[1]; xyz_total[2]-=xyz[2]; /* Detect saturation. */ if (-(1<<12) >= min(xyz[0],min(xyz[1],xyz[2]))) { DEBUG_PRINT("HMC58x3 Self test saturated. Increase range."); bret=false; break; // Breaks out of the for loop. No sense in continuing if we saturated. } } /* Compare the values against the expected self test bias gauss. Notice, the same limits are applied to all axis. */ low_limit =SELF_TEST_LOW_LIMIT *counts_per_milligauss[gain]*2*n_samples; high_limit=SELF_TEST_HIGH_LIMIT*counts_per_milligauss[gain]*2*n_samples; if ((true==bret) && (low_limit <= xyz_total[0]) && (high_limit >= xyz_total[0]) && (low_limit <= xyz_total[1]) && (high_limit >= xyz_total[1]) && (low_limit <= xyz_total[2]) && (high_limit >= xyz_total[2]) ) { /* Successful calibration. Normalize the scale factors so all axis return the same range of values for the bias field. Factor of 2 is from summation of total of n_samples from both positive and negative bias. */ x_scale=(counts_per_milligauss[gain]*(HMC58X3_X_SELF_TEST_GAUSS*2))/(xyz_total[0]/n_samples); y_scale=(counts_per_milligauss[gain]*(HMC58X3_Y_SELF_TEST_GAUSS*2))/(xyz_total[1]/n_samples); z_scale=(counts_per_milligauss[gain]*(HMC58X3_Z_SELF_TEST_GAUSS*2))/(xyz_total[2]/n_samples); }else { DEBUG_PRINT("HMC58x3 Self test out of range."); bret=false; } I2Cdev::writeByte(devAddr,HMC5883L_RA_CONFIG_A, 0x010); // set RegA/DOR back to default. }else { DEBUG_PRINT("HMC5883L failed id check."); bret=false; } }else { /* Bad input parameters. */ DEBUG_PRINT("HMC5883 Bad parameters."); bret=false; } return(bret); } // calibrate(). void HMC5883LCalibratable::getValues(int *x,int *y,int *z) { float fx,fy,fz; getValues(&fx,&fy,&fz); *x= (int) (fx + 0.5); *y= (int) (fy + 0.5); *z= (int) (fz + 0.5); } void HMC5883LCalibratable::getValues(float *x,float *y,float *z) { int xr,yr,zr; getHeading(&xr,&yr,&zr); *x= ((float) xr) / x_scale; *y = ((float) yr) / y_scale; *z = ((float) zr) / z_scale; } float HMC5883LCalibratable::compassHeadingRadians() { float xr, yr, zr; getValues(&xr,&yr,&zr); float heading_radians = atan2(yr, xr); // Correct for when signs are reversed. if(heading_radians < 0) heading_radians += 2*PI; return heading_radians; } float HMC5883LCalibratable::compassHeadingTiltCompensatedRadians(float pitch_radians, float roll_radians) { float tilt_compensated_heading; float MAG_X; float MAG_Y; float cos_roll; float sin_roll; float cos_pitch; float sin_pitch; cos_roll = cos(roll_radians); sin_roll = sin(roll_radians); cos_pitch = cos(pitch_radians); sin_pitch = sin(pitch_radians); float xr, yr, zr; getValues(&xr,&yr,&zr); /* // Tilt compensated Magnetic field X: MAG_X = xr*cos_pitch+yr*sin_roll*sin_pitch+zr*cos_roll*sin_pitch; // Tilt compensated Magnetic field Y: MAG_Y = yr*cos_roll-zr*sin_roll; // Magnetic Heading tilt_compensated_heading = atan2(MAG_Y,MAG_X); // TODO: Review - why negative Y? */ MAG_X = xr * cos_pitch + zr * sin_pitch; MAG_Y = xr * sin_roll * sin_pitch + yr * cos_roll - zr * sin_roll * cos_pitch; tilt_compensated_heading = atan2(MAG_Y,MAG_X); return tilt_compensated_heading; }
38.525735
187
0.604065
nowireless
10279da7ea0269d9f41217d0738c5959abb44075
13,724
cpp
C++
tcp.cpp
foragony/calculation_acceleration
147619d640cc29d4de93caec295e0984cf7f4281
[ "ECL-2.0" ]
null
null
null
tcp.cpp
foragony/calculation_acceleration
147619d640cc29d4de93caec295e0984cf7f4281
[ "ECL-2.0" ]
null
null
null
tcp.cpp
foragony/calculation_acceleration
147619d640cc29d4de93caec295e0984cf7f4281
[ "ECL-2.0" ]
null
null
null
// client.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include<iostream> #include<winsock.h> #include<windows.h> #include <mmintrin.h> //MMX #include <xmmintrin.h> //SSE(include mmintrin.h) #include <emmintrin.h> //SSE2(include xmmintrin.h) #include <pmmintrin.h> //SSE3(include emmintrin.h) #include <tmmintrin.h>//SSSE3(include pmmintrin.h) #include <smmintrin.h>//SSE4.1(include tmmintrin.h) #include <nmmintrin.h>//SSE4.2(include smmintrin.h) #include <wmmintrin.h>//AES(include nmmintrin.h) #include <immintrin.h>//AVX(include wmmintrin.h) #include <intrin.h>//(include immintrin.h) #define MAX_THREADS 64 #define SUBDATANUM 200000 #define DATANUM (SUBDATANUM * MAX_THREADS) /*这个数值是总数据量*/ #define TREAD 8 //实际线程数(排序) #define DATANUM1 ((DATANUM/TREAD)/2) //每线程数据数 /***********全局变量定义***********/ double rawdoubleData[DATANUM];//生成初始随机数 double rawdoubleData1[DATANUM];//计算出全部数的log(sqrt())结果,等待单机排序算法调用 double rawFloatData[DATANUM/2]; //排序输入数据 double rawFloatData_result[DATANUM/2]; //输出结果 int ThreadID[TREAD]; //线程 double floatResults1[TREAD][DATANUM1];//每个线程的中间结果 double tdata[TREAD][DATANUM1];//每个线程的中间结果,数据临时存储,便于调用函数 double finalsort_result[DATANUM];//最终排序结果 double finalsort_result1[DATANUM];//最终排序结果 double sendsort[DATANUM/2];//服务端排序结果 int counte = 0;//计算传输错误数 /****************IP地址在此输入****************/ char IP[] = "127.0.0.1"; using namespace std; #pragma comment(lib,"ws2_32.lib") using namespace std; /*********函数声明********/ void initialization();//套接字库初始化 /**SUM**/ double sum(const double data[], const int len);//不加速计算 double sumSpeedUp(const double data[], const int len); //sum使用avx和openmp double sumSpeedUp1(const double data[], const int len);//sum单独使用openmp,实际使用算法 /**MAX**/ double mymax(const double data[], const int len);//不加速计算,data是原始数据,len为长度。结果通过函数返回 double maxSpeedUp1(const double data[], const int len);//单独使用openmp double maxSpeedUp(const double data[], const int len);//单独使用sse,为实际使用算法,也可将注释部分消去注释以实现openmp+sse但速度会变慢 /**SORT**/ void init_sortdata(const double data[], const int len, double result[]);//排序数据使用SSE预处理 double sort(const double data[], const int len, double result[]);//慢排;data是原始数据,len为长度。排序结果在result中。 double sortSpeedUp(const double data[], const int len, double result[]);//快速排序;data是原始数据,len为长度。排序结果在result中。 void tQsort(double arr[], int low, int high); //快速排序算法 int tmin(const double data[], const int len); //返回最小值位置 void tMerge(double arr[][DATANUM1], double result[]); //归并有序数列 void MemeryArray(double a[], int n, double b[], int m, double c[]); //归并两个有序数列 /***********************/ /*******线程函数********/ DWORD WINAPI ThreadProc(LPVOID lpParameter) { //while (1) { int who = *(int*)lpParameter; int startIndex = who * DATANUM1; int endIndex = startIndex + DATANUM1; //调用函数复制数据 memcpy(tdata[who], rawFloatData + startIndex, DATANUM1 * sizeof(double)); sort(tdata[who], DATANUM1, floatResults1[who]); } return 0; } /*************************/ int main() { /**************重现时修改数据****************/ //初始化数据 for (size_t i = 0; i < DATANUM; i++)//数据初始化 { rawdoubleData[i] = double((rand() + rand() + rand() + rand()));//rand返回short数据类型,增加随机性 rawdoubleData1[i] = log(sqrt(rawdoubleData[i]/4)); } init_sortdata(rawdoubleData, DATANUM, rawFloatData); /*******************************************/ double time1, time2, time3, time4, time5, time6;//记录消耗时间 LARGE_INTEGER start, end; LARGE_INTEGER start1, end1; double sumresult2, maxresult2; double sumresult, maxresult; double r_c=0.0f, r_s=0.0f; int send_len = 0; int recv_len = 0; //定义发送缓冲区和接受缓冲区 char send_buf[100]; char recv_buf[100]; //定义服务端套接字,接受请求套接字 SOCKET s_server; //服务端地址客户端地址 SOCKADDR_IN server_addr; initialization(); //填充服务端信息 server_addr.sin_family = AF_INET; server_addr.sin_addr.S_un.S_addr = inet_addr(IP); server_addr.sin_port = htons(5010); //创建套接字 s_server = socket(AF_INET, SOCK_STREAM, 0); if (connect(s_server, (SOCKADDR*)&server_addr, sizeof(SOCKADDR)) == SOCKET_ERROR) { cout << "服务器连接失败!" << endl; WSACleanup(); } else { cout << "服务器连接成功!" << endl; /**********************SUM**********************/ cout << "输入1以开始sum:"; cin >> send_buf; QueryPerformanceCounter(&start);//start send_len = send(s_server, send_buf, 100, 0); if (send_len < 0) { cout << "发送失败!" << endl; } else { cout << "正在计算..." << endl; r_c = sumSpeedUp1(rawdoubleData, DATANUM); cout << "cilent端结果为" << r_c << endl; } //接收服务端结果 char sever_result[sizeof(double) + 1]; recv(s_server, sever_result, 9, 0); r_s = atof(sever_result); if (recv_len < 0) { cout << "接受失败!" << endl; } else { cout << "服务端结果:" << r_s << endl; } QueryPerformanceCounter(&end);//end time1 = (end.QuadPart - start.QuadPart); sumresult2 = r_s + r_c; /*******************MAX********************/ cout << "输入2以开始max:"; cin >> send_buf; QueryPerformanceCounter(&start);//start send_len = send(s_server, send_buf, 100, 0); if (send_len < 0) { cout << "发送失败!" << endl; } else { cout << "正在计算..." << endl; r_c = maxSpeedUp(rawdoubleData, DATANUM); cout << "cilent端结果为" << r_c << endl; } //接收服务端结果 recv(s_server, sever_result, 9, 0); r_s = atof(sever_result); if (recv_len < 0) { cout << "接受失败!" << endl; } else { cout << "服务端结果:" << r_s << endl; } maxresult2 = r_c > r_s ? r_c : r_s; QueryPerformanceCounter(&end);//end time3 = (end.QuadPart - start.QuadPart); /***********************SORT*************************/ cout << "输入3以开始sort:"; cin >> send_buf; QueryPerformanceCounter(&start);//start send_len = send(s_server, send_buf, 100, 0); if (send_len < 0) { cout << "发送失败!" << endl; } else { cout << "正在计算..." << endl; sortSpeedUp(rawFloatData, DATANUM/2, rawFloatData_result); } QueryPerformanceCounter(&start1);//start //接收服务端结果 char* prenv; prenv = (char*)&sendsort[0]; recv(s_server, prenv, sizeof(double)*DATANUM/2, 0); if (recv_len < 0) { cout << "接受失败!" << endl; } //监测是否有传输错误的数据 //for (size_t i = 0; i < DATANUM/2; i++) //{ // if (sendsort[i] > 6 || sendsort[i] < 1) // { // //cout << "ERROR! 传输数据监测错误" << endl; // sendsort[i] = 4.5; // counte += 1; // } //} QueryPerformanceCounter(&end1);//end MemeryArray(rawFloatData_result, DATANUM, sendsort, DATANUM, finalsort_result); QueryPerformanceCounter(&end);//end time5 = (end.QuadPart - start.QuadPart); } //单机程序SUM QueryPerformanceCounter(&start);//start sumresult = sum(rawdoubleData, DATANUM); QueryPerformanceCounter(&end);//end time2 = (end.QuadPart - start.QuadPart); cout << "////////////////////////////SUM/////////////////////////" << endl; cout << "双机加速结果为:" << sumresult2 <<" "; cout << "双机用时" << time1 << endl; cout << "单机结果为:" << sumresult << " "; cout << "单机用时" << time2 << endl; cout << "加速比为" << time2 / time1 << endl; //单机程序MAX QueryPerformanceCounter(&start);//start maxresult = mymax(rawdoubleData, DATANUM);//你的函数(...);//包括任务启动,结果回传,收集和综合 QueryPerformanceCounter(&end);//end time4 = (end.QuadPart - start.QuadPart); cout << "////////////////////////////MAX/////////////////////////" << endl; cout << "双机加速结果为:" << maxresult2 << " "; cout << "双机用时" << time3 << endl; cout << "单机结果为:" << maxresult << " "; cout << "单机用时" << time4 << endl; cout << "加速比为" << time4 / time3 << endl; //单机程序SORT QueryPerformanceCounter(&start);//start sort(rawdoubleData1, DATANUM, finalsort_result1); QueryPerformanceCounter(&end);//end time6 = (end.QuadPart - start.QuadPart); cout << "////////////////////////////SORT/////////////////////////" << endl; cout << "双机加速结果为:" << finalsort_result[DATANUM-1] << " "; cout << "双机用时" << time5 << endl; cout << "双机数据传输时间 " << (end1.QuadPart - start1.QuadPart) << endl; cout << "单机结果为:" << finalsort_result1[DATANUM - 1] << " "; cout << "单机用时" << time6 << endl; cout << "加速比为" << time6 / time5 << endl; cout << "除去传输时间加速比" << time6 / (time5- (end1.QuadPart - start1.QuadPart)) << endl; cout << counte << endl; //关闭套接字 closesocket(s_server); //释放DLL资源 WSACleanup(); return 0; } void initialization() { //初始化套接字库 WORD w_req = MAKEWORD(2, 2);//版本号 WSADATA wsadata; int err; err = WSAStartup(w_req, &wsadata); if (err != 0) { cout << "初始化套接字库失败!" << endl; } else { cout << "初始化套接字库成功!" << endl; } //检测版本号 if (LOBYTE(wsadata.wVersion) != 2 || HIBYTE(wsadata.wHighVersion) != 2) { cout << "套接字库版本号不符!" << endl; WSACleanup(); } else { cout << "套接字库版本正确!" << endl; } //填充服务端地址信息 } double sum(const double data[], const int len) { double result = 0.0f; for (int i = 0; i < len; i++) { result += log(sqrt(data[i] / 4.0)); } //cout << result << endl; return result; } //加速 openmp&SSE double sumSpeedUp(const double data[], const int len) //sum使用avx和openmp { double s[4] = { 0.25,0.25,0.25,0.25 }; __m256d s_256 = _mm256_load_pd(&s[0]); double temp[4]; double result = 0; __m256d sum = _mm256_set1_pd(0.0f); // init partial sums #pragma omp parallel for reduction (+:result) for (int i = 0; i < len; i = i + 4) { __m256d va = _mm256_load_pd(&data[i]); _mm256_store_pd(temp, _mm256_log_pd(_mm256_sqrt_pd(_mm256_mul_pd(va, s_256)))); double resulttemp = temp[0] + temp[1] + temp[2] + temp[3]; result += resulttemp; } return result; } double sumSpeedUp1(const double data[], const int len) //sum单独使用openmp { double result = 0.0f; #pragma omp parallel for reduction(+:result) for (int i = 0; i < len / 2; i++) { result += log(sqrt(data[i] / 4.0)); } return result; } double mymax(const double data[], const int len) //data是原始数据,len为长度。结果通过函数返回 { double result = 0.0f; for (int i = 0; i < len; i++) { double a = log(sqrt(data[i] / 4.0)); if (result < a) result = a; } return result; } double maxSpeedUp1(const double data[], const int len) //单独使用openmp { double result = 0.0f; #pragma omp parallel for for (int i = 0; i < len; i++) { int a = log(sqrt(data[i] / 4.0)); #pragma omp critical {if (result < a) result = a; } } //cout << result << endl; return result; } double maxSpeedUp(const double data[], const int len) //使用openmp会使速度极度变慢 { double s[4] = { 0.25,0.25,0.25,0.25 }; __m256d s_256 = _mm256_load_pd(&s[0]); double result1 = 0.0f, result2 = 0.0f, result = 0.0f; int i; double temp[4]; __m256d max = _mm256_set1_pd(0.0f); // init partial sums //#pragma omp parallel for for (i = 0; i < len / 2; i = i + 4) { __m256d va = _mm256_load_pd(&data[i]); //#pragma omp critical max = _mm256_max_pd(_mm256_log_pd(_mm256_sqrt_pd(_mm256_mul_pd(va, s_256))), max); } _mm256_store_pd(temp, max); result1 = temp[0] > temp[1] ? temp[0] : temp[1]; result2 = temp[2] > temp[3] ? temp[2] : temp[3]; result = result1 > result2 ? result1 : result2; return result; } /************排序*************/ void init_sortdata(const double data[], const int len, double result[])//sort数据初始化SSE { double s[4] = { 0.25,0.25,0.25,0.25 }; __m256d s_256 = _mm256_load_pd(&s[0]); for (size_t i = 0; i < len/2; i = i + 4) { __m256d va = _mm256_load_pd(&data[i]); _mm256_store_pd(&result[i], _mm256_log_pd(_mm256_sqrt_pd(_mm256_mul_pd(va, s_256)))); } } double sort(const double data[], const int len, double result[]) { memcpy(result, data, len * sizeof(double)); tQsort(result, 0, len - 1); return 1; } double sortSpeedUp(const double data[], const int len, double result[]) { HANDLE hThreads[TREAD]; //多线程 for (int i = 0; i < TREAD; i++) { ThreadID[i] = i; hThreads[i] = CreateThread( NULL,// default security attributes 0,// use default stack size ThreadProc,// thread function &ThreadID[i],// argument to thread function CREATE_SUSPENDED, // use default creation flags.0 means the thread will be run at once CREATE_SUSPENDED NULL); } //多线程 for (int i = 0; i < TREAD; i++) { ResumeThread(hThreads[i]); } WaitForMultipleObjects(TREAD, hThreads, TRUE, INFINITE); //这样传给回调函数的参数不用定位static或者new出来的了 //收割 tMerge(floatResults1, rawFloatData_result); // Close all thread handles upon completion. for (int i = 0; i < TREAD; i++) { CloseHandle(hThreads[i]); } return 1; } void tQsort(double arr[], int low, int high) { if (high <= low) return; int i = low; int j = high + 1; double key = arr[low]; while (true) { /*从左向右找比key大的值*/ while (arr[++i] < key) { if (i == high) { break; } } /*从右向左找比key小的值*/ while (arr[--j] > key) { if (j == low) { break; } } if (i >= j) break; /*交换i,j对应的值*/ double temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } /*中枢值与j对应值交换*/ double temp = arr[low]; arr[low] = arr[j]; arr[j] = temp; tQsort(arr, low, j - 1); tQsort(arr, j + 1, high); } //合并有序数列 //堆排序思想 void tMerge(double arr[][DATANUM1], double result[]) { double temp[TREAD]; int min_index; int tnum[TREAD] = { 0 }; for (size_t i = 0; i < TREAD; i++) { temp[i] = arr[i][tnum[i]]; } for (size_t i = 0; i < DATANUM/2; i++) { min_index = tmin(temp, TREAD); result[i] = temp[min_index]; if (tnum[min_index] == (DATANUM1 - 1) || tnum[min_index] > (DATANUM1 - 1)) { temp[min_index] = INT_MAX; } else temp[min_index] = arr[min_index][(++tnum[min_index])]; } } int tmin(const double data[], const int len) { double min = data[0]; int min_index = 0; for (size_t i = 0; i < len; i++) { if (min > data[i]) { min = data[i]; min_index = i; } } return min_index; } void MemeryArray(double a[], int n, double b[], int m, double c[]) { int i, j, k; i = j = k = 0; while (i < n/2 && j < m/2) { if (a[i] < b[j]) c[k++] = a[i++]; else c[k++] = b[j++]; } while (i < n/2) c[k++] = a[i++]; while (j < m/2) c[k++] = b[j++]; }
25.748593
109
0.610755
foragony
10290a4aeff6b6a023fb28961d12728aff891e83
7,385
cc
C++
paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc
ZongwuYang/Paddle
6224e61fd94e6ad87f18c2808a76256b516fa3f3
[ "Apache-2.0" ]
null
null
null
paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc
ZongwuYang/Paddle
6224e61fd94e6ad87f18c2808a76256b516fa3f3
[ "Apache-2.0" ]
null
null
null
paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc
ZongwuYang/Paddle
6224e61fd94e6ad87f18c2808a76256b516fa3f3
[ "Apache-2.0" ]
null
null
null
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #include <mkldnn/include/mkldnn.hpp> #include "paddle/fluid/operators/elementwise/elementwise_op.h" #include "paddle/fluid/operators/elementwise/elementwise_op_function.h" #include "paddle/fluid/platform/mkldnn_helper.h" #include "paddle/fluid/operators/math/jit_kernel.h" #include "xbyak.h" #include "xbyak_util.h" namespace paddle { namespace operators { using framework::DataLayout; using mkldnn::memory; static mkldnn::memory::format StringToMKLDNNFormat(std::string& format) { std::transform(format.begin(), format.end(), format.begin(), ::tolower); if (!format.compare("nchw")) { return memory::format::nchw; } else if (!format.compare("nchw16c")) { return memory::format::nChw16c; } else if (!format.compare("nchw8c")) { return memory::format::nChw8c; } else if (!format.compare("nhwc")) { return memory::format::nhwc; } else { return memory::format::any; } } static void UpdateDataFormat(const framework::ExecutionContext& ctx, framework::Tensor* tensor, const char* attribute) { if (ctx.op().HasAttr(attribute)) { auto format_as_string = ctx.Attr<std::string>(attribute); auto format = StringToMKLDNNFormat(format_as_string); if (format != memory::format::any) { tensor->set_format(format); } } } template <typename T> static void ReorderInput(framework::Tensor* tensor, const platform::Place& place, const mkldnn::engine& engine, bool isFourDim) { using platform::to_void_cast; auto dims = paddle::framework::vectorize2int(tensor->dims()); framework::Tensor out_tensor; out_tensor.Resize(tensor->dims()); out_tensor.set_format(isFourDim ? memory::format::nchw : memory::format::nc); out_tensor.set_layout(tensor->layout()); mkldnn::memory input_memory = { {{dims, platform::MKLDNNGetDataType<T>(), tensor->format()}, engine}, to_void_cast<T>(tensor->data<T>())}; mkldnn::memory output_memory = { {{dims, platform::MKLDNNGetDataType<T>(), out_tensor.format()}, engine}, to_void_cast<T>(out_tensor.mutable_data<T>(place))}; platform::Reorder(input_memory, output_memory); tensor->ShareDataWith(out_tensor); } template <typename T> class ElementwiseMulMKLDNNKernel : public framework::OpKernel<T> { public: void Compute(const framework::ExecutionContext& ctx) const override { using Tensor = framework::Tensor; int axis = ctx.Attr<int>("axis"); auto* x = ctx.Input<Tensor>("X"); auto* y = ctx.Input<Tensor>("Y"); auto* z = ctx.Output<Tensor>("Out"); const T* x_data = x->data<T>(); const T* y_data = y->data<T>(); T* z_data = z->mutable_data<T>(ctx.GetPlace()); auto x_dims = x->dims(); auto y_dims_untrimmed = y->dims(); auto x_int_dims = paddle::framework::vectorize2int(x_dims); UpdateDataFormat(ctx, (Tensor*)x, "x_data_format"); UpdateDataFormat(ctx, (Tensor*)y, "y_data_format"); Xbyak::util::Cpu cpu; const bool is_avx512_enabled = cpu.has(Xbyak::util::Cpu::tAVX512F); const bool are_dims_divisable = !(x_int_dims[1] % 16); const bool is_x_format_correct = x->format() == memory::format::nChw16c; const bool is_y_format_correct = y->format() == memory::format::nc; if (is_x_format_correct && is_y_format_correct && are_dims_divisable && is_avx512_enabled) { int pre, n, post; get_mid_dims(x_dims, y_dims_untrimmed, axis, &pre, &n, &post); if (post == 1) { PADDLE_THROW("Not implemented when post is 1"); } else { // Just check whether it works for RE-Resnext. PADDLE_ENFORCE_EQ(x_dims.size(), 4, "X should have 4 dimensions"); int n = x_dims[0]; int c = x_dims[1]; int h = x_dims[2]; int w = x_dims[3]; PADDLE_ENFORCE(y_dims_untrimmed[0] == n && y_dims_untrimmed[1] == c, "Y should be in nc format"); constexpr int simd_width = 16; int C = c / simd_width; const auto& multiply = math::jitkernel::KernelPool::Instance() .template Get<math::jitkernel::EltwiseMulnChw16cNCKernel<T>>(n); #pragma omp parallel for collapse(2) for (int ni = 0; ni < n; ni++) { for (int ci = 0; ci < C; ci++) { auto ptr_x = x_data + ni * C * h * w * simd_width + ci * h * w * simd_width; auto ptr_y = y_data + ni * C * simd_width + ci * simd_width; auto ptr_z = z_data + ni * C * h * w * simd_width + ci * h * w * simd_width; multiply->Compute(ptr_x, ptr_y, ptr_z, h, w); } } } z->set_layout(DataLayout::kMKLDNN); z->set_format(x->format()); } else { // Fallback to naive version: const bool are_inputs_in_same_format = x->format() == y->format(); const bool is_x_nchw = x->format() == memory::format::nchw; const bool is_x_nc = x->format() == memory::format::nc; const bool is_y_nchw = y->format() == memory::format::nchw; const bool is_y_nc = y->format() == memory::format::nc; if (!are_inputs_in_same_format) { using platform::MKLDNNDeviceContext; auto& dev_ctx = ctx.template device_context<MKLDNNDeviceContext>(); const auto& mkldnn_engine = dev_ctx.GetEngine(); if (!(is_x_nchw || is_x_nc)) ReorderInput<T>((Tensor*)x, ctx.GetPlace(), mkldnn_engine, x->dims().size() == 4); if (!(is_y_nchw || is_y_nc)) ReorderInput<T>((Tensor*)y, ctx.GetPlace(), mkldnn_engine, y->dims().size() == 4); } auto mul_func = [](T a, T b) -> T { return a * b; }; TransformFunctor<decltype(mul_func), T, paddle::platform::CPUDeviceContext, T> functor( x, y, z, ctx.template device_context<paddle::platform::CPUDeviceContext>(), mul_func); axis = (axis == -1 ? x_dims.size() - y_dims_untrimmed.size() : axis); PADDLE_ENFORCE(axis >= 0 && axis < x_dims.size(), "Axis should be in range [0, x_dims)"); auto y_dims = trim_trailing_singular_dims(y_dims_untrimmed); axis = (y_dims.size() == 0) ? x_dims.size() : axis; int pre, n, post; get_mid_dims(x_dims, y_dims, axis, &pre, &n, &post); if (post == 1) { functor.RunRowWise(n, pre); } else { functor.RunMidWise(n, pre, post); } z->set_layout(DataLayout::kMKLDNN); z->set_format(x->format()); } } }; } // namespace operators } // namespace paddle namespace ops = paddle::operators; REGISTER_OP_KERNEL(elementwise_mul, MKLDNN, ::paddle::platform::CPUPlace, ops::ElementwiseMulMKLDNNKernel<float>)
36.559406
80
0.627488
ZongwuYang
10297cf494588e60c748fbcbed6ba06dd5535cb3
3,069
cc
C++
src/ops/split.cc
aj7tesh/CTranslate2
8e424efdbcf40c89dca7e237a249464a95eeaf74
[ "MIT" ]
null
null
null
src/ops/split.cc
aj7tesh/CTranslate2
8e424efdbcf40c89dca7e237a249464a95eeaf74
[ "MIT" ]
null
null
null
src/ops/split.cc
aj7tesh/CTranslate2
8e424efdbcf40c89dca7e237a249464a95eeaf74
[ "MIT" ]
null
null
null
#include "ctranslate2/ops/split.h" #include <numeric> #include "device_dispatch.h" #include "type_dispatch.h" namespace ctranslate2 { namespace ops { Split::Split(dim_t axis, bool no_copy) : _axis(axis) , _total_size(0) , _no_copy(no_copy) { check_arguments(); } Split::Split(dim_t axis, const std::vector<dim_t>& split, bool no_copy) : _axis(axis) , _split(split) , _total_size(std::accumulate(split.begin(), split.end(), 0)) , _no_copy(no_copy) { check_arguments(); } void Split::operator()(const StorageView& input, StorageView& output1, StorageView& output2) const { std::vector<StorageView*> outputs{&output1, &output2}; operator()(input, outputs); } void Split::operator()(const StorageView& input, StorageView& output1, StorageView& output2, StorageView& output3) const { std::vector<StorageView*> outputs{&output1, &output2, &output3}; operator()(input, outputs); } void Split::operator()(const StorageView& input, std::vector<StorageView*>& outputs) const { PROFILE("Split"); const dim_t axis = _axis < 0 ? input.rank() + _axis : _axis; const dim_t dim = input.dim(axis); if (!_split.empty()) { if (_split.size() != outputs.size()) throw std::invalid_argument(std::to_string(outputs.size()) + " outputs are passed but " + std::to_string(_split.size()) + " split sizes were configured"); if (dim != _total_size) throw std::invalid_argument("axis " + std::to_string(axis) + " has dimension " + std::to_string(dim) + " but expected " + std::to_string(_total_size)); } else if (dim % outputs.size() != 0) throw std::invalid_argument("axis " + std::to_string(axis) + " is not divisble by " + std::to_string(outputs.size())); dim_t offset = 0; for (size_t j = 0; j < outputs.size(); ++j) { auto& x = *outputs[j]; auto shape = input.shape(); const dim_t split_size = _split.empty() ? dim / outputs.size() : _split[j]; shape[axis] = split_size; if (_no_copy) { TYPE_DISPATCH(input.dtype(), x.view(const_cast<T*>(input.data<T>() + offset), shape)); } else { x.resize(shape); } offset += input.stride(0) * split_size; } if (!_no_copy) { DEVICE_DISPATCH(input.device(), TYPE_DISPATCH(input.dtype(), (compute<D, T>(input, outputs)))); } } void Split::check_arguments() const { if (_no_copy && _axis != 0) throw std::invalid_argument("no_copy is only defined when splitting across the first dimension"); } } }
34.483146
105
0.529814
aj7tesh
102a019012876dfc0442c1e70182198f86b0cf7c
1,488
cpp
C++
cpp-pthread/demo22b-blocking-queue.cpp
thanhit95/multi-threading
30e745b6a6c52e56a8d8e3826ce7a97b51944caa
[ "BSD-3-Clause" ]
15
2021-06-15T09:27:35.000Z
2022-03-25T02:01:45.000Z
cpp-pthread/demo22b-blocking-queue.cpp
thanhit95/multi-threads
30e745b6a6c52e56a8d8e3826ce7a97b51944caa
[ "BSD-3-Clause" ]
null
null
null
cpp-pthread/demo22b-blocking-queue.cpp
thanhit95/multi-threads
30e745b6a6c52e56a8d8e3826ce7a97b51944caa
[ "BSD-3-Clause" ]
5
2021-07-15T14:31:33.000Z
2022-03-29T06:19:34.000Z
/* BLOCKING QUEUES Version B: A fast producer and a slow consumer Blocking queues in C++ POSIX threading are not supported by default. So, I use mylib::BlockingQueue for this demonstration. */ #include <iostream> #include <string> #include <unistd.h> #include <pthread.h> #include "../cpp-std/mylib-blockingqueue.hpp" using namespace std; using namespace mylib; void* producer(void* arg) { auto blkQueue = (BlockingQueue<string>*) arg; blkQueue->put("Alice"); blkQueue->put("likes"); /* Due to reaching the maximum capacity = 2, when executing blkQueue->put("singing"), this thread is going to sleep until the queue removes an element. */ blkQueue->put("singing"); pthread_exit(nullptr); return nullptr; } void* consumer(void* arg) { auto blkQueue = (BlockingQueue<string>*) arg; string data; sleep(2); for (int i = 0; i < 3; ++i) { cout << "\nWaiting for data..." << endl; data = blkQueue->take(); cout << " " << data << endl; } pthread_exit(nullptr); return nullptr; } int main() { pthread_t tidProducer, tidConsumer; auto blkQueue = BlockingQueue<string>(); // blocking queue with capacity = 2 int ret = 0; ret = pthread_create(&tidProducer, nullptr, producer, &blkQueue); ret = pthread_create(&tidConsumer, nullptr, consumer, &blkQueue); ret = pthread_join(tidProducer, nullptr); ret = pthread_join(tidConsumer, nullptr); return 0; }
20.957746
86
0.650538
thanhit95
102b1bc4f3e7f3e809f2fa584f523352af088133
267
cpp
C++
cpp/ql/src/Critical/MissingNegativityTest.cpp
calumgrant/ql
3c0f04ac96da17456a2085ef11e05aca4632b986
[ "ECL-2.0", "Apache-2.0" ]
1
2021-07-05T13:02:34.000Z
2021-07-05T13:02:34.000Z
cpp/ql/src/Critical/MissingNegativityTest.cpp
calumgrant/ql
3c0f04ac96da17456a2085ef11e05aca4632b986
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cpp/ql/src/Critical/MissingNegativityTest.cpp
calumgrant/ql
3c0f04ac96da17456a2085ef11e05aca4632b986
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Record records[SIZE] = ...; int f() { int recordIdx = 0; recordIdx = readUserInput(); //recordIdx is returned from a function // there is no check so it could be negative doFoo(&(records[recordIdx])); //but is not checked before use as an array offset }
26.7
81
0.677903
calumgrant
102c5231149876d8d1e956f496a4e518cd4d2700
2,191
cpp
C++
lunarlady/File.cpp
madeso/infection-survivors
654fc5405dcecccaa7e54f1fdbfec379e0c185da
[ "Zlib" ]
null
null
null
lunarlady/File.cpp
madeso/infection-survivors
654fc5405dcecccaa7e54f1fdbfec379e0c185da
[ "Zlib" ]
null
null
null
lunarlady/File.cpp
madeso/infection-survivors
654fc5405dcecccaa7e54f1fdbfec379e0c185da
[ "Zlib" ]
null
null
null
#include "lunarlady/File.hpp" #include "lunarlady/FileSystem.hpp" #include "lunarlady/StringUtils.hpp" #include "lunarlady/Error.hpp" #include <sstream> namespace lunarlady { void WriteFile(const std::string iFileName, const char* iBuffer, std::size_t iSize) { PHYSFS_file* file = PHYSFS_openWrite(iFileName.c_str()); if( file == NULL ) { std::ostringstream str; str << "Failed to write file, " << iFileName << ", reason: " << PHYSFS_getLastError(); throw PhysFSError(str.str()); } const PHYSFS_uint32 size = iSize; const PHYSFS_sint64 written = PHYSFS_write(file, iBuffer, sizeof(char), size ); if( written < size ) { std::ostringstream str; str << "Failed to write enough bytes to file " << iFileName << ", " << written << " bytes written, reason: " << PHYSFS_getLastError(); throw PhysFSError(str.str()); } HandlePhysfsInitError( PHYSFS_close(file), "Failed to close file" + iFileName ); } ReadFile::ReadFile(const std::string& iFileName) : mSize(0) { PHYSFS_file* file = PHYSFS_openRead( iFileName.c_str() ); if( file == NULL ) { std::ostringstream str; str << "Failed to load file, " << iFileName << ", reason: " << PHYSFS_getLastError(); throw PhysFSError(str.str()); } mSize = PHYSFS_fileLength(file); mFile.reset( new char[mSize] ); PHYSFS_sint64 lengthRead = PHYSFS_read (file, mFile.get(), 1, mSize); HandlePhysfsInitError( PHYSFS_close(file), "Failed to close file" + iFileName ); } bool FileExist(const std::string iFileName) { return 0 != PHYSFS_exists(iFileName.c_str()); } std::size_t ReadFile::getSize() const { return mSize; } char* ReadFile::getBuffer() const { return mFile.get(); } void GetFileListing(const std::string& iDirectory, std::vector<std::string>* oFiles) { char **rc = PHYSFS_enumerateFiles( iDirectory.c_str() ); const std::string SEPERATOR = "/"; const bool shouldAddSeperator = !EndsWith(iDirectory, SEPERATOR); for (char **i = rc; *i != NULL; i++) { std::ostringstream str; if( shouldAddSeperator ) { str << iDirectory << SEPERATOR << *i; } else { str << iDirectory << *i; } oFiles->push_back( str.str() ); } PHYSFS_freeList(rc); } }
32.701493
137
0.671383
madeso
102e7aa7aef0a4eade2a35d2a5b59df6c9ba0ac3
1,867
hpp
C++
include/fibio/http/server/templates/mustache_template.hpp
qicosmos/fibio
9242be982a62d82eefdc489d88ccbdda180d861f
[ "BSD-2-Clause" ]
8
2015-03-29T16:37:47.000Z
2021-11-18T23:53:56.000Z
include/fibio/http/server/templates/mustache_template.hpp
qicosmos/fibio
9242be982a62d82eefdc489d88ccbdda180d861f
[ "BSD-2-Clause" ]
null
null
null
include/fibio/http/server/templates/mustache_template.hpp
qicosmos/fibio
9242be982a62d82eefdc489d88ccbdda180d861f
[ "BSD-2-Clause" ]
2
2015-08-31T02:51:04.000Z
2021-06-02T09:41:04.000Z
// // mustache_template.hpp // fibio // // Created by Chen Xu on 14/12/1. // Copyright (c) 2014 0d0a.com. All rights reserved. // #ifndef fibio_http_server_template_hpp #define fibio_http_server_template_hpp #include <fibio/http/common/json.hpp> #include <fibio/http/server/templates/mustache.hpp> #include <fibio/http/server/routing.hpp> namespace fibio { namespace http { namespace detail { template<typename Ret, typename ...Args> struct mustache_controller; template<typename Ret, typename ...Args> struct mustache_controller<std::function<Ret(Args...)>> { typedef std::function<Ret(Args...)> model_type; mustache_controller(const std::string &tmpl, model_type &&func) : view_(mustache::compile(tmpl)) , model_(std::forward<model_type>(func)) { static_assert(std::is_constructible<json::wvalue, Ret>::value, "Return value of model function must be compatible with json::wvalue"); } std::string operator()(Args&&... args) { json::wvalue ctx(model_(std::forward<Args>(args)...)); return view_.render(ctx); } mustache::template_t view_; model_type model_; }; } template<typename Fn> server::request_handler mustache_(const std::string &tmpl, Fn &&fn, const std::string content_type="text/html") { typedef typename utility::make_function_type<Fn> model_type; detail::mustache_controller<model_type> controller(tmpl, model_type(std::forward<Fn>(fn))); return with_content_type(content_type, controller); } }} // End of namespace fibio::http #endif
35.226415
101
0.589716
qicosmos
102f6b6f4cdb7acf913d48a7d886bdd1480e9328
2,531
cpp
C++
Trees/InPlaceConvertToDoublyLinkedList/InPlaceConvertToDoublyLinkedList03.cpp
XoDeR/AlgoTrain2018
04b96af8dd16d57cb31b70d268262b51ed559551
[ "MIT" ]
null
null
null
Trees/InPlaceConvertToDoublyLinkedList/InPlaceConvertToDoublyLinkedList03.cpp
XoDeR/AlgoTrain2018
04b96af8dd16d57cb31b70d268262b51ed559551
[ "MIT" ]
null
null
null
Trees/InPlaceConvertToDoublyLinkedList/InPlaceConvertToDoublyLinkedList03.cpp
XoDeR/AlgoTrain2018
04b96af8dd16d57cb31b70d268262b51ed559551
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; // Data structure to store a Binary Tree node struct Node { int data; Node *left, *right; }; // Function to create a new binary tree node having given key Node* newNode(int key) { Node* node = new Node; node->data = key; node->left = node->right = nullptr; return node; } // Function to insert given key into the tree void insert(Node*& root, string level, int key) { // tree is empty if (level.length() == 0) { root = newNode(key); return; } int i = 0; Node* ptr = root; while (i < level.length() - 1) { if (level[i++] == 'L') ptr = ptr->left; else ptr = ptr->right; } if (level[i] == 'L') ptr->left = newNode(key); else ptr->right = newNode(key); } // Helper function to print given doubly linked list void printDLL(Node* &head) { Node* curr = head; while (curr != nullptr) { cout << curr->data << " "; curr = curr->right; } } // Function to in-place convert given Binary Tree to a Doubly Linked List // root -> current node // head -> head of the doubly linked list (Passed by reference) // prev -> previous processed node (Passed by reference) void convert(Node* curr, Node*& head, Node* &prev) { // base case: tree is empty if (curr == nullptr) return; // recursively convert left subtree first convert(curr->left, head, prev); // adjust pointers if (prev != nullptr) { // set current node's left child to prev curr->left = prev; // make prev's right child as curr prev->right = curr; } // if prev is null, then update head of DLL as this is first node in inorder else head = curr; // after current node is visited, update previous pointer to current node prev = curr; // recursively convert right subtree convert(curr->right, head, prev); } // in-place convert given Binary Tree to a Doubly Linked List void convert(Node* root) { // to keep track of previous processed node in inorder traversal Node* prev = nullptr; // convert above binary tree to DLL (using inorder traversal) convert(root, root, prev); // root is now head of doubly linked list // print list printDLL(root); } // main function int main() { /* Construct below tree 1 / \ / \ 2 3 / \ / \ 4 5 6 7 */ vector<pair<string, int>> keys = { {"", 1}, {"L", 2}, {"R", 3}, {"LL", 4}, {"LR", 5}, {"RL", 6}, {"RR", 7} }; Node* root = nullptr; for (auto pair: keys) insert(root, pair.first, pair.second); convert(root); return 0; }
18.88806
80
0.620703
XoDeR
10300000046defcb6a0af6e7479b2cdc723f2420
49,535
cpp
C++
SQLComponents/SQLVariantOperatorMod.cpp
edwig/Kwatta
ce1ca2907608e65ed62d7dbafa9ab1d030caccfe
[ "MIT" ]
1
2021-12-31T17:20:01.000Z
2021-12-31T17:20:01.000Z
SQLComponents/SQLVariantOperatorMod.cpp
edwig/Kwatta
ce1ca2907608e65ed62d7dbafa9ab1d030caccfe
[ "MIT" ]
10
2022-01-14T13:28:32.000Z
2022-02-13T12:46:34.000Z
SQLComponents/SQLVariantOperatorMod.cpp
edwig/Kwatta
ce1ca2907608e65ed62d7dbafa9ab1d030caccfe
[ "MIT" ]
null
null
null
//////////////////////////////////////////////////////////////////////// // // File: SQLVariantOperatorMod.cpp // // Copyright (c) 1998-2022 ir. W.E. Huisman // All rights reserved // // 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. // // Version number: See SQLComponents.h // #include "stdafx.h" #include "SQLComponents.h" #include "SQLVariant.h" #include "SQLVariantOperator.h" #include "SQLDate.h" #include "bcd.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif namespace SQLComponents { SQLVariant static SQL_OperSShortModChar(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModChar(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModChar(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModChar(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModChar(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModChar(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModChar(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModChar(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModChar(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModChar(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModChar(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt() % p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModChar(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsChar()); SQLVariant var(&num); return var; } // TYPE == SSHORT SQLVariant static SQL_OperCharModSShort(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModSShort(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModSShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModSShort(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModSShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModSShort(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModSShort(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModSShort(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModSShort(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModSShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModSShort(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModSShort(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModSShort(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsSShort()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModSShort(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModSShort(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == USHORT SQLVariant static SQL_OperCharModUShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModUShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModUShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModUShort(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperUlongModUShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModUShort(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModUShort(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModUShort(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModUShort(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModUShort(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModUShort(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModUShort(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModUShort(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd((int)p_right.GetAsUShort()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModUShort(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModUShort(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == SLONG SQLVariant static SQL_OperCharModSLong(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModSLong(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModSLong(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModSLong(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModSLong(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModSLong(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModSLong(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModSLong(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModSLong(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModSLong(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModSLong(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModSLong(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModSLong(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsSLong()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModSLong(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModSLong(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == ULONG SQLVariant static SQL_OperCharModULong(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModULong(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModULong(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModULong(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperULongModULong(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModULong(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModULong(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModULong(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModULong(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModULong(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModULong(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModULong(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModULong(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd((int64)p_right.GetAsUShort()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModULong(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModULong(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == FLOAT SQLVariant static SQL_OperCharModFloat(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperSShortModFloat(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModFloat(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModFloat(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModFloat(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModFloat(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModFloat(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModFloat(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModFloat(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModFloat(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModFloat(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModFloat(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModFloat(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd((double)p_right.GetAsFloat()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModFloat(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsDouble(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModFloat(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsDouble(); return SQLVariant(&result); } // TYPE == DOUBLE SQLVariant static SQL_OperCharModDouble(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperSShortModDouble(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsUShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModDouble(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModDouble(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModDouble(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModDouble(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModDouble(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModDouble(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModDouble(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModDouble(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModDouble(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModDouble(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModDouble(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsDouble()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModDouble(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsDouble(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModDouble(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsDouble(); return SQLVariant(&result); } // TYPE == BIT SQLVariant static SQL_OperCharModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { bool result = p_left.GetAsBit() != 0; return SQLVariant(result); } SQLVariant static SQL_OperSShortModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { short result = p_left.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { unsigned short result = p_left.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { int result = p_left.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { unsigned int result = p_left.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { float result = p_left.GetAsFloat(); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { double result = p_left.GetAsDouble(); return SQLVariant(result); } SQLVariant static SQL_OperBitModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { bool result = p_left.GetAsBit() != 0; return SQLVariant(result); } SQLVariant static SQL_OperSTinyModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { char result = p_left.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { unsigned char result = p_left.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { SQLBIGINT result = p_left.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { SQLUBIGINT result = p_left.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { SQLVariant result(p_left); return result; } SQLVariant static SQL_OperIntYMModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { SQLInterval result = p_left.GetAsSQLInterval(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModBit(SQLVariant& p_left,SQLVariant& /*p_right*/) { SQLInterval result = p_left.GetAsSQLInterval(); return SQLVariant(&result); } // TYPE == STINYINT SQLVariant static SQL_OperCharModSTiny(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModSTiny(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModSTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModSTiny(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModSTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModSTiny(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModSTiny(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModSTiny(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModSTiny(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModSTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModSTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModSTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModSTiny(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsSTinyInt()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModSTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModSTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE = UTINYINT SQLVariant static SQL_OperCharModUTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModUTiny(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModUTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModUTiny(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModUTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModUTiny(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModUTiny(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModUTiny(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModUTiny(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModUTiny(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModUTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModUTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModUTiny(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd((int)p_right.GetAsUTinyInt()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModUTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModUTiny(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == SBIGINT SQLVariant static SQL_OperCharModSBig(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModSBig(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModSBig(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModSBig(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModSBig(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModSBig(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModSBig(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModSBig(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModSBig(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModSBig(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModSBig(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModSBig(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModSBig(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsSBigInt()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModSBig(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModSBig(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == UBIGINT SQLVariant static SQL_OperCharModUBig(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperSShortModUBig(SQLVariant& p_left,SQLVariant& p_right) { short result = p_left.GetAsSShort(); result %= p_right.GetAsSShort(); return SQLVariant(result); } SQLVariant static SQL_OperUShortModUBig(SQLVariant& p_left,SQLVariant& p_right) { unsigned short result = p_left.GetAsUShort(); result %= p_right.GetAsUShort(); return SQLVariant(result); } SQLVariant static SQL_OperSLongModUBig(SQLVariant& p_left,SQLVariant& p_right) { int result = p_left.GetAsSLong(); result %= p_right.GetAsSLong(); return SQLVariant(result); } SQLVariant static SQL_OperULongModUBig(SQLVariant& p_left,SQLVariant& p_right) { unsigned int result = p_left.GetAsULong(); result %= p_right.GetAsULong(); return SQLVariant(result); } SQLVariant static SQL_OperFloatModUBig(SQLVariant& p_left,SQLVariant& p_right) { float result = ::fmod(p_left.GetAsFloat(),p_right.GetAsFloat()); return SQLVariant(result); } SQLVariant static SQL_OperDoubleModUBig(SQLVariant& p_left,SQLVariant& p_right) { double result = ::fmod(p_left.GetAsDouble(),p_right.GetAsDouble()); return SQLVariant(result); } SQLVariant static SQL_OperBitModUBig(SQLVariant& p_left,SQLVariant& p_right) { bool result = false; if(p_left.GetAsBit() && p_right.GetAsBit()) { result = true; } return SQLVariant(result); } SQLVariant static SQL_OperSTinyModUBig(SQLVariant& p_left,SQLVariant& p_right) { char result = p_left.GetAsSTinyInt(); result %= p_right.GetAsSTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperUTinyModUBig(SQLVariant& p_left,SQLVariant& p_right) { unsigned char result = p_left.GetAsUTinyInt(); result %= p_right.GetAsUTinyInt(); return SQLVariant(result); } SQLVariant static SQL_OperSBigModUBig(SQLVariant& p_left,SQLVariant& p_right) { SQLBIGINT result = p_left.GetAsSBigInt(); result %= p_right.GetAsSBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperUBigModUBig(SQLVariant& p_left,SQLVariant& p_right) { SQLUBIGINT result = p_left.GetAsUBigInt(); result %= p_right.GetAsUBigInt(); return SQLVariant(result); } SQLVariant static SQL_OperNumModUBig(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % bcd(p_right.GetAsUBigInt()); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModUBig(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModUBig(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsSLong(); return SQLVariant(&result); } // TYPE == NUMERIC SQLVariant static SQL_OperCharModNum(SQLVariant& p_left,SQLVariant& p_right) { double num = ::fmod(p_left.GetAsDouble(),p_right.GetAsBCD().AsDouble()); XString str; str.Format("%lf",num); SQLVariant var(str); return var; } SQLVariant static SQL_OperSShortModNum(SQLVariant& p_left,SQLVariant& p_right) { short num = p_left.GetAsSShort() % p_right.GetAsBCD().AsLong(); SQLVariant var(num); return var; } SQLVariant static SQL_OperUShortModNum(SQLVariant& p_left,SQLVariant& p_right) { unsigned short num = p_left.GetAsUShort() % p_right.GetAsBCD().AsLong(); SQLVariant var(num); return var; } SQLVariant static SQL_OperSLongModNum(SQLVariant& p_left,SQLVariant& p_right) { int num = p_left.GetAsSLong() % p_right.GetAsBCD().AsLong(); SQLVariant var(num); return var; } SQLVariant static SQL_OperULongModNum(SQLVariant& p_left,SQLVariant& p_right) { unsigned int num = p_left.GetAsULong() % p_right.GetAsBCD().AsInt64(); SQLVariant var(num); return var; } SQLVariant static SQL_OperFloatModNum(SQLVariant& p_left,SQLVariant& p_right) { float num = (float) ::fmod(p_left.GetAsFloat(),p_right.GetAsBCD().AsDouble()); SQLVariant var(num); return var; } SQLVariant static SQL_OperDoubleModNum(SQLVariant& p_left,SQLVariant& p_right) { double num = ::fmod(p_left.GetAsDouble(),p_right.GetAsBCD().AsDouble()); SQLVariant var(num); return var; } SQLVariant static SQL_OperBitModNum(SQLVariant& p_left,SQLVariant& /*p_right*/) { SQLVariant var(p_left.GetAsBit()); return var; } SQLVariant static SQL_OperSTinyModNum(SQLVariant& p_left,SQLVariant& p_right) { char num = p_left.GetAsSTinyInt() % (char) p_right.GetAsBCD().AsLong(); SQLVariant var(num); return var; } SQLVariant static SQL_OperUTinyModNum(SQLVariant& p_left,SQLVariant& p_right) { unsigned char num = p_left.GetAsUTinyInt() % (unsigned char)p_right.GetAsBCD().AsLong(); SQLVariant var(num); return var; } SQLVariant static SQL_OperSBigModNum(SQLVariant& p_left,SQLVariant& p_right) { int64 num = p_left.GetAsSBigInt() % p_right.GetAsBCD().AsInt64(); SQLVariant var(num); return var; } SQLVariant static SQL_OperUBigModNum(SQLVariant& p_left,SQLVariant& p_right) { uint64 num = p_left.GetAsUBigInt() % p_right.GetAsBCD().AsUInt64(); SQLVariant var(num); return var; } SQLVariant static SQL_OperNumModNum(SQLVariant& p_left,SQLVariant& p_right) { bcd num = p_left.GetAsBCD() % p_right.GetAsBCD(); SQLVariant var(&num); return var; } SQLVariant static SQL_OperIntYMModNum(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsDouble(); return SQLVariant(&result); } SQLVariant static SQL_OperIntDSModNum(SQLVariant& p_left,SQLVariant& p_right) { SQLInterval result = p_left.GetAsSQLInterval() % p_right.GetAsDouble(); return SQLVariant(&result); } // OPERATOR ARRAY static CalculateFunctionArray OperatorMod[CT_LAST][CT_LAST] = { // CT_CHAR CT_SSHORT CT_USHORT CT_SLONG CT_ULONG CT_FLOAT CT_DOUBLE CT_BIT CT_STINYINT CT_UTINYINT CT_SBIGINT CT_UBIGINT CT_NUMERIC CT_GUID CT_BINARY CT_DATE CT_TIME CT_TIMESTAMP CT_INTERVAL_YM CT_INTERVAL_DS // ---------------------- ------------------------ ------------------------ ----------------------- ----------------------- ----------------------- ------------------------ --------------------- ----------------------- ----------------------- ---------------------- ---------------------- --------------------- -------- --------- -------- -------- ------------ -------------- -------------- /* CT_CHAR */ { nullptr ,&SQL_OperCharModSShort ,&SQL_OperCharModUShort ,&SQL_OperCharModSLong ,&SQL_OperCharModULong ,&SQL_OperCharModFloat ,&SQL_OperCharModDouble ,&SQL_OperCharModBit ,&SQL_OperCharModSTiny ,&SQL_OperCharModUTiny ,&SQL_OperCharModSBig ,&SQL_OperCharModUBig ,&SQL_OperCharModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_SSHORT */ ,{ &SQL_OperSShortModChar,&SQL_OperSShortModSShort,&SQL_OperSShortModUShort,&SQL_OperSShortModSLong,&SQL_OperSShortModULong,&SQL_OperSShortModFloat,&SQL_OperSShortModDouble,&SQL_OperSShortModBit,&SQL_OperSShortModSTiny,&SQL_OperSShortModUTiny,&SQL_OperSShortModSBig,&SQL_OperSShortModUBig,&SQL_OperSShortModNum,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_USHORT */ ,{ &SQL_OperUShortModChar,&SQL_OperUShortModSShort,&SQL_OperUShortModUShort,&SQL_OperUShortModSLong,&SQL_OperUShortModULong,&SQL_OperUShortModFloat,&SQL_OperUShortModDouble,&SQL_OperUShortModBit,&SQL_OperUShortModSTiny,&SQL_OperUShortModUTiny,&SQL_OperUShortModSBig,&SQL_OperUShortModUBig,&SQL_OperUShortModNum,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_SLONG */ ,{ &SQL_OperSLongModChar ,&SQL_OperSLongModSShort ,&SQL_OperSLongModUShort ,&SQL_OperSLongModSLong ,&SQL_OperSLongModULong ,&SQL_OperSLongModFloat ,&SQL_OperSLongModDouble ,&SQL_OperSLongModBit ,&SQL_OperSLongModSTiny ,&SQL_OperSLongModUTiny ,&SQL_OperSLongModSBig ,&SQL_OperSLongModUBig ,&SQL_OperSLongModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_ULONG */ ,{ &SQL_OperULongModChar ,&SQL_OperULongModSShort ,&SQL_OperUlongModUShort ,&SQL_OperULongModSLong ,&SQL_OperULongModULong ,&SQL_OperULongModFloat ,&SQL_OperULongModDouble ,&SQL_OperULongModBit ,&SQL_OperULongModSTiny ,&SQL_OperULongModUTiny ,&SQL_OperULongModSBig ,&SQL_OperULongModUBig ,&SQL_OperULongModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_FLOAT */ ,{ &SQL_OperFloatModChar ,&SQL_OperFloatModSShort ,&SQL_OperFloatModUShort ,&SQL_OperFloatModSLong ,&SQL_OperFloatModULong ,&SQL_OperFloatModFloat ,&SQL_OperFloatModDouble ,&SQL_OperFloatModBit ,&SQL_OperFloatModSTiny ,&SQL_OperFloatModUTiny ,&SQL_OperFloatModSBig ,&SQL_OperFloatModUBig ,&SQL_OperFloatModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_DOUBLE */ ,{ &SQL_OperDoubleModChar,&SQL_OperDoubleModSShort,&SQL_OperDoubleModUShort,&SQL_OperDoubleModSLong,&SQL_OperDoubleModULong,&SQL_OperDoubleModFloat,&SQL_OperDoubleModDouble,&SQL_OperDoubleModBit,&SQL_OperDoubleModSTiny,&SQL_OperDoubleModUTiny,&SQL_OperDoubleModSBig,&SQL_OperDoubleModUBig,&SQL_OperDoubleModNum,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_BIT */ ,{ &SQL_OperBitModChar ,&SQL_OperBitModSShort ,&SQL_OperBitModUShort ,&SQL_OperBitModSLong ,&SQL_OperBitModULong ,&SQL_OperBitModFloat ,&SQL_OperBitModDouble ,&SQL_OperBitModBit ,&SQL_OperBitModSTiny ,&SQL_OperBitModUTiny ,&SQL_OperBitModSBig ,&SQL_OperBitModUBig ,&SQL_OperBitModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_STINYINT */ ,{ &SQL_OperSTinyModChar ,&SQL_OperSTinyModSShort ,&SQL_OperSTinyModUShort ,&SQL_OperSTinyModSLong ,&SQL_OperSTinyModULong ,&SQL_OperSTinyModFloat ,&SQL_OperSTinyModDouble ,&SQL_OperSTinyModBit ,&SQL_OperSTinyModSTiny ,&SQL_OperSTinyModUTiny ,&SQL_OperSTinyModSBig ,&SQL_OperSTinyModUBig ,&SQL_OperSTinyModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_UTINYINT */ ,{ &SQL_OperUTinyModChar ,&SQL_OperUTinyModSShort ,&SQL_OperUTinyModUShort ,&SQL_OperUTinyModSLong ,&SQL_OperUTinyModULong ,&SQL_OperUTinyModFloat ,&SQL_OperUTinyModDouble ,&SQL_OperUTinyModBit ,&SQL_OperUTinyModSTiny ,&SQL_OperUTinyModUTiny ,&SQL_OperUTinyModSBig ,&SQL_OperUTinyModUBig ,&SQL_OperUTinyModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_SBIGINT */ ,{ &SQL_OperSBigModChar ,&SQL_OperSBigModSShort ,&SQL_OperSBigModUShort ,&SQL_OperSBigModSLong ,&SQL_OperSBigModULong ,&SQL_OperSBigModFloat ,&SQL_OperSBigModDouble ,&SQL_OperSBigModBit ,&SQL_OperSBigModSTiny ,&SQL_OperSBigModUTiny ,&SQL_OperSBigModSBig ,&SQL_OperSBigModUBig ,&SQL_OperSBigModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_UBIGINT */ ,{ &SQL_OperUBigModChar ,&SQL_OperUBigModSShort ,&SQL_OperUBigModUShort ,&SQL_OperUBigModSLong ,&SQL_OperUBigModULong ,&SQL_OperUBigModFloat ,&SQL_OperUBigModDouble ,&SQL_OperUBigModBit ,&SQL_OperUBigModSTiny ,&SQL_OperUBigModUTiny ,&SQL_OperUBigModSBig ,&SQL_OperUBigModUBig ,&SQL_OperUBigModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_NUMERIC */ ,{ &SQL_OperNumModChar ,&SQL_OperNumModSShort ,&SQL_OperNumModUShort ,&SQL_OperNumModSLong ,&SQL_OperNumModULong ,&SQL_OperNumModFloat ,&SQL_OperNumModDouble ,&SQL_OperNumModBit ,&SQL_OperNumModSTiny ,&SQL_OperNumModUTiny ,&SQL_OperNumModSBig ,&SQL_OperNumModUBig ,&SQL_OperNumModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_GUID */ ,{ nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_BINARY */ ,{ nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_DATE */ ,{ nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_TIME */ ,{ nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_TIMESTAMP */ ,{ nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_INTERVAL_YM */ ,{ nullptr ,&SQL_OperIntYMModSShort ,&SQL_OperIntYMModUShort ,&SQL_OperIntYMModSLong ,&SQL_OperIntYMModULong ,&SQL_OperIntYMModFloat ,&SQL_OperIntYMModDouble ,&SQL_OperIntYMModBit ,&SQL_OperIntYMModSTiny ,&SQL_OperIntYMModUTiny ,&SQL_OperIntYMModSBig ,&SQL_OperIntYMModUBig ,&SQL_OperIntYMModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } /* CT_INTERVAL_DS */ ,{ nullptr ,&SQL_OperIntDSModSShort ,&SQL_OperIntDSModUShort ,&SQL_OperIntDSModSLong ,&SQL_OperIntDSModULong ,&SQL_OperIntDSModFloat ,&SQL_OperIntDSModDouble ,&SQL_OperIntDSModBit ,&SQL_OperIntDSModSTiny ,&SQL_OperIntDSModUTiny ,&SQL_OperIntDSModSBig ,&SQL_OperIntDSModUBig ,&SQL_OperIntDSModNum ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr ,nullptr } }; // Modulo operator for SQLVariant SQLVariant SQLVariant::operator%(SQLVariant& p_right) { // If one of both is NULL, the result is false if(IsNULL() || p_right.IsNULL()) { return SQLVariant(); } // Getting the concise type SQLConciseType left = SQLTypeToConciseType(m_datatype); SQLConciseType right = SQLTypeToConciseType(p_right.m_datatype); // Check whether both datatypes are valid if(left == CT_LAST || right == CT_LAST) { return SQLVariant(); } // Check whether there is something to modulo by! if(p_right.IsEmpty()) { throw StdException("Cannot do a modulo by zero/empty"); } // Find our comparison function OperatorCalculate function = OperatorMod[left][right].function; if(function) { return (*function)(*this,p_right); } // No compare function found // Data types are not comparable XString leftType = FindDatatype(m_datatype); XString rightType = FindDatatype(p_right.m_datatype); XString error; error.Format("Cannot do the modulo operator on (%s % %s)",leftType.GetString(),rightType.GetString()); throw StdException(error); } SQLVariant& SQLVariant::operator%=(SQLVariant& p_right) { // If one of both is NULL, the result is false if(IsNULL() || p_right.IsNULL()) { SetNULL(); return *this; } // Getting the concise type SQLConciseType left = SQLTypeToConciseType(m_datatype); SQLConciseType right = SQLTypeToConciseType(p_right.m_datatype); // Check whether both datatypes are valid if(left == CT_LAST || right == CT_LAST) { ThrowErrorOperator(SVO_AssignModulo); } // Find our comparison function OperatorCalculate function = OperatorMod[left][right].function; if(function) { *this = (*function)(*this,p_right); return *this; } // No compare function found // Data types are not comparable XString leftType = FindDatatype(m_datatype); XString rightType = FindDatatype(p_right.m_datatype); XString error; error.Format("Cannot do the %= operator on (%s + %s)",leftType.GetString(),rightType.GetString()); throw StdException(error); } // End of namespace }
29.432561
415
0.731362
edwig
103490c319bee3ecb7ef0edf99657bc3c4c01e69
4,807
cpp
C++
03_Tutorial/T02_XMCocos2D/Source/Test/TestChipmunk/DemoQuery.cpp
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
2
2017-08-03T07:15:00.000Z
2018-06-18T10:32:53.000Z
03_Tutorial/T02_XMCocos2D/Source/Test/TestChipmunk/DemoQuery.cpp
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
null
null
null
03_Tutorial/T02_XMCocos2D/Source/Test/TestChipmunk/DemoQuery.cpp
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
2
2019-03-04T22:57:42.000Z
2020-03-06T01:32:26.000Z
/* -------------------------------------------------------------------------- * * File DemoQuery.cpp * Ported By Young-Hwan Mun * Contact xmsoft77@gmail.com * * -------------------------------------------------------------------------- * * Copyright (c) 2010-2013 XMSoft. * Copyright (c) 2010-2013 cocos2d-x.org * Copyright (c) 2007 Scott Lembcke. All rights reserved. * * http://www.cocos2d-x.org * * -------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or ( at your option ) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- */ #include "Precompiled.h" #include "../TestChipmunk2.h" #include "XMChipmunk/chipmunk_unsafe.h" static cpSpace* space; static cpVect mousePoint; cpShape* querySeg = KD_NULL; static KDvoid update ( KDint ticks ) { messageString[0] = '\0'; cpVect start = cpvzero; cpVect end = /*cpv ( 0, 85 );//*/mousePoint; cpVect lineEnd = end; { KDchar infoString[1024]; kdSprintfKHR ( infoString, "Query: Dist ( %f ) Point%s, ", cpvdist ( start, end ), cpvstr ( end ) ); kdStrcat ( messageString, infoString ); } cpSegmentQueryInfo info = { }; if ( cpSpaceSegmentQueryFirst ( space, start, end, CP_ALL_LAYERS, CP_NO_GROUP, &info ) ) { cpVect point = cpSegmentQueryHitPoint ( start, end, info ); lineEnd = cpvadd ( point, cpvzero );//cpvmult ( info.n, 4.0f ) ); KDchar infoString[1024]; kdSprintfKHR ( infoString, "Segment Query: Dist ( %f ) Normal%s", cpSegmentQueryHitDist ( start, end, info ), cpvstr ( info.n ) ); kdStrcat ( messageString, infoString ); } else { kdStrcat ( messageString, "Segment Query ( None )" ); } cpSegmentShapeSetEndpoints ( querySeg, cpvzero, lineEnd ); // force it to update it's collision detection data so it will draw cpShapeUpdate ( querySeg, cpvzero, cpv ( 1.0f, 0.0f ) ); // normal other stuff. KDint steps = 1; cpFloat dt = 1.0f / 60.0f / (cpFloat) steps; for ( KDint i = 0; i < steps; i++ ) { cpSpaceStep ( space, dt ); } } static cpSpace* init ( KDvoid ) { cpResetShapeIdCounter ( ); space = cpSpaceNew ( ); space->iterations = 5; cpBody* staticBody = space->staticBody; cpShape* shape; // add a non-collidable segment as a quick and dirty way to draw the query line shape = cpSpaceAddShape ( space, cpSegmentShapeNew ( staticBody, cpvzero, cpv ( 100.0f, 0.0f ), 4.0f ) ); shape->layers = 0; querySeg = shape; { // add a fat segment cpFloat mass = 1.0f; cpFloat length = 100.0f; cpVect a = cpv ( -length / 2.0f, 0.0f ), b = cpv ( length / 2.0f, 0.0f ); cpBody *body = cpSpaceAddBody ( space, cpBodyNew ( mass, cpMomentForSegment ( mass, a, b ) ) ); body->p = cpv ( 0.0f, 100.0f ); cpSpaceAddShape ( space, cpSegmentShapeNew ( body, a, b, 20.0f ) ); } { // add a static segment cpSpaceAddShape ( space, cpSegmentShapeNew ( staticBody, cpv ( 0, 300 ), cpv ( 300, 0 ), 0.0f ) ); } { // add a pentagon cpFloat mass = 1.0f; const KDint NUM_VERTS = 5; cpVect verts[NUM_VERTS]; for ( KDint i=0; i<NUM_VERTS; i++ ) { cpFloat angle = -2 * KD_PI_F * i / ( NUM_VERTS ); verts[i] = cpv ( 30.f * cpfcos ( angle ), 30.f * cpfsin ( angle ) ); } cpBody* body = cpSpaceAddBody ( space, cpBodyNew ( mass, cpMomentForPoly ( mass, NUM_VERTS, verts, cpvzero ) ) ); body->p = cpv ( 50.0f, 50.0f ); cpSpaceAddShape ( space, cpPolyShapeNew ( body, NUM_VERTS, verts, cpvzero ) ); } { // add a circle cpFloat mass = 1.0f; cpFloat r = 20.0f; cpBody *body = cpSpaceAddBody ( space, cpBodyNew ( mass, cpMomentForCircle ( mass, 0.0f, r, cpvzero ) ) ); body->p = cpv ( 100.0f, 100.0f ); cpSpaceAddShape ( space, cpCircleShapeNew ( body, r, cpvzero ) ); } return space; } static KDvoid destroy ( KDvoid ) { ChipmunkDemoFreeSpaceChildren ( space ); cpSpaceFree ( space ); } chipmunkDemo Query = { "Segment Query", KD_NULL, init, update, destroy, };
30.424051
132
0.59871
mcodegeeks
10355833527765e13469d60529d98fa361566338
7,667
cc
C++
test/utils/test_type_list.cc
devbrain/neutrino
5e7cd7c93b5c264a5f1da6ae88312e14253de10d
[ "Apache-2.0" ]
null
null
null
test/utils/test_type_list.cc
devbrain/neutrino
5e7cd7c93b5c264a5f1da6ae88312e14253de10d
[ "Apache-2.0" ]
null
null
null
test/utils/test_type_list.cc
devbrain/neutrino
5e7cd7c93b5c264a5f1da6ae88312e14253de10d
[ "Apache-2.0" ]
null
null
null
#include <string> #include <vector> #include <type_traits> #include <neutrino/utils/mp/typelist.hh> #include <doctest/doctest.h> using namespace neutrino::mp; TEST_CASE("Test typelist size") { using t0 = type_list<>; using t1 = type_list<int>; using t2 = type_list<int, float>; using t3 = type_list<int, int>; REQUIRE((t0::size() == 0)); REQUIRE((t1::size() == 1)); REQUIRE((t2::size() == 2)); REQUIRE((t3::size() == 2)); } TEST_CASE("Test type_at") { using t = type_list<int, float, bool>; REQUIRE(std::is_same_v<int, type_list_at_t<0, t>>); REQUIRE(std::is_same_v<float, type_list_at_t<1, t>>); REQUIRE(std::is_same_v<bool, type_list_at_t<2, t>>); } TEST_CASE("Test append") { using t0 = type_list<>; using t0_1 = type_list_append_t <int, t0>; using t1 = type_list_append_t <float, t0_1>; using t2 = type_list_append_t <bool, t1>; REQUIRE(t0_1::size() == 1); REQUIRE(std::is_same_v<int, type_list_at_t<0, t0_1>>); REQUIRE(t1::size() == 2); REQUIRE(std::is_same_v<float, type_list_at_t<1, t1>>); REQUIRE(t2::size() == 3); REQUIRE(std::is_same_v<bool, type_list_at_t<2, t2>>); } TEST_CASE("Test prepend") { using t0 = type_list<>; using t0_1 = type_list_prepend_t <int, t0>; using t1 = type_list_prepend_t <float, t0_1>; using t2 = type_list_prepend_t <bool, t1>; REQUIRE(t0_1::size() == 1); REQUIRE(std::is_same_v<int, type_list_at_t<0, t0_1>>); REQUIRE((t1::size() == 2)); REQUIRE(std::is_same_v<float, type_list_at_t<0, t1>>); REQUIRE(std::is_same_v<int, type_list_at_t<1, t1>>); REQUIRE((t2::size() == 3)); REQUIRE(std::is_same_v<bool, type_list_at_t<0, t2>>); REQUIRE(std::is_same_v<float, type_list_at_t<1, t2>>); REQUIRE(std::is_same_v<int, type_list_at_t<2, t2>>); } TEST_CASE("Test merge") { using t0 = type_list<>; using t1 = type_list<int>; using t10 = type_list_merge_t<t0, t1>; REQUIRE((t10::size() == 1)); REQUIRE(std::is_same_v<int, type_list_at_t<0, t10>>); using t2 = type_list<bool, float>; using t102 = type_list_merge_t<t10, t2>; REQUIRE((t102::size() == 3)); REQUIRE(std::is_same_v<int, type_list_at_t<0, t102>>); REQUIRE(std::is_same_v<bool, type_list_at_t<1, t102>>); REQUIRE(std::is_same_v<float, type_list_at_t<2, t102>>); } template <typename T> struct is_integral { static constexpr bool value() noexcept { return std::is_integral <T>::value; } }; TEST_CASE("Test filter") { using t1 = type_list <int, bool, float, std::string, std::vector <int>>; using t2 = type_list_filter_t<is_integral, t1>; REQUIRE((t2::size() == 2)); REQUIRE(std::is_same_v<int, type_list_at_t<0, t2>>); REQUIRE(std::is_same_v<bool, type_list_at_t<1, t2>>); using t0 = type_list <float, std::string, std::vector <int>>; using t01 = type_list_filter_t<is_integral, t0>; REQUIRE((t01::empty())); using t00 = type_list <>; using t001 = type_list_filter_t<is_integral, t00>; REQUIRE((t001::empty())); } template <typename X> struct map { using type = std::vector<X>; }; TEST_CASE("Test mapper") { using t1 = type_list <int, bool, float>; using t2 = type_list_map_t<map, t1>; REQUIRE((t2::size() == 3)); REQUIRE(std::is_same_v<std::vector<int>, type_list_at_t<0, t2>>); REQUIRE(std::is_same_v<std::vector<bool>, type_list_at_t<1, t2>>); REQUIRE(std::is_same_v<std::vector<float>, type_list_at_t<2, t2>>); using t0 = type_list <>; using t01 = type_list_map_t<map, t0>; REQUIRE((t01::empty())); } TEST_CASE("Test to_tuple") { using t1 = type_list <int, bool, float>; using t = type_list_to_tuple_t<t1>; REQUIRE(std::is_same_v<typename std::tuple_element<0, t>::type, int>); REQUIRE(std::is_same_v<typename std::tuple_element<1, t>::type, bool>); REQUIRE(std::is_same_v<typename std::tuple_element<2, t>::type, float>); } TEST_CASE("Test from_tuple") { using t1 = std::tuple <int, bool, float>; using t = tuple_to_type_list_t<t1>; REQUIRE(std::is_same_v<type_list_at_t<0, t>, int>); REQUIRE(std::is_same_v<type_list_at_t<1, t>, bool>); REQUIRE(std::is_same_v<type_list_at_t<2, t>, float>); } TEST_CASE("Test find_first") { using t = type_list <int, bool, float>; constexpr auto idx = type_list_find_first_v<bool, t>; constexpr auto idx0 = type_list_find_first_v<char, t>; REQUIRE(idx == 1); REQUIRE(idx0 == t::npos); using t1 = type_list <int, bool, bool, float>; constexpr auto idx1 = type_list_find_first_v<bool, t1>; constexpr auto idx01 = type_list_find_first_v<char, t1>; REQUIRE(idx1 == 1); REQUIRE(idx01 == t::npos); } TEST_CASE("Test find_last") { using t = type_list <int, bool, float>; constexpr auto idx = type_list_find_last_v<bool, t>; constexpr auto idx0 = type_list_find_last_v<char, t>; REQUIRE(idx == 1); REQUIRE(idx0 == t::npos); using t1 = type_list <int, bool, bool, float>; constexpr auto idx1 = type_list_find_last_v<bool, t1>; constexpr auto idx01 = type_list_find_last_v<char, t1>; REQUIRE(idx1 == 2); REQUIRE(idx01 == t::npos); } TEST_CASE("Test repeat") { using t = type_list_repeat_t<int, 10>; REQUIRE((t::size () == 10)); REQUIRE(std::is_same_v<int, type_list_at_t<0, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<1, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<2, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<3, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<4, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<5, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<6, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<7, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<8, t>>); REQUIRE(std::is_same_v<int, type_list_at_t<9, t>>); } TEST_CASE("Test flatten") { using Types = type_list<int, type_list<float, type_list<double, type_list<char>>>>; using Flat = type_list_flatten_t<Types>; static_assert(std::is_same_v<Flat, type_list<int, float, double, char>>, "Not the same"); } TEST_CASE("contains type") { using A = type_list<int, float, char>; using B = type_list<float>; using C = type_list<double>; static_assert(type_list_contains_types_v<A, B>); static_assert(type_list_contains_types_v<A, A>); static_assert(!type_list_contains_types_v<A, C>); } TEST_CASE("is_subset1") { using t1 = std::tuple<int, double>; using t2 = std::tuple<double, int>; using t3 = std::tuple<int, double, char>; static_assert(is_subset_of_v<t1, t1>, "err"); static_assert(is_subset_of_v<t1, t2>, "err"); static_assert(is_subset_of_v<t2, t1>, "err"); static_assert(is_subset_of_v<t2, t3>, "err"); static_assert(!is_subset_of_v<t3, t2>, "err"); } TEST_CASE("is_subset2") { using t1 = std::index_sequence <0, 1>; using t2 = std::index_sequence <1, 0>; using t3 = std::index_sequence <0, 1, 2>; static_assert(is_subset_of_v<t1, t1>, "err"); static_assert(is_subset_of_v<t1, t2>, "err"); static_assert(is_subset_of_v<t2, t1>, "err"); static_assert(is_subset_of_v<t2, t3>, "err"); static_assert(!is_subset_of_v<t3, t2>, "err"); } TEST_CASE("is_subset3") { using t1 = type_list<int, double>; using t2 = type_list<double, int>; using t3 = type_list<int, double, char>; static_assert(is_subset_of_v<t1, t1>, "err"); static_assert(is_subset_of_v<t1, t2>, "err"); static_assert(is_subset_of_v<t2, t1>, "err"); static_assert(is_subset_of_v<t2, t3>, "err"); static_assert(!is_subset_of_v<t3, t2>, "err"); }
29.375479
93
0.651885
devbrain
1035ac7a03bacc05c2ec548c27f17140a9314a98
6,057
inl
C++
iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl
xiao6768/iceoryx
f99e0c3b5168dcde7f0d7bb99226c7faca01db69
[ "Apache-2.0" ]
1
2021-03-04T12:47:12.000Z
2021-03-04T12:47:12.000Z
iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl
xiao6768/iceoryx
f99e0c3b5168dcde7f0d7bb99226c7faca01db69
[ "Apache-2.0" ]
1
2021-06-14T12:07:47.000Z
2021-06-17T13:43:41.000Z
iceoryx_posh/include/iceoryx_posh/internal/mepoo/mepoo_segment.inl
boschglobal/iceoryx
eb0256407e3cf0baed1efdee6f8eeacf4d3514da
[ "Apache-2.0" ]
null
null
null
// Copyright (c) 2019 by Robert Bosch GmbH. All rights reserved. // Copyright (c) 2021 by Apex.AI Inc. 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. // // SPDX-License-Identifier: Apache-2.0 #ifndef IOX_POSH_MEPOO_MEPOO_SEGMENT_INL #define IOX_POSH_MEPOO_MEPOO_SEGMENT_INL #include "iceoryx_hoofs/error_handling/error_handling.hpp" #include "iceoryx_hoofs/internal/relocatable_pointer/relative_pointer.hpp" #include "iceoryx_posh/internal/log/posh_logging.hpp" #include "iceoryx_posh/mepoo/memory_info.hpp" #include "iceoryx_posh/mepoo/mepoo_config.hpp" namespace iox { namespace mepoo { template <typename SharedMemoryObjectType, typename MemoryManagerType> inline MePooSegment<SharedMemoryObjectType, MemoryManagerType>::MePooSegment( const MePooConfig& mempoolConfig, posix::Allocator& managementAllocator, const posix::PosixGroup& readerGroup, const posix::PosixGroup& writerGroup, const iox::mepoo::MemoryInfo& memoryInfo) noexcept : m_sharedMemoryObject(std::move(createSharedMemoryObject(mempoolConfig, writerGroup))) , m_readerGroup(readerGroup) , m_writerGroup(writerGroup) , m_memoryInfo(memoryInfo) { using namespace posix; AccessController accessController; if (!(readerGroup == writerGroup)) { accessController.addPermissionEntry( AccessController::Category::SPECIFIC_GROUP, AccessController::Permission::READ, readerGroup.getName()); } accessController.addPermissionEntry( AccessController::Category::SPECIFIC_GROUP, AccessController::Permission::READWRITE, writerGroup.getName()); accessController.addPermissionEntry(AccessController::Category::USER, AccessController::Permission::READWRITE); accessController.addPermissionEntry(AccessController::Category::GROUP, AccessController::Permission::READWRITE); accessController.addPermissionEntry(AccessController::Category::OTHERS, AccessController::Permission::NONE); if (!accessController.writePermissionsToFile(m_sharedMemoryObject.getFileHandle())) { errorHandler(Error::kMEPOO__SEGMENT_COULD_NOT_APPLY_POSIX_RIGHTS_TO_SHARED_MEMORY); } m_memoryManager.configureMemoryManager(mempoolConfig, managementAllocator, *m_sharedMemoryObject.getAllocator()); m_sharedMemoryObject.finalizeAllocation(); } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline SharedMemoryObjectType MePooSegment<SharedMemoryObjectType, MemoryManagerType>::createSharedMemoryObject( const MePooConfig& mempoolConfig, const posix::PosixGroup& writerGroup) noexcept { // we let the OS decide where to map the shm segments constexpr void* BASE_ADDRESS_HINT{nullptr}; // on qnx the current working directory will be added to the /dev/shmem path if the leading slash is missing constexpr char SHARED_MEMORY_NAME_PREFIX[] = "/"; posix::SharedMemory::Name_t shmName = SHARED_MEMORY_NAME_PREFIX + writerGroup.getName(); return std::move( SharedMemoryObjectType::create(shmName, MemoryManager::requiredChunkMemorySize(mempoolConfig), posix::AccessMode::READ_WRITE, posix::OwnerShip::MINE, BASE_ADDRESS_HINT, static_cast<mode_t>(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) .and_then([this](auto& sharedMemoryObject) { this->setSegmentId(iox::rp::BaseRelativePointer::registerPtr(sharedMemoryObject.getBaseAddress(), sharedMemoryObject.getSizeInBytes())); LogDebug() << "Roudi registered payload data segment " << iox::log::HexFormat(reinterpret_cast<uint64_t>(sharedMemoryObject.getBaseAddress())) << " with size " << sharedMemoryObject.getSizeInBytes() << " to id " << m_segmentId; }) .or_else([](auto&) { errorHandler(Error::kMEPOO__SEGMENT_UNABLE_TO_CREATE_SHARED_MEMORY_OBJECT); }) .value()); } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline posix::PosixGroup MePooSegment<SharedMemoryObjectType, MemoryManagerType>::getWriterGroup() const noexcept { return m_writerGroup; } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline posix::PosixGroup MePooSegment<SharedMemoryObjectType, MemoryManagerType>::getReaderGroup() const noexcept { return m_readerGroup; } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline MemoryManagerType& MePooSegment<SharedMemoryObjectType, MemoryManagerType>::getMemoryManager() noexcept { return m_memoryManager; } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline const SharedMemoryObjectType& MePooSegment<SharedMemoryObjectType, MemoryManagerType>::getSharedMemoryObject() const noexcept { return m_sharedMemoryObject; } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline uint64_t MePooSegment<SharedMemoryObjectType, MemoryManagerType>::getSegmentId() const noexcept { return m_segmentId; } template <typename SharedMemoryObjectType, typename MemoryManagerType> inline void MePooSegment<SharedMemoryObjectType, MemoryManagerType>::setSegmentId(const uint64_t segmentId) noexcept { m_segmentId = segmentId; } } // namespace mepoo } // namespace iox #endif // IOX_POSH_MEPOO_MEPOO_SEGMENT_INL
44.866667
117
0.742612
xiao6768
1035b23f5013e09b3b54ff5c26a7957de97ce48e
1,630
cpp
C++
src/Basic/CastKind.cpp
jonaszell97/cdotc
089b1161155118a0b78637883f0a6a04c6e9b436
[ "MIT" ]
1
2020-05-29T12:34:33.000Z
2020-05-29T12:34:33.000Z
src/Basic/CastKind.cpp
jonaszell97/cdotc
089b1161155118a0b78637883f0a6a04c6e9b436
[ "MIT" ]
null
null
null
src/Basic/CastKind.cpp
jonaszell97/cdotc
089b1161155118a0b78637883f0a6a04c6e9b436
[ "MIT" ]
null
null
null
namespace cdot { const char* CastNames[] = {"<noop>", "<lvalue_to_rvalue>", "inttofp", "fptoint", "ext", "trunc", "ptrtoint", "inttoptr", "sign_cast", "is_null", "fpext", "fptrunc", "dyn_cast", "upcast", "<conv_op>", "bitcast", "proto_wrap", "proto_unwrap", "existential_cast", "try_existential_cast", "existential_unwrap", "try_existential_unwrap", "existential_ref", "nothrow_to_throw", "thin_to_thick", "<meta_type_cast>", "<forward>", "<move>", "<copy>", "mut_ref_to_ref", "mut_ptr_to_ptr", "<rvalue_to_const_ref>", "int_to_enum", "enum_to_int", "<to_void>", "<to_()>", "<to_meta_type>", "<clang_conv>"}; } // namespace cdot
37.906977
52
0.263804
jonaszell97
10365b22e3bd41148d0f40ca25e38b55cf81651c
1,517
hpp
C++
node_modules/grad-listbuymenu/cfgFunctions.hpp
gruppe-adler/TvT_HoldingPoint.Altis
685a25e1cab315c877dcc0bbc41cf7d181fdd3f8
[ "CC-BY-3.0" ]
1
2020-08-31T15:48:28.000Z
2020-08-31T15:48:28.000Z
node_modules/grad-listbuymenu/cfgFunctions.hpp
AdlerSalbei/TvT_HoldingPoint.Altis
685a25e1cab315c877dcc0bbc41cf7d181fdd3f8
[ "CC-BY-3.0" ]
3
2017-01-16T09:25:39.000Z
2017-02-15T08:35:16.000Z
node_modules/grad-listbuymenu/cfgFunctions.hpp
gruppe-adler/TvT_HoldingPoint.Altis
685a25e1cab315c877dcc0bbc41cf7d181fdd3f8
[ "CC-BY-3.0" ]
null
null
null
#ifndef MODULES_DIRECTORY #define MODULES_DIRECTORY modules #endif class GRAD_lbm { class common { file = MODULES_DIRECTORY\grad-listBuymenu\functions\common; class addFunds {}; class addInteraction {}; class checkCargoSpace {}; class getModuleRoot {}; class getPermissionLevel {}; class getPicturePath {}; class getStock {}; class isVehicle {}; class loadBuymenu {}; class rotateModel {}; class setPermissionLevel {}; }; class buy { file = MODULES_DIRECTORY\grad-listBuymenu\functions\buy; class buyClient {}; class buyItem {}; class buyServer {}; class buyUnit {}; class buyVehicle {}; class buyWeapon {}; class buyWearable {}; class callCodeClient {}; class callCodeServer {}; class reimburse {}; class vehicleMarker {}; }; class init { file = MODULES_DIRECTORY\grad-listBuymenu\functions\init; class initClient { postInit = 1; }; class initStocks { postInit = 1; }; class initVehicles { postInit = 1; }; }; class update { file = MODULES_DIRECTORY\grad-listBuymenu\functions\update; class updateBuyButton {}; class updateCategories {}; class updateFunds {}; class updateItemData {}; class updateList {}; class updatePicture {}; }; };
25.711864
67
0.562294
gruppe-adler
1036cc1288d0d727ffd0b5d1dd780f6643df1948
2,121
cpp
C++
goals/GetWeaponGoal_Evaluator.cpp
Sundragon1993/AI-Game-Pratices
7549b23f71c3b2b5145388f0d8d4900bdb307a7a
[ "MIT" ]
null
null
null
goals/GetWeaponGoal_Evaluator.cpp
Sundragon1993/AI-Game-Pratices
7549b23f71c3b2b5145388f0d8d4900bdb307a7a
[ "MIT" ]
null
null
null
goals/GetWeaponGoal_Evaluator.cpp
Sundragon1993/AI-Game-Pratices
7549b23f71c3b2b5145388f0d8d4900bdb307a7a
[ "MIT" ]
null
null
null
#include "GetWeaponGoal_Evaluator.h" #include "../Raven_ObjectEnumerations.h" #include "misc/Stream_Utility_Functions.h" #include "../Raven_Game.h" #include "../Raven_Map.h" #include "Goal_Think.h" #include "Raven_Goal_Types.h" #include "Raven_Feature.h" #include <string> //------------------- CalculateDesirability --------------------------------- //----------------------------------------------------------------------------- double GetWeaponGoal_Evaluator::CalculateDesirability(Raven_Bot* pBot) { //grab the distance to the closest instance of the weapon type double Distance = Raven_Feature::DistanceToItem(pBot, m_iWeaponType); //if the distance feature is rated with a value of 1 it means that the //item is either not present on the map or too far away to be worth //considering, therefore the desirability is zero if (Distance == 1) { return 0; } else { //value used to tweak the desirability const double Tweaker = 0.15; double Health, WeaponStrength; Health = Raven_Feature::Health(pBot); WeaponStrength = Raven_Feature::IndividualWeaponStrength(pBot, m_iWeaponType); double Desirability = (Tweaker * Health * (1-WeaponStrength)) / Distance; //ensure the value is in the range 0 to 1 Clamp(Desirability, 0, 1); Desirability *= m_dCharacterBias; return Desirability; } } //------------------------------ SetGoal -------------------------------------- void GetWeaponGoal_Evaluator::SetGoal(Raven_Bot* pBot) { pBot->GetBrain()->AddGoal_GetItem(m_iWeaponType); } //-------------------------- RenderInfo --------------------------------------- //----------------------------------------------------------------------------- void GetWeaponGoal_Evaluator::RenderInfo(Vector2D Position, Raven_Bot* pBot) { std::string s; switch(m_iWeaponType) { case type_rail_gun: s="RG: ";break; case type_rocket_launcher: s="RL: "; break; case type_shotgun: s="SG: "; break; } gdi->TextAtPos(Position, s + ttos(CalculateDesirability(pBot), 2)); }
27.907895
79
0.577558
Sundragon1993
10377f4601e1190527cb32fa954e6b643ee279df
36
hpp
C++
lib/include/drivers/adc.hpp
niclasberg/asfw
f836de1c0d6350541e3253863dedab6a3eb81df7
[ "MIT" ]
null
null
null
lib/include/drivers/adc.hpp
niclasberg/asfw
f836de1c0d6350541e3253863dedab6a3eb81df7
[ "MIT" ]
null
null
null
lib/include/drivers/adc.hpp
niclasberg/asfw
f836de1c0d6350541e3253863dedab6a3eb81df7
[ "MIT" ]
null
null
null
#pragma once #include "adc/make.hpp"
18
23
0.75
niclasberg
103807b73b45150d29886c8b26abc609000a59bf
9,356
cpp
C++
frameworks/render/modules/osg/dmzRenderModuleIsectOSG.cpp
dmzgroup/dmz
fc2d9ddcb04ed71f4106b8d33539529807b3dea6
[ "MIT" ]
2
2015-11-05T03:03:43.000Z
2017-05-15T12:55:39.000Z
frameworks/render/modules/osg/dmzRenderModuleIsectOSG.cpp
dmzgroup/dmz
fc2d9ddcb04ed71f4106b8d33539529807b3dea6
[ "MIT" ]
null
null
null
frameworks/render/modules/osg/dmzRenderModuleIsectOSG.cpp
dmzgroup/dmz
fc2d9ddcb04ed71f4106b8d33539529807b3dea6
[ "MIT" ]
null
null
null
#include <dmzRenderConsts.h> #include "dmzRenderModuleIsectOSG.h" #include <dmzRenderUtilOSG.h> #include <dmzRenderObjectDataOSG.h> #include <dmzRuntimePluginFactoryLinkSymbol.h> #include <dmzTypesHandleContainer.h> #include <dmzTypesVector.h> #include <dmzTypesString.h> #include <osg/CullFace> #include <osg/Drawable> #include <osg/Group> #include <osg/LineSegment> #include <osg/Node> #include <osgUtil/IntersectVisitor> dmz::RenderModuleIsectOSG::RenderModuleIsectOSG ( const PluginInfo &Info, const Config &Local) : Plugin (Info), RenderModuleIsect (Info), _log (Info), _core (0), _defaultIsectMask (0) { _init (Local); } dmz::RenderModuleIsectOSG::~RenderModuleIsectOSG () { } void dmz::RenderModuleIsectOSG::discover_plugin ( const PluginDiscoverEnum Mode, const Plugin *PluginPtr) { if (Mode == PluginDiscoverAdd) { if (!_core) { _core = RenderModuleCoreOSG::cast (PluginPtr); if (_core) { _defaultIsectMask = _core->lookup_isect_mask (RenderIsectStaticName); _defaultIsectMask |= _core->lookup_isect_mask (RenderIsectEntityName); } } } else if (Mode == PluginDiscoverRemove) { if (_core && (_core == RenderModuleCoreOSG::cast (PluginPtr))) { _core = 0; _defaultIsectMask = 0; } } } dmz::Boolean dmz::RenderModuleIsectOSG::do_isect ( const IsectParameters &Parameters, const IsectTestContainer &TestValues, IsectResultContainer &resultContainer) { if (_core) { osg::ref_ptr<osg::Group> scene = _core->get_isect (); // osg::ref_ptr<osg::Group> scene = _core->get_static_objects (); osg::BoundingSphere bs = scene->getBound(); std::vector<osg::LineSegment*> lsList;// = new osg::LineSegment[TestValues]; UInt32 mask (_defaultIsectMask); HandleContainer attrList; if (Parameters.get_isect_attributes (attrList)) { mask = 0; HandleContainerIterator it; Handle attr (0); while (attrList.get_next (it, attr)) { mask |= _core->lookup_isect_mask (attr); } } osgUtil::IntersectVisitor visitor; visitor.setTraversalMask (mask); UInt32 testHandle; IsectTestTypeEnum testType; Vector vec1, vec2; std::vector<UInt32> handleArray; std::vector<Vector> sourceArray; TestValues.get_first_test (testHandle, testType, vec1, vec2); do { if (testType == IsectRayTest) { vec2 = (vec1 + (vec2 * (bs.radius () * 2))); } osg::LineSegment *ls = new osg::LineSegment; ls->set (to_osg_vector (vec1), to_osg_vector (vec2)); visitor.addLineSegment (ls); lsList.push_back (ls); handleArray.push_back (testHandle); sourceArray.push_back (vec1); } while (TestValues.get_next_test (testHandle, testType, vec1, vec2)); scene->accept (visitor); IsectTestResultTypeEnum param = Parameters.get_test_result_type (); bool closestPoint = (param == IsectClosestPoint); bool firstPoint = (param == IsectFirstPoint); if (closestPoint && !Parameters.get_calculate_distance ()) { firstPoint = true; closestPoint = false; } Boolean result (False); for (unsigned int ix = 0; ix < lsList.size () && !result; ix++) { osgUtil::IntersectVisitor::HitList resultHits; resultHits = visitor.getHitList (lsList[ix]); if (!resultHits.empty ()) { for (unsigned int jy = 0; jy < resultHits.size (); jy++) { Handle objHandle (0); osgUtil::Hit currentHit = resultHits[jy]; Boolean disabled (False); osg::CullFace *cf (0); osg::NodePath path = currentHit.getNodePath (); for ( osg::NodePath::iterator it = path.begin (); (it != path.end ()) && !disabled; it++) { osg::Node *node (*it); if (node) { osg::StateSet *sSet = (node->getStateSet ()); if (sSet) { osg::CullFace *cfTmp ( (osg::CullFace*)(sSet->getAttribute ( osg::StateAttribute::CULLFACE))); if (cfTmp) { cf = cfTmp; } } osg::Referenced *r (node->getUserData ()); if (r) { RenderObjectDataOSG *data ( dynamic_cast<RenderObjectDataOSG *> (r)); if (data) { if (!data->do_isect ()) { // Should never reach here now disabled = True; } else { objHandle = data->get_handle (); } } } } } if (!disabled) { Vector lsPoint = to_dmz_vector (currentHit.getWorldIntersectPoint ()); IsectResult lsResult; lsResult.set_isect_test_id (handleArray[ix]); lsResult.set_point (lsPoint); if (Parameters.get_calculate_object_handle ()) { lsResult.set_object_handle (objHandle); } if (Parameters.get_calculate_normal ()) { lsResult.set_normal ( to_dmz_vector (currentHit.getWorldIntersectNormal ())); } if (Parameters.get_calculate_distance ()) { lsResult.set_distance ((lsPoint - sourceArray[ix]).magnitude ()); } if (Parameters.get_calculate_cull_mode ()) { UInt32 cullMask = 0; if (cf) { if (cf->getMode () == osg::CullFace::FRONT || cf->getMode () == osg::CullFace::FRONT_AND_BACK) { cullMask |= IsectPolygonFrontCulledMask; } if (cf->getMode () == osg::CullFace::BACK || cf->getMode () == osg::CullFace::FRONT_AND_BACK) { cullMask |= IsectPolygonBackCulledMask; } } else { cullMask |= IsectPolygonBackCulledMask; } lsResult.set_cull_mode (cullMask); } if (Parameters.get_calculate_object_handle ()) { osg::Geode *hitObject = currentHit.getGeode (); } resultContainer.add_result (lsResult); if (firstPoint) { result = true; } } } } } if (closestPoint && resultContainer.get_result_count () > 1) { IsectResult current; resultContainer.get_first (current); IsectResult closest (current); double closestDist; current.get_distance (closestDist); while (resultContainer.get_next (current)) { double testDist; if (current.get_distance (testDist)) { if (testDist < closestDist) { closest = current; } } } IsectResultContainer closestContainer; closestContainer.add_result (closest); resultContainer = closestContainer; } } return resultContainer.get_result_count () > 0; } dmz::UInt32 dmz::RenderModuleIsectOSG::enable_isect (const Handle ObjectHandle) { UInt32 result (0); if (_core) { osg::Group *g (_core->lookup_dynamic_object (ObjectHandle)); if (g) { RenderObjectDataOSG *data ( dynamic_cast<RenderObjectDataOSG *> (g->getUserData ())); if (data) { result = UInt32 (data->enable_isect ()); if (0 == result) { UInt32 mask = g->getNodeMask (); mask |= data->get_mask (); g->setNodeMask (mask); } } } } return result; } dmz::UInt32 dmz::RenderModuleIsectOSG::disable_isect (const Handle ObjectHandle) { UInt32 result (0); if (_core) { osg::Group *g (_core->lookup_dynamic_object (ObjectHandle)); if (g) { RenderObjectDataOSG *data ( dynamic_cast<RenderObjectDataOSG *> (g->getUserData ())); if (data) { result = UInt32 (data->disable_isect ()); if (1 == result) { UInt32 mask = g->getNodeMask (); data->set_mask (mask & _defaultIsectMask); mask &= (~_defaultIsectMask); g->setNodeMask (mask); } } } } return result; } void dmz::RenderModuleIsectOSG::_init (const Config &Local) { } extern "C" { DMZ_PLUGIN_FACTORY_LINK_SYMBOL dmz::Plugin * create_dmzRenderModuleIsectOSG ( const dmz::PluginInfo &Info, dmz::Config &local, dmz::Config &global) { return new dmz::RenderModuleIsectOSG (Info, local); } };
25.016043
90
0.525973
dmzgroup
103902cac236f8a988d05f01197ad080a846cfd2
1,180
cpp
C++
CSE 225L Data Structures and Algorithms/Resources/Codes Previous/Spring-2019-CSE225 1/Lab Final/main(3).cpp
diptu/Teaching
20655bb2c688ae29566b0a914df4a3e5936a2f61
[ "MIT" ]
null
null
null
CSE 225L Data Structures and Algorithms/Resources/Codes Previous/Spring-2019-CSE225 1/Lab Final/main(3).cpp
diptu/Teaching
20655bb2c688ae29566b0a914df4a3e5936a2f61
[ "MIT" ]
null
null
null
CSE 225L Data Structures and Algorithms/Resources/Codes Previous/Spring-2019-CSE225 1/Lab Final/main(3).cpp
diptu/Teaching
20655bb2c688ae29566b0a914df4a3e5936a2f61
[ "MIT" ]
null
null
null
#include <iostream> #include "binarysearchtree.h" #include "binarysearchtree.cpp" using namespace std; struct Node { int data; Node *left, *right; }; Node* newNode(int key) { Node* node = new Node; node->data = key; node->left = node->right = nullptr; return node; } void inorder(Node* root) { if (root == nullptr) return; inorder(root->left); cout << root->data << " "; inorder(root->right); } Node* insert(Node* root, int key) { if (root == nullptr) return newNode(key); if (key < root->data) root->left = insert(root->left, key); else root->right = insert(root->right, key); return root; } int findSum(Node* root) { if (root == nullptr) return 0; return root->data + findSum(root->left) + findSum(root->right); } void update(Node* root, int &sum) { if (root == nullptr) return; update(root->left, sum); sum = sum - root->data; root->data += sum; update(root->right, sum); } int main() { Node* root = nullptr; int keys[] = { 5, 3, 2, 4, 6, 8, 10 }; int n = sizeof(keys)/sizeof(keys[0]); for (int key : keys) root = insert(root, key); int sum = findSum(root); update(root, sum); inorder(root); return 0; }
12.967033
64
0.616949
diptu
103a03280340da22c8ed3fca32af62c5570dc6cb
1,923
cpp
C++
inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_split.cpp
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
2
2020-11-18T14:14:06.000Z
2020-11-28T04:55:57.000Z
inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_split.cpp
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
30
2020-11-13T11:44:07.000Z
2022-02-21T13:03:16.000Z
inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_split.cpp
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
1
2020-12-18T15:47:45.000Z
2020-12-18T15:47:45.000Z
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "dsr_tests_common.hpp" namespace { using namespace LayerTestsUtils::vpu; struct SplitTestCase { DataShapeWithUpperBound dataShapes; int64_t axis, numSplits; }; const auto combinations = testing::Combine( testing::Values( ngraph::element::f16), testing::Values( ngraph::element::i32), testing::Values( SplitTestCase{{{6, 12, 10}, {6, 12, 15}}, 1, 3}, SplitTestCase{{{6, 12, 10}, {9, 12, 10}}, 1, 3}, SplitTestCase{{{6, 12}, {10, 12}}, 1, 4}, SplitTestCase{{{6, 12, 10, 24}, {6, 12, 10, 50}}, 0, 6}, SplitTestCase{{{6, 12, 10, 24}, {6, 12, 10, 50}}, -3, 2}, SplitTestCase{{{1, 128, 4}, {1, 256, 4}}, 2, 4}), testing::Values(CommonTestUtils::DEVICE_MYRIAD)); using Parameters = std::tuple< DataType, DataType, SplitTestCase, LayerTestsUtils::TargetDevice >; class DSR_Split : public testing::WithParamInterface<Parameters>, public DSR_TestsCommon { protected: std::shared_ptr<ngraph::Node> createTestedOp() override { const auto& parameters = GetParam(); const auto& dataType = std::get<0>(parameters); const auto& idxType = std::get<1>(parameters); const auto& splitSetup = std::get<2>(parameters); targetDevice = std::get<3>(parameters); const auto inputSubgraph = createInputSubgraphWithDSR(dataType, splitSetup.dataShapes); const auto axis = ngraph::opset5::Constant::create(idxType, {}, {splitSetup.axis}); return std::make_shared<ngraph::opset5::Split>(inputSubgraph, axis, splitSetup.numSplits); } }; TEST_P(DSR_Split, CompareWithReference) { Run(); } INSTANTIATE_TEST_CASE_P(smoke_DynamicSplit, DSR_Split, combinations); } // namespace
31.016129
98
0.616745
Andruxin52rus
103a5165c7c2ac742043f1a5153f39633e5eee24
329
cpp
C++
libFileArbTests/libFileArbTestsMain.cpp
NeilJustice/FileArb
4104c64170177a0b5d8d52ed7af7968970f0ecfd
[ "MIT" ]
1
2021-12-09T22:49:01.000Z
2021-12-09T22:49:01.000Z
libFileArbTests/libFileArbTestsMain.cpp
NeilJustice/FileArb
4104c64170177a0b5d8d52ed7af7968970f0ecfd
[ "MIT" ]
8
2020-03-04T01:43:04.000Z
2020-04-11T22:27:41.000Z
libFileArbTests/libFileArbTestsMain.cpp
NeilJustice/FileArb
4104c64170177a0b5d8d52ed7af7968970f0ecfd
[ "MIT" ]
null
null
null
#include "pch.h" #if defined _WIN32 #if defined _DEBUG #pragma comment(lib, "libboost_regex-vc142-mt-gd-x64-1_75.lib") #else #pragma comment(lib, "libboost_regex-vc142-mt-x64-1_75.lib") #endif #endif int main(int argc, char* argv[]) { const int exitCode = ZenUnit::RunTests(argc, argv); return exitCode; }
20.5625
64
0.68693
NeilJustice
103b0498197dc6af29c8f5c84777ee4bf2f3e02e
1,022
cpp
C++
test/std/utilities/variant/variant.get/holds_alternative.pass.cpp
AOSiP/platform_external_libcxx
eb2115113f10274c0d25523ba44c3c7373ea3209
[ "MIT" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
test/std/utilities/variant/variant.get/holds_alternative.pass.cpp
AOSiP/platform_external_libcxx
eb2115113f10274c0d25523ba44c3c7373ea3209
[ "MIT" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
test/std/utilities/variant/variant.get/holds_alternative.pass.cpp
AOSiP/platform_external_libcxx
eb2115113f10274c0d25523ba44c3c7373ea3209
[ "MIT" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
// -*- C++ -*- //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 // <variant> // template <class T, class... Types> // constexpr bool holds_alternative(const variant<Types...>& v) noexcept; #include "test_macros.h" #include <variant> int main() { { using V = std::variant<int>; constexpr V v; static_assert(std::holds_alternative<int>(v), ""); } { using V = std::variant<int, long>; constexpr V v; static_assert(std::holds_alternative<int>(v), ""); static_assert(!std::holds_alternative<long>(v), ""); } { // noexcept test using V = std::variant<int>; const V v; ASSERT_NOEXCEPT(std::holds_alternative<int>(v)); } }
26.205128
80
0.521526
AOSiP
103bba595724b6413cd8334d43d429aa9c5f1a98
1,410
hpp
C++
libs/dmlf/include/dmlf/collective_learning/client_params.hpp
devjsc/ledger
5681480faf6e2aeee577f149c17745d6ab4d4ab3
[ "Apache-2.0" ]
null
null
null
libs/dmlf/include/dmlf/collective_learning/client_params.hpp
devjsc/ledger
5681480faf6e2aeee577f149c17745d6ab4d4ab3
[ "Apache-2.0" ]
null
null
null
libs/dmlf/include/dmlf/collective_learning/client_params.hpp
devjsc/ledger
5681480faf6e2aeee577f149c17745d6ab4d4ab3
[ "Apache-2.0" ]
null
null
null
#pragma once //------------------------------------------------------------------------------ // // Copyright 2018-2019 Fetch.AI Limited // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //------------------------------------------------------------------------------ #include "math/base_types.hpp" namespace fetch { namespace dmlf { namespace collective_learning { template <typename DataType> struct ClientParams { using SizeType = fetch::math::SizeType; SizeType n_algorithms_per_client = 1; SizeType batch_size{}; SizeType max_updates; DataType learning_rate; bool print_loss = false; std::vector<std::string> input_names = {"Input"}; std::string label_name = "Label"; std::string error_name = "Error"; std::string results_dir = "."; }; } // namespace collective_learning } // namespace dmlf } // namespace fetch
30
80
0.619858
devjsc
103c81feea8781325ba84e138b234bfbcf5721c1
598
cc
C++
erizoAPI/addon.cc
winlinvip/licode
ee4f012147264c29cc6d8282f2a573b801a2454b
[ "MIT" ]
1
2018-08-21T03:59:44.000Z
2018-08-21T03:59:44.000Z
erizoAPI/addon.cc
winlinvip/licode
ee4f012147264c29cc6d8282f2a573b801a2454b
[ "MIT" ]
null
null
null
erizoAPI/addon.cc
winlinvip/licode
ee4f012147264c29cc6d8282f2a573b801a2454b
[ "MIT" ]
1
2018-08-21T03:59:47.000Z
2018-08-21T03:59:47.000Z
#ifndef BUILDING_NODE_EXTENSION #define BUILDING_NODE_EXTENSION #endif #include <nan.h> #include "WebRtcConnection.h" #include "OneToManyProcessor.h" #include "OneToManyTranscoder.h" #include "SyntheticInput.h" #include "ExternalInput.h" #include "ExternalOutput.h" #include "ThreadPool.h" #include "IOThreadPool.h" NAN_MODULE_INIT(InitAll) { WebRtcConnection::Init(target); OneToManyProcessor::Init(target); ExternalInput::Init(target); ExternalOutput::Init(target); SyntheticInput::Init(target); ThreadPool::Init(target); IOThreadPool::Init(target); } NODE_MODULE(addon, InitAll)
23.92
35
0.779264
winlinvip
103ca24d6f03bd2def6c7cb404e11020d3be086b
22,248
cpp
C++
ngraph/test/backend/detection_output.in.cpp
MikhailPedus/openvino
5f9ef0cf26543b3dde80b3b2bfc7e996e7c55d5b
[ "Apache-2.0" ]
null
null
null
ngraph/test/backend/detection_output.in.cpp
MikhailPedus/openvino
5f9ef0cf26543b3dde80b3b2bfc7e996e7c55d5b
[ "Apache-2.0" ]
27
2020-12-29T14:38:34.000Z
2022-02-21T13:04:03.000Z
ngraph/test/backend/detection_output.in.cpp
dorloff/openvino
1c3848a96fdd325b044babe6d5cd26db341cf85b
[ "Apache-2.0" ]
null
null
null
//***************************************************************************** // Copyright 2020 Intel Corporation // // 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. //***************************************************************************** // clang-format off #ifdef ${BACKEND_NAME}_FLOAT_TOLERANCE_BITS #define DEFAULT_FLOAT_TOLERANCE_BITS ${BACKEND_NAME}_FLOAT_TOLERANCE_BITS #endif #ifdef ${BACKEND_NAME}_DOUBLE_TOLERANCE_BITS #define DEFAULT_DOUBLE_TOLERANCE_BITS ${BACKEND_NAME}_DOUBLE_TOLERANCE_BITS #endif // clang-format on #include "gtest/gtest.h" #include "ngraph/ngraph.hpp" #include "util/engine/test_engines.hpp" #include "util/test_case.hpp" #include "util/test_control.hpp" using namespace std; using namespace ngraph; static string s_manifest = "${MANIFEST}"; using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs) { op::DetectionOutputAttrs attrs; attrs.num_classes = 3; attrs.background_label_id = -1; attrs.top_k = -1; attrs.variance_encoded_in_target = true; attrs.keep_top_k = {2}; attrs.code_type = "caffe.PriorBoxParameter.CORNER"; attrs.share_location = false; attrs.nms_threshold = 0.5; attrs.confidence_threshold = 0.3; attrs.clip_after_nms = false; attrs.clip_before_nms = true; attrs.decrease_label_id = false; attrs.normalized = true; attrs.input_height = 0; attrs.input_width = 0; attrs.objectness_score = 0; size_t num_prior_boxes = 2; size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; size_t prior_box_size = attrs.normalized ? 4 : 5; size_t num_images = 2; Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; Shape prior_boxes_shape{ 1, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; auto loc = make_shared<op::Parameter>(element::f32, loc_shape); auto conf = make_shared<op::Parameter>(element::f32, conf_shape); auto prior_boxes = make_shared<op::Parameter>(element::f32, prior_boxes_shape); auto f = make_shared<Function>(make_shared<op::DetectionOutput>(loc, conf, prior_boxes, attrs), ParameterVector{loc, conf, prior_boxes}); auto test_case = test::TestCase<TestEngine>(f); // locations test_case.add_input<float>({ // batch 0, class 0 0.1, 0.1, 0.2, 0.2, 0.0, 0.1, 0.2, 0.15, // batch 0, class 1 0.3, 0.2, 0.5, 0.3, 0.2, 0.1, 0.42, 0.66, // batch 0, class 2 0.05, 0.1, 0.2, 0.3, 0.2, 0.1, 0.33, 0.44, // batch 1, class 0 0.2, 0.1, 0.4, 0.2, 0.1, 0.05, 0.2, 0.25, // batch 1, class 1 0.1, 0.2, 0.5, 0.3, 0.1, 0.1, 0.12, 0.34, // batch 1, class 2 0.25, 0.11, 0.4, 0.32, 0.2, 0.12, 0.38, 0.24, }); test_case.add_input<float>({ // batch 0 0.1, 0.9, 0.4, 0.7, 0, 0.2, // batch 1 0.7, 0.8, 0.42, 0.33, 0.81, 0.2, }); test_case.add_input<float>({ // prior box 0 0.0, 0.5, 0.1, 0.2, // prior box 1 0.0, 0.3, 0.1, 0.35, }); Shape output_shape{1, 1, num_images * static_cast<size_t>(attrs.keep_top_k[0]), 7}; test_case.add_expected_output<float>( output_shape, {0, 0, 0.7, 0.2, 0.4, 0.52, 1, 0, 1, 0.9, 0, 0.6, 0.3, 0.35, 1, 1, 0.81, 0.25, 0.41, 0.5, 0.67, 1, 1, 0.8, 0.1, 0.55, 0.3, 0.45}); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_share_location) { op::DetectionOutputAttrs attrs; attrs.num_classes = 3; attrs.background_label_id = -1; attrs.top_k = -1; attrs.variance_encoded_in_target = true; attrs.keep_top_k = {2}; attrs.code_type = "caffe.PriorBoxParameter.CORNER"; attrs.share_location = true; attrs.nms_threshold = 0.5; attrs.confidence_threshold = 0.3; attrs.clip_after_nms = false; attrs.clip_before_nms = true; attrs.decrease_label_id = false; attrs.normalized = true; attrs.input_height = 0; attrs.input_width = 0; attrs.objectness_score = 0; size_t num_prior_boxes = 2; size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; size_t prior_box_size = attrs.normalized ? 4 : 5; size_t num_images = 2; Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; Shape prior_boxes_shape{ num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; auto loc = make_shared<op::Parameter>(element::f32, loc_shape); auto conf = make_shared<op::Parameter>(element::f32, conf_shape); auto prior_boxes = make_shared<op::Parameter>(element::f32, prior_boxes_shape); auto f = make_shared<Function>(make_shared<op::DetectionOutput>(loc, conf, prior_boxes, attrs), ParameterVector{loc, conf, prior_boxes}); auto test_case = test::TestCase<TestEngine>(f); // locations test_case.add_input<float>({ // batch 0 0.1, 0.1, 0.2, 0.2, 0.0, 0.1, 0.2, 0.15, // batch 1 0.2, 0.1, 0.4, 0.2, 0.1, 0.05, 0.2, 0.25, }); test_case.add_input<float>({ // batch 0 0.1, 0.9, 0.4, 0.7, 0, 0.2, // batch 1 0.7, 0.8, 0.42, 0.33, 0.81, 0.2, }); test_case.add_input<float>({ // batch 0 0.0, 0.5, 0.1, 0.2, 0.0, 0.3, 0.1, 0.35, // batch 1 0.33, 0.2, 0.52, 0.37, 0.22, 0.1, 0.32, 0.36, }); Shape output_shape{1, 1, num_images * static_cast<size_t>(attrs.keep_top_k[0]), 7}; test_case.add_expected_output<float>(output_shape, { 0, 0, 0.7, 0, 0.4, 0.3, 0.5, 0, 1, 0.9, 0.1, 0.6, 0.3, 0.4, 1, 1, 0.81, 0.32, 0.15, 0.52, 0.61, 1, 1, 0.8, 0.53, 0.3, 0.92, 0.57, }); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_normalized) { op::DetectionOutputAttrs attrs; attrs.num_classes = 3; attrs.background_label_id = -1; attrs.top_k = -1; attrs.variance_encoded_in_target = true; attrs.keep_top_k = {2}; attrs.code_type = "caffe.PriorBoxParameter.CORNER"; attrs.share_location = true; attrs.nms_threshold = 0.5; attrs.confidence_threshold = 0.3; attrs.clip_after_nms = false; attrs.clip_before_nms = true; attrs.decrease_label_id = false; attrs.normalized = true; attrs.input_height = 0; attrs.input_width = 0; attrs.objectness_score = 0; size_t num_prior_boxes = 2; size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; size_t prior_box_size = attrs.normalized ? 4 : 5; size_t num_images = 2; Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; Shape prior_boxes_shape{ num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; auto loc = make_shared<op::Parameter>(element::f32, loc_shape); auto conf = make_shared<op::Parameter>(element::f32, conf_shape); auto prior_boxes = make_shared<op::Parameter>(element::f32, prior_boxes_shape); auto f = make_shared<Function>(make_shared<op::DetectionOutput>(loc, conf, prior_boxes, attrs), ParameterVector{loc, conf, prior_boxes}); auto test_case = test::TestCase<TestEngine>(f); // locations test_case.add_input<float>({ // batch 0 0.1, 0.1, 0.2, 0.2, 0.0, 0.1, 0.2, 0.15, // batch 1 0.2, 0.1, 0.4, 0.2, 0.1, 0.05, 0.2, 0.25, }); test_case.add_input<float>({ // batch 0 0.1, 0.9, 0.4, 0.7, 0, 0.2, // batch 1 0.7, 0.8, 0.42, 0.33, 0.81, 0.2, }); test_case.add_input<float>({ // batch 0 0.0, 0.5, 0.1, 0.2, 0.0, 0.3, 0.1, 0.35, // batch 1 0.33, 0.2, 0.52, 0.37, 0.22, 0.1, 0.32, 0.36, }); Shape output_shape{1, 1, num_images * static_cast<size_t>(attrs.keep_top_k[0]), 7}; test_case.add_expected_output<float>(output_shape, { 0, 0, 0.7, 0, 0.4, 0.3, 0.5, 0, 1, 0.9, 0.1, 0.6, 0.3, 0.4, 1, 1, 0.81, 0.32, 0.15, 0.52, 0.61, 1, 1, 0.8, 0.53, 0.3, 0.92, 0.57, }); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_keep_all_bboxes) { op::DetectionOutputAttrs attrs; attrs.num_classes = 2; attrs.background_label_id = -1; attrs.top_k = -1; attrs.variance_encoded_in_target = false; attrs.keep_top_k = {-1}; attrs.code_type = "caffe.PriorBoxParameter.CORNER"; attrs.share_location = false; attrs.nms_threshold = 0.5; attrs.confidence_threshold = 0.3; attrs.clip_after_nms = false; attrs.clip_before_nms = true; attrs.decrease_label_id = false; attrs.normalized = true; attrs.input_height = 0; attrs.input_width = 0; attrs.objectness_score = 0; size_t num_prior_boxes = 2; size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; size_t prior_box_size = attrs.normalized ? 4 : 5; size_t num_images = 3; Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; Shape prior_boxes_shape{ num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; auto loc = make_shared<op::Parameter>(element::f32, loc_shape); auto conf = make_shared<op::Parameter>(element::f32, conf_shape); auto prior_boxes = make_shared<op::Parameter>(element::f32, prior_boxes_shape); auto f = make_shared<Function>(make_shared<op::DetectionOutput>(loc, conf, prior_boxes, attrs), ParameterVector{loc, conf, prior_boxes}); auto test_case = test::TestCase<TestEngine>(f); // locations test_case.add_input<float>({ // batch 0, class 0 0.1, 0.1, 0.2, 0.2, 0.0, 0.1, 0.2, 0.15, // batch 0, class 1 0.3, 0.2, 0.5, 0.3, 0.2, 0.1, 0.42, 0.66, // batch 1, class 0 0.05, 0.1, 0.2, 0.3, 0.2, 0.1, 0.33, 0.44, // batch 1, class 1 0.2, 0.1, 0.4, 0.2, 0.1, 0.05, 0.2, 0.25, // batch 2, class 0 0.1, 0.2, 0.5, 0.3, 0.1, 0.1, 0.12, 0.34, // batch 2, class 1 0.25, 0.11, 0.4, 0.32, 0.2, 0.12, 0.38, 0.24, }); test_case.add_input<float>({ // batch 0 0.1, 0.9, 0.4, 0.7, // batch 1 0.7, 0.8, 0.42, 0.33, // batch 1 0.1, 0.2, 0.32, 0.43, }); test_case.add_input<float>({ // batch 0 priors 0.0, 0.5, 0.1, 0.2, 0.0, 0.3, 0.1, 0.35, // batch 0 variances 0.12, 0.11, 0.32, 0.02, 0.02, 0.20, 0.09, 0.71, // batch 1 priors 0.33, 0.2, 0.52, 0.37, 0.22, 0.1, 0.32, 0.36, // batch 1 variances 0.01, 0.07, 0.12, 0.13, 0.41, 0.33, 0.2, 0.1, // batch 2 priors 0.0, 0.3, 0.1, 0.35, 0.22, 0.1, 0.32, 0.36, // batch 2 variances 0.32, 0.02, 0.13, 0.41, 0.33, 0.2, 0.02, 0.20, }); Shape output_shape{1, 1, num_images * attrs.num_classes * num_prior_boxes, 7}; test_case.add_expected_output<float>( output_shape, { 0, 0, 0.4, 0.006, 0.34, 0.145, 0.563, 0, 1, 0.9, 0, 0.511, 0.164, 0.203, 0, 1, 0.7, 0.004, 0.32, 0.1378, 0.8186, 1, 0, 0.7, 0.3305, 0.207, 0.544, 0.409, 1, 0, 0.42, 0.302, 0.133, 0.4, 0.38, 1, 1, 0.8, 0.332, 0.207, 0.5596, 0.4272, 1, 1, 0.33, 0.261, 0.1165, 0.36, 0.385, 2, 0, 0.32, 0.3025, 0.122, 0.328, 0.424, 2, 1, 0.43, 0.286, 0.124, 0.3276, 0.408, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_center_size) { op::DetectionOutputAttrs attrs; attrs.num_classes = 3; attrs.background_label_id = -1; attrs.top_k = -1; attrs.variance_encoded_in_target = true; attrs.keep_top_k = {2}; attrs.code_type = "caffe.PriorBoxParameter.CENTER_SIZE"; attrs.share_location = false; attrs.nms_threshold = 0.5; attrs.confidence_threshold = 0.3; attrs.clip_after_nms = false; attrs.clip_before_nms = true; attrs.decrease_label_id = false; attrs.normalized = true; attrs.input_height = 0; attrs.input_width = 0; attrs.objectness_score = 0; size_t num_prior_boxes = 2; size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; size_t prior_box_size = attrs.normalized ? 4 : 5; size_t num_images = 2; Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; Shape prior_boxes_shape{ num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; auto loc = make_shared<op::Parameter>(element::f32, loc_shape); auto conf = make_shared<op::Parameter>(element::f32, conf_shape); auto prior_boxes = make_shared<op::Parameter>(element::f32, prior_boxes_shape); auto f = make_shared<Function>(make_shared<op::DetectionOutput>(loc, conf, prior_boxes, attrs), ParameterVector{loc, conf, prior_boxes}); auto test_case = test::TestCase<TestEngine>(f); // locations test_case.add_input<float>({ // batch 0, class 0 0.1, 0.1, 0.2, 0.2, 0.0, 0.1, 0.2, 0.15, // batch 0, class 1 0.3, 0.2, 0.5, 0.3, 0.2, 0.1, 0.42, 0.66, // batch 0, class 2 0.05, 0.1, 0.2, 0.3, 0.2, 0.1, 0.33, 0.44, // batch 1, class 0 0.2, 0.1, 0.4, 0.2, 0.1, 0.05, 0.2, 0.25, // batch 1, class 1 0.1, 0.2, 0.5, 0.3, 0.1, 0.1, 0.12, 0.34, // batch 1, class 2 0.25, 0.11, 0.4, 0.32, 0.2, 0.12, 0.38, 0.24, }); test_case.add_input<float>({ // batch 0 0.1, 0.9, 0.4, 0.7, 0, 0.2, // batch 1 0.7, 0.8, 0.42, 0.33, 0.81, 0.2, }); test_case.add_input<float>({ // batch 0 0.0, 0.5, 0.1, 0.2, 0.0, 0.3, 0.1, 0.35, // batch 1 0.33, 0.2, 0.52, 0.37, 0.22, 0.1, 0.32, 0.36, }); Shape output_shape{1, 1, num_images * static_cast<size_t>(attrs.keep_top_k[0]), 7}; test_case.add_expected_output<float>( output_shape, { 0, 0, 0.7, 0, 0.28163019, 0.14609808, 0.37836978, 0, 1, 0.9, 0, 0.49427515, 0.11107014, 0.14572485, 1, 1, 0.81, 0.22040875, 0.079573378, 0.36959124, 0.4376266, 1, 1, 0.8, 0.32796675, 0.18435785, 0.56003326, 0.40264216, }); test_case.run(); } NGRAPH_TEST(${BACKEND_NAME}, detection_output_5_inputs) { op::DetectionOutputAttrs attrs; attrs.num_classes = 2; attrs.background_label_id = -1; attrs.top_k = -1; attrs.variance_encoded_in_target = true; attrs.keep_top_k = {2}; attrs.code_type = "caffe.PriorBoxParameter.CORNER"; attrs.share_location = false; attrs.nms_threshold = 0.5; attrs.confidence_threshold = 0.3; attrs.clip_after_nms = false; attrs.clip_before_nms = true; attrs.decrease_label_id = false; attrs.normalized = true; attrs.input_height = 0; attrs.input_width = 0; attrs.objectness_score = 0.6; size_t num_prior_boxes = 2; size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; size_t prior_box_size = attrs.normalized ? 4 : 5; size_t num_images = 2; Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; Shape prior_boxes_shape{ num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; auto loc = make_shared<op::Parameter>(element::f32, loc_shape); auto conf = make_shared<op::Parameter>(element::f32, conf_shape); auto prior_boxes = make_shared<op::Parameter>(element::f32, prior_boxes_shape); auto aux_loc = make_shared<op::Parameter>(element::f32, loc_shape); auto aux_conf = make_shared<op::Parameter>(element::f32, conf_shape); auto f = make_shared<Function>( make_shared<op::DetectionOutput>(loc, conf, prior_boxes, aux_conf, aux_loc, attrs), ParameterVector{loc, conf, prior_boxes, aux_conf, aux_loc}); auto test_case = test::TestCase<TestEngine>(f); // locations test_case.add_input<float>({ // batch 0, class 0 0.1, 0.1, 0.2, 0.2, 0.0, 0.1, 0.2, 0.15, // batch 0, class 1 0.3, 0.2, 0.5, 0.3, 0.2, 0.1, 0.42, 0.66, // batch 1, class 0 0.2, 0.1, 0.4, 0.2, 0.1, 0.05, 0.2, 0.25, // batch 1, class 1 0.1, 0.2, 0.5, 0.3, 0.1, 0.1, 0.12, 0.34, }); // confidence test_case.add_input<float>({ // batch 0 0.1, 0.9, 0.4, 0.7, // batch 1 0.42, 0.33, 0.81, 0.2, }); // prior boxes test_case.add_input<float>({ // batch 0 0.0, 0.5, 0.1, 0.2, 0.0, 0.3, 0.1, 0.35, // batch 1 0.33, 0.2, 0.52, 0.37, 0.22, 0.1, 0.32, 0.36, }); // aux conf test_case.add_input<float>({ // batch 0 0.1, 0.3, 0.5, 0.8, // batch 1 0.5, 0.8, 0.01, 0.1, }); // aux locations test_case.add_input<float>({ // batch 0, class 0 0.1, 0.2, 0.5, 0.3, 0.1, 0.1, 0.12, 0.34, // batch 0, class 1 0.25, 0.11, 0.4, 0.32, 0.2, 0.12, 0.38, 0.24, // batch 1, class 0 0.3, 0.2, 0.5, 0.3, 0.2, 0.1, 0.42, 0.66, // batch 1, class 1 0.05, 0.1, 0.2, 0.3, 0.2, 0.1, 0.33, 0.44, }); Shape output_shape{1, 1, num_images * static_cast<size_t>(attrs.keep_top_k[0]), 7}; test_case.add_expected_output<float>( output_shape, { 0, 0, 0.4, 0.55, 0.61, 1, 0.97, 0, 1, 0.7, 0.4, 0.52, 0.9, 1, 1, 0, 0.42, 0.83, 0.5, 1, 0.87, 1, 1, 0.33, 0.63, 0.35, 1, 1, }); test_case.run(); }
25.484536
100
0.502247
MikhailPedus
103cd6311a5b2270ba19ff696c286cc96cffd054
19,920
cpp
C++
Libraries/RobsJuceModules/rosic/_third_party/angelscript/as_module.cpp
RobinSchmidt/RS-MET-Preliminary
6c01cbaad7cce3daa3293c444dd9e4b74e5ebfbe
[ "FTL" ]
34
2017-04-19T18:26:02.000Z
2022-02-15T17:47:26.000Z
Libraries/RobsJuceModules/rosic/_third_party/angelscript/as_module.cpp
RobinSchmidt/RS-MET-Preliminary
6c01cbaad7cce3daa3293c444dd9e4b74e5ebfbe
[ "FTL" ]
307
2017-05-04T21:45:01.000Z
2022-02-03T00:59:01.000Z
Libraries/RobsJuceModules/rosic/_third_party/angelscript/as_module.cpp
RobinSchmidt/RS-MET-Preliminary
6c01cbaad7cce3daa3293c444dd9e4b74e5ebfbe
[ "FTL" ]
4
2017-09-05T17:04:31.000Z
2021-12-15T21:24:28.000Z
/* AngelCode Scripting Library Copyright (c) 2003-2007 Andreas Jonsson This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. The original version of this library can be located at: http://www.angelcode.com/angelscript/ Andreas Jonsson andreas@angelcode.com */ // // as_module.cpp // // A class that holds a script module // #include "as_config.h" #include "as_module.h" #include "as_builder.h" #include "as_context.h" BEGIN_AS_NAMESPACE asCModule::asCModule(const char *name, int id, asCScriptEngine *engine) { this->name = name; this->engine = engine; this->moduleID = id; builder = 0; isDiscarded = false; isBuildWithoutErrors = false; contextCount = 0; moduleCount = 0; isGlobalVarInitialized = false; initFunction = 0; } asCModule::~asCModule() { Reset(); if( builder ) { DELETE(builder,asCBuilder); builder = 0; } // Remove the module from the engine if( engine ) { if( engine->lastModule == this ) engine->lastModule = 0; int index = (moduleID >> 16); engine->scriptModules[index] = 0; } } int asCModule::AddScriptSection(const char *name, const char *code, int codeLength, int lineOffset, bool makeCopy) { if( !builder ) builder = NEW(asCBuilder)(engine, this); builder->AddCode(name, code, codeLength, lineOffset, (int)builder->scripts.GetLength(), makeCopy); return asSUCCESS; } int asCModule::Build() { assert( contextCount == 0 ); Reset(); if( !builder ) return asSUCCESS; // Store the section names for( size_t n = 0; n < builder->scripts.GetLength(); n++ ) { asCString *sectionName = NEW(asCString)(builder->scripts[n]->name); scriptSections.PushLast(sectionName); } // Compile the script int r = builder->Build(); DELETE(builder,asCBuilder); builder = 0; if( r < 0 ) { // Reset module again Reset(); isBuildWithoutErrors = false; return r; } isBuildWithoutErrors = true; engine->PrepareEngine(); CallInit(); return r; } int asCModule::ResetGlobalVars() { if( !isGlobalVarInitialized ) return asERROR; CallExit(); CallInit(); return 0; } void asCModule::CallInit() { if( isGlobalVarInitialized ) return; memset(globalMem.AddressOf(), 0, globalMem.GetLength()*sizeof(asDWORD)); if( initFunction && initFunction->byteCode.GetLength() == 0 ) return; int id = asFUNC_INIT; asIScriptContext *ctx = 0; int r = engine->CreateContext(&ctx, true); if( r >= 0 && ctx ) { // TODO: Add error handling ((asCContext*)ctx)->PrepareSpecial(id, this); ctx->Execute(); ctx->Release(); ctx = 0; } isGlobalVarInitialized = true; } void asCModule::CallExit() { if( !isGlobalVarInitialized ) return; for( size_t n = 0; n < scriptGlobals.GetLength(); n++ ) { if( scriptGlobals[n]->type.IsObject() ) { void *obj = *(void**)(globalMem.AddressOf() + scriptGlobals[n]->index); if( obj ) { asCObjectType *ot = scriptGlobals[n]->type.GetObjectType(); if( ot->beh.release ) engine->CallObjectMethod(obj, ot->beh.release); else { if( ot->beh.destruct ) engine->CallObjectMethod(obj, ot->beh.destruct); engine->CallFree(ot, obj); } } } } isGlobalVarInitialized = false; } void asCModule::Discard() { isDiscarded = true; } void asCModule::Reset() { assert( !IsUsed() ); CallExit(); // Free global variables globalMem.SetLength(0); globalVarPointers.SetLength(0); isBuildWithoutErrors = true; isDiscarded = false; if( initFunction ) { engine->DeleteScriptFunction(initFunction->id); initFunction = 0; } size_t n; for( n = 0; n < scriptFunctions.GetLength(); n++ ) engine->DeleteScriptFunction(scriptFunctions[n]->id); scriptFunctions.SetLength(0); for( n = 0; n < importedFunctions.GetLength(); n++ ) { DELETE(importedFunctions[n],asCScriptFunction); } importedFunctions.SetLength(0); // Release bound functions for( n = 0; n < bindInformations.GetLength(); n++ ) { int oldFuncID = bindInformations[n].importedFunction; if( oldFuncID != -1 ) { asCModule *oldModule = engine->GetModuleFromFuncId(oldFuncID); if( oldModule != 0 ) { // Release reference to the module oldModule->ReleaseModuleRef(); } } } bindInformations.SetLength(0); for( n = 0; n < stringConstants.GetLength(); n++ ) { DELETE(stringConstants[n],asCString); } stringConstants.SetLength(0); for( n = 0; n < scriptGlobals.GetLength(); n++ ) { DELETE(scriptGlobals[n],asCProperty); } scriptGlobals.SetLength(0); for( n = 0; n < scriptSections.GetLength(); n++ ) { DELETE(scriptSections[n],asCString); } scriptSections.SetLength(0); for( n = 0; n < classTypes.GetLength(); n++ ) classTypes[n]->refCount--; classTypes.SetLength(0); // Release all used object types for( n = 0; n < usedTypes.GetLength(); n++ ) usedTypes[n]->refCount--; usedTypes.SetLength(0); // Release all config groups for( n = 0; n < configGroups.GetLength(); n++ ) configGroups[n]->Release(); configGroups.SetLength(0); } int asCModule::GetFunctionIDByName(const char *name) { if( isBuildWithoutErrors == false ) return asERROR; // TODO: Improve linear search // Find the function id int id = -1; for( size_t n = 0; n < scriptFunctions.GetLength(); n++ ) { if( scriptFunctions[n]->name == name ) { if( id == -1 ) id = scriptFunctions[n]->id; else return asMULTIPLE_FUNCTIONS; } } if( id == -1 ) return asNO_FUNCTION; return id; } int asCModule::GetMethodIDByDecl(asCObjectType *ot, const char *decl) { if( isBuildWithoutErrors == false ) return asERROR; return engine->GetMethodIDByDecl(ot, decl, this); } int asCModule::GetImportedFunctionCount() { if( isBuildWithoutErrors == false ) return asERROR; return (int)importedFunctions.GetLength(); } int asCModule::GetImportedFunctionIndexByDecl(const char *decl) { if( isBuildWithoutErrors == false ) return asERROR; asCBuilder bld(engine, this); asCScriptFunction func(this); bld.ParseFunctionDeclaration(decl, &func); // TODO: Improve linear search // Search script functions for matching interface int id = -1; for( asUINT n = 0; n < importedFunctions.GetLength(); ++n ) { if( func.name == importedFunctions[n]->name && func.returnType == importedFunctions[n]->returnType && func.parameterTypes.GetLength() == importedFunctions[n]->parameterTypes.GetLength() ) { bool match = true; for( asUINT p = 0; p < func.parameterTypes.GetLength(); ++p ) { if( func.parameterTypes[p] != importedFunctions[n]->parameterTypes[p] ) { match = false; break; } } if( match ) { if( id == -1 ) id = n; else return asMULTIPLE_FUNCTIONS; } } } if( id == -1 ) return asNO_FUNCTION; return id; } int asCModule::GetFunctionCount() { if( isBuildWithoutErrors == false ) return asERROR; return (int)scriptFunctions.GetLength(); } int asCModule::GetFunctionIDByDecl(const char *decl) { if( isBuildWithoutErrors == false ) return asERROR; asCBuilder bld(engine, this); asCScriptFunction func(this); int r = bld.ParseFunctionDeclaration(decl, &func); if( r < 0 ) return asINVALID_DECLARATION; // TODO: Improve linear search // Search script functions for matching interface int id = -1; for( size_t n = 0; n < scriptFunctions.GetLength(); ++n ) { if( scriptFunctions[n]->objectType == 0 && func.name == scriptFunctions[n]->name && func.returnType == scriptFunctions[n]->returnType && func.parameterTypes.GetLength() == scriptFunctions[n]->parameterTypes.GetLength() ) { bool match = true; for( size_t p = 0; p < func.parameterTypes.GetLength(); ++p ) { if( func.parameterTypes[p] != scriptFunctions[n]->parameterTypes[p] ) { match = false; break; } } if( match ) { if( id == -1 ) id = scriptFunctions[n]->id; else return asMULTIPLE_FUNCTIONS; } } } if( id == -1 ) return asNO_FUNCTION; return id; } int asCModule::GetGlobalVarCount() { if( isBuildWithoutErrors == false ) return asERROR; return (int)scriptGlobals.GetLength(); } int asCModule::GetGlobalVarIDByName(const char *name) { if( isBuildWithoutErrors == false ) return asERROR; // Find the global var id int id = -1; for( size_t n = 0; n < scriptGlobals.GetLength(); n++ ) { if( scriptGlobals[n]->name == name ) { id = (int)n; break; } } if( id == -1 ) return asNO_GLOBAL_VAR; return moduleID | id; } int asCModule::GetGlobalVarIDByDecl(const char *decl) { if( isBuildWithoutErrors == false ) return asERROR; asCBuilder bld(engine, this); asCProperty gvar; bld.ParseVariableDeclaration(decl, &gvar); // TODO: Improve linear search // Search script functions for matching interface int id = -1; for( size_t n = 0; n < scriptGlobals.GetLength(); ++n ) { if( gvar.name == scriptGlobals[n]->name && gvar.type == scriptGlobals[n]->type ) { id = (int)n; break; } } if( id == -1 ) return asNO_GLOBAL_VAR; return moduleID | id; } int asCModule::AddConstantString(const char *str, size_t len) { // The str may contain null chars, so we cannot use strlen, or strcmp, or strcpy asCString *cstr = NEW(asCString)(str, len); // TODO: Improve linear search // Has the string been registered before? for( size_t n = 0; n < stringConstants.GetLength(); n++ ) { if( *stringConstants[n] == *cstr ) { DELETE(cstr,asCString); return (int)n; } } // No match was found, add the string stringConstants.PushLast(cstr); return (int)stringConstants.GetLength() - 1; } const asCString &asCModule::GetConstantString(int id) { return *stringConstants[id]; } int asCModule::GetNextFunctionId() { return engine->GetNextScriptFunctionId(); } int asCModule::GetNextImportedFunctionId() { return FUNC_IMPORTED | (asUINT)importedFunctions.GetLength(); } int asCModule::AddScriptFunction(int sectionIdx, int id, const char *name, const asCDataType &returnType, asCDataType *params, int *inOutFlags, int paramCount, bool isInterface, asCObjectType *objType) { assert(id >= 0); // Store the function information asCScriptFunction *func = NEW(asCScriptFunction)(this); func->funcType = isInterface ? asFUNC_INTERFACE : asFUNC_SCRIPT; func->name = name; func->id = id; func->returnType = returnType; func->scriptSectionIdx = sectionIdx; for( int n = 0; n < paramCount; n++ ) { func->parameterTypes.PushLast(params[n]); func->inOutFlags.PushLast(inOutFlags[n]); } func->objectType = objType; scriptFunctions.PushLast(func); engine->SetScriptFunction(func); // Compute the signature id if( objType ) func->ComputeSignatureId(engine); return 0; } int asCModule::AddImportedFunction(int id, const char *name, const asCDataType &returnType, asCDataType *params, int *inOutFlags, int paramCount, int moduleNameStringID) { assert(id >= 0); // Store the function information asCScriptFunction *func = NEW(asCScriptFunction)(this); func->funcType = asFUNC_IMPORTED; func->name = name; func->id = id; func->returnType = returnType; for( int n = 0; n < paramCount; n++ ) { func->parameterTypes.PushLast(params[n]); func->inOutFlags.PushLast(inOutFlags[n]); } func->objectType = 0; importedFunctions.PushLast(func); sBindInfo info; info.importedFunction = -1; info.importFrom = moduleNameStringID; bindInformations.PushLast(info); return 0; } asCScriptFunction *asCModule::GetScriptFunction(int funcID) { return engine->scriptFunctions[funcID & 0xFFFF]; } asCScriptFunction *asCModule::GetImportedFunction(int funcID) { return importedFunctions[funcID & 0xFFFF]; } asCScriptFunction *asCModule::GetSpecialFunction(int funcID) { if( funcID & FUNC_IMPORTED ) return importedFunctions[funcID & 0xFFFF]; else { if( (funcID & 0xFFFF) == asFUNC_INIT ) return initFunction; else if( (funcID & 0xFFFF) == asFUNC_STRING ) { assert(false); } return engine->scriptFunctions[funcID & 0xFFFF]; } } int asCModule::AllocGlobalMemory(int size) { int index = (int)globalMem.GetLength(); size_t *start = globalMem.AddressOf(); globalMem.SetLength(index + size); // Update the addresses in the globalVarPointers for( size_t n = 0; n < globalVarPointers.GetLength(); n++ ) { if( globalVarPointers[n] >= start && globalVarPointers[n] < (start+index) ) globalVarPointers[n] = &globalMem[0] + (size_t(globalVarPointers[n]) - size_t(start))/sizeof(void*); } return index; } int asCModule::AddContextRef() { ENTERCRITICALSECTION(criticalSection); int r = ++contextCount; LEAVECRITICALSECTION(criticalSection); return r; } int asCModule::ReleaseContextRef() { ENTERCRITICALSECTION(criticalSection); int r = --contextCount; LEAVECRITICALSECTION(criticalSection); return r; } int asCModule::AddModuleRef() { ENTERCRITICALSECTION(criticalSection); int r = ++moduleCount; LEAVECRITICALSECTION(criticalSection); return r; } int asCModule::ReleaseModuleRef() { ENTERCRITICALSECTION(criticalSection); int r = --moduleCount; LEAVECRITICALSECTION(criticalSection); return r; } bool asCModule::CanDelete() { // Don't delete if not discarded if( !isDiscarded ) return false; // Are there any contexts still referencing the module? if( contextCount ) return false; // If there are modules referencing this one we need to check for circular referencing if( moduleCount ) { // Check if all the modules are without external reference asCArray<asCModule*> modules; if( CanDeleteAllReferences(modules) ) { // Unbind all functions. This will break any circular references for( size_t n = 0; n < bindInformations.GetLength(); n++ ) { int oldFuncID = bindInformations[n].importedFunction; if( oldFuncID != -1 ) { asCModule *oldModule = engine->GetModuleFromFuncId(oldFuncID); if( oldModule != 0 ) { // Release reference to the module oldModule->ReleaseModuleRef(); } } } } // Can't delete the module yet because the // other modules haven't released this one return false; } return true; } bool asCModule::CanDeleteAllReferences(asCArray<asCModule*> &modules) { if( !isDiscarded ) return false; if( contextCount ) return false; modules.PushLast(this); // Check all bound functions for referenced modules for( size_t n = 0; n < bindInformations.GetLength(); n++ ) { int funcID = bindInformations[n].importedFunction; asCModule *module = engine->GetModuleFromFuncId(funcID); // If the module is already in the list don't check it again bool inList = false; for( size_t m = 0; m < modules.GetLength(); m++ ) { if( modules[m] == module ) { inList = true; break; } } if( !inList ) { bool ret = module->CanDeleteAllReferences(modules); if( ret == false ) return false; } } // If no module has external references then all can be deleted return true; } int asCModule::BindImportedFunction(int index, int sourceID) { // Remove reference to old module int oldFuncID = bindInformations[index].importedFunction; if( oldFuncID != -1 ) { asCModule *oldModule = engine->GetModuleFromFuncId(oldFuncID); if( oldModule != 0 ) { // Release reference to the module oldModule->ReleaseModuleRef(); } } if( sourceID == -1 ) { bindInformations[index].importedFunction = -1; return asSUCCESS; } // Must verify that the interfaces are equal asCModule *srcModule = engine->GetModuleFromFuncId(sourceID); if( srcModule == 0 ) return asNO_MODULE; asCScriptFunction *dst = GetImportedFunction(index); if( dst == 0 ) return asNO_FUNCTION; asCScriptFunction *src = srcModule->GetScriptFunction(sourceID); if( src == 0 ) return asNO_FUNCTION; // Verify return type if( dst->returnType != src->returnType ) return asINVALID_INTERFACE; if( dst->parameterTypes.GetLength() != src->parameterTypes.GetLength() ) return asINVALID_INTERFACE; for( size_t n = 0; n < dst->parameterTypes.GetLength(); ++n ) { if( dst->parameterTypes[n] != src->parameterTypes[n] ) return asINVALID_INTERFACE; } // Add reference to new module srcModule->AddModuleRef(); bindInformations[index].importedFunction = sourceID; return asSUCCESS; } const char *asCModule::GetImportedFunctionSourceModule(int index) { if( index >= (int)bindInformations.GetLength() ) return 0; index = bindInformations[index].importFrom; return stringConstants[index]->AddressOf(); } bool asCModule::IsUsed() { if( contextCount ) return true; if( moduleCount ) return true; return false; } asCObjectType *asCModule::GetObjectType(const char *type) { // TODO: Improve linear search for( size_t n = 0; n < classTypes.GetLength(); n++ ) if( classTypes[n]->name == type ) return classTypes[n]; return 0; } asCObjectType *asCModule::RefObjectType(asCObjectType *type) { if( !type ) return 0; // Determine the index local to the module for( size_t n = 0; n < usedTypes.GetLength(); n++ ) if( usedTypes[n] == type ) return type; usedTypes.PushLast(type); type->refCount++; RefConfigGroupForObjectType(type); return type; } void asCModule::RefConfigGroupForFunction(int funcId) { // Find the config group where the function was registered asCConfigGroup *group = engine->FindConfigGroupForFunction(funcId); if( group == 0 ) return; // Verify if the module is already referencing the config group for( size_t n = 0; n < configGroups.GetLength(); n++ ) { if( configGroups[n] == group ) return; } // Add reference to the group configGroups.PushLast(group); group->AddRef(); } void asCModule::RefConfigGroupForGlobalVar(int gvarId) { // Find the config group where the function was registered asCConfigGroup *group = engine->FindConfigGroupForGlobalVar(gvarId); if( group == 0 ) return; // Verify if the module is already referencing the config group for( size_t n = 0; n < configGroups.GetLength(); n++ ) { if( configGroups[n] == group ) return; } // Add reference to the group configGroups.PushLast(group); group->AddRef(); } void asCModule::RefConfigGroupForObjectType(asCObjectType *type) { if( type == 0 ) return; // Find the config group where the function was registered asCConfigGroup *group = engine->FindConfigGroupForObjectType(type); if( group == 0 ) return; // Verify if the module is already referencing the config group for( size_t n = 0; n < configGroups.GetLength(); n++ ) { if( configGroups[n] == group ) return; } // Add reference to the group configGroups.PushLast(group); group->AddRef(); } int asCModule::GetGlobalVarIndex(int propIdx) { void *ptr = 0; if( propIdx < 0 ) ptr = engine->globalPropAddresses[-int(propIdx) - 1]; else ptr = globalMem.AddressOf() + (propIdx & 0xFFFF); for( int n = 0; n < (signed)globalVarPointers.GetLength(); n++ ) if( globalVarPointers[n] == ptr ) return n; globalVarPointers.PushLast(ptr); return (int)globalVarPointers.GetLength()-1; } void asCModule::UpdateGlobalVarPointer(void *pold, void *pnew) { for( asUINT n = 0; n < globalVarPointers.GetLength(); n++ ) if( globalVarPointers[n] == pold ) { globalVarPointers[n] = pnew; return; } } END_AS_NAMESPACE
22.035398
201
0.689809
RobinSchmidt
103ff94c3f3d0fd8945df53e14902601760d9e72
5,287
cpp
C++
options/posix/generic/sys-socket-stubs.cpp
64/mlibc
81d17ab95b5b8a0bd7bf67cec8c7f773c6d762da
[ "MIT" ]
1
2021-07-05T04:19:56.000Z
2021-07-05T04:19:56.000Z
options/posix/generic/sys-socket-stubs.cpp
64/mlibc
81d17ab95b5b8a0bd7bf67cec8c7f773c6d762da
[ "MIT" ]
null
null
null
options/posix/generic/sys-socket-stubs.cpp
64/mlibc
81d17ab95b5b8a0bd7bf67cec8c7f773c6d762da
[ "MIT" ]
null
null
null
#include <errno.h> #include <sys/socket.h> #include <bits/ensure.h> #include <mlibc/debug.hpp> #include <mlibc/posix-sysdeps.hpp> int accept(int fd, struct sockaddr *__restrict addr_ptr, socklen_t *__restrict addr_length) { if(addr_ptr || addr_length) mlibc::infoLogger() << "\e[35mmlibc: accept() does not fill struct sockaddr\e[39m" << frg::endlog; int newfd; if(!mlibc::sys_accept) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_accept(fd, &newfd); e) { errno = e; return -1; } return newfd; } int bind(int fd, const struct sockaddr *addr_ptr, socklen_t addr_len) { if(!mlibc::sys_bind) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_bind(fd, addr_ptr, addr_len); e) { errno = e; return -1; } return 0; } int connect(int fd, const struct sockaddr *addr_ptr, socklen_t addr_len) { if(!mlibc::sys_connect) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_connect(fd, addr_ptr, addr_len); e) { errno = e; return -1; } return 0; } int getpeername(int fd, struct sockaddr *addr_ptr, socklen_t *__restrict addr_length) { socklen_t actual_length; if(!mlibc::sys_peername) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_peername(fd, addr_ptr, *addr_length, &actual_length); e) { errno = e; return -1; } *addr_length = actual_length; return 0; } int getsockname(int fd, struct sockaddr *__restrict addr_ptr, socklen_t *__restrict addr_length) { socklen_t actual_length; if(!mlibc::sys_sockname) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_sockname(fd, addr_ptr, *addr_length, &actual_length); e) { errno = e; return -1; } *addr_length = actual_length; return 0; } int getsockopt(int fd, int layer, int number, void *__restrict buffer, socklen_t *__restrict size) { if(!mlibc::sys_getsockopt) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } return mlibc::sys_getsockopt(fd, layer, number, buffer, size); } int listen(int fd, int backlog) { if(!mlibc::sys_listen) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_listen(fd, backlog); e) { errno = e; return -1; } return 0; } ssize_t recv(int sockfd, void *__restrict buf, size_t len, int flags) { return recvfrom(sockfd, buf, len, flags, NULL, NULL); } ssize_t recvfrom(int sockfd, void *__restrict buf, size_t len, int flags, struct sockaddr *__restrict src_addr, socklen_t *__restrict addrlen) { struct iovec iov = {}; iov.iov_base = buf; iov.iov_len = len; struct msghdr hdr = {}; hdr.msg_name = src_addr; if (addrlen) { hdr.msg_namelen = *addrlen; } hdr.msg_iov = &iov; hdr.msg_iovlen = 1; int ret = recvmsg(sockfd, &hdr, flags); if (ret < 0) return ret; if(addrlen) *addrlen = hdr.msg_namelen; return ret; } ssize_t recvmsg(int fd, struct msghdr *hdr, int flags) { ssize_t length; if(!mlibc::sys_msg_recv) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_msg_recv(fd, hdr, flags, &length); e) { errno = e; return -1; } return length; } int recvmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, int flags, struct timespec *timeout) { __ensure(!"Not implemented"); __builtin_unreachable(); } ssize_t send(int fd, const void *buffer, size_t size, int flags) { return sendto(fd, buffer, size, flags, nullptr, 0); } ssize_t sendto(int fd, const void *buffer, size_t size, int flags, const struct sockaddr *sock_addr, socklen_t addr_length) { struct iovec iov = {}; iov.iov_base = const_cast<void *>(buffer); iov.iov_len = size; struct msghdr hdr = {}; hdr.msg_name = const_cast<struct sockaddr *>(sock_addr); hdr.msg_namelen = addr_length; hdr.msg_iov = &iov; hdr.msg_iovlen = 1; return sendmsg(fd, &hdr, flags); } ssize_t sendmsg(int fd, const struct msghdr *hdr, int flags) { ssize_t length; if(!mlibc::sys_msg_send) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_msg_send(fd, hdr, flags, &length); e) { errno = e; return -1; } return length; } int sendmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, int flags) { __ensure(!"Not implemented"); __builtin_unreachable(); } int setsockopt(int fd, int layer, int number, const void *buffer, socklen_t size) { if(!mlibc::sys_setsockopt) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } return mlibc::sys_setsockopt(fd, layer, number, buffer, size); } int shutdown(int, int) { mlibc::infoLogger() << "mlibc: shutdown() is a no-op!" << frg::endlog; return 0; } int sockatmark(int) { __ensure(!"Not implemented"); __builtin_unreachable(); } int socket(int family, int type, int protocol) { int fd; if(!mlibc::sys_socket) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_socket(family, type, protocol, &fd); e) { errno = e; return -1; } return fd; } int socketpair(int domain, int type, int protocol, int sv[2]) { if(!mlibc::sys_socketpair) { MLIBC_MISSING_SYSDEP(); errno = ENOSYS; return -1; } if(int e = mlibc::sys_socketpair(domain, type, protocol, sv); e) { errno = e; return -1; } return 0; } // connectpair() is provided by the platform
22.214286
106
0.680726
64
1041737a1c37d31376a2aba5941dc7aeeb4c8aaa
1,179
cc
C++
chromium/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.cc
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
chromium/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.cc
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
chromium/ios/public/provider/chrome/browser/browser_state/chrome_browser_state.cc
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h" #include "base/files/file_path.h" #include "ios/public/provider/web/web_ui_ios.h" #include "ios/web/public/web_state/web_state.h" namespace ios { // static ChromeBrowserState* ChromeBrowserState::FromBrowserState( web::BrowserState* browser_state) { // This is safe; this is the only implementation of BrowserState. return static_cast<ChromeBrowserState*>(browser_state); } // static ChromeBrowserState* ChromeBrowserState::FromWebUIIOS(web::WebUIIOS* web_ui) { return FromBrowserState(web_ui->GetWebState()->GetBrowserState()); } std::string ChromeBrowserState::GetDebugName() { // The debug name is based on the state path of the original browser state // to keep in sync with the meaning on other platforms. std::string name = GetOriginalChromeBrowserState()->GetStatePath().BaseName().MaybeAsASCII(); if (name.empty()) { name = "UnknownBrowserState"; } return name; } } // namespace ios
31.864865
82
0.754029
wedataintelligence
10424238b789e0e4c362d208e9ed08984fdf4ba9
2,690
cc
C++
CondFormats/CSCObjects/src/CSCTriggerMapping.cc
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
CondFormats/CSCObjects/src/CSCTriggerMapping.cc
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
CondFormats/CSCObjects/src/CSCTriggerMapping.cc
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
#include <CondFormats/CSCObjects/interface/CSCTriggerMapping.h> #include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h> #include <iostream> CSCTriggerMapping::CSCTriggerMapping() : myName_("CSCTriggerMapping"), debugV_(false) {} CSCTriggerMapping::~CSCTriggerMapping() {} int CSCTriggerMapping::chamber(int endcap, int station, int sector, int subsector, int cscid) const { // Build hw id from input, find sw id to match int cid = 0; int hid = hwId(endcap, station, sector, subsector, cscid); // Search for that hw id in mapping std::map<int, int>::const_iterator it = hw2sw_.find(hid); if (it != hw2sw_.end()) { cid = it->second; if (debugV()) std::cout << myName_ << ": for requested hw id = " << hid << ", found sw id = " << cid << std::endl; } else { std::cout << myName_ << ": ERROR, cannot find requested hw id = " << hid << " in mapping." << std::endl; } return cid; } CSCDetId CSCTriggerMapping::detId(int endcap, int station, int sector, int subsector, int cscid, int layer) const { int cid = chamber(endcap, station, sector, subsector, cscid); int lid = cid + layer; return CSCDetId(lid); } void CSCTriggerMapping::addRecord(int rendcap, int rstation, int rsector, int rsubsector, int rcscid, int cendcap, int cstation, int csector, int csubsector, int ccscid) { Connection newRecord(rendcap, rstation, rsector, rsubsector, rcscid, cendcap, cstation, csector, csubsector, ccscid); mapping_.push_back(newRecord); int hid = hwId(rendcap, rstation, rsector, rsubsector, rcscid); int sid = swId(cendcap, cstation, csector, csubsector, ccscid); if (debugV()) std::cout << myName_ << ": map hw " << hid << " to sw " << sid << std::endl; if (hw2sw_.insert(std::make_pair(hid, sid)).second) { if (debugV()) std::cout << myName_ << ": insert pair succeeded." << std::endl; } else { std::cout << myName_ << ": ERROR, already have key = " << hid << std::endl; } } int CSCTriggerMapping::swId(int endcap, int station, int sector, int subsector, int cscid) const { // Software id is just CSCDetId for the chamber int ring = CSCTriggerNumbering::ringFromTriggerLabels(station, cscid); int chamber = CSCTriggerNumbering::chamberFromTriggerLabels(sector, subsector, station, cscid); return CSCDetId::rawIdMaker(endcap, station, ring, chamber, 0); // usual detid for chamber, i.e. layer=0 }
44.098361
119
0.611896
ckamtsikis
1048a8427c1fbbe3fff05c3c1363549ab33cc288
15,584
cpp
C++
Source/core/rendering/RenderQuote.cpp
Fusion-Rom/android_external_chromium_org_third_party_WebKit
8865f83aaf400ef5f7c234a70da404d3fc5e1272
[ "BSD-3-Clause" ]
2
2016-05-19T10:37:25.000Z
2019-09-18T04:37:14.000Z
Source/core/rendering/RenderQuote.cpp
Fusion-Rom/android_external_chromium_org_third_party_WebKit
8865f83aaf400ef5f7c234a70da404d3fc5e1272
[ "BSD-3-Clause" ]
null
null
null
Source/core/rendering/RenderQuote.cpp
Fusion-Rom/android_external_chromium_org_third_party_WebKit
8865f83aaf400ef5f7c234a70da404d3fc5e1272
[ "BSD-3-Clause" ]
7
2015-09-23T09:56:29.000Z
2022-01-20T10:36:06.000Z
/** * Copyright (C) 2011 Nokia Inc. All rights reserved. * Copyright (C) 2012 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #include "config.h" #include "core/rendering/RenderQuote.h" #include "core/rendering/RenderTextFragment.h" #include "core/rendering/RenderView.h" #include "wtf/StdLibExtras.h" #include "wtf/text/AtomicString.h" #include <algorithm> namespace blink { RenderQuote::RenderQuote(Document* node, QuoteType quote) : RenderInline(0) , m_type(quote) , m_depth(0) , m_next(nullptr) , m_previous(nullptr) , m_attached(false) { setDocumentForAnonymous(node); } RenderQuote::~RenderQuote() { ASSERT(!m_attached); ASSERT(!m_next && !m_previous); } void RenderQuote::trace(Visitor* visitor) { visitor->trace(m_next); visitor->trace(m_previous); RenderInline::trace(visitor); } void RenderQuote::willBeDestroyed() { detachQuote(); RenderInline::willBeDestroyed(); } void RenderQuote::willBeRemovedFromTree() { RenderInline::willBeRemovedFromTree(); detachQuote(); } void RenderQuote::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) { RenderInline::styleDidChange(diff, oldStyle); updateText(); } struct Language { const char* lang; UChar open1; UChar close1; UChar open2; UChar close2; QuotesData* data; bool operator<(const Language& b) const { return strcmp(lang, b.lang) < 0; } }; // Table of quotes from http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#quote Language languages[] = { { "af", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "agq", 0x201e, 0x201d, 0x201a, 0x2019, 0 }, { "ak", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "am", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "ar", 0x201d, 0x201c, 0x2019, 0x2018, 0 }, { "asa", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "az-cyrl", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "bas", 0x00ab, 0x00bb, 0x201e, 0x201c, 0 }, { "bem", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "bez", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "bg", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "bm", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "bn", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "br", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "brx", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "bs-cyrl" , 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "ca", 0x201c, 0x201d, 0x00ab, 0x00bb, 0 }, { "cgg", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "chr", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "cs", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "da", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "dav", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "de", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "de-ch", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "dje", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "dua", 0x00ab, 0x00bb, 0x2018, 0x2019, 0 }, { "dyo", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "dz", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ebu", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ee", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "el", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "en", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "en-gb", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "es", 0x201c, 0x201d, 0x00ab, 0x00bb, 0 }, { "et", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "eu", 0x201c, 0x201d, 0x00ab, 0x00bb, 0 }, { "ewo", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "fa", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "ff", 0x201e, 0x201d, 0x201a, 0x2019, 0 }, { "fi", 0x201d, 0x201d, 0x2019, 0x2019, 0 }, { "fr", 0x00ab, 0x00bb, 0x00ab, 0x00bb, 0 }, { "fr-ca", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "fr-ch", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "gsw", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "gu", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "guz", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ha", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "he", 0x0022, 0x0022, 0x0027, 0x0027, 0 }, { "hi", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "hr", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "hu", 0x201e, 0x201d, 0x00bb, 0x00ab, 0 }, { "id", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ig", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "it", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "ja", 0x300c, 0x300d, 0x300e, 0x300f, 0 }, { "jgo", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "jmc", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "kab", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "kam", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "kde", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "kea", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "khq", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ki", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "kkj", 0x00ab, 0x00bb, 0x2039, 0x203a, 0 }, { "kln", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "km", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "kn", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ko", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ksb", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ksf", 0x00ab, 0x00bb, 0x2018, 0x2019, 0 }, { "lag", 0x201d, 0x201d, 0x2019, 0x2019, 0 }, { "lg", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ln", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "lo", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "lt", 0x201e, 0x201c, 0x201e, 0x201c, 0 }, { "lu", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "luo", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "luy", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "lv", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mas", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mer", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mfe", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mg", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "mgo", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mk", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "ml", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mr", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ms", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "mua", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "my", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "naq", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "nb", 0x00ab, 0x00bb, 0x2018, 0x2019, 0 }, { "nd", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "nl", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "nmg", 0x201e, 0x201d, 0x00ab, 0x00bb, 0 }, { "nn", 0x00ab, 0x00bb, 0x2018, 0x2019, 0 }, { "nnh", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "nus", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "nyn", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "pl", 0x201e, 0x201d, 0x00ab, 0x00bb, 0 }, { "pt", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "pt-pt", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "rn", 0x201d, 0x201d, 0x2019, 0x2019, 0 }, { "ro", 0x201e, 0x201d, 0x00ab, 0x00bb, 0 }, { "rof", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ru", 0x00ab, 0x00bb, 0x201e, 0x201c, 0 }, { "rw", 0x00ab, 0x00bb, 0x2018, 0x2019, 0 }, { "rwk", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "saq", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "sbp", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "seh", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ses", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "sg", 0x00ab, 0x00bb, 0x201c, 0x201d, 0 }, { "shi", 0x00ab, 0x00bb, 0x201e, 0x201d, 0 }, { "shi-tfng", 0x00ab, 0x00bb, 0x201e, 0x201d, 0 }, { "si", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "sk", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "sl", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "sn", 0x201d, 0x201d, 0x2019, 0x2019, 0 }, { "so", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "sq", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "sr", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "sr-latn", 0x201e, 0x201c, 0x201a, 0x2018, 0 }, { "sv", 0x201d, 0x201d, 0x2019, 0x2019, 0 }, { "sw", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "swc", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ta", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "te", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "teo", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "th", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "ti-er", 0x2018, 0x2019, 0x201c, 0x201d, 0 }, { "to", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "tr", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "twq", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "tzm", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "uk", 0x00ab, 0x00bb, 0x201e, 0x201c, 0 }, { "ur", 0x201d, 0x201c, 0x2019, 0x2018, 0 }, { "vai", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "vai-latn", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "vi", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "vun", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "xh", 0x2018, 0x2019, 0x201c, 0x201d, 0 }, { "xog", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "yav", 0x00ab, 0x00bb, 0x00ab, 0x00bb, 0 }, { "yo", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "zh", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, { "zh-hant", 0x300c, 0x300d, 0x300e, 0x300f, 0 }, { "zu", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, }; const QuotesData* quotesDataForLanguage(const AtomicString& lang) { if (lang.isNull()) return 0; // This could be just a hash table, but doing that adds 200k to RenderQuote.o Language* languagesEnd = languages + WTF_ARRAY_LENGTH(languages); CString lowercaseLang = lang.lower().utf8(); Language key = { lowercaseLang.data(), 0, 0, 0, 0, 0 }; Language* match = std::lower_bound(languages, languagesEnd, key); if (match == languagesEnd || strcmp(match->lang, key.lang)) return 0; if (!match->data) match->data = QuotesData::create(match->open1, match->close1, match->open2, match->close2).leakRef(); return match->data; } static const QuotesData* basicQuotesData() { // FIXME: The default quotes should be the fancy quotes for "en". DEFINE_STATIC_REF(QuotesData, staticBasicQuotes, (QuotesData::create('"', '"', '\'', '\''))); return staticBasicQuotes; } void RenderQuote::updateText() { String text = computeText(); if (m_text == text) return; m_text = text; while (RenderObject* child = lastChild()) child->destroy(); RenderTextFragment* fragment = new RenderTextFragment(&document(), m_text.impl()); fragment->setStyle(style()); addChild(fragment); } String RenderQuote::computeText() const { switch (m_type) { case NO_OPEN_QUOTE: case NO_CLOSE_QUOTE: return emptyString(); case CLOSE_QUOTE: return quotesData()->getCloseQuote(m_depth - 1).impl(); case OPEN_QUOTE: return quotesData()->getOpenQuote(m_depth).impl(); } ASSERT_NOT_REACHED(); return emptyString(); } const QuotesData* RenderQuote::quotesData() const { if (const QuotesData* customQuotes = style()->quotes()) return customQuotes; if (const QuotesData* quotes = quotesDataForLanguage(style()->locale())) return quotes; return basicQuotesData(); } void RenderQuote::attachQuote() { ASSERT(view()); ASSERT(!m_attached); ASSERT(!m_next && !m_previous); ASSERT(isRooted()); if (!view()->renderQuoteHead()) { view()->setRenderQuoteHead(this); m_attached = true; return; } for (RenderObject* predecessor = previousInPreOrder(); predecessor; predecessor = predecessor->previousInPreOrder()) { // Skip unattached predecessors to avoid having stale m_previous pointers // if the previous node is never attached and is then destroyed. if (!predecessor->isQuote() || !toRenderQuote(predecessor)->isAttached()) continue; m_previous = toRenderQuote(predecessor); m_next = m_previous->m_next; m_previous->m_next = this; if (m_next) m_next->m_previous = this; break; } if (!m_previous) { m_next = view()->renderQuoteHead(); view()->setRenderQuoteHead(this); if (m_next) m_next->m_previous = this; } m_attached = true; for (RenderQuote* quote = this; quote; quote = quote->m_next) quote->updateDepth(); ASSERT(!m_next || m_next->m_attached); ASSERT(!m_next || m_next->m_previous == this); ASSERT(!m_previous || m_previous->m_attached); ASSERT(!m_previous || m_previous->m_next == this); } void RenderQuote::detachQuote() { ASSERT(!m_next || m_next->m_attached); ASSERT(!m_previous || m_previous->m_attached); if (!m_attached) return; if (m_previous) m_previous->m_next = m_next; else if (view()) view()->setRenderQuoteHead(m_next); if (m_next) m_next->m_previous = m_previous; if (!documentBeingDestroyed()) { for (RenderQuote* quote = m_next; quote; quote = quote->m_next) quote->updateDepth(); } m_attached = false; m_next = nullptr; m_previous = nullptr; m_depth = 0; } void RenderQuote::updateDepth() { ASSERT(m_attached); int oldDepth = m_depth; m_depth = 0; if (m_previous) { m_depth = m_previous->m_depth; switch (m_previous->m_type) { case OPEN_QUOTE: case NO_OPEN_QUOTE: m_depth++; break; case CLOSE_QUOTE: case NO_CLOSE_QUOTE: if (m_depth) m_depth--; break; } } if (oldDepth != m_depth) updateText(); } } // namespace blink
39.353535
122
0.543955
Fusion-Rom
1048b0075f582a12c750afb1ee8b455f25793961
3,207
hpp
C++
source/thewizardplusplus/wizard_parser/vendor/range/v3/algorithm/partition_copy.hpp
thewizardplusplus/wizard-parser
a2aafcc087e6f5b96afee636831a0c6d67836218
[ "MIT" ]
1
2020-04-17T06:55:35.000Z
2020-04-17T06:55:35.000Z
example/source/vendor/range/v3/algorithm/partition_copy.hpp
thewizardplusplus/wizard-parser
a2aafcc087e6f5b96afee636831a0c6d67836218
[ "MIT" ]
29
2017-02-24T04:36:16.000Z
2019-03-13T00:29:39.000Z
source/thewizardplusplus/wizard_parser/vendor/range/v3/algorithm/partition_copy.hpp
thewizardplusplus/wizard-parser
a2aafcc087e6f5b96afee636831a0c6d67836218
[ "MIT" ]
null
null
null
/// \file // Range v3 library // // Copyright Eric Niebler 2014-present // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://github.com/ericniebler/range-v3 // #ifndef RANGES_V3_ALGORITHM_PARTITION_COPY_HPP #define RANGES_V3_ALGORITHM_PARTITION_COPY_HPP #include <tuple> #include "../../../meta/meta.hpp" #include "../range_fwd.hpp" #include "../begin_end.hpp" #include "../distance.hpp" #include "../range_concepts.hpp" #include "../range_traits.hpp" #include "../utility/iterator.hpp" #include "../utility/iterator_concepts.hpp" #include "../utility/iterator_traits.hpp" #include "../utility/functional.hpp" #include "../utility/static_const.hpp" #include "../utility/tagged_tuple.hpp" #include "../algorithm/tagspec.hpp" namespace ranges { inline namespace v3 { /// \ingroup group-concepts template<typename I, typename O0, typename O1, typename C, typename P = ident> using PartitionCopyable = meta::strict_and< InputIterator<I>, WeaklyIncrementable<O0>, WeaklyIncrementable<O1>, IndirectlyCopyable<I, O0>, IndirectlyCopyable<I, O1>, IndirectPredicate<C, projected<I, P>>>; /// \addtogroup group-algorithms /// @{ struct partition_copy_fn { template<typename I, typename S, typename O0, typename O1, typename C, typename P = ident, CONCEPT_REQUIRES_(PartitionCopyable<I, O0, O1, C, P>() && Sentinel<S, I>())> tagged_tuple<tag::in(I), tag::out1(O0), tag::out2(O1)> operator()(I begin, S end, O0 o0, O1 o1, C pred, P proj = P{}) const { for(; begin != end; ++begin) { auto &&x = *begin; if(invoke(pred, invoke(proj, x))) { *o0 = (decltype(x) &&) x; ++o0; } else { *o1 = (decltype(x) &&) x; ++o1; } } return make_tagged_tuple<tag::in, tag::out1, tag::out2>(begin, o0, o1); } template<typename Rng, typename O0, typename O1, typename C, typename P = ident, typename I = iterator_t<Rng>, CONCEPT_REQUIRES_(PartitionCopyable<I, O0, O1, C, P>() && Range<Rng>())> tagged_tuple<tag::in(safe_iterator_t<Rng>), tag::out1(O0), tag::out2(O1)> operator()(Rng &&rng, O0 o0, O1 o1, C pred, P proj = P{}) const { return (*this)(begin(rng), end(rng), std::move(o0), std::move(o1), std::move(pred), std::move(proj)); } }; /// \sa `partition_copy_fn` /// \ingroup group-algorithms RANGES_INLINE_VARIABLE(with_braced_init_args<partition_copy_fn>, partition_copy) /// @} } // namespace v3 } // namespace ranges #endif // include guard
35.241758
102
0.546305
thewizardplusplus