hexsha stringlengths 40 40 | size int64 7 1.05M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 269 | max_stars_repo_name stringlengths 5 108 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 269 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 9 | max_issues_count int64 1 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 listlengths 1 9 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 7 1.05M | avg_line_length float64 1.21 330k | max_line_length int64 6 990k | alphanum_fraction float64 0.01 0.99 | author_id stringlengths 2 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abc0e4c7822144d62731879aadfd05722dc26df4 | 1,522 | cc | C++ | chrome/updater/app/app.cc | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/updater/app/app.cc | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/updater/app/app.cc | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | // Copyright 2020 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/updater/app/app.h"
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#include "base/message_loop/message_pump_type.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_executor.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/thread_restrictions.h"
namespace updater {
constexpr base::StringPiece App::kThreadPoolName;
App::App() = default;
App::~App() = default;
void App::InitializeThreadPool() {
base::ThreadPoolInstance::CreateAndStartWithDefaultParams(kThreadPoolName);
}
int App::Run() {
InitializeThreadPool();
base::SingleThreadTaskExecutor main_task_executor(base::MessagePumpType::UI);
Initialize();
int exit_code = 0;
{
base::ScopedDisallowBlocking no_blocking_allowed_on_ui_thread;
base::RunLoop runloop;
quit_ = base::BindOnce(
[](base::OnceClosure quit, int* exit_code_out, int exit_code) {
*exit_code_out = exit_code;
std::move(quit).Run();
},
runloop.QuitWhenIdleClosure(), &exit_code);
FirstTaskRun();
runloop.Run();
}
Uninitialize();
// Shutting down the thread pool involves joining threads.
base::ThreadPoolInstance::Get()->Shutdown();
return exit_code;
}
void App::Shutdown(int exit_code) {
std::move(quit_).Run(exit_code);
}
} // namespace updater
| 26.701754 | 79 | 0.721419 | sarang-apps |
abc22ac2eb9ffd59dcfe49ab824e9b5c86288107 | 2,386 | cpp | C++ | tests/ImageViewIterator_test.cpp | alexanderbelous/imageview | 817e92ac1dcbffc7fb0ebb11afe4ee9836f37df0 | [
"MIT"
] | null | null | null | tests/ImageViewIterator_test.cpp | alexanderbelous/imageview | 817e92ac1dcbffc7fb0ebb11afe4ee9836f37df0 | [
"MIT"
] | null | null | null | tests/ImageViewIterator_test.cpp | alexanderbelous/imageview | 817e92ac1dcbffc7fb0ebb11afe4ee9836f37df0 | [
"MIT"
] | null | null | null | #include <imageview/internal/ImageViewIterator.h>
#include <imageview/pixel_formats/PixelFormatRGB24.h>
#include <gtest/gtest.h>
namespace imageview {
namespace {
// Sample flat image used in several tests.
constexpr std::size_t kSampleNumPixels = 6;
constexpr std::array<std::byte, kSampleNumPixels * PixelFormatRGB24::kBytesPerPixel> kSampleData{
std::byte{0}, std::byte{1}, std::byte{2},
std::byte{3}, std::byte{4}, std::byte{5},
std::byte{6}, std::byte{7}, std::byte{8},
std::byte{9}, std::byte{10}, std::byte{11},
std::byte{12}, std::byte{13}, std::byte{14},
std::byte{15}, std::byte{16}, std::byte{17}
};
using ConstIteratorRGB24 = detail::ImageViewIterator<PixelFormatRGB24, false>;
constexpr PixelFormatRGB24 kSamplePixelFormat;
constexpr ConstIteratorRGB24 kSampleImageBegin(kSampleData.data(), kSamplePixelFormat);
constexpr ConstIteratorRGB24 kSampleImageEnd(kSampleData.data() + kSampleData.size(), kSamplePixelFormat);
TEST(ImageViewIterator, Dereference) {
static_assert(*kSampleImageBegin == RGB24(0, 1, 2), "Must be {0, 1, 2}.");
}
TEST(ImageViewIterator, PreIncrement) {
ConstIteratorRGB24 iter = kSampleImageBegin;
static_assert(std::is_same_v<decltype(++iter), ConstIteratorRGB24&>, "Must be ConstIteratorRGB24&");
ConstIteratorRGB24& iter2 = ++iter;
// iter2 must be a reference to iter.
EXPECT_EQ(std::addressof(iter2), std::addressof(iter));
// The resulting iterator must point to pixel[1].
EXPECT_EQ(*iter, RGB24(3, 4, 5));
}
TEST(ImageViewIterator, PostIncrement) {
ConstIteratorRGB24 iter = kSampleImageBegin;
static_assert(std::is_same_v<decltype(iter++), ConstIteratorRGB24>, "Must be ConstIteratorRGB24");
ConstIteratorRGB24 iter2 = iter++;
// iter2 must point to pixel[0].
EXPECT_EQ(*iter2, RGB24(0, 1, 2));
// iter must point to pixel[1].
EXPECT_EQ(*iter, RGB24(3, 4, 5));
}
TEST(ImageViewIterator, NonConst) {
using IteratorRGB24 = detail::ImageViewIterator<PixelFormatRGB24, true>;
constexpr std::size_t kNumPixels = 6;
constexpr PixelFormatRGB24 kPixelFormat;
std::array<std::byte, kNumPixels * PixelFormatRGB24::kBytesPerPixel> data{};
IteratorRGB24 iter(data.data(), kPixelFormat);
*iter = RGB24{13, 181, 254};
EXPECT_EQ(data[0], std::byte{13});
EXPECT_EQ(data[1], std::byte{181});
EXPECT_EQ(data[2], std::byte{254});
}
} // namespace
} // namespace imageview
| 37.873016 | 106 | 0.723806 | alexanderbelous |
abc295e794bf9c5aa4bb1221c5380463a68eda1a | 608 | cpp | C++ | src/massive8/main.cpp | Danila18/unit-homework | 64e864f991abcf2c8ef566bdc493b59522dfea11 | [
"BSD-3-Clause"
] | null | null | null | src/massive8/main.cpp | Danila18/unit-homework | 64e864f991abcf2c8ef566bdc493b59522dfea11 | [
"BSD-3-Clause"
] | null | null | null | src/massive8/main.cpp | Danila18/unit-homework | 64e864f991abcf2c8ef566bdc493b59522dfea11 | [
"BSD-3-Clause"
] | null | null | null | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
int i, n, a; // Шеренга
cout << "количество учеников = ";
cin >> n;
cout << "рост Пети = ";
cin >> a;
int *arr = new int [n];
for (i = 0; i < n; i++)
{
cout << "рост ученика[" << i << "]= ";
cin >> arr[i];
}
for (i = n - 1; i >= 0; i--)
{
if (a <= arr[i]) {
cout << i + 1; // место Пети в шеренге, если рост учеников одинаковый, то он встаёт за ними
break;
}
}
} | 25.333333 | 111 | 0.391447 | Danila18 |
abc5441b74f514ebcb7730bde1d668759db582ec | 634 | hpp | C++ | include/euclidean2/object/projectile.hpp | Euclidean-Entertainment/Assignment_2 | 04a855f3cec41c9046340b3248d32e5acb94c221 | [
"BSD-3-Clause"
] | 1 | 2018-05-03T03:57:29.000Z | 2018-05-03T03:57:29.000Z | include/euclidean2/object/projectile.hpp | Euclidean-Entertainment/Assignment_2 | 04a855f3cec41c9046340b3248d32e5acb94c221 | [
"BSD-3-Clause"
] | 1 | 2018-05-04T14:17:53.000Z | 2018-05-04T14:17:53.000Z | include/euclidean2/object/projectile.hpp | Euclidean-Entertainment/Assignment_2 | 04a855f3cec41c9046340b3248d32e5acb94c221 | [
"BSD-3-Clause"
] | 2 | 2018-05-03T03:57:32.000Z | 2018-05-20T12:01:55.000Z | /**
* Projectiles
*/
#ifndef _PROJECTILE_HPP_INCLUDED_
#define _PROJECTILE_HPP_INCLUDED_
#include "euclidean2/math/vec3.hpp"
//extern
static constexpr float GRAVITY = -9.8f;
struct projectile_t
{
vec3_t position;
vec3_t velocity;
material_t mat;
};
/**
* Create a projectile
*/
void projectile_create(float x, float y, float z, float pitch, float yaw, float power);
void projectile_create(float x, float y, float z, float pitch, float vx, float vz, float power);
/**
* Update a projectile
*/
void projectile_update(float dt);
/**
* Draw a projectile
*/
void projectile_draw();
#endif
| 11.527273 | 96 | 0.689274 | Euclidean-Entertainment |
abc547430175b3e41f19d0b63a5d6bb45e08fe91 | 328,380 | cpp | C++ | src/blas/blas_loader.cpp | cdgarland/oneMKL | b1b8dc1072224afc254836d7b6150e3ef4b9eba5 | [
"Apache-2.0"
] | 1 | 2020-10-13T22:29:38.000Z | 2020-10-13T22:29:38.000Z | src/blas/blas_loader.cpp | cdgarland/oneMKL | b1b8dc1072224afc254836d7b6150e3ef4b9eba5 | [
"Apache-2.0"
] | null | null | null | src/blas/blas_loader.cpp | cdgarland/oneMKL | b1b8dc1072224afc254836d7b6150e3ef4b9eba5 | [
"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.
*
*
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************/
#include "oneapi/mkl/blas/detail/blas_loader.hpp"
#include "function_table_initializer.hpp"
#include "blas/function_table.hpp"
namespace oneapi {
namespace mkl {
namespace blas {
namespace column_major {
namespace detail {
static oneapi::mkl::detail::table_initializer<domain::blas, blas_function_table_t> function_tables;
// Buffer APIs
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].column_major_scasum_sycl(queue, n, x, incx, result);
}
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].column_major_dzasum_sycl(queue, n, x, incx, result);
}
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].column_major_sasum_sycl(queue, n, x, incx, result);
}
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].column_major_dasum_sycl(queue, n, x, incx, result);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_saxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_daxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_caxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_zaxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_scopy_sycl(queue, n, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_dcopy_sycl(queue, n, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_ccopy_sycl(queue, n, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_zcopy_sycl(queue, n, x, incx, y, incy);
}
void dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].column_major_sdot_sycl(queue, n, x, incx, y, incy, result);
}
void dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].column_major_ddot_sycl(queue, n, x, incx, y, incy, result);
}
void dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].column_major_dsdot_sycl(queue, n, x, incx, y, incy, result);
}
void dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &result) {
function_tables[libkey].column_major_cdotc_sycl(queue, n, x, incx, y, incy, result);
}
void dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &result) {
function_tables[libkey].column_major_zdotc_sycl(queue, n, x, incx, y, incy, result);
}
void dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &result) {
function_tables[libkey].column_major_cdotu_sycl(queue, n, x, incx, y, incy, result);
}
void dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &result) {
function_tables[libkey].column_major_zdotu_sycl(queue, n, x, incx, y, incy, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_isamin_sycl(queue, n, x, incx, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_idamin_sycl(queue, n, x, incx, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_icamin_sycl(queue, n, x, incx, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_izamin_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_isamax_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_idamax_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_icamax_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].column_major_izamax_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].column_major_scnrm2_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].column_major_dznrm2_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].column_major_snrm2_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].column_major_dnrm2_sycl(queue, n, x, incx, result);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy, float c, float s) {
function_tables[libkey].column_major_srot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy, double c, double s) {
function_tables[libkey].column_major_drot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, float c, float s) {
function_tables[libkey].column_major_csrot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy, double c, double s) {
function_tables[libkey].column_major_zdrot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<float, 1> &a,
cl::sycl::buffer<float, 1> &b, cl::sycl::buffer<float, 1> &c,
cl::sycl::buffer<float, 1> &s) {
function_tables[libkey].column_major_srotg_sycl(queue, a, b, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<double, 1> &a,
cl::sycl::buffer<double, 1> &b, cl::sycl::buffer<double, 1> &c,
cl::sycl::buffer<double, 1> &s) {
function_tables[libkey].column_major_drotg_sycl(queue, a, b, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue,
cl::sycl::buffer<std::complex<float>, 1> &a, cl::sycl::buffer<std::complex<float>, 1> &b,
cl::sycl::buffer<float, 1> &c, cl::sycl::buffer<std::complex<float>, 1> &s) {
function_tables[libkey].column_major_crotg_sycl(queue, a, b, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue,
cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &b, cl::sycl::buffer<double, 1> &c,
cl::sycl::buffer<std::complex<double>, 1> &s) {
function_tables[libkey].column_major_zrotg_sycl(queue, a, b, c, s);
}
void rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> ¶m) {
function_tables[libkey].column_major_srotm_sycl(queue, n, x, incx, y, incy, param);
}
void rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy, cl::sycl::buffer<double, 1> ¶m) {
function_tables[libkey].column_major_drotm_sycl(queue, n, x, incx, y, incy, param);
}
void rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<float, 1> &d1,
cl::sycl::buffer<float, 1> &d2, cl::sycl::buffer<float, 1> &x1, float y1,
cl::sycl::buffer<float, 1> ¶m) {
function_tables[libkey].column_major_srotmg_sycl(queue, d1, d2, x1, y1, param);
}
void rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<double, 1> &d1,
cl::sycl::buffer<double, 1> &d2, cl::sycl::buffer<double, 1> &x1, double y1,
cl::sycl::buffer<double, 1> ¶m) {
function_tables[libkey].column_major_drotmg_sycl(queue, d1, d2, x1, y1, param);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_sscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x,
std::int64_t incx) {
function_tables[libkey].column_major_cscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx) {
function_tables[libkey].column_major_csscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float alpha,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_zscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double alpha,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_zdscal_sycl(queue, n, alpha, x, incx);
}
void sdsdot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float sb,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].column_major_sdsdot_sycl(queue, n, sb, x, incx, y, incy, result);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_sswap_sycl(queue, n, x, incx, y, incy);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_dswap_sycl(queue, n, x, incx, y, incy);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_cswap_sycl(queue, n, x, incx, y, incy);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_zswap_sycl(queue, n, x, incx, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &x,
std::int64_t incx, float beta, cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_sgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x,
incx, beta, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &x,
std::int64_t incx, double beta, cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_dgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x,
incx, beta, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_cgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x,
incx, beta, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_zgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x,
incx, beta, y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, float beta,
cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_sgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, double beta,
cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_dgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
std::complex<float> beta, cl::sycl::buffer<std::complex<float>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_cgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_zgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy, cl::sycl::buffer<float, 1> &a,
std::int64_t lda) {
function_tables[libkey].column_major_sger_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &y, std::int64_t incy, cl::sycl::buffer<double, 1> &a,
std::int64_t lda) {
function_tables[libkey].column_major_dger_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_cgerc_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_zgerc_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_cgeru_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_zgeru_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
std::complex<float> beta, cl::sycl::buffer<std::complex<float>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_chbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x,
incx, beta, y, incy);
}
void hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_zhbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x,
incx, beta, y, incy);
}
void hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_chemv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_zhemv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_cher_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_zher_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_cher2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a, lda);
}
void her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_zher2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a, lda);
}
void hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_chpmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta,
y, incy);
}
void hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].column_major_zhpmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta,
y, incy);
}
void hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &a) {
function_tables[libkey].column_major_chpr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &a) {
function_tables[libkey].column_major_zhpr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a) {
function_tables[libkey].column_major_chpr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a);
}
void hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a) {
function_tables[libkey].column_major_zhpr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a);
}
void sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, float beta,
cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_ssbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x,
incx, beta, y, incy);
}
void sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, double beta,
cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_dsbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x,
incx, beta, y, incy);
}
void spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &a, cl::sycl::buffer<float, 1> &x,
std::int64_t incx, float beta, cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_sspmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta,
y, incy);
}
void spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &a, cl::sycl::buffer<double, 1> &x,
std::int64_t incx, double beta, cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_dspmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta,
y, incy);
}
void spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &a) {
function_tables[libkey].column_major_sspr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &a) {
function_tables[libkey].column_major_dspr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy, cl::sycl::buffer<float, 1> &a) {
function_tables[libkey].column_major_sspr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a);
}
void spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &y, std::int64_t incy, cl::sycl::buffer<double, 1> &a) {
function_tables[libkey].column_major_dspr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a);
}
void symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, float beta,
cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_ssymv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, double beta,
cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].column_major_dsymv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_ssyr_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &a, std::int64_t lda) {
function_tables[libkey].column_major_dsyr_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy, cl::sycl::buffer<float, 1> &a,
std::int64_t lda) {
function_tables[libkey].column_major_ssyr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a, lda);
}
void syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &y, std::int64_t incy, cl::sycl::buffer<double, 1> &a,
std::int64_t lda) {
function_tables[libkey].column_major_dsyr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy,
a, lda);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_stbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dtbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ctbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ztbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_stbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dtbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ctbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ztbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a,
lda, x, incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_stpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dtpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ctpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ztpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_stpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dtpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ctpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ztpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_strmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dtrmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ctrmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ztrmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_strsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_dtrsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ctrsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].column_major_ztrsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda,
x, incx);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb, float beta, cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_sgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb, double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_dgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_cgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_zgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, half alpha, cl::sycl::buffer<half, 1> &a,
std::int64_t lda, cl::sycl::buffer<half, 1> &b, std::int64_t ldb, half beta,
cl::sycl::buffer<half, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_hgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<half, 1> &a,
std::int64_t lda, cl::sycl::buffer<half, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_gemm_f16f16f32_sycl(queue, transa, transb, m, n, k, alpha,
a, lda, b, ldb, beta, c, ldc);
}
void hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_chemm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_zhemm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, float beta, cl::sycl::buffer<std::complex<float>, 1> &c,
std::int64_t ldc) {
function_tables[libkey].column_major_cherk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda, double beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_zherk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_cher2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, double beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_zher2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, float alpha, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_ssymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, double alpha, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &b, std::int64_t ldb, double beta,
cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_dsymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_csymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_zsymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, float beta, cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_ssyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, double alpha, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_dsyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_csyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_zsyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_ssyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, double alpha, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &b, std::int64_t ldb, double beta,
cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_dsyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_csyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &c,
std::int64_t ldc) {
function_tables[libkey].column_major_zsyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
b, ldb, beta, c, ldc);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb) {
function_tables[libkey].column_major_strmm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb) {
function_tables[libkey].column_major_dtrmm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb) {
function_tables[libkey].column_major_ctrmm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb) {
function_tables[libkey].column_major_ztrmm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb) {
function_tables[libkey].column_major_strsm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb) {
function_tables[libkey].column_major_dtrsm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb) {
function_tables[libkey].column_major_ctrsm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb) {
function_tables[libkey].column_major_ztrsm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<float, 1> &b, std::int64_t ldb, std::int64_t stride_b, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size) {
function_tables[libkey].column_major_sgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<double, 1> &b, std::int64_t ldb, std::int64_t stride_b,
double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc,
std::int64_t stride_c, std::int64_t batch_size) {
function_tables[libkey].column_major_dgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc,
std::int64_t stride_c, std::int64_t batch_size) {
function_tables[libkey].column_major_cgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc,
std::int64_t stride_c, std::int64_t batch_size) {
function_tables[libkey].column_major_zgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<float, 1> &b, std::int64_t ldb, std::int64_t stride_b,
std::int64_t batch_size) {
function_tables[libkey].column_major_strsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
std::int64_t stride_a, cl::sycl::buffer<double, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::int64_t batch_size) {
function_tables[libkey].column_major_dtrsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::int64_t batch_size) {
function_tables[libkey].column_major_ctrsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::int64_t batch_size) {
function_tables[libkey].column_major_ztrsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb, float beta, cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_sgemmt_sycl(queue, upper_lower, transa, transb, n, k,
alpha, a, lda, b, ldb, beta, c, ldc);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb, double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_dgemmt_sycl(queue, upper_lower, transa, transb, n, k,
alpha, a, lda, b, ldb, beta, c, ldc);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].column_major_cgemmt_sycl(queue, upper_lower, transa, transb, n, k,
alpha, a, lda, b, ldb, beta, c, ldc);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &c,
std::int64_t ldc) {
function_tables[libkey].column_major_zgemmt_sycl(queue, upper_lower, transa, transb, n, k,
alpha, a, lda, b, ldb, beta, c, ldc);
}
void gemm_bias(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, offset offsetc, std::int64_t m, std::int64_t n, std::int64_t k,
float alpha, cl::sycl::buffer<int8_t, 1> &a, std::int64_t lda, int8_t ao,
cl::sycl::buffer<uint8_t, 1> &b, std::int64_t ldb, uint8_t bo, float beta,
cl::sycl::buffer<int32_t, 1> &c, std::int64_t ldc,
cl::sycl::buffer<int32_t, 1> &co) {
function_tables[libkey].column_major_gemm_s8u8s32_bias_sycl(
queue, transa, transb, offsetc, m, n, k, alpha, a, lda, ao, b, ldb, bo, beta, c, ldc, co);
}
// USM APIs
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_scasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dzasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
float alpha, const float *x, std::int64_t incx, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_saxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
double alpha, const double *x, std::int64_t incx, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_daxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, const std::complex<float> *x, std::int64_t incx,
std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_caxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, const std::complex<double> *x, std::int64_t incx,
std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zaxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
float *alpha, const float **x, std::int64_t *incx, float **y,
std::int64_t *incy, std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_saxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
double *alpha, const double **x, std::int64_t *incx, double **y,
std::int64_t *incy, std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_daxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
std::complex<float> *alpha, const std::complex<float> **x,
std::int64_t *incx, std::complex<float> **y, std::int64_t *incy,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_caxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
std::complex<double> *alpha, const std::complex<double> **x,
std::int64_t *incx, std::complex<double> **y, std::int64_t *incy,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zaxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_scopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dcopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ccopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zcopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, const float *y, std::int64_t incy,
float *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sdot_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, const double *y, std::int64_t incy,
double *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ddot_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, const float *y, std::int64_t incy,
double *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsdot_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, const std::complex<float> *y,
std::int64_t incy, std::complex<float> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cdotc_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx,
const std::complex<double> *y, std::int64_t incy, std::complex<double> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zdotc_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, const std::complex<float> *y,
std::int64_t incy, std::complex<float> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cdotu_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx,
const std::complex<double> *y, std::int64_t incy, std::complex<double> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zdotu_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_isamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_idamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_icamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_izamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_isamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_idamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_icamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_izamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_scnrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dznrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_snrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dnrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> *x, std::int64_t incx, std::complex<float> *y,
std::int64_t incy, float c, float s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_srot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> *x, std::int64_t incx, std::complex<double> *y,
std::int64_t incy, double c, double s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_drot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float *x,
std::int64_t incx, float *y, std::int64_t incy, float c, float s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_csrot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double *x,
std::int64_t incx, double *y, std::int64_t incy, double c, double s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zdrot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, float *a, float *b,
float *c, float *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_srotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, double *a, double *b,
double *c, double *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_drotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::complex<float> *a,
std::complex<float> *b, float *c, std::complex<float> *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_crotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::complex<double> *a,
std::complex<double> *b, double *c, std::complex<double> *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zrotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float *x,
std::int64_t incx, float *y, std::int64_t incy, float *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_srotm_usm_sycl(queue, n, x, incx, y, incy, param,
dependencies);
}
cl::sycl::event rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double *x,
std::int64_t incx, double *y, std::int64_t incy, double *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_drotm_usm_sycl(queue, n, x, incx, y, incy, param,
dependencies);
}
cl::sycl::event rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, float *d1, float *d2,
float *x1, float y1, float *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_srotmg_usm_sycl(queue, d1, d2, x1, y1, param,
dependencies);
}
cl::sycl::event rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, double *d1, double *d2,
double *x1, double y1, double *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_drotmg_usm_sycl(queue, d1, d2, x1, y1, param,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
float alpha, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
double alpha, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_csscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
float alpha, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
double alpha, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zdscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event sdsdot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float sb,
const float *x, std::int64_t incx, const float *y, std::int64_t incy,
float *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sdsdot_usm_sycl(queue, n, sb, x, incx, y, incy,
result, dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float *x,
std::int64_t incx, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double *x,
std::int64_t incx, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> *x, std::int64_t incx, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> *x, std::int64_t incx, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku, float alpha,
const float *a, std::int64_t lda, const float *x, std::int64_t incx,
float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku, double alpha,
const double *a, std::int64_t lda, const double *x, std::int64_t incx,
double beta, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku,
std::complex<float> alpha, const std::complex<float> *a, std::int64_t lda,
const std::complex<float> *x, std::int64_t incx, std::complex<float> beta,
std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku,
std::complex<double> alpha, const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *x, std::int64_t incx, std::complex<double> beta,
std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, float alpha, const float *a, std::int64_t lda,
const float *x, std::int64_t incx, float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, double alpha, const double *a,
std::int64_t lda, const double *x, std::int64_t incx, double beta, double *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *x,
std::int64_t incx, std::complex<float> beta, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *x,
std::int64_t incx, std::complex<double> beta, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, float alpha, const float *x, std::int64_t incx, const float *y,
std::int64_t incy, float *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sger_usm_sycl(queue, m, n, alpha, x, incx, y, incy,
a, lda, dependencies);
}
cl::sycl::event ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, double alpha, const double *x, std::int64_t incx,
const double *y, std::int64_t incy, double *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dger_usm_sycl(queue, m, n, alpha, x, incx, y, incy,
a, lda, dependencies);
}
cl::sycl::event gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgerc_usm_sycl(queue, m, n, alpha, x, incx, y, incy,
a, lda, dependencies);
}
cl::sycl::event gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgerc_usm_sycl(queue, m, n, alpha, x, incx, y, incy,
a, lda, dependencies);
}
cl::sycl::event geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgeru_usm_sycl(queue, m, n, alpha, x, incx, y, incy,
a, lda, dependencies);
}
cl::sycl::event geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgeru_usm_sycl(queue, m, n, alpha, x, incx, y, incy,
a, lda, dependencies);
}
cl::sycl::event hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *x,
std::int64_t incx, std::complex<float> beta, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_chbmv_usm_sycl(
queue, upper_lower, n, k, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *x,
std::int64_t incx, std::complex<double> beta, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zhbmv_usm_sycl(
queue, upper_lower, n, k, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, const std::complex<float> *x, std::int64_t incx,
std::complex<float> beta, std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_chemv_usm_sycl(
queue, upper_lower, n, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, const std::complex<double> *x, std::int64_t incx,
std::complex<double> beta, std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zhemv_usm_sycl(
queue, upper_lower, n, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const std::complex<float> *x, std::int64_t incx,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cher_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, lda, dependencies);
}
cl::sycl::event her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const std::complex<double> *x, std::int64_t incx,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zher_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, lda, dependencies);
}
cl::sycl::event her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cher2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, lda, dependencies);
}
cl::sycl::event her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zher2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, lda, dependencies);
}
cl::sycl::event hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
const std::complex<float> *x, std::int64_t incx, std::complex<float> beta,
std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_chpmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
const std::complex<double> *x, std::int64_t incx, std::complex<double> beta,
std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zhpmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const std::complex<float> *x, std::int64_t incx,
std::complex<float> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_chpr_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, dependencies);
}
cl::sycl::event hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const std::complex<double> *x, std::int64_t incx,
std::complex<double> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zhpr_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, dependencies);
}
cl::sycl::event hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_chpr2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, dependencies);
}
cl::sycl::event hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zhpr2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, dependencies);
}
cl::sycl::event sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, float alpha, const float *a, std::int64_t lda,
const float *x, std::int64_t incx, float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssbmv_usm_sycl(
queue, upper_lower, n, k, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, double alpha, const double *a,
std::int64_t lda, const double *x, std::int64_t incx, double beta, double *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsbmv_usm_sycl(
queue, upper_lower, n, k, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *a, const float *x, std::int64_t incx,
float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sspmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *a, const double *x,
std::int64_t incx, double beta, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dspmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, float *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sspr_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, dependencies);
}
cl::sycl::event spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx, double *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dspr_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, dependencies);
}
cl::sycl::event spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, const float *y,
std::int64_t incy, float *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sspr2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, dependencies);
}
cl::sycl::event spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx,
const double *y, std::int64_t incy, double *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dspr2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, dependencies);
}
cl::sycl::event symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *a, std::int64_t lda, const float *x,
std::int64_t incx, float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssymv_usm_sycl(
queue, upper_lower, n, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *a, std::int64_t lda,
const double *x, std::int64_t incx, double beta, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsymv_usm_sycl(
queue, upper_lower, n, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, float *a,
std::int64_t lda, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssyr_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, lda, dependencies);
}
cl::sycl::event syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx, double *a,
std::int64_t lda, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsyr_usm_sycl(queue, upper_lower, n, alpha, x, incx,
a, lda, dependencies);
}
cl::sycl::event syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, const float *y,
std::int64_t incy, float *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssyr2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, lda, dependencies);
}
cl::sycl::event syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx,
const double *y, std::int64_t incy, double *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsyr2_usm_sycl(queue, upper_lower, n, alpha, x,
incx, y, incy, a, lda, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const float *a, std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_stbmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const double *a, std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtbmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<float> *a, std::int64_t lda, std::complex<float> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctbmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<double> *a, std::int64_t lda, std::complex<double> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztbmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const float *a, std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_stbsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const double *a, std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtbsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<float> *a, std::int64_t lda, std::complex<float> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctbsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<double> *a, std::int64_t lda, std::complex<double> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztbsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, k, a, lda, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a, float *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_stpmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a, double *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtpmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctpmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztpmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a, float *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_stpsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a, double *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtpsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctpsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztpsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a,
std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_strmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a,
std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtrmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctrmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztrmv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a,
std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_strsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a,
std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtrsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctrsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztrsv_usm_sycl(queue, upper_lower, trans, unit_diag,
n, a, lda, x, incx, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, float alpha,
const float *a, std::int64_t lda, const float *b, std::int64_t ldb, float beta,
float *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, double alpha,
const double *a, std::int64_t lda, const double *b, std::int64_t ldb,
double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<float> alpha, const std::complex<float> *a, std::int64_t lda,
const std::complex<float> *b, std::int64_t ldb, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<double> alpha, const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, std::complex<float> beta, std::complex<float> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_chemm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *b,
std::int64_t ldb, std::complex<double> beta, std::complex<double> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zhemm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, float alpha,
const std::complex<float> *a, std::int64_t lda, float beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cherk_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, double alpha,
const std::complex<double> *a, std::int64_t lda, double beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zherk_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, float beta, std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cher2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, double beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zher2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, float alpha, const float *a,
std::int64_t lda, const float *b, std::int64_t ldb, float beta, float *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, double alpha,
const double *a, std::int64_t lda, const double *b, std::int64_t ldb,
double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, std::complex<float> beta, std::complex<float> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_csymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *b,
std::int64_t ldb, std::complex<double> beta, std::complex<double> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zsymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, float alpha, const float *a,
std::int64_t lda, float beta, float *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssyrk_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, double alpha, const double *a,
std::int64_t lda, double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsyrk_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_csyrk_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zsyrk_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, float alpha, const float *a,
std::int64_t lda, const float *b, std::int64_t ldb, float beta, float *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ssyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, double alpha,
const double *a, std::int64_t lda, const double *b, std::int64_t ldb,
double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dsyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, std::complex<float> beta, std::complex<float> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_csyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zsyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, float alpha, const float *a, std::int64_t lda, float *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_strmm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, double alpha, const double *a, std::int64_t lda, double *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtrmm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctrmm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztrmm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, float alpha, const float *a, std::int64_t lda, float *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_strsm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, double alpha, const double *a, std::int64_t lda, double *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dtrsm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ctrsm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_ztrsm_usm_sycl(queue, left_right, upper_lower,
trans, unit_diag, m, n, alpha, a,
lda, b, ldb, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
float *alpha, const float **a, std::int64_t *lda, const float **b,
std::int64_t *ldb, float *beta, float **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
double *alpha, const double **a, std::int64_t *lda, const double **b,
std::int64_t *ldb, double *beta, double **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
std::complex<float> *alpha, const std::complex<float> **a,
std::int64_t *lda, const std::complex<float> **b, std::int64_t *ldb,
std::complex<float> *beta, std::complex<float> **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
std::complex<double> *alpha, const std::complex<double> **a,
std::int64_t *lda, const std::complex<double> **b, std::int64_t *ldb,
std::complex<double> *beta, std::complex<double> **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
float alpha, const float *a, std::int64_t lda, std::int64_t stride_a,
const float *b, std::int64_t ldb, std::int64_t stride_b, float beta,
float *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
double alpha, const double *a, std::int64_t lda, std::int64_t stride_a,
const double *b, std::int64_t ldb, std::int64_t stride_b, double beta,
double *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, std::int64_t stride_a, const std::complex<float> *b,
std::int64_t ldb, std::int64_t stride_b, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, std::int64_t stride_a, const std::complex<double> *b,
std::int64_t ldb, std::int64_t stride_b, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
float alpha, const float *a, std::int64_t lda, const float *b,
std::int64_t ldb, float beta, float *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_sgemmt_usm_sycl(queue, upper_lower, transa, transb,
n, k, alpha, a, lda, b, ldb, beta,
c, ldc, dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
double alpha, const double *a, std::int64_t lda, const double *b,
std::int64_t ldb, double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_dgemmt_usm_sycl(queue, upper_lower, transa, transb,
n, k, alpha, a, lda, b, ldb, beta,
c, ldc, dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
std::complex<float> alpha, const std::complex<float> *a, std::int64_t lda,
const std::complex<float> *b, std::int64_t ldb, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_cgemmt_usm_sycl(queue, upper_lower, transa, transb,
n, k, alpha, a, lda, b, ldb, beta,
c, ldc, dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
std::complex<double> alpha, const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].column_major_zgemmt_usm_sycl(queue, upper_lower, transa, transb,
n, k, alpha, a, lda, b, ldb, beta,
c, ldc, dependencies);
}
} //namespace detail
} //namespace column_major
namespace row_major {
namespace detail {
static oneapi::mkl::detail::table_initializer<domain::blas, blas_function_table_t> function_tables;
// Buffer APIs
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].row_major_scasum_sycl(queue, n, x, incx, result);
}
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].row_major_dzasum_sycl(queue, n, x, incx, result);
}
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].row_major_sasum_sycl(queue, n, x, incx, result);
}
void asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].row_major_dasum_sycl(queue, n, x, incx, result);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_saxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_daxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_caxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_zaxpy_sycl(queue, n, alpha, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_scopy_sycl(queue, n, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_dcopy_sycl(queue, n, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_ccopy_sycl(queue, n, x, incx, y, incy);
}
void copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_zcopy_sycl(queue, n, x, incx, y, incy);
}
void dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].row_major_sdot_sycl(queue, n, x, incx, y, incy, result);
}
void dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].row_major_ddot_sycl(queue, n, x, incx, y, incy, result);
}
void dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].row_major_dsdot_sycl(queue, n, x, incx, y, incy, result);
}
void dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &result) {
function_tables[libkey].row_major_cdotc_sycl(queue, n, x, incx, y, incy, result);
}
void dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &result) {
function_tables[libkey].row_major_zdotc_sycl(queue, n, x, incx, y, incy, result);
}
void dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &result) {
function_tables[libkey].row_major_cdotu_sycl(queue, n, x, incx, y, incy, result);
}
void dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &result) {
function_tables[libkey].row_major_zdotu_sycl(queue, n, x, incx, y, incy, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_isamin_sycl(queue, n, x, incx, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_idamin_sycl(queue, n, x, incx, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_icamin_sycl(queue, n, x, incx, result);
}
void iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_izamin_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_isamax_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_idamax_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_icamax_sycl(queue, n, x, incx, result);
}
void iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::int64_t, 1> &result) {
function_tables[libkey].row_major_izamax_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].row_major_scnrm2_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].row_major_dznrm2_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].row_major_snrm2_sycl(queue, n, x, incx, result);
}
void nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &result) {
function_tables[libkey].row_major_dnrm2_sycl(queue, n, x, incx, result);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy, float c, float s) {
function_tables[libkey].row_major_srot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy, double c, double s) {
function_tables[libkey].row_major_drot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, float c, float s) {
function_tables[libkey].row_major_csrot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy, double c, double s) {
function_tables[libkey].row_major_zdrot_sycl(queue, n, x, incx, y, incy, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<float, 1> &a,
cl::sycl::buffer<float, 1> &b, cl::sycl::buffer<float, 1> &c,
cl::sycl::buffer<float, 1> &s) {
function_tables[libkey].row_major_srotg_sycl(queue, a, b, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<double, 1> &a,
cl::sycl::buffer<double, 1> &b, cl::sycl::buffer<double, 1> &c,
cl::sycl::buffer<double, 1> &s) {
function_tables[libkey].row_major_drotg_sycl(queue, a, b, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue,
cl::sycl::buffer<std::complex<float>, 1> &a, cl::sycl::buffer<std::complex<float>, 1> &b,
cl::sycl::buffer<float, 1> &c, cl::sycl::buffer<std::complex<float>, 1> &s) {
function_tables[libkey].row_major_crotg_sycl(queue, a, b, c, s);
}
void rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue,
cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &b, cl::sycl::buffer<double, 1> &c,
cl::sycl::buffer<std::complex<double>, 1> &s) {
function_tables[libkey].row_major_zrotg_sycl(queue, a, b, c, s);
}
void rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> ¶m) {
function_tables[libkey].row_major_srotm_sycl(queue, n, x, incx, y, incy, param);
}
void rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy, cl::sycl::buffer<double, 1> ¶m) {
function_tables[libkey].row_major_drotm_sycl(queue, n, x, incx, y, incy, param);
}
void rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<float, 1> &d1,
cl::sycl::buffer<float, 1> &d2, cl::sycl::buffer<float, 1> &x1, float y1,
cl::sycl::buffer<float, 1> ¶m) {
function_tables[libkey].row_major_srotmg_sycl(queue, d1, d2, x1, y1, param);
}
void rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, cl::sycl::buffer<double, 1> &d1,
cl::sycl::buffer<double, 1> &d2, cl::sycl::buffer<double, 1> &x1, double y1,
cl::sycl::buffer<double, 1> ¶m) {
function_tables[libkey].row_major_drotmg_sycl(queue, d1, d2, x1, y1, param);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_sscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x,
std::int64_t incx) {
function_tables[libkey].row_major_cscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx) {
function_tables[libkey].row_major_csscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float alpha,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_zscal_sycl(queue, n, alpha, x, incx);
}
void scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double alpha,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_zdscal_sycl(queue, n, alpha, x, incx);
}
void sdsdot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float sb,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> &result) {
function_tables[libkey].row_major_sdsdot_sycl(queue, n, sb, x, incx, y, incy, result);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_sswap_sycl(queue, n, x, incx, y, incy);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, cl::sycl::buffer<double, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_dswap_sycl(queue, n, x, incx, y, incy);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_cswap_sycl(queue, n, x, incx, y, incy);
}
void swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_zswap_sycl(queue, n, x, incx, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &x,
std::int64_t incx, float beta, cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_sgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x, incx,
beta, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &x,
std::int64_t incx, double beta, cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_dgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x, incx,
beta, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_cgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x, incx,
beta, y, incy);
}
void gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::int64_t kl, std::int64_t ku, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_zgbmv_sycl(queue, trans, m, n, kl, ku, alpha, a, lda, x, incx,
beta, y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, float beta,
cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_sgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx, beta,
y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, double beta,
cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_dgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx, beta,
y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
std::complex<float> beta, cl::sycl::buffer<std::complex<float>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_cgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx, beta,
y, incy);
}
void gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans, std::int64_t m,
std::int64_t n, std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_zgemv_sycl(queue, trans, m, n, alpha, a, lda, x, incx, beta,
y, incy);
}
void ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy, cl::sycl::buffer<float, 1> &a,
std::int64_t lda) {
function_tables[libkey].row_major_sger_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &y, std::int64_t incy, cl::sycl::buffer<double, 1> &a,
std::int64_t lda) {
function_tables[libkey].row_major_dger_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_cgerc_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_zgerc_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_cgeru_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_zgeru_sycl(queue, m, n, alpha, x, incx, y, incy, a, lda);
}
void hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
std::complex<float> beta, cl::sycl::buffer<std::complex<float>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_chbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x, incx,
beta, y, incy);
}
void hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_zhbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x, incx,
beta, y, incy);
}
void hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_chemv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_zhemv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_cher_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_zher_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_cher2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a,
lda);
}
void her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_zher2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a,
lda);
}
void hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_chpmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta, y,
incy);
}
void hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &y,
std::int64_t incy) {
function_tables[libkey].row_major_zhpmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta, y,
incy);
}
void hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &a) {
function_tables[libkey].row_major_chpr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<double>, 1> &a) {
function_tables[libkey].row_major_zhpr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx,
cl::sycl::buffer<std::complex<float>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<float>, 1> &a) {
function_tables[libkey].row_major_chpr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a);
}
void hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &x,
std::int64_t incx, cl::sycl::buffer<std::complex<double>, 1> &y, std::int64_t incy,
cl::sycl::buffer<std::complex<double>, 1> &a) {
function_tables[libkey].row_major_zhpr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a);
}
void sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, float beta,
cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_ssbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x, incx,
beta, y, incy);
}
void sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
std::int64_t k, double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, double beta,
cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_dsbmv_sycl(queue, upper_lower, n, k, alpha, a, lda, x, incx,
beta, y, incy);
}
void spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &a, cl::sycl::buffer<float, 1> &x,
std::int64_t incx, float beta, cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_sspmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta, y,
incy);
}
void spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &a, cl::sycl::buffer<double, 1> &x,
std::int64_t incx, double beta, cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_dspmv_sycl(queue, upper_lower, n, alpha, a, x, incx, beta, y,
incy);
}
void spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &a) {
function_tables[libkey].row_major_sspr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &a) {
function_tables[libkey].row_major_dspr_sycl(queue, upper_lower, n, alpha, x, incx, a);
}
void spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy, cl::sycl::buffer<float, 1> &a) {
function_tables[libkey].row_major_sspr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a);
}
void spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &y, std::int64_t incy, cl::sycl::buffer<double, 1> &a) {
function_tables[libkey].row_major_dspr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a);
}
void symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, float beta,
cl::sycl::buffer<float, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_ssymv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx, double beta,
cl::sycl::buffer<double, 1> &y, std::int64_t incy) {
function_tables[libkey].row_major_dsymv_sycl(queue, upper_lower, n, alpha, a, lda, x, incx,
beta, y, incy);
}
void syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_ssyr_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &a, std::int64_t lda) {
function_tables[libkey].row_major_dsyr_sycl(queue, upper_lower, n, alpha, x, incx, a, lda);
}
void syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy, cl::sycl::buffer<float, 1> &a,
std::int64_t lda) {
function_tables[libkey].row_major_ssyr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a,
lda);
}
void syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &x, std::int64_t incx,
cl::sycl::buffer<double, 1> &y, std::int64_t incy, cl::sycl::buffer<double, 1> &a,
std::int64_t lda) {
function_tables[libkey].row_major_dsyr2_sycl(queue, upper_lower, n, alpha, x, incx, y, incy, a,
lda);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_stbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dtbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ctbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ztbmv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_stbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dtbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ctbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, std::int64_t k,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ztbsv_sycl(queue, upper_lower, trans, unit_diag, n, k, a, lda,
x, incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_stpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dtpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ctpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ztpmv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_stpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dtpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ctpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ztpsv_sycl(queue, upper_lower, trans, unit_diag, n, a, x,
incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_strmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dtrmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ctrmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ztrmv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<float, 1> &a, std::int64_t lda,
cl::sycl::buffer<float, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_strsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
cl::sycl::buffer<double, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_dtrsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<float>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ctrsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
diag unit_diag, std::int64_t n, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &x, std::int64_t incx) {
function_tables[libkey].row_major_ztrsv_sycl(queue, upper_lower, trans, unit_diag, n, a, lda, x,
incx);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb, float beta, cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_sgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb, double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_dgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_cgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_zgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, half alpha, cl::sycl::buffer<half, 1> &a,
std::int64_t lda, cl::sycl::buffer<half, 1> &b, std::int64_t ldb, half beta,
cl::sycl::buffer<half, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_hgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<half, 1> &a,
std::int64_t lda, cl::sycl::buffer<half, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_gemm_f16f16f32_sycl(queue, transa, transb, m, n, k, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_chemm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_zhemm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, float beta, cl::sycl::buffer<std::complex<float>, 1> &c,
std::int64_t ldc) {
function_tables[libkey].row_major_cherk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda, double beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_zherk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_cher2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, double beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_zher2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, float alpha, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_ssymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, double alpha, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &b, std::int64_t ldb, double beta,
cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_dsymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_csymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
std::int64_t m, std::int64_t n, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_zsymm_sycl(queue, left_right, upper_lower, m, n, alpha, a,
lda, b, ldb, beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, float beta, cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_ssyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, double alpha, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_dsyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_csyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_zsyrk_sycl(queue, upper_lower, trans, n, k, alpha, a, lda,
beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, float alpha, cl::sycl::buffer<float, 1> &a,
std::int64_t lda, cl::sycl::buffer<float, 1> &b, std::int64_t ldb, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_ssyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, double alpha, cl::sycl::buffer<double, 1> &a,
std::int64_t lda, cl::sycl::buffer<double, 1> &b, std::int64_t ldb, double beta,
cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_dsyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_csyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose trans,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &c,
std::int64_t ldc) {
function_tables[libkey].row_major_zsyr2k_sycl(queue, upper_lower, trans, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb) {
function_tables[libkey].row_major_strmm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb) {
function_tables[libkey].row_major_dtrmm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb) {
function_tables[libkey].row_major_ctrmm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb) {
function_tables[libkey].row_major_ztrmm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb) {
function_tables[libkey].row_major_strsm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb) {
function_tables[libkey].row_major_dtrsm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb) {
function_tables[libkey].row_major_ctrsm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb) {
function_tables[libkey].row_major_ztrsm_sycl(queue, left_right, upper_lower, trans, unit_diag,
m, n, alpha, a, lda, b, ldb);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<float, 1> &b, std::int64_t ldb, std::int64_t stride_b, float beta,
cl::sycl::buffer<float, 1> &c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size) {
function_tables[libkey].row_major_sgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<double, 1> &b, std::int64_t ldb, std::int64_t stride_b,
double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc,
std::int64_t stride_c, std::int64_t batch_size) {
function_tables[libkey].row_major_dgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc,
std::int64_t stride_c, std::int64_t batch_size) {
function_tables[libkey].row_major_cgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::complex<double> beta,
cl::sycl::buffer<std::complex<double>, 1> &c, std::int64_t ldc,
std::int64_t stride_c, std::int64_t batch_size) {
function_tables[libkey].row_major_zgemm_batch_strided_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
float alpha, cl::sycl::buffer<float, 1> &a, std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<float, 1> &b, std::int64_t ldb, std::int64_t stride_b,
std::int64_t batch_size) {
function_tables[libkey].row_major_strsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
double alpha, cl::sycl::buffer<double, 1> &a, std::int64_t lda,
std::int64_t stride_a, cl::sycl::buffer<double, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::int64_t batch_size) {
function_tables[libkey].row_major_dtrsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<float> alpha, cl::sycl::buffer<std::complex<float>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::int64_t batch_size) {
function_tables[libkey].row_major_ctrsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void trsm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m, std::int64_t n,
std::complex<double> alpha, cl::sycl::buffer<std::complex<double>, 1> &a,
std::int64_t lda, std::int64_t stride_a,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::int64_t stride_b, std::int64_t batch_size) {
function_tables[libkey].row_major_ztrsm_batch_strided_sycl(
queue, left_right, upper_lower, trans, unit_diag, m, n, alpha, a, lda, stride_a, b, ldb,
stride_b, batch_size);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, float alpha,
cl::sycl::buffer<float, 1> &a, std::int64_t lda, cl::sycl::buffer<float, 1> &b,
std::int64_t ldb, float beta, cl::sycl::buffer<float, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_sgemmt_sycl(queue, upper_lower, transa, transb, n, k, alpha,
a, lda, b, ldb, beta, c, ldc);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, double alpha,
cl::sycl::buffer<double, 1> &a, std::int64_t lda, cl::sycl::buffer<double, 1> &b,
std::int64_t ldb, double beta, cl::sycl::buffer<double, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_dgemmt_sycl(queue, upper_lower, transa, transb, n, k, alpha,
a, lda, b, ldb, beta, c, ldc);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, std::complex<float> alpha,
cl::sycl::buffer<std::complex<float>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<float>, 1> &b, std::int64_t ldb, std::complex<float> beta,
cl::sycl::buffer<std::complex<float>, 1> &c, std::int64_t ldc) {
function_tables[libkey].row_major_cgemmt_sycl(queue, upper_lower, transa, transb, n, k, alpha,
a, lda, b, ldb, beta, c, ldc);
}
void gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower, transpose transa,
transpose transb, std::int64_t n, std::int64_t k, std::complex<double> alpha,
cl::sycl::buffer<std::complex<double>, 1> &a, std::int64_t lda,
cl::sycl::buffer<std::complex<double>, 1> &b, std::int64_t ldb,
std::complex<double> beta, cl::sycl::buffer<std::complex<double>, 1> &c,
std::int64_t ldc) {
function_tables[libkey].row_major_zgemmt_sycl(queue, upper_lower, transa, transb, n, k, alpha,
a, lda, b, ldb, beta, c, ldc);
}
void gemm_bias(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, offset offsetc, std::int64_t m, std::int64_t n, std::int64_t k,
float alpha, cl::sycl::buffer<int8_t, 1> &a, std::int64_t lda, int8_t ao,
cl::sycl::buffer<uint8_t, 1> &b, std::int64_t ldb, uint8_t bo, float beta,
cl::sycl::buffer<int32_t, 1> &c, std::int64_t ldc,
cl::sycl::buffer<int32_t, 1> &co) {
function_tables[libkey].row_major_gemm_s8u8s32_bias_sycl(
queue, transa, transb, offsetc, m, n, k, alpha, a, lda, ao, b, ldb, bo, beta, c, ldc, co);
}
// USM APIs
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_scasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dzasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event asum(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dasum_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
float alpha, const float *x, std::int64_t incx, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_saxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
double alpha, const double *x, std::int64_t incx, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_daxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, const std::complex<float> *x, std::int64_t incx,
std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_caxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, const std::complex<double> *x, std::int64_t incx,
std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zaxpy_usm_sycl(queue, n, alpha, x, incx, y, incy,
dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
float *alpha, const float **x, std::int64_t *incx, float **y,
std::int64_t *incy, std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_saxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
double *alpha, const double **x, std::int64_t *incx, double **y,
std::int64_t *incy, std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_daxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
std::complex<float> *alpha, const std::complex<float> **x,
std::int64_t *incx, std::complex<float> **y, std::int64_t *incy,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_caxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event axpy_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t *n,
std::complex<double> *alpha, const std::complex<double> **x,
std::int64_t *incx, std::complex<double> **y, std::int64_t *incy,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zaxpy_batch_group_usm_sycl(
queue, n, alpha, x, incx, y, incy, group_count, group_size, dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_scopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dcopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ccopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event copy(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zcopy_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, const float *y, std::int64_t incy,
float *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sdot_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, const double *y, std::int64_t incy,
double *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ddot_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, const float *y, std::int64_t incy,
double *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsdot_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, const std::complex<float> *y,
std::int64_t incy, std::complex<float> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cdotc_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx,
const std::complex<double> *y, std::int64_t incy, std::complex<double> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zdotc_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, const std::complex<float> *y,
std::int64_t incy, std::complex<float> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cdotu_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event dotu(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx,
const std::complex<double> *y, std::int64_t incy, std::complex<double> *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zdotu_usm_sycl(queue, n, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_isamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_idamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_icamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamin(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_izamin_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_isamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_idamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_icamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event iamax(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, std::int64_t *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_izamax_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<float> *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_scnrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const std::complex<double> *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dznrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const float *x, std::int64_t incx, float *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_snrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event nrm2(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
const double *x, std::int64_t incx, double *result,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dnrm2_usm_sycl(queue, n, x, incx, result,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> *x, std::int64_t incx, std::complex<float> *y,
std::int64_t incy, float c, float s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_srot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> *x, std::int64_t incx, std::complex<double> *y,
std::int64_t incy, double c, double s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_drot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float *x,
std::int64_t incx, float *y, std::int64_t incy, float c, float s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_csrot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double *x,
std::int64_t incx, double *y, std::int64_t incy, double c, double s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zdrot_usm_sycl(queue, n, x, incx, y, incy, c, s,
dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, float *a, float *b,
float *c, float *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_srotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, double *a, double *b,
double *c, double *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_drotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::complex<float> *a,
std::complex<float> *b, float *c, std::complex<float> *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_crotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotg(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::complex<double> *a,
std::complex<double> *b, double *c, std::complex<double> *s,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zrotg_usm_sycl(queue, a, b, c, s, dependencies);
}
cl::sycl::event rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float *x,
std::int64_t incx, float *y, std::int64_t incy, float *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_srotm_usm_sycl(queue, n, x, incx, y, incy, param,
dependencies);
}
cl::sycl::event rotm(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double *x,
std::int64_t incx, double *y, std::int64_t incy, double *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_drotm_usm_sycl(queue, n, x, incx, y, incy, param,
dependencies);
}
cl::sycl::event rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, float *d1, float *d2,
float *x1, float y1, float *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_srotmg_usm_sycl(queue, d1, d2, x1, y1, param,
dependencies);
}
cl::sycl::event rotmg(oneapi::mkl::device libkey, cl::sycl::queue &queue, double *d1, double *d2,
double *x1, double y1, double *param,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_drotmg_usm_sycl(queue, d1, d2, x1, y1, param,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
float alpha, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sscal_usm_sycl(queue, n, alpha, x, incx, dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
double alpha, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dscal_usm_sycl(queue, n, alpha, x, incx, dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> alpha, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cscal_usm_sycl(queue, n, alpha, x, incx, dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> alpha, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_csscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
float alpha, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zscal_usm_sycl(queue, n, alpha, x, incx, dependencies);
}
cl::sycl::event scal(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
double alpha, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zdscal_usm_sycl(queue, n, alpha, x, incx,
dependencies);
}
cl::sycl::event sdsdot(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float sb,
const float *x, std::int64_t incx, const float *y, std::int64_t incy,
float *result, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sdsdot_usm_sycl(queue, n, sb, x, incx, y, incy, result,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, float *x,
std::int64_t incx, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n, double *x,
std::int64_t incx, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<float> *x, std::int64_t incx, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event swap(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t n,
std::complex<double> *x, std::int64_t incx, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zswap_usm_sycl(queue, n, x, incx, y, incy,
dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku, float alpha,
const float *a, std::int64_t lda, const float *x, std::int64_t incx,
float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku, double alpha,
const double *a, std::int64_t lda, const double *x, std::int64_t incx,
double beta, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku,
std::complex<float> alpha, const std::complex<float> *a, std::int64_t lda,
const std::complex<float> *x, std::int64_t incx, std::complex<float> beta,
std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::int64_t kl, std::int64_t ku,
std::complex<double> alpha, const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *x, std::int64_t incx, std::complex<double> beta,
std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgbmv_usm_sycl(
queue, trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, float alpha, const float *a, std::int64_t lda,
const float *x, std::int64_t incx, float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, double alpha, const double *a,
std::int64_t lda, const double *x, std::int64_t incx, double beta, double *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *x,
std::int64_t incx, std::complex<float> beta, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event gemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose trans,
std::int64_t m, std::int64_t n, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *x,
std::int64_t incx, std::complex<double> beta, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgemv_usm_sycl(queue, trans, m, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, float alpha, const float *x, std::int64_t incx, const float *y,
std::int64_t incy, float *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sger_usm_sycl(queue, m, n, alpha, x, incx, y, incy, a,
lda, dependencies);
}
cl::sycl::event ger(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, double alpha, const double *x, std::int64_t incx,
const double *y, std::int64_t incy, double *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dger_usm_sycl(queue, m, n, alpha, x, incx, y, incy, a,
lda, dependencies);
}
cl::sycl::event gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgerc_usm_sycl(queue, m, n, alpha, x, incx, y, incy, a,
lda, dependencies);
}
cl::sycl::event gerc(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgerc_usm_sycl(queue, m, n, alpha, x, incx, y, incy, a,
lda, dependencies);
}
cl::sycl::event geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgeru_usm_sycl(queue, m, n, alpha, x, incx, y, incy, a,
lda, dependencies);
}
cl::sycl::event geru(oneapi::mkl::device libkey, cl::sycl::queue &queue, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgeru_usm_sycl(queue, m, n, alpha, x, incx, y, incy, a,
lda, dependencies);
}
cl::sycl::event hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *x,
std::int64_t incx, std::complex<float> beta, std::complex<float> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_chbmv_usm_sycl(queue, upper_lower, n, k, alpha, a, lda,
x, incx, beta, y, incy, dependencies);
}
cl::sycl::event hbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *x,
std::int64_t incx, std::complex<double> beta, std::complex<double> *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zhbmv_usm_sycl(queue, upper_lower, n, k, alpha, a, lda,
x, incx, beta, y, incy, dependencies);
}
cl::sycl::event hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, const std::complex<float> *x, std::int64_t incx,
std::complex<float> beta, std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_chemv_usm_sycl(queue, upper_lower, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event hemv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, const std::complex<double> *x, std::int64_t incx,
std::complex<double> beta, std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zhemv_usm_sycl(queue, upper_lower, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const std::complex<float> *x, std::int64_t incx,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cher_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
lda, dependencies);
}
cl::sycl::event her(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const std::complex<double> *x, std::int64_t incx,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zher_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
lda, dependencies);
}
cl::sycl::event her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cher2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, lda, dependencies);
}
cl::sycl::event her2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zher2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, lda, dependencies);
}
cl::sycl::event hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
const std::complex<float> *x, std::int64_t incx, std::complex<float> beta,
std::complex<float> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_chpmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event hpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
const std::complex<double> *x, std::int64_t incx, std::complex<double> beta,
std::complex<double> *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zhpmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const std::complex<float> *x, std::int64_t incx,
std::complex<float> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_chpr_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
dependencies);
}
cl::sycl::event hpr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const std::complex<double> *x, std::int64_t incx,
std::complex<double> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zhpr_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
dependencies);
}
cl::sycl::event hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *x,
std::int64_t incx, const std::complex<float> *y, std::int64_t incy,
std::complex<float> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_chpr2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, dependencies);
}
cl::sycl::event hpr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *x,
std::int64_t incx, const std::complex<double> *y, std::int64_t incy,
std::complex<double> *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zhpr2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, dependencies);
}
cl::sycl::event sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, float alpha, const float *a, std::int64_t lda,
const float *x, std::int64_t incx, float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssbmv_usm_sycl(queue, upper_lower, n, k, alpha, a, lda,
x, incx, beta, y, incy, dependencies);
}
cl::sycl::event sbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, std::int64_t k, double alpha, const double *a,
std::int64_t lda, const double *x, std::int64_t incx, double beta, double *y,
std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsbmv_usm_sycl(queue, upper_lower, n, k, alpha, a, lda,
x, incx, beta, y, incy, dependencies);
}
cl::sycl::event spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *a, const float *x, std::int64_t incx,
float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sspmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event spmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *a, const double *x,
std::int64_t incx, double beta, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dspmv_usm_sycl(queue, upper_lower, n, alpha, a, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, float *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sspr_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
dependencies);
}
cl::sycl::event spr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx, double *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dspr_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
dependencies);
}
cl::sycl::event spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, const float *y,
std::int64_t incy, float *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sspr2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, dependencies);
}
cl::sycl::event spr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx,
const double *y, std::int64_t incy, double *a,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dspr2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, dependencies);
}
cl::sycl::event symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *a, std::int64_t lda, const float *x,
std::int64_t incx, float beta, float *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssymv_usm_sycl(queue, upper_lower, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event symv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *a, std::int64_t lda,
const double *x, std::int64_t incx, double beta, double *y, std::int64_t incy,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsymv_usm_sycl(queue, upper_lower, n, alpha, a, lda, x,
incx, beta, y, incy, dependencies);
}
cl::sycl::event syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, float *a,
std::int64_t lda, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssyr_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
lda, dependencies);
}
cl::sycl::event syr(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx, double *a,
std::int64_t lda, const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsyr_usm_sycl(queue, upper_lower, n, alpha, x, incx, a,
lda, dependencies);
}
cl::sycl::event syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, float alpha, const float *x, std::int64_t incx, const float *y,
std::int64_t incy, float *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssyr2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, lda, dependencies);
}
cl::sycl::event syr2(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
std::int64_t n, double alpha, const double *x, std::int64_t incx,
const double *y, std::int64_t incy, double *a, std::int64_t lda,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsyr2_usm_sycl(queue, upper_lower, n, alpha, x, incx,
y, incy, a, lda, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const float *a, std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_stbmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const double *a, std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtbmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<float> *a, std::int64_t lda, std::complex<float> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctbmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<double> *a, std::int64_t lda, std::complex<double> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztbmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const float *a, std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_stbsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const double *a, std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtbsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<float> *a, std::int64_t lda, std::complex<float> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctbsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tbsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, std::int64_t k,
const std::complex<double> *a, std::int64_t lda, std::complex<double> *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztbsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
k, a, lda, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a, float *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_stpmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a, double *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtpmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctpmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztpmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a, float *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_stpsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a, double *x,
std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtpsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctpsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event tpsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztpsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a,
std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_strmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a,
std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtrmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctrmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trmv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztrmv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const float *a,
std::int64_t lda, float *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_strsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const double *a,
std::int64_t lda, double *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtrsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctrsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event trsv(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, diag unit_diag, std::int64_t n, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *x, std::int64_t incx,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztrsv_usm_sycl(queue, upper_lower, trans, unit_diag, n,
a, lda, x, incx, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, float alpha,
const float *a, std::int64_t lda, const float *b, std::int64_t ldb, float beta,
float *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k, double alpha,
const double *a, std::int64_t lda, const double *b, std::int64_t ldb,
double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<float> alpha, const std::complex<float> *a, std::int64_t lda,
const std::complex<float> *b, std::int64_t ldb, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<double> alpha, const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgemm_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, std::complex<float> beta, std::complex<float> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_chemm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event hemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *b,
std::int64_t ldb, std::complex<double> beta, std::complex<double> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zhemm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, float alpha,
const std::complex<float> *a, std::int64_t lda, float beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cherk_usm_sycl(queue, upper_lower, trans, n, k, alpha,
a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event herk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, double alpha,
const std::complex<double> *a, std::int64_t lda, double beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zherk_usm_sycl(queue, upper_lower, trans, n, k, alpha,
a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, float beta, std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cher2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event her2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, double beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zher2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, float alpha, const float *a,
std::int64_t lda, const float *b, std::int64_t ldb, float beta, float *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, double alpha,
const double *a, std::int64_t lda, const double *b, std::int64_t ldb,
double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, std::complex<float> beta, std::complex<float> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_csymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event symm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, std::int64_t m, std::int64_t n, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, const std::complex<double> *b,
std::int64_t ldb, std::complex<double> beta, std::complex<double> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zsymm_usm_sycl(
queue, left_right, upper_lower, m, n, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, float alpha, const float *a,
std::int64_t lda, float beta, float *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssyrk_usm_sycl(queue, upper_lower, trans, n, k, alpha,
a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, double alpha, const double *a,
std::int64_t lda, double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsyrk_usm_sycl(queue, upper_lower, trans, n, k, alpha,
a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_csyrk_usm_sycl(queue, upper_lower, trans, n, k, alpha,
a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syrk(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zsyrk_usm_sycl(queue, upper_lower, trans, n, k, alpha,
a, lda, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, float alpha, const float *a,
std::int64_t lda, const float *b, std::int64_t ldb, float beta, float *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ssyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, double alpha,
const double *a, std::int64_t lda, const double *b, std::int64_t ldb,
double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dsyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<float> alpha,
const std::complex<float> *a, std::int64_t lda, const std::complex<float> *b,
std::int64_t ldb, std::complex<float> beta, std::complex<float> *c,
std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_csyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event syr2k(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose trans, std::int64_t n, std::int64_t k, std::complex<double> alpha,
const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zsyr2k_usm_sycl(
queue, upper_lower, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc, dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, float alpha, const float *a, std::int64_t lda, float *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_strmm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, double alpha, const double *a, std::int64_t lda, double *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtrmm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctrmm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trmm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztrmm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, float alpha, const float *a, std::int64_t lda, float *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_strsm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, double alpha, const double *a, std::int64_t lda, double *b,
std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dtrsm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, std::complex<float> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ctrsm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event trsm(oneapi::mkl::device libkey, cl::sycl::queue &queue, side left_right,
uplo upper_lower, transpose trans, diag unit_diag, std::int64_t m,
std::int64_t n, std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, std::complex<double> *b, std::int64_t ldb,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_ztrsm_usm_sycl(queue, left_right, upper_lower, trans,
unit_diag, m, n, alpha, a, lda, b, ldb,
dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
float *alpha, const float **a, std::int64_t *lda, const float **b,
std::int64_t *ldb, float *beta, float **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
double *alpha, const double **a, std::int64_t *lda, const double **b,
std::int64_t *ldb, double *beta, double **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
std::complex<float> *alpha, const std::complex<float> **a,
std::int64_t *lda, const std::complex<float> **b, std::int64_t *ldb,
std::complex<float> *beta, std::complex<float> **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose *transa,
transpose *transb, std::int64_t *m, std::int64_t *n, std::int64_t *k,
std::complex<double> *alpha, const std::complex<double> **a,
std::int64_t *lda, const std::complex<double> **b, std::int64_t *ldb,
std::complex<double> *beta, std::complex<double> **c, std::int64_t *ldc,
std::int64_t group_count, std::int64_t *group_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgemm_batch_group_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc, group_count,
group_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
float alpha, const float *a, std::int64_t lda, std::int64_t stride_a,
const float *b, std::int64_t ldb, std::int64_t stride_b, float beta,
float *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
double alpha, const double *a, std::int64_t lda, std::int64_t stride_a,
const double *b, std::int64_t ldb, std::int64_t stride_b, double beta,
double *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<float> alpha, const std::complex<float> *a,
std::int64_t lda, std::int64_t stride_a, const std::complex<float> *b,
std::int64_t ldb, std::int64_t stride_b, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemm_batch(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
transpose transb, std::int64_t m, std::int64_t n, std::int64_t k,
std::complex<double> alpha, const std::complex<double> *a,
std::int64_t lda, std::int64_t stride_a, const std::complex<double> *b,
std::int64_t ldb, std::int64_t stride_b, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc, std::int64_t stride_c,
std::int64_t batch_size,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgemm_batch_strided_usm_sycl(
queue, transa, transb, m, n, k, alpha, a, lda, stride_a, b, ldb, stride_b, beta, c, ldc,
stride_c, batch_size, dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
float alpha, const float *a, std::int64_t lda, const float *b,
std::int64_t ldb, float beta, float *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_sgemmt_usm_sycl(queue, upper_lower, transa, transb, n,
k, alpha, a, lda, b, ldb, beta, c, ldc,
dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
double alpha, const double *a, std::int64_t lda, const double *b,
std::int64_t ldb, double beta, double *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_dgemmt_usm_sycl(queue, upper_lower, transa, transb, n,
k, alpha, a, lda, b, ldb, beta, c, ldc,
dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
std::complex<float> alpha, const std::complex<float> *a, std::int64_t lda,
const std::complex<float> *b, std::int64_t ldb, std::complex<float> beta,
std::complex<float> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_cgemmt_usm_sycl(queue, upper_lower, transa, transb, n,
k, alpha, a, lda, b, ldb, beta, c, ldc,
dependencies);
}
cl::sycl::event gemmt(oneapi::mkl::device libkey, cl::sycl::queue &queue, uplo upper_lower,
transpose transa, transpose transb, std::int64_t n, std::int64_t k,
std::complex<double> alpha, const std::complex<double> *a, std::int64_t lda,
const std::complex<double> *b, std::int64_t ldb, std::complex<double> beta,
std::complex<double> *c, std::int64_t ldc,
const cl::sycl::vector_class<cl::sycl::event> &dependencies) {
return function_tables[libkey].row_major_zgemmt_usm_sycl(queue, upper_lower, transa, transb, n,
k, alpha, a, lda, b, ldb, beta, c, ldc,
dependencies);
}
} //namespace detail
} //namespace row_major
} //namespace blas
} //namespace mkl
} //namespace oneapi
| 62.346687 | 100 | 0.587061 | cdgarland |
abca03d3c0b2981e896b543279a34d92352a6a33 | 243 | hpp | C++ | futurehead/futurehead_node/daemon.hpp | futureheadgroup/futurehead-node | 9995fb99462c77b07a880763cbb162a41279a5da | [
"BSD-3-Clause"
] | 2 | 2021-04-15T03:09:48.000Z | 2021-05-09T13:44:48.000Z | futurehead/futurehead_node/daemon.hpp | FutureHeadCoin/futurehead-node | 3871da56c478144b79cb12d43813f49ad280f6d4 | [
"BSD-3-Clause"
] | null | null | null | futurehead/futurehead_node/daemon.hpp | FutureHeadCoin/futurehead-node | 3871da56c478144b79cb12d43813f49ad280f6d4 | [
"BSD-3-Clause"
] | null | null | null | namespace boost
{
namespace filesystem
{
class path;
}
}
namespace futurehead
{
class node_flags;
}
namespace futurehead_daemon
{
class daemon
{
public:
void run (boost::filesystem::path const &, futurehead::node_flags const & flags);
};
}
| 11.571429 | 82 | 0.740741 | futureheadgroup |
abca30c7ebde7214225f6204ba11aab5512f6649 | 1,009 | cpp | C++ | CCF/CCSP/2018/5-malloc/utils.cpp | cnsteven/online-judge | 60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7 | [
"MIT"
] | 1 | 2019-05-04T10:28:32.000Z | 2019-05-04T10:28:32.000Z | CCF/CCSP/2018/5-malloc/utils.cpp | cnsteven/online-judge | 60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7 | [
"MIT"
] | null | null | null | CCF/CCSP/2018/5-malloc/utils.cpp | cnsteven/online-judge | 60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7 | [
"MIT"
] | 3 | 2020-12-31T04:36:38.000Z | 2021-07-25T07:39:31.000Z | #include "utils.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
static char* mem_start_brk;
static char* mem_brk;
static char* mem_max_addr;
void mem_init() {
if ((mem_start_brk = (char*)malloc(MAX_HEAP)) == NULL) {
fprintf(stderr, "mem_init error\n");
exit(1);
}
mem_max_addr = mem_start_brk + MAX_HEAP;
mem_brk = mem_start_brk;
}
void mem_deinit() {
free(mem_start_brk);
}
void mem_reset_brk() {
mem_brk = mem_start_brk;
}
void* mem_sbrk(int incr) {
char* old_brk = mem_brk;
if ((incr < 0) || ((mem_brk + incr) > mem_max_addr)) {
errno = ENOMEM;
fprintf(stderr, "ERROR: mem_sbrk failed. Ran out of memory...\n");
return (void*)-1;
}
mem_brk += incr;
return (void*)old_brk;
}
void* mem_heap_lo() {
return (void*)mem_start_brk;
}
void* mem_heap_hi() {
return (void*)(mem_brk - 1);
}
size_t mem_heapsize() {
return (size_t)(mem_brk - mem_start_brk);
}
| 19.784314 | 74 | 0.624381 | cnsteven |
abca50600a5a77cb7d8a78505189dbed98ee493f | 457 | cpp | C++ | Train/Sheet/Sheet-A/base/Sheet-A 0-20/11-20/17-Nearly Lucky Number.cpp | mohamedGamalAbuGalala/Practice | 2a5fa3bdaf995d0c304f04231e1a69e6960f72c8 | [
"MIT"
] | 1 | 2019-12-19T06:51:20.000Z | 2019-12-19T06:51:20.000Z | Train/Sheet/Sheet-A/base/Sheet-A 0-20/11-20/17-Nearly Lucky Number.cpp | mohamedGamalAbuGalala/Practice | 2a5fa3bdaf995d0c304f04231e1a69e6960f72c8 | [
"MIT"
] | null | null | null | Train/Sheet/Sheet-A/base/Sheet-A 0-20/11-20/17-Nearly Lucky Number.cpp | mohamedGamalAbuGalala/Practice | 2a5fa3bdaf995d0c304f04231e1a69e6960f72c8 | [
"MIT"
] | null | null | null | #include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>
#include <string.h>
#include <array>
#include <iterator>
#define pb push_back
#define up upper_bound
#define lp lower_bound
using namespace std;
int main() {
int cnt = 0;
string inp;
cin>>inp;
for (int i = 0 , s = inp.size() ; i < s; ++i)
if((inp[i] == '4') || inp[i] == '7')
cnt++;
if(cnt == 7 || cnt == 4)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
| 16.925926 | 46 | 0.599562 | mohamedGamalAbuGalala |
abcd8c69fe75f35c086ed74df3916557179a05dd | 4,827 | cpp | C++ | Sandbox/src/Sandbox2D.cpp | davidliljefors/Hazel | 1467f1c20ba46bdfe943d72a75b6d86bca1c2a66 | [
"Apache-2.0"
] | 1 | 2020-09-27T09:22:33.000Z | 2020-09-27T09:22:33.000Z | Sandbox/src/Sandbox2D.cpp | davidliljefors/Hazel | 1467f1c20ba46bdfe943d72a75b6d86bca1c2a66 | [
"Apache-2.0"
] | null | null | null | Sandbox/src/Sandbox2D.cpp | davidliljefors/Hazel | 1467f1c20ba46bdfe943d72a75b6d86bca1c2a66 | [
"Apache-2.0"
] | null | null | null | #include "Sandbox2D.h"
#include "imgui/imgui.h"
#include <glm/gtc/type_ptr.hpp>
#include<sstream>
Hazel::Ref<Hazel::Texture2D> logo;
float frametime = 1.f;
Sandbox2D::Sandbox2D()
: Layer("Sandbox2D"), m_CameraController(1280.f / 720.f)
{
}
void Sandbox2D::OnAttach()
{
HZ_PROFILE_FUNCTION();
m_CheckerTexture = Hazel::Texture2D::Create("assets/Checkerboard.png");
logo = Hazel::Texture2D::Create("assets/HazelLogo.png");
}
void Sandbox2D::OnDetach()
{
}
void Sandbox2D::OnUpdate(Hazel::Timestep ts)
{
frametime = ts.GetSeconds();
HZ_PROFILE_FUNCTION();
// Update
m_CameraController.OnUpdate(ts);
if (Hazel::Input::IsMouseButtonPressed(0))
{
std::stringstream ss;
auto [x, y] = Hazel::Input::GetMousePosition();
ss << "Mouse X:" << x << ", Y: " << y << std::endl;
}
// Render
Hazel::Renderer2D::ResetStats();
{
HZ_PROFILE_SCOPE("Sandbox::Render Prep");
Hazel::RenderCommand::SetClearColor({ 0.1f, 0.1f, 0.1f, 1 });
Hazel::RenderCommand::Clear();
Hazel::Renderer2D::BeginScene(m_CameraController.GetCamera());
}
Hazel::Renderer2D::EndScene();
Hazel::Renderer2D::BeginScene(m_CameraController.GetCamera());
for (float y = -5.f; y < 5.0f; y +=1.0f)
{
for (float x = -5.f; x < 5.0f; x += 1.0f)
{
glm::vec4 col = { (x + 5.f) / 10.f, (y + 5.f) / 10.f, 0.6f, 0.7f };
Hazel::Renderer2D::DrawQuad({ x, y, 1.0f }, glm::vec2(0.95f), col);
}
}
Hazel::Renderer2D::EndScene();
}
void Sandbox2D::OnImGuiRender()
{
ImGui::Begin("Settings");
ImGui::Text("FPS : %f", 1.f / frametime);
auto stats = Hazel::Renderer2D::GetStats();
ImGui::DragFloat3("Pos", glm::value_ptr(m_SpritePos), 0.01f);
ImGui::DragFloat2("Size", glm::value_ptr(m_SpriteSize), 0.01f);
ImGui::Text("Renderer2D stats : ");
ImGui::Text("Draw calls : %d", stats.DrawCalls);
ImGui::Text("Quads : %d", stats.QuadCount);
ImGui::Text("Vertices : %d", stats.GetTotalVertexCount());
ImGui::Text("Indices : %d", stats.GetTotalIndexCount());
ImGui::ColorEdit4("Square Color", glm::value_ptr(m_SquareColor));
ImGui::End();
/// ------ DOCKSPACE
static bool dockspaceOpen = true;
static bool opt_fullscreen_persistant = true;
bool opt_fullscreen = opt_fullscreen_persistant;
static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_None;
// We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into,
// because it would be confusing to have two docking targets within each others.
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking;
if (opt_fullscreen)
{
ImGuiViewport* viewport = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(viewport->Pos);
ImGui::SetNextWindowSize(viewport->Size);
ImGui::SetNextWindowViewport(viewport->ID);
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove;
window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus;
}
// When using ImGuiDockNodeFlags_PassthruCentralNode, DockSpace() will render our background and handle the pass-thru hole, so we ask Begin() to not render a background.
if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode)
window_flags |= ImGuiWindowFlags_NoBackground;
// Important: note that we proceed even if Begin() returns false (aka window is collapsed).
// This is because we want to keep our DockSpace() active. If a DockSpace() is inactive,
// all active windows docked into it will lose their parent and become undocked.
// We cannot preserve the docking relationship between an active window and an inactive docking, otherwise
// any change of dockspace/settings would lead to windows being stuck in limbo and never being visible.
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
ImGui::Begin("DockSpace Demo", &dockspaceOpen, window_flags);
ImGui::PopStyleVar();
if (opt_fullscreen)
ImGui::PopStyleVar(2);
// DockSpace
ImGuiIO& io = ImGui::GetIO();
if (io.ConfigFlags & ImGuiConfigFlags_DockingEnable)
{
ImGuiID dockspace_id = ImGui::GetID("MyDockSpace");
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
}
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu("File"))
{
// Disabling fullscreen would allow the window to be moved to the front of other windows,
// which we can't undo at the moment without finer window depth/z control.
//ImGui::MenuItem("Fullscreen", NULL, &opt_fullscreen_persistant);
if (ImGui::MenuItem("Exit"))
{
Hazel::Application::Get().Close();
}
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
ImGui::End();
}
void Sandbox2D::OnEvent(Hazel::Event& e)
{
m_CameraController.OnEvent(e);
} | 31.141935 | 170 | 0.719495 | davidliljefors |
abce15ee2eb1be128394fb486457f5250b5a8993 | 579 | cpp | C++ | C++/0406-Queue-Reconstruction-By-Height/soln.cpp | wyaadarsh/LeetCode-Solutions | 3719f5cb059eefd66b83eb8ae990652f4b7fd124 | [
"MIT"
] | 5 | 2020-07-24T17:48:59.000Z | 2020-12-21T05:56:00.000Z | C++/0406-Queue-Reconstruction-By-Height/soln.cpp | zhangyaqi1989/LeetCode-Solutions | 2655a1ffc8678ad1de6c24295071308a18c5dc6e | [
"MIT"
] | null | null | null | C++/0406-Queue-Reconstruction-By-Height/soln.cpp | zhangyaqi1989/LeetCode-Solutions | 2655a1ffc8678ad1de6c24295071308a18c5dc6e | [
"MIT"
] | 2 | 2020-07-24T17:49:01.000Z | 2020-08-31T19:57:35.000Z | auto desyncio = []()
{
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
return nullptr;
}();
// ALG: sort
//
bool mySort(pair<int,int> a, pair<int,int> b){
if(a.first != b.first) return a.first > b.first;
return a.second < b.second;
}
class Solution {
public:
vector<pair<int, int>> reconstructQueue(vector<pair<int, int>>& people) {
vector<pair<int, int>> ans;
sort(people.begin(), people.end(), mySort);
for(auto p : people) {
ans.insert(ans.begin() + p.second, p);
}
return ans;
}
};
| 20.678571 | 77 | 0.561313 | wyaadarsh |
abce765833e3622126dd06720bc68f7121d15d5d | 3,344 | cpp | C++ | src/synth/SubstractiveSynthParams.cpp | MacFurax/ofxPDSPTools | a2c7af9035d771287abc9414cfadd299e9a8dd41 | [
"MIT"
] | 12 | 2019-09-17T15:43:50.000Z | 2021-07-20T09:46:44.000Z | src/synth/SubstractiveSynthParams.cpp | MacFurax/ofxPDSPTools | a2c7af9035d771287abc9414cfadd299e9a8dd41 | [
"MIT"
] | null | null | null | src/synth/SubstractiveSynthParams.cpp | MacFurax/ofxPDSPTools | a2c7af9035d771287abc9414cfadd299e9a8dd41 | [
"MIT"
] | null | null | null | #include "SubstractiveSynthParams.h"
SubstractiveSynthParams::SubstractiveSynthParams() : PatchParams()
{
//AddParam("SYNTH.Filter Type", 0, {"LowPass", "BandPass", "HighPass", "Notch"});
//AddParam("SYNTH.Filter Cutoff", 180.0f, 0.0f, 180.0f, 100.f); // because filter type is default to LowPass, set cutoff on higher frequencey (pitch)
//AddParam("SYNTH.Filter Reso", 0.0f, 0.0f, 1.0f);
//AddParam("SYNTH.Filter LFO WF", 0.0f, {"sine","triangle", "saw", "square"});
//AddParam("SYNTH.Filter LFO Freq", 1.0f, 0.0f, 30.0f);
//AddParam("SYNTH.Filter LFO Amp", 0.0f, 0.0f, 40.0f);
//AddParam("OSC1.Detune", 0.0f, -12.0f, 12.0f);
//AddParam("OSC1.Fine", 0.0f, -1.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.Level", 0.5f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.PW", 0.5f, 0.1f, 0.9f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.Sine", 1.0f, 0.0f, 1.0f);
//AddParam("OSC1.Triangle", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.Saw", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.Pulse", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.Noise", 0.0f, 0.0f, 0.5f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.A", 10.0f, 0.0f, 3000.0f);
//AddParam("OSC1.D", 200.0f, 0.0f, 3000.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.S", 0.5f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.R", 400.0f, 0.0f, 3000.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.LFO Sine", 1.0f, 0.0f, 1.0f);
//AddParam("OSC1.LFO Triangle", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.LFO Saw", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.LFO Square", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.LFO Freq", 1.0f, 0.0f, 30.0f);
//AddParam("OSC1.LFO Pitch", 0.0f, 0.0f, 20.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.LFO Level", 0.0f, 0.0f, 1.0f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("OSC1.LFO PW", 0.0f, 0.0f, 0.5f, 50.f, ParamDesc::Layouts::SameLine);
//AddParam("Voice2.Level", 0.5f, 0.0f, 1.0f);
//AddParam("Voice2.Detune", 0.0f, -12.0f, 12.0f);
//AddParam("Voice2.Fine", 0.0f, -1.0f, 1.0f);
//AddParam("Voice2.PW", 0.5f, 0.1f, 0.9f);
//AddParam("Voice2.Sine", 1.0f, 0.0f, 1.0f);
//AddParam("Voice2.Triangle", 0.0f, 0.0f, 1.0f);
//AddParam("Voice2.Saw", 0.0f, 0.0f, 1.0f);
//AddParam("Voice2.Pulse", 0.0f, 0.0f, 1.0f);
//AddParam("Voice2.Noise", 0.0f, 0.0f, 1.0f);
//AddParam("Voice2.A", 10.0f, 0.0f, 3000.0f);
//AddParam("Voice2.D", 200.0f, 0.0f, 3000.0f);
//AddParam("Voice2.S", 0.5f, 0.0f, 1.0f);
//AddParam("Voice2.R", 400.0f, 0.0f, 3000.0f);
//AddParam("Voice2.Filter.Mode", 0, { "LowPass", "BandPass", "HighPass", "Notch" });
//AddParam("Voice2.Filter.Cutoff", 180.0f, 0.0f, 180.0f);
//AddParam("Voice2.Filter.Reso", 0.0f, 0.0f, 1.0f);
//AddParam("Voice2.Filter.A", 10.0f, 0.0f, 3000.0f);
//AddParam("Voice2.Filter.D", 200.0f, 0.0f, 3000.0f);
//AddParam("Voice2.Filter.S", 0.5f, 0.0f, 1.0f);
//AddParam("Voice2.Filter.R", 400.0f, 0.0f, 3000.0f);
//AddParam("Voice2.ADSR.Level", 0.0f, 0.0f, 180.0f);
}
SubstractiveSynthParams::~SubstractiveSynthParams()
{
}
| 41.8 | 151 | 0.627392 | MacFurax |
abce85024e6c439f2c060e161dd6eba26f25424c | 921 | hpp | C++ | include/muse_smc/sampling/normal.hpp | wuyou33/muse_smc | 1dd2c2f2657f7440dfd071f2fb974f429fea5de3 | [
"BSD-3-Clause"
] | 1 | 2019-11-07T02:02:08.000Z | 2019-11-07T02:02:08.000Z | include/muse_smc/sampling/normal.hpp | wuyou33/muse_smc | 1dd2c2f2657f7440dfd071f2fb974f429fea5de3 | [
"BSD-3-Clause"
] | null | null | null | include/muse_smc/sampling/normal.hpp | wuyou33/muse_smc | 1dd2c2f2657f7440dfd071f2fb974f429fea5de3 | [
"BSD-3-Clause"
] | null | null | null | #ifndef NORMAL_HPP
#define NORMAL_HPP
#include <memory>
#include <vector>
#include <map>
#include <muse_smc/samples/sample_set.hpp>
namespace muse_smc {
template<typename state_space_description_t>
class NormalSampling
{
public:
using Ptr = std::shared_ptr<NormalSampling>;
using sample_t = typename state_space_description_t::sample_t;
using state_t = typename state_space_description_t::state_t;
using covariance_t = typename state_space_description_t::covariance_t;
using sample_set_t = SampleSet<state_space_description_t>;
inline NormalSampling()
{
}
virtual ~NormalSampling() = default;
virtual bool apply(const state_t &state,
const covariance_t &covariance,
sample_set_t &sample_set) = 0;
virtual bool update(const std::string &frame) = 0;
};
}
#endif // NORMAL_HPP
| 26.314286 | 74 | 0.676439 | wuyou33 |
abd07f05e6c77b74fce9a618542642fa503989d8 | 1,817 | cpp | C++ | LightOJ/RealLifeTraffic.cpp | sourav025/algorithms-practices | 987932fe0b995c61fc40d1b5a7da18dce8492752 | [
"MIT"
] | null | null | null | LightOJ/RealLifeTraffic.cpp | sourav025/algorithms-practices | 987932fe0b995c61fc40d1b5a7da18dce8492752 | [
"MIT"
] | null | null | null | LightOJ/RealLifeTraffic.cpp | sourav025/algorithms-practices | 987932fe0b995c61fc40d1b5a7da18dce8492752 | [
"MIT"
] | null | null | null | #include<stdio.h>
#include<vector>
#include<iostream>
#include<algorithm>
#include<map>
#define getMin(a,b) ((a<b)?(a):(b))
#define getMax(a,b) ((a>b)?(a):(b))
#define MAX 100009
using namespace std;
typedef pair<int,int> pn;
vector<int>edge[MAX];
int dc,n,m;
int disTime[MAX+7],level[MAX+7],degree[MAX+7];
void reset();
void addEdge(int u,int v);
void dfsCont(int u,int par);
void fillUpDegree();
int getAns();
int main()
{
int t,cas=1,a,b;
for(scanf("%d",&t);cas<=t;cas++)
{
dc=1;
scanf("%d%d",&n,&m);
reset();
for(int i=0;i<m;i++)
scanf("%d%d",&a,&b),addEdge(a,b);
dfsCont(0,0);
fillUpDegree();
int res=getAns();
printf("Case %d: %d\n",cas,res);
}
return 0;
}
void reset()
{
for(int i=0;i<n+5;i++)
{
edge[i].clear(),disTime[i]=0,level[i]=0,degree[i]=0;
}
}
void addEdge(int u,int v)
{
edge[u].push_back(v);
edge[v].push_back(u);
}
void dfsCont(int u,int par) //DFS counting
{
disTime[u]=level[u]=dc++;
for(int i=0;i<edge[u].size();i++)
{
int v=edge[u][i];
if(v==par) continue;
if(disTime[v]==0)
{
dfsCont(v,u);
level[u]=getMin(level[u],level[v]);
}
else if(level[u]>level[v])
{
level[u]=level[v];
}
}
}
void fillUpDegree()
{
for(int u=0;u<n;u++)
for(int i=0;i<edge[u].size();i++)
{
int v=edge[u][i];
if(level[u]!=level[v]) // a bridge Bridge
degree[level[u]]++;
}
}
int getAns()
{
int cnt=0;
for(int i=0;i<=n;i++)
if(degree[i]==1)
cnt++;
return (cnt+1)/2;
}
| 18.353535 | 61 | 0.4612 | sourav025 |
abd37b2861264413aab60f209147cc454baf62d1 | 4,202 | cpp | C++ | DT3LevelEditor/Scripting/EdLevelGroup.cpp | 9heart/DT3 | 4ba8fd2af3aebb5c0d77036ac3941e83cd4d1c7e | [
"MIT"
] | 3 | 2018-10-05T15:03:27.000Z | 2019-03-19T11:01:56.000Z | DT3LevelEditor/Scripting/EdLevelGroup.cpp | pakoito/DT3 | 4ba8fd2af3aebb5c0d77036ac3941e83cd4d1c7e | [
"MIT"
] | 1 | 2016-01-28T14:39:49.000Z | 2016-01-28T22:12:07.000Z | DT3LevelEditor/Scripting/EdLevelGroup.cpp | adderly/DT3 | e2605be091ec903d3582e182313837cbaf790857 | [
"MIT"
] | 3 | 2016-01-25T16:44:51.000Z | 2021-01-29T19:59:45.000Z | //==============================================================================
///
/// File: EdLevelGroup.cpp
///
/// Copyright (C) 2000-2014 by Smells Like Donkey Software Inc. All rights reserved.
///
/// This file is subject to the terms and conditions defined in
/// file 'LICENSE.txt', which is part of this source code package.
///
//==============================================================================
// Editor include
#include "EdLevelGroup.hpp"
#include "EdLevelScriptNodeStandard.hpp"
// Qt include
#include <QtGui/QPainter>
#include <QtGui/QMouseEvent>
// Engine includes
#include "DT3Core/Types/Base/BaseInclude.hpp"
#include "DT3Core/Types/Node/Group.hpp"
#include "DT3Core/Types/Math/MoreMath.hpp"
//==============================================================================
//==============================================================================
const float EdLevelGroup::SHADOW_OFFSET_X = 5.0F;
const float EdLevelGroup::SHADOW_OFFSET_Y = 5.0F;
//==============================================================================
//==============================================================================
EdLevelGroup::EdLevelGroup(std::shared_ptr<Group> group)
: _title_font ("Arial", 15)
{
setFlag(QGraphicsItem::ItemIsSelectable);
//setFlag(QGraphicsItem::ItemIsMovable);
_group = group;
}
EdLevelGroup::~EdLevelGroup(void)
{
}
void EdLevelGroup::setBoundingRect (const QRectF &rect)
{
prepareGeometryChange();
setPos(rect.x(), rect.y());
_bounding_rect = rect;
_bounding_rect.translate(-_bounding_rect.x(), -_bounding_rect.y());
}
//QPainterPath EdLevelGroup::shape (void) const
//{
// return QPainterPath();
//}
//==============================================================================
//==============================================================================
void EdLevelGroup::paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
painter->setRenderHint(QPainter::Antialiasing, true);
const DTint TITLE_HEIGHT = 20;
Color4f c = _group->group_color();
if (isSelected()) {
painter->setPen(QPen(QColor(53,120,255,255),3,Qt::SolidLine));
} else {
painter->setPen(QPen(QColor(50,50,50,64),3,Qt::SolidLine));
}
painter->setClipping (true);
painter->setClipRect(QRectF(0,TITLE_HEIGHT,_bounding_rect.width(), _bounding_rect.height() - TITLE_HEIGHT));
painter->setBrush(QBrush(QColor( MoreMath::max(0,c.r_as_byte()-60),
MoreMath::max(0,c.g_as_byte()-60),
MoreMath::max(0,c.b_as_byte()-60),
64)));
painter->drawRoundedRect(_bounding_rect, 5, 5);
painter->setClipRect(QRectF(0,0,_bounding_rect.width(), TITLE_HEIGHT));
painter->setBrush(QBrush(QColor( MoreMath::max(0,c.r_as_byte()-30),
MoreMath::max(0,c.g_as_byte()-30),
MoreMath::max(0,c.b_as_byte()-30),
64)));
painter->drawRoundedRect(_bounding_rect, 5, 5);
painter->setPen(QPen(QColor(40,40,40,255),1));
painter->setFont ( _title_font);
painter->drawText( QRectF(10,0,_bounding_rect.width(), TITLE_HEIGHT), Qt::AlignLeft | Qt::AlignVCenter, _group->name().c_str() );
painter->setClipping (false);
}
//==============================================================================
//==============================================================================
bool EdLevelGroup::checkClick (const QPointF &scene_pos, const QPointF &global_pos)
{
if ( _bounding_rect.contains(mapFromScene(scene_pos)) )
return true;
return false;
}
bool EdLevelGroup::handleClick (const QPointF &scene_pos, const QPointF &global_pos)
{
return false;
}
//==============================================================================
//==============================================================================
//#include "moc_EdLevelScriptPlugConnection.cpp"
| 33.616 | 131 | 0.485721 | 9heart |
abd640ea279444956abe1c9c3fd24355d870c751 | 1,365 | hpp | C++ | third_party/boost/simd/function/if_else.hpp | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | null | null | null | third_party/boost/simd/function/if_else.hpp | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | null | null | null | third_party/boost/simd/function/if_else.hpp | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | null | null | null | //==================================================================================================
/*!
@file
Copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//==================================================================================================
#ifndef BOOST_SIMD_FUNCTION_IF_ELSE_HPP_INCLUDED
#define BOOST_SIMD_FUNCTION_IF_ELSE_HPP_INCLUDED
#if defined(DOXYGEN_ONLY)
namespace boost { namespace simd
{
/*!
@ingroup group-boolean
Function object implementing if_else capabilities
If cond is @ref True returns t else returns f
If vectors, the types involved in the call must share the same number of elements.
@par Semantic:
For every parameters @c c of type @c C, @c t and @c f of type @c T:
@code
T r = if_else(cond,t,f);
@endcode
is similar to:
@code
T r = cond ? t : f;
@endcode
@see if_else_zero, if_else_allbits, if_zero_else,
if_allbits_else, if_one_else_zero, if_zero_else_one, bitwise_select
**/
Value if_else(Value const& c, Value const& v0);
//@overload
Value if_else(LogicalValue const& c, Value const& v0);
} }
#endif
#include <boost/simd/function/scalar/if_else.hpp>
#include <boost/simd/function/simd/if_else.hpp>
#endif
| 25.277778 | 100 | 0.607326 | xmar |
abd7ba14696f07a75a41a63d4bf210569f958323 | 44,017 | cpp | C++ | jni/application/Game_State.cpp | clarkdonald/eecs494game4 | c5101b4bbf7f620c3490dcfb88f5e72260ef8fa2 | [
"BSD-2-Clause"
] | null | null | null | jni/application/Game_State.cpp | clarkdonald/eecs494game4 | c5101b4bbf7f620c3490dcfb88f5e72260ef8fa2 | [
"BSD-2-Clause"
] | null | null | null | jni/application/Game_State.cpp | clarkdonald/eecs494game4 | c5101b4bbf7f620c3490dcfb88f5e72260ef8fa2 | [
"BSD-2-Clause"
] | null | null | null | //
// Game_State.cpp
// game
//
// Created by Donald Clark on 11/9/13.
//
//
#include "Game_State.h"
#include "Utility.h"
#include "Atmosphere.h"
#include "Atmosphere_Factory.h"
#include "Environment.h"
#include "Environment_Factory.h"
#include "Terrain.h"
#include "Terrain_Factory.h"
#include "Npc.h"
#include "Npc_Factory.h"
#include "Player.h"
#include "Percent_Bar.h"
#include "Player_Factory.h"
#include "Map_Manager.h"
#include "Crystal.h"
#include "Spawn_Menu.h"
#include "Heal_Circle.h"
#include <utility>
#include <fstream>
#include <map>
#include <vector>
#include <random>
#include <sstream>
using namespace Zeni;
using namespace Zeni::Collision;
using std::stringstream;
using std::make_pair;
using std::cout;
using std::string;
using std::getline;
using std::ifstream;
using std::bad_exception;
using std::to_string;
using std::map;
using std::vector;
using std::cerr;
using std::endl;
using std::to_string;
using std::random_device;
using std::mt19937;
using std::uniform_int_distribution;
using std::istringstream;
Player_Wrapper::Player_Wrapper(Player *player_, const int &uid_)
: player(player_),
uid(uid_),
select_pressed(false),
spawn_time_left("")
{}
Player_Wrapper::~Player_Wrapper() {
if (player != nullptr) delete player;
}
Player_Info::Player_Info(const Zeni::Point2f &start_position_,
const Team &team_,
Spawn_Menu * spawn_menu_)
: crystal_bar(Point2f(), Vector2f(32.0f, 2.0f)),
crystal_info("crystal"),
start_position(start_position_),
spawn_menu(spawn_menu_),
team(team_),
up_axis_released(false),
down_axis_released(false)
{}
Player_Info::~Player_Info() {
if (spawn_menu != nullptr)
delete spawn_menu;
}
Game_State::Game_State(const std::string &file_)
: crystals_in_play(0),
gameover(false),
vbo_ptr_floor(new Vertex_Buffer),
vbo_ptr_lower(new Vertex_Buffer),
vbo_ptr_middle(new Vertex_Buffer),
box("selection"),
dodge("dodge"),
dodge_button("LB"),
special_button("LT"),
divider(Point2f(), Vector2f(2.0f, 2.0f), "white_bar"),
skill_indicator(Point2f(), Vector2f(32.0f, 2.0f), "white_bar"),
health_indicator(Point2f(), Vector2f(32.0f, 2.0f)),
heal_circles(4, nullptr)
{
// set up function pointers for split screen methods
screen_coord_map.push_back(&get_top_left_screen);
screen_coord_map.push_back(&get_bottom_left_screen);
screen_coord_map.push_back(&get_top_right_screen);
screen_coord_map.push_back(&get_bottom_right_screen);
// load map from the input file
load_map(file_);
}
Game_State::~Game_State() {
for (auto it = grasss.begin(); it != grasss.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = terrains.begin(); it != terrains.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = atmospheres.begin(); it != atmospheres.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = environments.begin(); it != environments.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = collidable_environments.begin(); it != collidable_environments.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = projectiles.begin(); it != projectiles.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = player_wrappers.begin(); it != player_wrappers.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = player_infos.begin(); it != player_infos.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = npcs.begin(); it != npcs.end(); ++it)
if (*it != nullptr) delete *it;
for (auto it = crystals.begin(); it != crystals.end(); ++it)
if (*it != nullptr) delete *it;
delete vbo_ptr_floor;
delete vbo_ptr_lower;
delete vbo_ptr_middle;
}
void Game_State::perform_logic() {
// check if a team won
for (auto& score : scores) {
if (score.second >= WIN_CRYSTAL_COUNT) {
if (!game_over_timer.is_running()) game_over_timer.start();
return;
}
}
// calculate game time
const Time_HQ current_time = get_Timer_HQ().get_time();
float processing_time = float(current_time.get_seconds_since(time_passed));
time_passed = current_time;
float time_step = processing_time;
for (auto npc : npcs)
npc->set_hold_a(false);
// iterate through each player, updating its state
for (auto player_wrapper : player_wrappers) {
// get controls for each player
Controls input = player_infos[player_wrapper->uid]->controls;
player_infos[player_wrapper->uid]->controls.start = false;
// pausing logic
if (input.start) {
if (!player_infos[player_wrapper->uid]->pause_timer.is_running()) {
get_Game().push_Popup_Menu_State();
player_infos[player_wrapper->uid]->pause_timer.start();
}
}
// fix the timer for pausing
if (player_infos[player_wrapper->uid]->pause_timer.is_running()) {
if (player_infos[player_wrapper->uid]->pause_timer.seconds() > 0.25f) {
player_infos[player_wrapper->uid]->pause_timer.stop();
player_infos[player_wrapper->uid]->pause_timer.reset();
}
}
if (!player_wrapper->player->can_respawn()) {
int count_down = ceil(5.0f - player_wrapper->player->get_spawn_time());
player_wrapper->spawn_time_left = String("Respawn in " + itoa(count_down));
player_wrapper->player->update_respawn_timer(time_step);
continue;
}
if (player_wrapper->player->is_dead()) {
float move_y = input.move_y;
if (move_y > 0.7f && player_infos[player_wrapper->uid]->down_axis_released) {
player_infos[player_wrapper->uid]->down_axis_released = false;
player_infos[player_wrapper->uid]->spawn_menu->move_down();
}
if (move_y < -0.7f && player_infos[player_wrapper->uid]->up_axis_released) {
player_infos[player_wrapper->uid]->up_axis_released = false;
player_infos[player_wrapper->uid]->spawn_menu->move_up();
}
if (move_y <= 0.2)
player_infos[player_wrapper->uid]->down_axis_released = true;
if (move_y >= -0.2)
player_infos[player_wrapper->uid]->up_axis_released = true;
if (input.A)
player_infos[player_wrapper->uid]->spawn_menu->select_current_option();
// if the player is dead, we skip rest of movement logic
continue;
}
if (input.back) {
player_wrapper->select_pressed = true;
continue;
}
else {
player_wrapper->select_pressed = false;
}
// if player is stunned, don't move or anything else
if (player_wrapper->player->is_stunned()) continue;
// check collision with terrain on movement for effects
float move_x, move_y;
bool is_in_circle = false;
for(auto heal_circle : heal_circles)
{
if(heal_circle == nullptr) continue;
if(!same_team(player_wrapper->player->get_team(), heal_circle->get_team()))
{
if(heal_circle->touching(*(player_wrapper->player)))
{
is_in_circle = true;
Point2f center = heal_circle->get_center();
Vector2f vec = player_wrapper->player->get_center() - center;
vec.normalize();
vec *= 3.0f;
move_x = vec.i;
move_y = vec.j;
break;
}
}
}
if(!is_in_circle)
{
move_x = input.move_x;
move_y = input.move_y;
}
// take away dead zones of joy stick
if (fabs(move_x) < .1f && fabs(move_y) < .1f) move_y = move_x = 0.0f;
bool is_submerged = false;
for (auto terrain : terrains) {
if (terrain->slow_player_down() && player_wrapper->player->touching_feet(*terrain)) {
move_x *= 0.5f;
move_y *= 0.5f;
is_submerged = true;
break;
}
}
player_wrapper->player->set_submerged(is_submerged);
// dodge logic for player
//player_wrapper->player->stop_dodge(time_step);
player_wrapper->player->update_dodge_timer(time_step);
if (input.LB || input.RB) {
if (!player_wrapper->player->is_dodging())
player_wrapper->player->dodge();
}
if (player_wrapper->player->is_dodging()) {
move_x *= 6.0f;
move_y *= 6.0f;
}
// check collision with environment/npc/player on movement
// first check boundary collision, then env, then npc, then oppo player
bool moved_back = false;
float delta_x = player_wrapper->player->get_position().x + move_x;
float delta_y = player_wrapper->player->get_position().y + move_y;
if ((move_x > 0.0f &&
delta_x < (dimension.width*UNIT_LENGTH - (UNIT_LENGTH - 1.0f))) ||
(move_x < 0.0f &&
delta_x > 0.0f))
{
// make an initial attempt at movement
player_wrapper->player->move_x(move_x, time_step, true);
for (auto environment : collidable_environments) {
if (player_wrapper->player->touching(*environment)) {
player_wrapper->player->move_x(-move_x, time_step, false);
moved_back = true;
break;
}
}
if (!moved_back) {
for (auto npc : npcs) {
if (player_wrapper->player->touching(*npc)) {
player_wrapper->player->move_x(-move_x, time_step, false);
moved_back = true;
break;
}
}
}
if (!moved_back) {
for (auto player_check : player_wrappers) {
if (player_check->player->is_dead() ||
same_team(player_wrapper->player->get_team(), player_check->player->get_team()))
{
continue;
}
if (player_wrapper->player->touching(*(player_check->player))) {
player_wrapper->player->move_x(-move_x, time_step, false);
break;
}
}
}
}
moved_back = false;
if ((move_y > 0.0f &&
delta_y < (dimension.height*UNIT_LENGTH - (UNIT_LENGTH - 1.0f))) ||
(move_y < 0.0f &&
delta_y > 0.0f))
{
// make an initial attempt at movement
player_wrapper->player->move_y(move_y, time_step, true);
for (auto environment : collidable_environments) {
if (player_wrapper->player->touching(*environment)) {
player_wrapper->player->move_y(-move_y, time_step, false);
moved_back = true;
break;
}
}
if (!moved_back) {
for (auto npc : npcs) {
if (player_wrapper->player->touching(*npc)) {
player_wrapper->player->move_y(-move_y, time_step, false);
moved_back = true;
break;
}
}
}
if (!moved_back) {
for (auto player_check : player_wrappers) {
if (player_check->player->is_dead() ||
same_team(player_wrapper->player->get_team(), player_check->player->get_team()))
{
continue;
}
if (player_wrapper->player->touching(*(player_check->player))) {
player_wrapper->player->move_y(-move_y, time_step, false);
break;
}
}
}
}
// directional logic for player
bool delta_facing = false;
Vector2f direction_vector(input.look_x, input.look_y);
if (direction_vector.magnitude() > 0.4f) { // deadzone for right stick; magnitude : [0,1]
player_wrapper->player->turn_to_face(direction_vector.theta());
delta_facing = true;
}
// attack logic for player
Vector2f move_direction(move_x, move_y);
if (input.attack && !is_submerged) {
// warrior melee sword attack
Weapon *melee = nullptr;
if (delta_facing) melee = player_wrapper->player->melee(direction_vector.theta());
else if (move_x == 0.0f && move_y == 0.0f) melee = player_wrapper->player->melee();
else melee = player_wrapper->player->melee(move_direction.theta());
if (melee != nullptr) {
for (auto player_check : player_wrappers) {
if (player_check->player->is_dead() ||
same_team(player_wrapper->player->get_team(), player_check->player->get_team()))
{
continue;
}
if (melee->touching(*(player_check->player)))
player_check->player->take_dmg(melee->get_damage());
}
melee->animation_timer.start();
melees.push_back(melee);
}
// archer/mage ranged attack
Weapon* projectile = nullptr;
if (delta_facing) projectile = player_wrapper->player->range(direction_vector.theta());
else if (move_x == 0.0f && move_y == 0.0f) projectile = player_wrapper->player->range();
else projectile = player_wrapper->player->range(move_direction.theta());
if (projectile != nullptr) projectiles.push_back(projectile);
}
Heal_Circle* heal_circle = nullptr;
heal_circle = player_wrapper->player->mage_spc_skill(input.LT, time_step);
heal_circles[player_wrapper->uid] = heal_circle;
if (input.LT)
{
Weapon* stun_arrow = nullptr;
if (delta_facing) stun_arrow = player_wrapper->player->archer_spc_skill(direction_vector.theta());
else if (move_x == 0.0f && move_y == 0.0f) stun_arrow = player_wrapper->player->archer_spc_skill();
else stun_arrow = player_wrapper->player->archer_spc_skill(move_direction.theta());
if (stun_arrow != nullptr)
projectiles.push_back(stun_arrow);
Weapon* shield = nullptr;
shield = player_wrapper->player->warrior_spc_skill();
if (shield != nullptr)
{
shield->animation_timer.start();
melees.push_back(shield);
}
}
// crystal depositing logic
for (auto npc : npcs) {
if (!input.A && same_team(npc->get_team(), player_wrapper->player->get_team()) && player_wrapper->player->has_crystal() && player_wrapper->player->pseudo_touching(*npc)) {
// Show information
npc->set_hold_a(true);
}
else {
npc->set_hold_a(false || npc->get_hold_a());
}
// Crystal logic
if (same_team(npc->get_team(), player_wrapper->player->get_team())) {
if (input.A && player_wrapper->player->has_crystal())
{
if (player_wrapper->player->pseudo_touching(*npc)) {
if (npc->can_deposit(player_wrapper->uid)) {
//touching = true;
if (!player_infos[player_wrapper->uid]->deposit_crystal_timer.is_running()) {
player_infos[player_wrapper->uid]->deposit_crystal_timer.reset();
player_infos[player_wrapper->uid]->deposit_crystal_timer.start();
npc->set_depositing(player_wrapper->uid);
}
else {
if (player_infos[player_wrapper->uid]->deposit_crystal_timer.seconds() > DEPOSIT_TIME) {
player_wrapper->player->drop_crystal();
++scores[player_wrapper->player->get_team()];
--crystals_in_play;
player_infos[player_wrapper->uid]->deposit_crystal_timer.stop();
// Done depositing
npc->set_depositing(-1);
}
npc->set_deposit_pctg(player_infos[player_wrapper->uid]->deposit_crystal_timer.seconds() / DEPOSIT_TIME);
//npc->set_depositing(player_wrapper->uid);
}
}
}
else if (player_infos[player_wrapper->uid]->deposit_crystal_timer.is_running()) {
// Stopped depositing
player_infos[player_wrapper->uid]->deposit_crystal_timer.stop();
npc->set_depositing(-1);
}
}
else if (player_infos[player_wrapper->uid]->deposit_crystal_timer.is_running()) {
// Stopped depositing
player_infos[player_wrapper->uid]->deposit_crystal_timer.stop();
npc->set_depositing(-1);
}
}
}
// crystal pick up logic
for (auto crystal = crystals.begin(); crystal != crystals.end();) {
if (player_wrapper->player->touching(**crystal)) {
player_wrapper->player->pick_up_crystal();
delete *crystal;
crystal = crystals.erase(crystal);
} else {
++crystal;
}
}
}
// cloud movement logic
for (auto atmosphere : atmospheres) {
atmosphere->update(time_step);
if (atmosphere->get_position().x + atmosphere->get_size().x >= dimension.width*UNIT_LENGTH) {
Point2f pos = atmosphere->get_position();
pos.x = 0.0f;
atmosphere->set_position(pos);
}
}
// iterate through each melee weapon, updating it
for (auto melee = melees.begin(); melee != melees.end();) {
if ((*melee)->animation_over())
{
(*melee)->remove_from_owner();
delete *melee;
melee = melees.erase(melee);
}
else
melee++;
}
// iterate through each projectile, updating it
for (auto projectile = projectiles.begin(); projectile != projectiles.end();) {
(*projectile)->update(time_step);
bool should_remove = false;
// do shield collision checks
for (auto melee : melees) {
if ( melee->is_shield() && (*projectile)->touching(*melee)) {
should_remove = true;
break;
}
}
// do player collision checks
for (auto player_wrapper : player_wrappers) {
if (player_wrapper->player->is_dead() ||
same_team(player_wrapper->player->get_team(), (*projectile)->get_team()))
{
continue;
}
if ((*projectile)->touching(*(player_wrapper->player))) {
player_wrapper->player->take_dmg((*projectile)->get_damage());
if ((*projectile)->is_stun())
{
player_wrapper->player->start_stun_timer();
}
should_remove = true;
break;
}
}
// do environment collision checks
for (auto environment : collidable_environments) {
if ((*projectile)->touching(*environment)) {
should_remove = true;
break;
}
}
// do map boundary checks
Point2f proj_pos = (*projectile)->get_center();
if (proj_pos.x < 0.0f || proj_pos.x >= dimension.width*UNIT_LENGTH ||
proj_pos.y < 0.0f || proj_pos.y >= dimension.height*UNIT_LENGTH)
{
should_remove = true;
}
if (should_remove) {
delete *projectile;
projectile = projectiles.erase(projectile);
} else {
projectile++;
}
}
// blinking players
for (auto player_wrapper : player_wrappers) {
player_wrapper->player->update_blink_timer(time_step);
}
// respawn dead players
for (auto player_wrapper : player_wrappers) {
if (!player_wrapper->player->is_dead()) continue;
Player *dead = player_wrapper->player;
// drop one crystal where you die if they have at least one
if (dead->get_crystals_held()) {
dead->drop_crystal();
crystals.push_back(new Crystal(dead->get_position()));
while (dead->get_crystals_held()) {
dead->drop_crystal();
--crystals_in_play;
}
}
Weapon* sword = dead->get_weapon();
Weapon* shield = dead->get_shield();
if (sword != nullptr)
{
for(auto melee = melees.begin(); melee != melees.end(); melee++)
{
if (sword == *melee)
{
melees.erase(melee);
break;
}
}
}
if (shield != nullptr)
{
for(auto melee = melees.begin(); melee != melees.end(); melee++)
{
if (shield == *melee)
{
melees.erase(melee);
break;
}
}
}
heal_circles[player_wrapper->uid] = nullptr;
if(player_wrapper->player->can_respawn()) {
if (player_infos[player_wrapper->uid]->spawn_menu->is_option_selected()) {
player_infos[player_wrapper->uid]->spawn_menu->clear_menu();
player_wrapper->player = create_player(String(player_infos[player_wrapper->uid]->spawn_menu->
get_selected_option()),
player_infos[player_wrapper->uid]->start_position,
player_wrapper->uid,
player_wrapper->player->get_team());
// Once the player is alive it shouldn't make him wait.
player_wrapper->player->reset_respawn_time();
delete dead;
}
}
}
player_wrappers[0]->player->set_partner(player_wrappers[2]->player);
player_wrappers[1]->player->set_partner(player_wrappers[3]->player);
player_wrappers[2]->player->set_partner(player_wrappers[0]->player);
player_wrappers[3]->player->set_partner(player_wrappers[1]->player);
// respawn crystals
if (crystals_in_play < total_num_crystals) respawn_crystal();
}
void Game_State::respawn_crystal() {
// Set up random number generation
random_device rd;
mt19937 gen = mt19937(rd());
uniform_int_distribution<> dis = uniform_int_distribution<>(0, crystal_locations.size()-1);
while (crystals_in_play < total_num_crystals) {
bool found = true;
int index;
do {
index = dis(gen);
for (auto crystal : crystals) {
if (crystal->get_position().x == crystal_locations[index].x &&
crystal->get_position().y == crystal_locations[index].y) {
found = false;
break;
}
else {
found = true;
}
}
} while (!found);
crystals.push_back(new Crystal(crystal_locations[index]));
++crystals_in_play;
}
}
void Game_State::render_map(int screen_num) {
auto screen_coord = screen_coord_map[screen_num]();
auto bottom_corner = Point2f(32.0f * dimension.width, 32.0f * dimension.height);
get_Video().set_2d_view(std::make_pair(Point2f(0.0f, 0.0f) , bottom_corner),
screen_coord,
false);
// Render Map and Movable objects
vbo_ptr_floor->render();
vbo_ptr_lower->render();
for (auto crystal : crystals) crystal->render();
for (auto player_wrapper_ptr : player_wrappers) player_wrapper_ptr->player->render();
for (auto npc : npcs) npc->render();
for (auto projectile : projectiles) projectile->render();
for (auto melee : melees) melee->render();
vbo_ptr_middle->render();
for (auto player_wrapper_ptr : player_wrappers) {
if (!player_wrapper_ptr->player->is_dead()) {
health_indicator.set_position(player_wrapper_ptr->player->get_position() - Vector2f(0.0f, 8.0f));
health_indicator.render(player_wrapper_ptr->player->get_hp_pctg());
}
}
for (auto atmosphere : atmospheres) atmosphere->render();
// Render Player Score
get_Fonts()["godofwar_50"].render_text(String("Crystals: " + to_string(
scores[BLUE])),
Point2f(5.0f, bottom_corner.y) - Vector2f(0.0f, 105.0f),
get_Colors()["blue"]);
get_Fonts()["godofwar_50"].render_text(String("Crystals: " + to_string(
scores[RED])),
Point2f(5.0f, bottom_corner.y) - Vector2f(0.0f, 55.0f),
get_Colors()["red"]);
}
void Game_State::render_spawn_menu(Player_Wrapper * player_wrapper) {
auto screen_coord = screen_coord_map[player_wrapper->uid]();
get_Video().set_2d_view(std::make_pair(Point2f(screen_coord.first),
Point2f(screen_coord.second)),
screen_coord,
false);
player_infos[player_wrapper->uid]->spawn_menu->render();
}
void Game_State::render_all(Player_Wrapper * player_wrapper) {
auto p_pos = player_wrapper->player->get_position();
get_Video().set_2d_view(std::make_pair(p_pos - Vector2f(250.0f, 200.0f),
p_pos + Vector2f(250.0f, 200.0f)),
screen_coord_map[player_wrapper->uid](),
false);
// Render Map and Movable objects
vbo_ptr_floor->render();
vbo_ptr_lower->render();
for (auto heal_circle : heal_circles)
{
if(heal_circle != nullptr) heal_circle->render();
}
for (auto crystal : crystals) crystal->render();
// Render aiming reticle
if(!player_wrapper->player->is_submerged()) {
Player* player = player_wrapper->player;
Point2f pos = p_pos;
Vector2f size = player->get_size();
pos += 0.4f * size.get_j();
// render aiming reticle
Vector2f face_vec = Vector2f(cos(player->get_facing()), sin(player->get_facing()));
Team team = player->get_team();
String str = "";
switch(team)
{
case RED:
str = "red_";
break;
case BLUE:
str = "blue_";
break;
}
// couldn't use Game_Object::render() because need to render the reticle at a different location
render_image(str + "aiming", // which texture to use
pos, // upper-left corner
pos + size, // lower-right corner
face_vec.multiply_by(Vector2f(1.0f,-1.0f)).theta() + Global::pi_over_two, // rotation in radians
1.0f, // scaling factor
pos + 0.5f * size, // point to rotate & scale about
false, // whether or not to horizontally flip the texture
Color()); // what Color to "paint" the texture
}
for (auto player_wrapper_ptr : player_wrappers) player_wrapper_ptr->player->render();
for (auto npc : npcs) npc->render();
for (auto projectile : projectiles) projectile->render();
for (auto melee : melees) melee->render();
vbo_ptr_middle->render();
for (auto player_wrapper_ptr : player_wrappers) {
if (player_wrapper != player_wrapper_ptr) {
if (!player_wrapper_ptr->player->is_dead()) {
health_indicator.set_position(player_wrapper_ptr->player->get_position() - Vector2f(0.0f, 8.0f));
health_indicator.render(player_wrapper_ptr->player->get_hp_pctg());
}
}
}
for (auto atmosphere : atmospheres) atmosphere->render();
// Render Player health
player_infos[player_wrapper->uid]->health_bar.set_position(p_pos - Vector2f(240.0f, 190.0f));
player_infos[player_wrapper->uid]->health_bar.render(player_wrapper->player->get_hp_pctg());
// Render Player Score
get_Fonts()["godofwar_20"].render_text(String("Crystals: " + to_string(
scores[BLUE])),
p_pos - Vector2f(240.0f,-150.0f),
get_Colors()["blue"]);
get_Fonts()["godofwar_20"].render_text(String("Crystals: " + to_string(
scores[RED])),
p_pos - Vector2f(240.0f,-175.0f),
get_Colors()["red"]);
//Render Skills info
if (player_wrapper->player->can_use_dodge()) {
dodge.set_position(p_pos + Vector2f(0.0f, -190.0f));
dodge.render();
}
else {
skill_indicator.set_position(p_pos + Vector2f(0.0f, -157.0f));
skill_indicator.render(player_wrapper->player->get_dodge_percentage());
}
box.set_position(p_pos + Vector2f(0.0f, -190.0f));
box.render();
dodge_button.set_position(p_pos + Vector2f(0.0f, -168.0f));
dodge_button.render();
if (player_wrapper->player->can_use_special()) {
special_skill.set_position(p_pos + Vector2f(34.0f, -190.0f));
special_skill.render(player_wrapper->player->get_skill_str());
}
else {
auto pctg = player_wrapper->player->get_special_attck_percentage();
if (pctg <= 1.0f) {
skill_indicator.set_position(p_pos + Vector2f(34.0f, -157.0f));
skill_indicator.render(pctg);
}
}
box.set_position(p_pos + Vector2f(34.0f, -190.0f));
box.render();
special_button.set_position(p_pos + Vector2f(34.0f, -165.0f));
special_button.render();
// Render the number of crystals
player_infos[player_wrapper->uid]->crystal_info.set_position(p_pos + Vector2f(190.0f,-190.0f));
player_infos[player_wrapper->uid]->crystal_info.render(player_wrapper->player->get_crystals_held());
}
void Game_State::render(){
// render logic for when a team wins
if (game_over_timer.is_running()) {
if (game_over_timer.seconds() <= 4.0f) {
get_Video().set_2d(make_pair(Point2f(0.0f, 0.0f), Point2f(get_Window().get_width(), get_Window().get_height())), false);
if (scores[BLUE] >= WIN_CRYSTAL_COUNT) {
get_Fonts()["godofwar_80"].render_text("BLUE TEAM WINS!",
Point2f(get_Window().get_width()/2, get_Window().get_height()/2),
get_Colors()["blue"],
ZENI_CENTER);
} else {
get_Fonts()["godofwar_80"].render_text("RED TEAM WINS!",
Point2f(get_Window().get_width()/2, get_Window().get_height()/2),
get_Colors()["red"],
ZENI_CENTER);
}
} else {
game_over_timer.stop();
game_over_timer.reset();
gameover = true;
}
} else {
for (auto player_wrapper : player_wrappers) {
if (player_wrapper->player->is_dead()) {
if(player_wrapper->player->can_respawn()) {
render_spawn_menu(player_wrapper);
}
else {
render_map(player_wrapper->uid);
auto bottom_corner = Point2f(32.0f * dimension.width, 32.0f * dimension.height);
get_Fonts()["godofwar_60"].render_text(player_wrapper->spawn_time_left,
Point2f(bottom_corner.x/2, bottom_corner.y/2),
get_Colors()["black"],
ZENI_CENTER);
}
}
else {
if(player_wrapper->select_pressed) {
render_map(player_wrapper->uid);
}
else {
render_all(player_wrapper);
//player_wrapper->player->render_extras();
}
}
}
// Add splitting lines for each screen.
get_Video().set_2d(make_pair(Point2f(0.0f, 0.0f), Point2f(get_Window().get_width(), get_Window().get_height())), false);
divider.render(Point2f(0.0f, (get_Window().get_height() / 2) - 1), Vector2f(get_Window().get_width(), 2.0f));
divider.render(Point2f((get_Window().get_width() / 2) - 1, 0.0f), Vector2f(2.0f, get_Window().get_height()));
}
}
void Game_State::create_tree(const Point2f &position) {
if (position.y - UNIT_LENGTH < 0)
error_handle("Cannot place tree in the specified location");
collidable_environments.push_back(create_environment("Tree", position, BOTTOM));
environments.push_back(create_environment("Tree", position - Point2f(0, UNIT_LENGTH), TOP));
}
void Game_State::create_house(const Point2f &position) {
if ((position.y - UNIT_LENGTH*3) < 0 ||
(position.x - UNIT_LENGTH) < 0 ||
(position.x + UNIT_LENGTH) >= (dimension.width*UNIT_LENGTH))
{
error_handle("Cannot place house in the specified location");
}
collidable_environments.push_back(create_environment("House", position, DOOR));
collidable_environments.push_back(create_environment("House", position - Point2f(UNIT_LENGTH, 0), WINDOW_LEFT));
collidable_environments.push_back(create_environment("House", position + Point2f(UNIT_LENGTH, 0), WINDOW_RIGHT));
collidable_environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH), BLUE_ROOF_MIDDLE_EDGE));
collidable_environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH) + Point2f(UNIT_LENGTH, 0), BLUE_ROOF_DOWN_RIGHT_CORNER_1));
collidable_environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH) - Point2f(UNIT_LENGTH, 0), BLUE_ROOF_DOWN_LEFT_CORNER_1));
collidable_environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH*2),
BLUE_ROOF_MIDDLE));
collidable_environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH*2) - Point2f(UNIT_LENGTH, 0), BLUE_ROOF_LEFT_SIDE));
collidable_environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH*2) + Point2f(UNIT_LENGTH, 0), BLUE_ROOF_RIGHT_SIDE));
environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH*3),
BLUE_ROOF_UP_MIDDLE));
environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH*3) + Point2f(UNIT_LENGTH, 0), BLUE_ROOF_UP_RIGHT_CORNER));
environments.push_back(create_environment("House", position - Point2f(0, UNIT_LENGTH*3) - Point2f(UNIT_LENGTH, 0), BLUE_ROOF_UP_LEFT_CORNER));
}
void Game_State::load_map(const std::string &file_) {
// logging
cout << "Creating map: " << file_ << endl;
ifstream file(file_);
// Check if file exists
if (!file.is_open()) {
string s = "File does not exist: ";
error_handle(s + file_);
}
// Get dimensions of map
string line;
getline(file,line);
istringstream sstream(line);
if (line.find('#') != std::string::npos) {
getline(file,line);
istringstream temp(line);
sstream.swap(temp);
}
if (!(sstream >> dimension.height)) error_handle("Could not input height");
if (!(sstream >> dimension.width)) error_handle("Could not input width");
// logging
cout << "Map dimension (y,x): (" << dimension.height << ',' << dimension.width << ')' << endl;
// Get starting location of players
Team team;
int start_y, start_x;
for (int i = 0; i < NUM_PLAYERS && getline(file,line); ++i) {
if (line.find('#') != std::string::npos) {--i; continue;}
istringstream sstream(line);
if (!(sstream >> start_y))
error_handle("Could not input starting y for player");
if (start_y < 0 || start_y >= dimension.height)
error_handle("Invalid start y for player");
if (!(sstream >> start_x))
error_handle("Could not input starting x for player");
if (start_x < 0 || start_x >= dimension.width)
error_handle("Invalid start x for player");
Point2f pos(start_x*UNIT_LENGTH, start_y*UNIT_LENGTH);
team = (i % 2 == 0 ? BLUE : RED);
scores[team] = 0;
player_wrappers.push_back(new Player_Wrapper(create_player("Mage", pos, i, team), i));
player_wrappers.back()->player->kill();
player_infos.push_back(new Player_Info(pos, team, new Spawn_Menu(screen_coord_map[i]())));
// logging
cout << "Player " << i << " Location (y,x): (" << start_y << ',' << start_x << ')' << endl;
}
// Get starting location of npc
String npc_type;
for (int i = 0; i < NUM_PLAYERS && getline(file,line); i+=2) {
if (line.find('#') != std::string::npos) {i -= 2; continue;}
istringstream sstream(line);
if (!(sstream >> start_y))
error_handle("Could not input starting y for npc");
if (start_y < 0 || start_y >= dimension.height)
error_handle("Invalid start y for npc");
if (!(sstream >> start_x))
error_handle("Could not input starting x for npc");
if (start_x < 0 || start_x >= dimension.width)
error_handle("Invalid start x for npc");
team = (i < 2 ? BLUE : RED);
npc_type = (team == BLUE ? "Blonde_Kid" : "Girl");
npcs.push_back(create_npc(npc_type, Point2f(start_x*UNIT_LENGTH, start_y*UNIT_LENGTH), team));
// logging
cout << npc_type << " Location (y,x): (" << start_y << ',' << start_x << ')' << endl;
}
// Get locations of crystals
int number_of_crystal_locations;
{
getline(file,line);
istringstream sstream(line);
if (line.find('#') != std::string::npos) {
getline(file,line);
istringstream temp(line);
sstream.swap(temp);
}
if (!(sstream >> total_num_crystals)) error_handle("Could not input number of crystals in play");
// logging
cout << "Number of Crystals: " << total_num_crystals << endl;
getline(file,line);
istringstream temp(line);
sstream.swap(temp);
if (!(sstream >> number_of_crystal_locations)) error_handle("Could not input number of crystal locs");
// logging
cout << "Number of Crystal Locations: " << number_of_crystal_locations << endl;
}
for (int i = 0; i < number_of_crystal_locations && getline(file,line); ++i) {
if (line.find('#') != std::string::npos) {--i; continue;}
istringstream sstream(line);
if (!(sstream >> start_y))
error_handle("Could not input y for crystal location");
if (start_y < 0 || start_y >= dimension.height)
error_handle("Invalid y for crystal location");
if (!(sstream >> start_x))
error_handle("Could not input x for crystal location");
if (start_x < 0 || start_x >= dimension.width)
error_handle("Invalid x for crystal location");
crystal_locations.push_back(Point2f(start_x*UNIT_LENGTH, start_y*UNIT_LENGTH));
// logging
cout << "Crystal " << i << " Location (y,x): (" << start_y << ',' << start_x << ')' << endl;
}
// Get map information
for (int height = 0; getline(file,line) && height < dimension.height;) {
if (line.find('#') != std::string::npos) continue;
for (int width = 0; width < line.length() && width < dimension.width; ++width) {
Point2f position(UNIT_LENGTH*width, UNIT_LENGTH*height);
if (line[width] == '.') {
grasss.push_back(create_terrain("Grass", position));
}
else if (line[width] == 't') {
grasss.push_back(create_terrain("Grass", position));
create_tree(position);
} else if (line[width] == 'h') {
grasss.push_back(create_terrain("Grass", position));
create_house(position);
} else if (line[width] == 'F') {
grasss.push_back(create_terrain("Grass", position));
collidable_environments.push_back(
create_environment(Map_Manager::get_Instance().get_environment(line[width]),position));
} else if (line[width] == 'f') {
terrains.push_back(create_terrain("Dirt", position));
collidable_environments.push_back(
create_environment(Map_Manager::get_Instance().get_environment(line[width]),position));
} else if (Map_Manager::get_Instance().find_terrain(line[width])) {
grasss.push_back(create_terrain("Grass", position));
terrains.push_back(create_terrain(
Map_Manager::get_Instance().get_terrain(line[width]),position));
} else if (Map_Manager::get_Instance().find_atmosphere(line[width])) {
grasss.push_back(create_terrain("Grass", position));
atmospheres.push_back(
create_atmosphere(Map_Manager::get_Instance().get_atmosphere(line[width]),position));
} else if (Map_Manager::get_Instance().find_environment(line[width])) {
terrains.push_back(create_terrain("Dirt", position));
collidable_environments.push_back(
create_environment(Map_Manager::get_Instance().get_environment(line[width]),position));
} else {
string s = "Invalid character found in map: ";
error_handle(s);
}
}
++height;
}
// Put objects into the Vertex_Buffer
for (auto grass : grasss)
vbo_ptr_floor->give_Quadrilateral(create_quad_ptr(grass));
for (auto terrain : terrains)
vbo_ptr_lower->give_Quadrilateral(create_quad_ptr(terrain));
for (auto environment : environments)
vbo_ptr_middle->give_Quadrilateral(create_quad_ptr(environment));
for (auto environment : collidable_environments)
vbo_ptr_middle->give_Quadrilateral(create_quad_ptr(environment));
// Spawn crystals
respawn_crystal();
// Logging
cout << "Created Map!" << endl;
file.close();
}
void Game_State::execute_controller_code(const Zeni_Input_ID &id,
const float &confidence,
const int &action)
{
switch (action) {
/* player 1 */
case 101:
break;
case 102:
player_infos[0]->controls.move_x = confidence;
break;
case 103:
player_infos[0]->controls.move_y = confidence;
break;
case 104:
player_infos[0]->controls.look_x = confidence;
break;
case 105:
player_infos[0]->controls.look_y = confidence;
break;
case 106:
player_infos[0]->controls.LT = (confidence == 1.0);
break;
case 107:
player_infos[0]->controls.attack = confidence > 0.5f;
break;
case 108:
player_infos[0]->controls.A = (confidence == 1.0);
break;
case 109:
break;
case 110:
break;
case 111:
break;
case 112:
player_infos[0]->controls.LB = (confidence == 1.0);
break;
case 113:
player_infos[0]->controls.RB = (confidence == 1.0);
break;
case 114:
player_infos[0]->controls.start = (confidence == 1.0);
break;
case 115:
player_infos[0]->controls.back = (confidence == 1.0);
break;
/* player 2 */
case 201:
break;
case 202:
player_infos[1]->controls.move_x = confidence;
break;
case 203:
player_infos[1]->controls.move_y = confidence;
break;
case 204:
player_infos[1]->controls.look_x = confidence;
break;
case 205:
player_infos[1]->controls.look_y = confidence;
break;
case 206:
player_infos[1]->controls.LT = (confidence == 1.0);
break;
case 207:
player_infos[1]->controls.attack = confidence > 0.5f;
break;
case 208:
player_infos[1]->controls.A = (confidence == 1.0);
break;
case 209:
break;
case 210:
break;
case 211:
break;
case 212:
player_infos[1]->controls.LB = (confidence == 1.0);
break;
case 213:
player_infos[1]->controls.RB = (confidence == 1.0);
break;
case 214:
player_infos[1]->controls.start = (confidence == 1.0);
break;
case 215:
player_infos[1]->controls.back = (confidence == 1.0);
break;
/* player 3 */
case 301:
break;
case 302:
player_infos[2]->controls.move_x = confidence;
break;
case 303:
player_infos[2]->controls.move_y = confidence;
break;
case 304:
player_infos[2]->controls.look_x = confidence;
break;
case 305:
player_infos[2]->controls.look_y = confidence;
break;
case 306:
player_infos[2]->controls.LT = (confidence == 1.0);
break;
case 307:
player_infos[2]->controls.attack = confidence > 0.5f;
break;
case 308:
player_infos[2]->controls.A = (confidence == 1.0);
break;
case 309:
break;
case 310:
break;
case 311:
break;
case 312:
player_infos[2]->controls.LB = (confidence == 1.0);
break;
case 313:
player_infos[2]->controls.RB = (confidence == 1.0);
break;
case 314:
player_infos[2]->controls.start = (confidence == 1.0);
break;
case 315:
player_infos[2]->controls.back = (confidence == 1.0);
break;
/* player 4 */
case 401:
break;
case 402:
player_infos[3]->controls.move_x = confidence;
break;
case 403:
player_infos[3]->controls.move_y = confidence;
break;
case 404:
player_infos[3]->controls.look_x = confidence;
break;
case 405:
player_infos[3]->controls.look_y = confidence;
break;
case 406:
player_infos[3]->controls.LT = (confidence == 1.0);
break;
case 407:
player_infos[3]->controls.attack = confidence > 0.5f;
break;
case 408:
player_infos[3]->controls.A = (confidence == 1.0);
break;
case 409:
break;
case 410:
break;
case 411:
break;
case 412:
player_infos[3]->controls.LB = (confidence == 1.0);
break;
case 413:
player_infos[3]->controls.RB = (confidence == 1.0);
break;
case 414:
player_infos[3]->controls.start = (confidence == 1.0);
break;
case 415:
player_infos[3]->controls.back = (confidence == 1.0);
break;
default:
break;
}
}
| 33.320969 | 193 | 0.61399 | clarkdonald |
abdd686f7d8d35957fde23c4da041614817b9fec | 12,187 | cc | C++ | tools/android/forwarder2/host_controllers_manager.cc | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/android/forwarder2/host_controllers_manager.cc | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/android/forwarder2/host_controllers_manager.cc | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | // Copyright 2017 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 "tools/android/forwarder2/host_controllers_manager.h"
#include "base/bind.h"
#include "base/process/launch.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "tools/android/forwarder2/util.h"
namespace forwarder2 {
HostControllersManager::HostControllersManager(
base::RepeatingCallback<int()> exit_notifier_fd_callback)
: controllers_(new HostControllerMap()),
exit_notifier_fd_callback_(exit_notifier_fd_callback),
has_failed_(false),
weak_ptr_factory_(this) {}
HostControllersManager::~HostControllersManager() {
if (!thread_.get())
return;
// Delete the controllers on the thread they were created on.
thread_->task_runner()->DeleteSoon(FROM_HERE, controllers_.release());
}
void HostControllersManager::HandleRequest(
const std::string& adb_path,
const std::string& device_serial,
int command,
int device_port,
int host_port,
std::unique_ptr<Socket> client_socket) {
// Lazy initialize so that the CLI process doesn't get this thread created.
InitOnce();
thread_->task_runner()->PostTask(
FROM_HERE,
base::BindOnce(&HostControllersManager::HandleRequestOnInternalThread,
base::Unretained(this), adb_path, device_serial, command,
device_port, host_port, std::move(client_socket)));
}
// static
std::string HostControllersManager::MakeHostControllerMapKey(int adb_port,
int device_port) {
return base::StringPrintf("%d:%d", adb_port, device_port);
}
void HostControllersManager::InitOnce() {
if (thread_.get())
return;
at_exit_manager_.reset(new base::AtExitManager());
thread_.reset(new base::Thread("HostControllersManagerThread"));
thread_->Start();
}
// static
void HostControllersManager::DeleteHostController(
const base::WeakPtr<HostControllersManager>& manager_ptr,
std::unique_ptr<HostController> host_controller) {
HostController* const controller = host_controller.release();
HostControllersManager* const manager = manager_ptr.get();
if (!manager) {
// Note that |controller| is not leaked in this case since the host
// controllers manager owns the controllers. If the manager was deleted
// then all the controllers (including |controller|) were also deleted.
return;
}
DCHECK(manager->thread_->task_runner()->RunsTasksInCurrentSequence());
// Note that this will delete |controller| which is owned by the map.
DeleteRefCountedValueInMap(
MakeHostControllerMapKey(controller->adb_port(),
controller->device_port()),
manager->controllers_.get());
}
void HostControllersManager::Map(const std::string& adb_path,
const std::string& device_serial,
int adb_port,
int device_port,
int host_port,
Socket* client_socket) {
if (host_port < 0) {
SendMessage("ERROR: missing host port\n", client_socket);
return;
}
const bool use_dynamic_port_allocation = device_port == 0;
if (!use_dynamic_port_allocation) {
const std::string controller_key =
MakeHostControllerMapKey(adb_port, device_port);
if (controllers_->find(controller_key) != controllers_->end()) {
LOG(INFO) << "Already forwarding device port " << device_port
<< " to host port " << host_port;
SendMessage(base::StringPrintf("%d:%d", device_port, host_port),
client_socket);
return;
}
}
// Create a new host controller.
std::unique_ptr<HostController> host_controller(HostController::Create(
device_serial, device_port, host_port, adb_port,
exit_notifier_fd_callback_.Run(),
base::BindOnce(&HostControllersManager::DeleteHostController,
weak_ptr_factory_.GetWeakPtr())));
if (!host_controller.get()) {
has_failed_ = true;
SendMessage("ERROR: Connection to device failed.\n", client_socket);
LogExistingControllers(client_socket);
return;
}
// Get the current allocated port.
device_port = host_controller->device_port();
LOG(INFO) << "Forwarding device port " << device_port << " to host port "
<< host_port;
const std::string msg = base::StringPrintf("%d:%d", device_port, host_port);
if (!SendMessage(msg, client_socket))
return;
host_controller->Start();
controllers_->emplace(MakeHostControllerMapKey(adb_port, device_port),
std::move(host_controller));
}
void HostControllersManager::Unmap(const std::string& adb_path,
const std::string& device_serial,
int adb_port,
int device_port,
Socket* client_socket) {
// Remove the previously created host controller.
const std::string controller_key =
MakeHostControllerMapKey(adb_port, device_port);
const bool controller_did_exist =
DeleteRefCountedValueInMap(controller_key, controllers_.get());
if (!controller_did_exist) {
SendMessage("ERROR: could not unmap port.\n", client_socket);
LogExistingControllers(client_socket);
} else {
SendMessage("OK", client_socket);
}
RemoveAdbPortForDeviceIfNeeded(adb_path, device_serial);
}
void HostControllersManager::UnmapAll(const std::string& adb_path,
const std::string& device_serial,
int adb_port,
Socket* client_socket) {
const std::string adb_port_str = base::StringPrintf("%d", adb_port);
for (auto controller_key = controllers_->begin();
controller_key != controllers_->end(); ++controller_key) {
std::vector<std::string> pieces =
base::SplitString(controller_key->first, ":", base::KEEP_WHITESPACE,
base::SPLIT_WANT_ALL);
if (pieces.size() == 2) {
if (pieces[0] == adb_port_str) {
DeleteRefCountedValueInMapFromIterator(controller_key,
controllers_.get());
}
} else {
LOG(ERROR) << "Unexpected controller key: " << controller_key->first;
}
}
RemoveAdbPortForDeviceIfNeeded(adb_path, device_serial);
SendMessage("OK", client_socket);
}
void HostControllersManager::HandleRequestOnInternalThread(
const std::string& adb_path,
const std::string& device_serial,
int command,
int device_port,
int host_port,
std::unique_ptr<Socket> client_socket) {
const int adb_port = GetAdbPortForDevice(adb_path, device_serial);
if (adb_port < 0) {
SendMessage(
"ERROR: could not get adb port for device. You might need to add "
"'adb' to your PATH or provide the device serial id.\n",
client_socket.get());
return;
}
switch (command) {
case MAP:
Map(adb_path, device_serial, adb_port, device_port, host_port,
client_socket.get());
break;
case UNMAP:
Unmap(adb_path, device_serial, adb_port, device_port,
client_socket.get());
break;
case UNMAP_ALL:
UnmapAll(adb_path, device_serial, adb_port, client_socket.get());
break;
default:
SendMessage(
base::StringPrintf("ERROR: unrecognized command %d\n", command),
client_socket.get());
break;
}
}
void HostControllersManager::LogExistingControllers(Socket* client_socket) {
SendMessage("ERROR: Existing controllers:\n", client_socket);
for (const auto& controller : *controllers_) {
SendMessage(base::StringPrintf("ERROR: %s\n", controller.first.c_str()),
client_socket);
}
}
bool HostControllersManager::Adb(const std::string& adb_path,
const std::string& device_serial,
const std::string& command,
std::string* output_and_error) {
// We use the vector version of GetAppOutputAndError rather than the
// more standard base::CommandLine version because base::CommandLine
// reorders the command s.t. switches precede arguments and doing so
// here creates an invalid adb command.
std::vector<std::string> adb_command{adb_path};
if (!device_serial.empty()) {
adb_command.push_back("-s");
adb_command.push_back(device_serial);
}
const std::vector<std::string> split_command = base::SplitString(
command, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
adb_command.insert(adb_command.end(), split_command.begin(),
split_command.end());
return GetAppOutputAndError(adb_command, output_and_error);
}
void HostControllersManager::RemoveAdbPortForDeviceIfNeeded(
const std::string& adb_path,
const std::string& device_serial) {
std::unordered_map<std::string, int>::const_iterator it =
device_serial_to_adb_port_map_.find(device_serial);
if (it == device_serial_to_adb_port_map_.end())
return;
int port = it->second;
const std::string prefix = base::StringPrintf("%d:", port);
for (auto others = controllers_->begin(); others != controllers_->end();
++others) {
if (base::StartsWith(others->first, prefix, base::CompareCase::SENSITIVE))
return;
}
// No other port is being forwarded to this device:
// - Remove it from our internal serial -> adb port map.
// - Remove from "adb forward" command.
LOG(INFO) << "Device " << device_serial << " has no more ports.";
device_serial_to_adb_port_map_.erase(device_serial);
const std::string command =
base::StringPrintf("forward --remove tcp:%d", port);
std::string output;
if (!Adb(adb_path, device_serial, command, &output)) {
LOG(ERROR) << command << " failed. output: \"" << output << "\"";
} else {
LOG(INFO) << command << " (output: \"" << output << "\")";
}
// Wait for the socket to be fully unmapped.
const std::string port_mapped_cmd = base::StringPrintf("lsof -nPi:%d", port);
const std::vector<std::string> port_mapped_split_cmd = base::SplitString(
port_mapped_cmd, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
const int poll_interval_us = 500 * 1000;
int retries = 3;
while (retries) {
// lsof failure means the port was successfully unmapped.
bool port_unmapped = !GetAppOutputAndError(port_mapped_split_cmd, &output);
LOG(INFO) << "Device " << device_serial << " port " << port
<< (port_unmapped ? "" : " not") << " unmapped";
if (port_unmapped)
break;
--retries;
usleep(poll_interval_us);
}
}
int HostControllersManager::GetAdbPortForDevice(
const std::string adb_path,
const std::string& device_serial) {
std::unordered_map<std::string, int>::const_iterator it =
device_serial_to_adb_port_map_.find(device_serial);
if (it != device_serial_to_adb_port_map_.end())
return it->second;
Socket bind_socket;
CHECK(bind_socket.BindTcp("127.0.0.1", 0));
const int port = bind_socket.GetPort();
bind_socket.Close();
const std::string command = base::StringPrintf(
"forward tcp:%d localabstract:chrome_device_forwarder", port);
std::string output;
if (!Adb(adb_path, device_serial, command, &output)) {
LOG(ERROR) << command << " failed. output: " << output;
return -1;
}
LOG(INFO) << command;
device_serial_to_adb_port_map_[device_serial] = port;
return port;
}
bool HostControllersManager::SendMessage(const std::string& msg,
Socket* client_socket) {
bool result = client_socket->WriteString(msg);
DCHECK(result);
if (!result)
has_failed_ = true;
return result;
}
bool HostControllersManager::GetAppOutputAndError(
const std::vector<std::string>& argv,
std::string* output) {
return base::GetAppOutputAndError(argv, output);
}
} // namespace forwarder2
| 38.323899 | 79 | 0.661278 | sarang-apps |
abddbf88cbc45e029b00c0f6619d31e09e8e16fc | 1,953 | cpp | C++ | classes/misc/binary.cpp | Patriccollu/smooth | 8673d4702c55b1008bbcabddf7907da0e50505e4 | [
"Artistic-2.0"
] | 24 | 2017-08-22T15:55:34.000Z | 2022-03-06T11:41:31.000Z | classes/misc/binary.cpp | Patriccollu/smooth | 8673d4702c55b1008bbcabddf7907da0e50505e4 | [
"Artistic-2.0"
] | 6 | 2018-07-21T12:17:55.000Z | 2021-08-12T11:27:27.000Z | classes/misc/binary.cpp | Patriccollu/smooth | 8673d4702c55b1008bbcabddf7907da0e50505e4 | [
"Artistic-2.0"
] | 9 | 2017-09-13T02:32:18.000Z | 2022-03-06T11:41:32.000Z | /* The smooth Class Library
* Copyright (C) 1998-2014 Robert Kausch <robert.kausch@gmx.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of "The Artistic License, Version 2.0".
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
#include <smooth/misc/binary.h>
#include <smooth/misc/math.h>
S::Binary::Binary()
{
}
S::Binary::Binary(const Binary &)
{
}
S::Bool S::Binary::GetBit(Int n, UnsignedInt bit)
{
return IsFlagSet(n, (Int) Math::Pow(2l, (Signed) bit));
}
S::Int S::Binary::SetBit(Int &n, UnsignedInt bit, Bool value)
{
if (value) return (n |= (Int) Math::Pow(2l, (Signed) bit));
else return (n = ((n | (Int) Math::Pow(2l, (Signed) bit)) ^ (Int) Math::Pow(2l, (Signed) bit)));
}
S::Int S::Binary::GetBits(Int n, UnsignedInt startBit, UnsignedInt endBit)
{
Int retVal = 0;
if (startBit >= 32 || endBit >= 32) return -1;
for (UnsignedInt i = startBit; i <= endBit; i++)
{
retVal += (Int) Math::Pow(2l, (Signed) i - (Signed) startBit) * ((n >> i) & 1);
}
return retVal;
}
S::Int S::Binary::SetBits(Int &n, UnsignedInt startBit, UnsignedInt endBit, Int value)
{
if (startBit >= 32 || endBit >= 32) return -1;
for (UnsignedInt i = startBit; i <= endBit; i++)
{
SetBit(n, i, (value >> (i - startBit)) & 1);
}
return n;
}
S::Int S::Binary::And(Int a, Int b)
{
return a & b;
}
S::Int S::Binary::Or(Int a, Int b)
{
return a | b;
}
S::Int S::Binary::Xor(Int a, Int b)
{
return a ^ b;
}
S::Int S::Binary::Not(Int a)
{
return ~a;
}
S::Int S::Binary::ShiftL(Int n, Int s)
{
return n << s;
}
S::Int S::Binary::ShiftR(Int n, Int s)
{
return n >> s;
}
S::Bool S::Binary::IsFlagSet(Int n, Int flag)
{
return ((n & flag) == flag);
}
S::Int S::Binary::SetFlag(Int &n, Int flag)
{
return (n |= flag);
}
| 19.928571 | 98 | 0.623144 | Patriccollu |
abe04c7b26e26e2e590f181e44cffbf5863336e9 | 4,815 | cpp | C++ | src/globals/tests/dbio_test.cpp | zakimjz/GPU_graph_mining | 22ba73bea97533ed6b2af613bd263ef4d869e71a | [
"Apache-2.0"
] | 2 | 2020-05-13T09:09:50.000Z | 2021-07-16T12:51:53.000Z | src/globals/tests/dbio_test.cpp | zakimjz/GPU_graph_mining | 22ba73bea97533ed6b2af613bd263ef4d869e71a | [
"Apache-2.0"
] | null | null | null | src/globals/tests/dbio_test.cpp | zakimjz/GPU_graph_mining | 22ba73bea97533ed6b2af613bd263ef4d869e71a | [
"Apache-2.0"
] | 1 | 2022-03-22T01:15:33.000Z | 2022-03-22T01:15:33.000Z | #include <dfs_code.hpp>
#include <string>
#include <gtest/gtest.h>
#include <stdexcept>
#include <dbio.hpp>
#include <logger.hpp>
#include <cuda_graph_types.hpp>
using std::string;
using std::runtime_error;
using types::DFS;
using namespace dbio;
types::graph_database_t get_test_database()
{
std::string pbec_prefixes[] = {
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(3 0 0 0 0);(0 4 0 0 0)", // prefix 0
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(3 0 0 0 0);(1 4 0 0 0)", // prefix 0
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(3 4 0 0 0);(4 0 0 0 0)", // prefix 1
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(3 4 0 0 0);(4 1 0 0 0)", // prefix 1
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(3 4 0 0 0);(4 2 0 0 0)", // prefix 1
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(2 4 0 0 0);(4 0 0 0 0)", // prefix 2
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(2 4 0 0 0);(4 1 0 0 0)", // prefix 2
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(1 4 0 0 0);(4 5 0 0 0)", // prefix 3
"(0 1 0 0 0);(1 2 0 0 0);(2 0 0 0 0);(2 3 0 0 0);(1 4 0 0 0);(4 0 0 0 0)", // prefix 3
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(3 0 0 0 0);(3 4 0 0 0)", // prefix 4
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(3 0 0 0 0);(3 4 0 0 0);(4 1 0 0 0)", // prefix 4
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(3 0 0 0 0);(3 4 0 0 0);(4 0 0 0 0)", // prefix 4
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(3 4 0 0 0);(4 0 0 0 0)", // prefix 5
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(3 4 0 0 0);(4 1 0 0 0)", // prefix 5
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(3 4 0 0 0)", // prefix 5
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(2 4 0 0 0);(4 5 0 0 0)", // prefix 6
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(2 4 0 0 0);(4 0 0 0 0)", // prefix 6
"(0 1 0 0 0);(1 2 0 0 0);(2 3 0 0 0);(2 4 0 0 0);(4 1 0 0 0)", // prefix 6
""
};
types::graph_database_t result;
int idx = 0;
while(pbec_prefixes[idx].size() != 0) {
types::DFSCode dfs = types::DFSCode::read_from_str(pbec_prefixes[idx]);
types::Graph grph;
dfs.toGraph(grph);
result.push_back(grph);
idx++;
} // while
return result;
} // get_test_database
TEST(dbio, basic_io_bin_test)
{
types::graph_database_t db = get_test_database();
types::graph_database_t read_db;
TRACE5(*Logger::get_logger("GLOBALSTEST"), "test database size (in # of graphs): " << db.size());
write_database_bin("test.dat", db);
read_database_bin("test.dat", read_db);
ASSERT_EQ(db.size(), read_db.size());
for(int i = 0; i < read_db.size(); i++) {
std::string read_db_dfs_code = read_db[i].get_min_dfs_code().to_string();
std::string orig_db_dfs_code = db[i].get_min_dfs_code().to_string();
ASSERT_EQ(read_db_dfs_code, orig_db_dfs_code);
} // for i
} // TEST dbio.basic_io_bin_test
static void perform_basic_io_bin_part_test(const types::graph_database_t &db, int total_parts)
{
types::graph_database_t *read_db = new types::graph_database_t[total_parts];
for(int i = 0; i < total_parts; i++) {
read_database_bin("test.dat", read_db[i], total_parts, i);
}
int db_idx = 0;
for(int i = 0; i < total_parts; i++) {
for(int j = 0; j < read_db[i].size(); j++) {
//std::cout << "comparing; read: " << read_db[i][j].to_string() << "; stored: " << db[db_idx].to_string() << std::endl;
ASSERT_EQ(read_db[i][j].to_string(), db[db_idx].to_string());
db_idx++;
} // for j
} // for i
}
TEST(dbio, basic_io_bin_part_test)
{
types::graph_database_t db = get_test_database();
TRACE5(*Logger::get_logger("GLOBALSTEST"), "test database size (in # of graphs): " << db.size());
write_database_bin("test.dat", db);
for(int parts = 1; parts < db.size(); parts++) {
perform_basic_io_bin_part_test(db, parts);
}
} // TEST dbio.basic_io_bin_test
TEST(dbio, basic_io_cuda)
{
types::graph_database_t db = get_test_database();
TRACE(*Logger::get_logger("GLOBALSTEST"), "test database size (in # of graphs): " << db.size());
types::graph_database_cuda cuda_gdb = types::graph_database_cuda::create_from_host_representation(db);
types::graph_database_cuda cuda_gdb_read(true);
write_database_cudabin("test.dat", cuda_gdb);
read_database_cudabin("test.dat", cuda_gdb_read);
types::graph_database_t db_read;
cuda_gdb_read.convert_to_host_representation(db_read);
TRACE(*Logger::get_logger("GLOBALSTEST"), "read database size (in # of graphs): " << db_read.size());
ASSERT_EQ(db_read.size(), db.size());
for(int i = 0; i < db_read.size(); i++) {
if(db_read[i].get_min_dfs_code() == db[i].get_min_dfs_code()) {
ASSERT_TRUE(true);
} else {
ASSERT_TRUE(false);
}
} // for i
cuda_gdb_read.delete_from_host();
cuda_gdb.delete_from_host();
} // TEST dbio.basic_io_bin_test
| 33.908451 | 125 | 0.591277 | zakimjz |
abe1f724699e3f979362f2000179d30fc9aaece0 | 5,420 | cpp | C++ | examples/xtd.forms.examples/components/radio_button_renderer/src/radio_button_renderer.cpp | BaderEddineOuaich/xtd | 6f28634c7949a541d183879d2de18d824ec3c8b1 | [
"MIT"
] | 1 | 2022-02-25T16:53:06.000Z | 2022-02-25T16:53:06.000Z | examples/xtd.forms.examples/components/radio_button_renderer/src/radio_button_renderer.cpp | leanid/xtd | 2e1ea6537218788ca08901faf8915d4100990b53 | [
"MIT"
] | null | null | null | examples/xtd.forms.examples/components/radio_button_renderer/src/radio_button_renderer.cpp | leanid/xtd | 2e1ea6537218788ca08901faf8915d4100990b53 | [
"MIT"
] | null | null | null | #include <xtd/xtd>
using namespace std;
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms;
namespace examples {
class form1 : public form {
public:
form1() {
text("Radio button renderer example");
client_size({500, 300});
set_color(color::blue);
set_color(nullptr);
choice_theme.parent(*this);
choice_theme.location({10, 10});
choice_theme.items().push_back("default theme");
choice_theme.items().push_back_range(theme::theme_names());
choice_theme.selected_index(0);
choice_theme.selected_index_changed += [&] {
application::theme(choice_theme.selected_index() == 0 ? theme::default_theme_name() : choice_theme.selected_item().value());
color_picker_background.color(back_color());
color_picker_foreground.color(fore_color());
bcolor.reset();
fcolor.reset();
radio_button_system.back_color(nullptr);
radio_button_system.fore_color(nullptr);
radio_button_standard.back_color(nullptr);
radio_button_standard.fore_color(nullptr);
};
color_picker_background.parent(*this);
color_picker_background.location({140, 10});
color_picker_background.color(back_color());
color_picker_background.color_changed += [&] {
bcolor = color_picker_background.color();
radio_button_system.back_color(bcolor.value());
radio_button_standard.back_color(bcolor.value());
};
color_picker_foreground.parent(*this);
color_picker_foreground.location({250, 10});
color_picker_foreground.color(fore_color());
color_picker_foreground.color_changed += [&] {
fcolor = color_picker_foreground.color();
radio_button_system.fore_color(fcolor.value());
radio_button_standard.fore_color(fcolor.value());
};
radio_button_system.parent(*this);
radio_button_system.checked(true);
radio_button_system.flat_style(xtd::forms::flat_style::system);
radio_button_system.location({10, 170});
radio_button_system.text("System");
radio_button_standard.parent(*this);
radio_button_standard.location({100, 170});
radio_button_standard.text("Standard");
}
protected:
void on_paint(paint_event_args& e) override {
form::on_paint(e);
radio_button_renderer::draw_radio_button(e.graphics(), {10, 70, 104, 25}, "Normal", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::unchecked_normal, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {124, 70, 104, 25}, "Hot", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::unchecked_hot, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {238, 70, 104, 25}, "Pressed", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::unchecked_pressed, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {352, 70, 104, 25}, "Disabled", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::unchecked_disabled, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {10, 110, 104, 25}, "Normal", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::checked_normal, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {124, 110, 104, 25}, "Hot", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::checked_hot, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {238, 110, 104, 25}, "Pressed", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::checked_pressed, bcolor, fcolor);
radio_button_renderer::draw_radio_button(e.graphics(), {352, 110, 104, 25}, "Disabled", font(), xtd::forms::text_format_flags::vertical_center | xtd::forms::text_format_flags::left, xtd::drawing::image::empty, {0, 0, 0, 0}, false, xtd::forms::visual_styles::radio_button_state::checked_disabled, bcolor, fcolor);
}
private:
void set_color(const color& color) {
cdebug << ustring::format("color = {}", color.to_string()) << endl;
}
void set_color(nullptr_t) {
cdebug << "color = (nullptr)" << endl;
}
optional<color> bcolor;
optional<color> fcolor;
choice choice_theme;
color_picker color_picker_background;
color_picker color_picker_foreground;
radio_button radio_button_system;
radio_button radio_button_standard;
};
}
int main() {
application::run(examples::form1());
}
| 56.458333 | 319 | 0.701292 | BaderEddineOuaich |
abe3557ffb78bd28ddbae9e36407852abb78f347 | 1,070 | cc | C++ | chrome/browser/ui/webui/settings/settings_page_ui_handler.cc | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 1 | 2020-09-15T08:43:34.000Z | 2020-09-15T08:43:34.000Z | chrome/browser/ui/webui/settings/settings_page_ui_handler.cc | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | chrome/browser/ui/webui/settings/settings_page_ui_handler.cc | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
#include "content/public/browser/web_ui.h"
namespace settings {
SettingsPageUIHandler::SettingsPageUIHandler() {}
SettingsPageUIHandler::~SettingsPageUIHandler() {}
void SettingsPageUIHandler::ResolveJavascriptCallback(
const base::Value& callback_id,
const base::Value& response) {
// cr.webUIResponse is a global JS function exposed from cr.js.
CallJavascriptFunction("cr.webUIResponse", callback_id,
base::FundamentalValue(true), response);
}
void SettingsPageUIHandler::RejectJavascriptCallback(
const base::Value& callback_id,
const base::Value& response) {
// cr.webUIResponse is a global JS function exposed from cr.js.
CallJavascriptFunction("cr.webUIResponse", callback_id,
base::FundamentalValue(false), response);
}
} // namespace settings
| 33.4375 | 73 | 0.737383 | maidiHaitai |
abe547e44fd5f90e8a596ba42546dc5ab6683458 | 689 | cpp | C++ | cerberus/GeneratedFiles/qrc_cerberus.cpp | gA4ss/cerberus | 0023dba54a27e6f87acb9dfec9b5fcda0e611bbf | [
"MIT"
] | 7 | 2020-08-17T09:09:53.000Z | 2022-02-02T07:23:57.000Z | cerberus/GeneratedFiles/qrc_cerberus.cpp | gA4ss/cerberus | 0023dba54a27e6f87acb9dfec9b5fcda0e611bbf | [
"MIT"
] | null | null | null | cerberus/GeneratedFiles/qrc_cerberus.cpp | gA4ss/cerberus | 0023dba54a27e6f87acb9dfec9b5fcda0e611bbf | [
"MIT"
] | 7 | 2020-08-17T09:09:55.000Z | 2021-09-24T03:49:36.000Z | /****************************************************************************
** Resource object code
**
** Created: Mon Feb 13 11:53:47 2012
** by: The Resource Compiler for Qt version 4.7.0
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
int QT_MANGLE_NAMESPACE(qInitResources_cerberus)()
{
return 1;
}
Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_cerberus))
int QT_MANGLE_NAMESPACE(qCleanupResources_cerberus)()
{
return 1;
}
Q_DESTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qCleanupResources_cerberus))
| 22.225806 | 78 | 0.597968 | gA4ss |
abe5e6e76216b8146499aacefd06df6cda681624 | 18,274 | hpp | C++ | include/feature_brex.hpp | dsbrown1331/brex_gridworld_cpp | 15c36c703cf8b874d9bd7f87e426338af23781cd | [
"MIT"
] | 1 | 2020-05-22T14:04:50.000Z | 2020-05-22T14:04:50.000Z | include/feature_brex.hpp | dsbrown1331/safe-imitation-learning | dc4f40a7f51f4ff98994371d6aa026ec8181557a | [
"MIT"
] | null | null | null | include/feature_brex.hpp | dsbrown1331/safe-imitation-learning | dc4f40a7f51f4ff98994371d6aa026ec8181557a | [
"MIT"
] | null | null | null |
#ifndef feature_brex_h
#define feature_brex_h
#include <cmath>
#include <stdlib.h>
#include <vector>
#include <numeric>
#include <math.h>
#include "mdp.hpp"
#include "../include/unit_norm_sampling.hpp"
using namespace std;
class FeatureBREX { // B-REX with known features
protected:
double r_min, r_max, step_size;
unsigned int chain_length;
unsigned int grid_height, grid_width;
double alpha;
unsigned int iteration;
int sampling_flag;
bool mcmc_reject; //If false then it uses Yuchen's sample until accept method, if true uses normal MCMC sampling procedure
int num_steps; //how many times to change current to get proposal
unsigned int nfeatures;
double gamma;
double** stateFeatures;
vector< vector<double> > fcounts; //TODO add fcounts to this everytime a demo is added
vector<pair<unsigned int, unsigned int> > pairwise_preferences; //vector or pairwise preferences
void initializeMDP();
void modifyFeatureWeightsRandomly(FeatureGridMDP * gmdp, double step_size);
void sampleL1UnitBallRandomly(FeatureGridMDP * gmdp);
void updownL1UnitBallWalk(FeatureGridMDP * gmdp, double step);
void manifoldL1UnitBallWalk(FeatureGridMDP * gmdp, double step, int num_steps);
void manifoldL1UnitBallWalkAllSteps(FeatureGridMDP * gmdp, double step);
double* posteriors = nullptr;
FeatureGridMDP* MAPmdp = nullptr;
double MAPposterior;
public:
FeatureGridMDP* mdp = nullptr; //original MDP
FeatureGridMDP** R_chain = nullptr; //storing the rewards along the way
~FeatureBREX(){
if(R_chain != nullptr) {
for(unsigned int i=0; i<chain_length; i++) delete R_chain[i];
delete []R_chain;
}
if(posteriors != nullptr) delete []posteriors;
delete MAPmdp;
}
double getAlpha(){return alpha;}
FeatureBREX(FeatureGridMDP* init_mdp, double min_reward, double max_reward, unsigned int chain_len, double step, double conf, int samp_flag=0, bool reject=false, int num_step=1): r_min(min_reward), r_max(max_reward), step_size(step), chain_length(chain_len), alpha(conf), sampling_flag(samp_flag), mcmc_reject(reject), num_steps(num_step){
unsigned int grid_height = init_mdp -> getGridHeight();
unsigned int grid_width = init_mdp -> getGridWidth();
bool* initStates = init_mdp -> getInitialStates();
bool* termStates = init_mdp -> getTerminalStates();
nfeatures = init_mdp -> getNumFeatures();
double* fweights = init_mdp -> getFeatureWeights();
stateFeatures = init_mdp -> getStateFeatures();
bool stochastic = init_mdp -> isStochastic();
gamma = init_mdp -> getDiscount();
//copy init_mdp
mdp = new FeatureGridMDP(grid_width, grid_height, initStates, termStates, nfeatures, fweights, stateFeatures, stochastic, gamma);
mdp->setWallStates(init_mdp->getWallStates());
initializeMDP(); //set weights to (r_min+r_max)/2
MAPmdp = new FeatureGridMDP(grid_width, grid_height, initStates, termStates, nfeatures, fweights, stateFeatures, stochastic, gamma);
MAPmdp->setWallStates(init_mdp->getWallStates());
MAPmdp->setFeatureWeights(mdp->getFeatureWeights());
MAPposterior = 0;
R_chain = new FeatureGridMDP*[chain_length];
posteriors = new double[chain_length];
iteration = 0;
};
FeatureGridMDP* getMAPmdp(){return MAPmdp;}
double getMAPposterior(){return MAPposterior;}
void run(double eps=0.001);
double getMinReward(){return r_min;};
double getMaxReward(){return r_max;};
double getStepSize(){return step_size;};
unsigned int getChainLength(){return chain_length;};
FeatureGridMDP** getRewardChain(){ return R_chain; };
FeatureGridMDP* getMeanMDP(int burn, int skip);
double* getPosteriorChain(){ return posteriors; };
FeatureGridMDP* getMDP(){ return mdp;};
double calculatePosterior(FeatureGridMDP* gmdp);
double logsumexp(double* nums, unsigned int size);
//accumulate the feature counts of a vector
vector<double> computeFCounts(vector<pair<unsigned int, unsigned int> > traj);
void addTrajectories(vector<vector<pair<unsigned int,unsigned int> > > demonstrations);
void addPairwisePreferences(vector<pair<unsigned int,unsigned int> > prefs);
};
void FeatureBREX::run(double eps)
{
//cout.precision(10);
//cout << "itr: " << iteration << endl;
//clear out previous values if they exist
if(iteration > 0) for(unsigned int i=0; i<chain_length-1; i++) delete R_chain[i];
iteration++;
MAPposterior = 0;
R_chain[0] = mdp; // so that it can be deleted with R_chain!!!!
//vector<unsigned int> policy (mdp->getNumStates());
//cout << "testing" << endl;
//mdp->valueIteration(eps);//deterministicPolicyIteration(policy);
//cout << "value iter" << endl;
//mdp->calculateQValues();
mdp->displayFeatureWeights();
double posterior = calculatePosterior(mdp);
//cout << "init posterior: " << posterior << endl;
posteriors[0] = exp(posterior);
int reject_cnt = 0;
//BREX iterations
for(unsigned int itr=1; itr < chain_length; itr++)
{
//cout << "itr: " << itr << endl;
FeatureGridMDP* temp_mdp = new FeatureGridMDP (mdp->getGridWidth(),mdp->getGridHeight(), mdp->getInitialStates(), mdp->getTerminalStates(), mdp->getNumFeatures(), mdp->getFeatureWeights(), mdp->getStateFeatures(), mdp->isStochastic(), mdp->getDiscount());
//set the walls
temp_mdp->setWallStates(mdp->getWallStates());
temp_mdp->setFeatureWeights(mdp->getFeatureWeights());
if(sampling_flag == 0)
{ //random grid walk
modifyFeatureWeightsRandomly(temp_mdp,step_size);
}
else if(sampling_flag == 1)
{
//cout << "sampling randomly from L1 unit ball" << endl;
sampleL1UnitBallRandomly(temp_mdp);
}
//updown sampling on L1 ball
else if(sampling_flag == 2)
{
//cout << "before step" << endl;
//temp_mdp->displayFeatureWeights();
updownL1UnitBallWalk(temp_mdp, step_size);
//cout << "after step" << endl;
//temp_mdp->displayFeatureWeights();
//check if norm is right
assert(isEqual(l1_norm(temp_mdp->getFeatureWeights(), temp_mdp->getNumFeatures()),1.0));
}
//random manifold walk sampling
else if(sampling_flag == 3)
{
manifoldL1UnitBallWalk(temp_mdp, step_size, num_steps);
assert(isEqual(l1_norm(temp_mdp->getFeatureWeights(), temp_mdp->getNumFeatures()),1.0));
}
else if(sampling_flag == 4)
{
manifoldL1UnitBallWalkAllSteps(temp_mdp, step_size);
assert(isEqual(l1_norm(temp_mdp->getFeatureWeights(), temp_mdp->getNumFeatures()),1.0));
}
//cout << "trying out" << endl;
//temp_mdp->displayFeatureWeights();
//temp_mdp->valueIteration(eps, mdp->getValues());
//temp_mdp->deterministicPolicyIteration(policy);//valueIteration(0.05);
//temp_mdp->calculateQValues();
double new_posterior = calculatePosterior(temp_mdp);
//cout << "nwe posterior: " << new_posterior << endl;
double probability = min((double)1.0, exp(new_posterior - posterior));
//cout << "probability accept = " << probability << endl;
//transition with probability
double r = ((double) rand() / (RAND_MAX));
if ( r < probability ) //policy_changed &&
{
//temp_mdp->displayFeatureWeights();
//cout << "accept" << endl;
mdp = temp_mdp;
posterior = new_posterior;
R_chain[itr] = temp_mdp;
posteriors[itr] = exp(new_posterior);
//if (itr%100 == 0) cout << itr << ": " << posteriors[itr] << endl;
if(posteriors[itr] > MAPposterior)
{
cout << "iter " << itr << endl;
cout << "new MAP" << endl;
temp_mdp->displayFeatureWeights();
MAPposterior = posteriors[itr];
//TODO remove set terminals, right? why here in first place?
MAPmdp->setFeatureWeights(mdp->getFeatureWeights());
}
}else {
//delete temp_mdp
delete temp_mdp;
//keep previous reward in chain
//cout << "reject!!!!" << endl;
reject_cnt++;
if(mcmc_reject)
{
//TODO can I make this more efficient by adding a count variable?
//make a copy of mdp
FeatureGridMDP* mdp_copy = new FeatureGridMDP (mdp->getGridWidth(),mdp->getGridHeight(), mdp->getInitialStates(), mdp->getTerminalStates(), mdp->getNumFeatures(), mdp->getFeatureWeights(), mdp->getStateFeatures(), mdp->isStochastic(), mdp->getDiscount());
//mdp_copy->setValues(mdp->getValues());
//mdp_copy->setQValues(mdp->getQValues());
mdp_copy->setWallStates(mdp->getWallStates());
R_chain[itr] = mdp_copy;
}
//sample until you get accept and then add that -- doesn't repeat old reward in chain
else
{
assert(reject_cnt < 100000);
itr--;
//delete temp_mdp;
}
}
}
cout << "accepts / total: " << chain_length - reject_cnt << "/" << chain_length << endl;
}
//optimized version
double FeatureBREX::logsumexp(double* nums, unsigned int size) {
double max_exp = nums[0];
double sum = 0.0;
unsigned int i;
//find max exponent
for (i = 1 ; i < size ; i++)
{
if (nums[i] > max_exp)
max_exp = nums[i];
}
for (i = 0; i < size ; i++)
sum += exp(nums[i] - max_exp);
return log(sum) + max_exp;
}
//computes posterior using pairwise preference softmax likelihood fn
double FeatureBREX::calculatePosterior(FeatureGridMDP* gmdp) //assuming uniform prior
{
double posterior = 0;
//add in a zero norm (non-zero count)
double prior = 0;
// int count = 0;
// double* weights = gmdp->getFeatureWeights();
// for(int i=0; i < gmdp->getNumFeatures(); i++)
// if(abs(weights[i]) > 0.0001)
// count += 1;
// prior = -1 * alpha * log(count-1);
posterior += prior;
double* weights = gmdp->getFeatureWeights();
// "-- Ranked Demos --" each element is a pair of trajectory indices
for(unsigned int i=0; i < pairwise_preferences.size(); i++)
{
pair<unsigned int,unsigned int> trajpair = pairwise_preferences[i];
unsigned int worse_idx = trajpair.first;
unsigned int better_idx = trajpair.second;
//cout << "prefrence: " << worse_idx << " < " << better_idx << endl;
vector<double> fcounts_better = fcounts[better_idx];
vector<double> fcounts_worse = fcounts[worse_idx];
//compute dot products
double better_return = dotProduct(weights, &fcounts_better[0], nfeatures);
double worse_return = dotProduct(weights, &fcounts_worse[0], nfeatures);
//cout << "better return = " << better_return << " worse return = " << worse_return << endl;
double Z [2];
Z[0] = alpha * better_return;
Z[1] = alpha * worse_return;
//cout << Z[0] << "," << Z[1] << endl;
float pairwise_likelihood = alpha * better_return - logsumexp(Z, 2);
//cout << alpha * better_return << endl;
//cout << logsumexp(Z,2) << endl;
//cout << worse_idx << " < " << better_idx << " loglikelihood = " << pairwise_likelihood << endl;
posterior += pairwise_likelihood;
//cout << state << "," << action << ": " << posterior << endl;
}
return posterior;
}
void FeatureBREX::modifyFeatureWeightsRandomly(FeatureGridMDP * gmdp, double step)
{
unsigned int state = rand() % gmdp->getNumFeatures();
double change = pow(-1,rand()%2)*step;
//cout << "before " << gmdp->getReward(state) << endl;
//cout << "change " << change << endl;
double weight = max(min(gmdp->getWeight(state) + change, r_max), r_min);
//if(gmdp->isTerminalState(state)) reward = max(min(gmdp->getReward(state) + change, r_max), 0.0);
//else reward = max(min(gmdp->getReward(state) + change, 0.0), r_min);
//cout << "after " << reward << endl;
gmdp->setFeatureWeight(state, weight);
}
void FeatureBREX::sampleL1UnitBallRandomly(FeatureGridMDP * gmdp)
{
unsigned int numFeatures = gmdp->getNumFeatures();
double* newWeights = sample_unit_L1_norm(numFeatures);
gmdp->setFeatureWeights(newWeights);
delete [] newWeights;
}
void FeatureBREX::updownL1UnitBallWalk(FeatureGridMDP * gmdp, double step)
{
unsigned int numFeatures = gmdp->getNumFeatures();
double* newWeights = updown_l1_norm_walk(gmdp->getFeatureWeights(), numFeatures, step);
gmdp->setFeatureWeights(newWeights);
delete [] newWeights;
}
void FeatureBREX::manifoldL1UnitBallWalk(FeatureGridMDP * gmdp, double step, int num_steps)
{
unsigned int numFeatures = gmdp->getNumFeatures();
double* newWeights = random_manifold_l1_step(gmdp->getFeatureWeights(), numFeatures, step, num_steps);
gmdp->setFeatureWeights(newWeights);
delete [] newWeights;
}
void FeatureBREX::manifoldL1UnitBallWalkAllSteps(FeatureGridMDP * gmdp, double step)
{
unsigned int numFeatures = gmdp->getNumFeatures();
double* newWeights = take_all_manifold_l1_steps(gmdp->getFeatureWeights(), numFeatures, step);
gmdp->setFeatureWeights(newWeights);
delete [] newWeights;
}
//accumulate the feature counts of a vector
vector<double> FeatureBREX::computeFCounts(vector<pair<unsigned int, unsigned int> > traj)
{
vector<double> fcounts(nfeatures);
for(unsigned int t = 0; t < traj.size(); t++)
{
pair<unsigned int, unsigned int> p = traj[t];
unsigned int state = p.first;
//get feature vector for state
double* f = stateFeatures[state];
for(unsigned int i=0; i<nfeatures; i++)
fcounts[i] += pow(gamma, t) * f[i];
}
return fcounts;
}
//compute fcounts for each demo
void FeatureBREX::addTrajectories(vector<vector<pair<unsigned int,unsigned int> > > demonstrations)
{
for(vector<pair<unsigned int, unsigned int> > traj : demonstrations)
{
vector<double> fcs = computeFCounts(traj);
fcounts.push_back(fcs);
}
// for(unsigned int t = 0; t < fcounts.size(); t++)
// {
// cout << "fcounts " << t << endl;
// for(unsigned int i = 0; i < fcounts[t].size(); i++)
// cout << fcounts[t][i] << ",";
// cout << endl;
// }
}
//input is a list of pairs (i,j) where j is preferred over i.
void FeatureBREX::addPairwisePreferences(vector<pair<unsigned int,unsigned int> > prefs)
{
for(pair<unsigned int, unsigned int> p : prefs)
pairwise_preferences.push_back(p);
// cout <<"preferences" << endl;
// for(pair<unsigned int, unsigned int> p : pairwise_preferences)
// cout << "(" << p.first << ", " << p.second << ")" << endl;
}
void FeatureBREX::initializeMDP()
{
// if(sampling_flag == 0)
// {
// double* weights = new double[mdp->getNumFeatures()];
// for(unsigned int s=0; s<mdp->getNumFeatures(); s++)
// {
// weights[s] = (r_min+r_max)/2;
// }
// mdp->setFeatureWeights(weights);
// delete [] weights;
// }
// else if (sampling_flag == 1) //sample randomly from L1 unit ball
// {
// double* weights = sample_unit_L1_norm(mdp->getNumFeatures());
// mdp->setFeatureWeights(weights);
// delete [] weights;
// }
// else if(sampling_flag == 2)
// {
unsigned int numDims = mdp->getNumFeatures();
double* weights = new double[numDims];
for(unsigned int s=0; s<numDims; s++)
weights[s] = -1.0 / numDims;
// {
// if((rand() % 2) == 0)
// weights[s] = 1.0 / numDims;
// else
// weights[s] = -1.0 / numDims;
//// if(s == 0)
//// weights[s] = 1.0;
//// else
//// weights[s] = 0.0;
// }
// weights[0] = 0.2;
// weights[1] = 0.2;
// weights[2] = -0.2;
// weights[3] = 0.2;
// weights[4] = 0.2;
//weights[0] = 1.0;
mdp->setFeatureWeights(weights);
delete [] weights;
// }
// else if(sampling_flag == 3)
// {
// unsigned int numDims = mdp->getNumFeatures();
// double* weights = new double[numDims];
// for(unsigned int s=0; s<numDims; s++)
// weights[s] = 0.0;
//// {
//// if((rand() % 2) == 0)
//// weights[s] = 1.0 / numDims;
//// else
//// weights[s] = -1.0 / numDims;
////// if(s == 0)
////// weights[s] = 1.0;
////// else
////// weights[s] = 0.0;
//// }
//// weights[0] = 0.2;
//// weights[1] = 0.2;
//// weights[2] = -0.2;
//// weights[3] = 0.2;
//// weights[4] = 0.2;
// weights[0] = 1.0;
// mdp->setFeatureWeights(weights);
// delete [] weights;
// }
}
FeatureGridMDP* FeatureBREX::getMeanMDP(int burn, int skip)
{
//average rewards in chain
int nFeatures = mdp->getNumFeatures();
double aveWeights[nFeatures];
for(int i=0;i<nFeatures;i++) aveWeights[i] = 0;
int count = 0;
for(unsigned int i=burn; i<chain_length; i+=skip)
{
count++;
//(*(R_chain + i))->displayFeatureWeights();
//cout << "weights" << endl;
double* w = (*(R_chain + i))->getFeatureWeights();
for(int f=0; f < nFeatures; f++)
aveWeights[f] += w[f];
}
for(int f=0; f < nFeatures; f++)
aveWeights[f] /= count;
// //create new MDP with average weights as features
FeatureGridMDP* mean_mdp = new FeatureGridMDP(MAPmdp->getGridWidth(),MAPmdp->getGridHeight(), MAPmdp->getInitialStates(), MAPmdp->getTerminalStates(), MAPmdp->getNumFeatures(), aveWeights, MAPmdp->getStateFeatures(), MAPmdp->isStochastic(), MAPmdp->getDiscount());
mean_mdp->setWallStates(MAPmdp->getWallStates());
return mean_mdp;
}
#endif
| 36.114625 | 346 | 0.611306 | dsbrown1331 |
abe7f3ad7b2d8aa10aa5dac919ed75796d215c6b | 649 | hpp | C++ | include/armadillo_bits/glue_conv_bones.hpp | ArashMassoudieh/GIFMod_ | 1fa9eda21fab870fc3baf56462f79eb800d5154f | [
"MIT"
] | 5 | 2017-11-20T19:32:27.000Z | 2018-08-28T06:08:45.000Z | include/armadillo_bits/glue_conv_bones.hpp | ArashMassoudieh/GIFMod_ | 1fa9eda21fab870fc3baf56462f79eb800d5154f | [
"MIT"
] | 1 | 2017-07-04T05:40:30.000Z | 2017-07-04T05:43:37.000Z | include/armadillo_bits/glue_conv_bones.hpp | ArashMassoudieh/GIFMod_ | 1fa9eda21fab870fc3baf56462f79eb800d5154f | [
"MIT"
] | 2 | 2017-11-09T22:00:45.000Z | 2018-08-30T10:56:08.000Z | // Copyright (C) 2010-2015 Conrad Sanderson
// Copyright (C) 2010-2015 NICTA (www.nicta.com.au)
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//! \addtogroup glue_conv
//! @{
class glue_conv
{
public:
template<typename eT> inline static void apply_noalias(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B, const bool A_is_col);
template<typename T1, typename T2> inline static void apply(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_conv>& X);
};
//! @}
| 23.178571 | 128 | 0.684129 | ArashMassoudieh |
abe8932ed04afd54599641d77234d3e3c36ae565 | 148 | cpp | C++ | src/blockchain/Chain.cpp | perriera/blockchain | 2c89ecc110dcc9c042bdb919c7cf3017a43d4ce8 | [
"MIT"
] | null | null | null | src/blockchain/Chain.cpp | perriera/blockchain | 2c89ecc110dcc9c042bdb919c7cf3017a43d4ce8 | [
"MIT"
] | null | null | null | src/blockchain/Chain.cpp | perriera/blockchain | 2c89ecc110dcc9c042bdb919c7cf3017a43d4ce8 | [
"MIT"
] | null | null | null | #include "../../include/blockchain/Chain.hpp"
#include <iostream>
using namespace std;
string Chain::say_hello() const { return "Hello, world"; }
| 21.142857 | 58 | 0.709459 | perriera |
abea15dbeb4a2eca53e18bb902262f62ecbde7c1 | 2,785 | cpp | C++ | src/CText.cpp | Fabio3rs/COFF-to-GTAScript-Helper | dc606372c48dd4f50ac822b77b71d5c0ea765544 | [
"MIT"
] | null | null | null | src/CText.cpp | Fabio3rs/COFF-to-GTAScript-Helper | dc606372c48dd4f50ac822b77b71d5c0ea765544 | [
"MIT"
] | null | null | null | src/CText.cpp | Fabio3rs/COFF-to-GTAScript-Helper | dc606372c48dd4f50ac822b77b71d5c0ea765544 | [
"MIT"
] | null | null | null | /*
Config parser originally write to Guitar++ https://github.com/Fabio3rs/Guitar-PlusPlus
Write by Fabio3rs - https://github.com/Fabio3rs
*/
#include "CText.h"
#include <cctype>
#include <iostream>
void CText::Parse(){
if(fileName.length() == 0){
return;
}
if(is_open()){
file.close();
}
file.open(fileName, std::ios::in | std::ios::out | std::ios::binary);
if(!is_open()){
throw std::logic_error(std::string("Can't open file ") + fileName);
}
tables.clear();
char *content = nullptr;
file.seekg(0, std::ios::end);
fileSize = file.tellg();
file.seekg(0, std::ios::beg);
if(fileSize == -1L || fileSize == 0){
return;
}
content = new char[fileSize + 4];
memset(content, 0, fileSize + 4);
if(!content){
throw std::logic_error("Alloc space fail");
}
file.read(content, fileSize);
content[fileSize] = 0;
char bufferA[128], bufferB[2048];
integer workingInScope = 0;
table_t globalTable;
globalTable.name = "GLOBAL";
tables.push_back(globalTable);
for(size_t i = 0; i < fileSize; i++){
while(!isprint((unsigned char)content[i])) i++;
*bufferA = 0;
*bufferB = 0;
int scanResult = sscanf(&content[i], "%127s %2047[^\t\n\r]", bufferA, bufferB);
if(*bufferA == '@'){
integer tempWorkingScope = 0;
if((tempWorkingScope = getTableIDByName(&bufferA[1])) != -1){
workingInScope = tempWorkingScope;
}else if(bufferA[1]){
table_t newTable;
newTable.name = &bufferA[1];
tables.push_back(newTable);
workingInScope = tables.size() - (int64_t)1;
}else{
workingInScope = 0;
}
}
else if (*bufferA == '#'){
}
else{
field_t newField;
switch(scanResult){
case 2:
newField.content = bufferB;
case 1:
newField.name = bufferA;
tables[workingInScope].fields.push_back(newField);
break;
}
}
while(content[i] != '\n' && content[i] != '\r' && content[i] != 0) i++;
i--;
}
delete[] content;
}
void CText::open(const char *name, bool autoParse){
fileName = name;
if (autoParse) Parse();
}
CText::CText(){
fileSize = 0;
}
void CText::save(){
if (is_open()){
file.close();
}
file.open(fileName, std::ios::out | std::ios::trunc);
file.close();
file.open(fileName, std::ios::in | std::ios::out);
for (int i = 0, size = tables.size(); i < size; i++){
file << "@" << tables[i].name << "\n";
for (int j = 0, jsize = tables[i].fields.size(); j < jsize; j++){
file << tables[i].fields[j].name << " " << tables[i].fields[j].content << "\n";
}
file << "\n###### fstream bugs everywhere ######";
}
}
CText::CText(const char *name, bool autoParse){
fileName = name;
if(autoParse) Parse();
}
| 20.328467 | 87 | 0.578456 | Fabio3rs |
abecd1613f885db5ef555b4c4ef175aa571c8427 | 3,195 | cpp | C++ | isode++/code/iso/itu/osi/fsmc/cpp/FactoryForCpp.cpp | Kampbell/ISODE | 37f161e65f11348ef6fca2925d399d611df9f31b | [
"Apache-2.0"
] | 3 | 2016-01-18T17:00:00.000Z | 2021-06-25T03:18:13.000Z | isode++/code/iso/itu/osi/fsmc/cpp/FactoryForCpp.cpp | Kampbell/ISODE | 37f161e65f11348ef6fca2925d399d611df9f31b | [
"Apache-2.0"
] | null | null | null | isode++/code/iso/itu/osi/fsmc/cpp/FactoryForCpp.cpp | Kampbell/ISODE | 37f161e65f11348ef6fca2925d399d611df9f31b | [
"Apache-2.0"
] | null | null | null | /*
* FactoryForCpp.cpp
*
* Created on: 20 janv. 2016
* Author: FrancisANDRE
*/
#include "fsmc/cpp/FactoryForCpp.h"
#include "fsmc/cpp/ActionForCpp.h"
#include "fsmc/cpp/FSMForCpp.h"
#include "fsmc/cpp/GuardForCpp.h"
#include "fsmc/cpp/MapForCpp.h"
#include "fsmc/cpp/ParameterForCpp.h"
#include "fsmc/cpp/StateForCpp.h"
#include "fsmc/cpp/EntryForCpp.h"
#include "fsmc/cpp/ExitForCpp.h"
#include "fsmc/cpp/TransitionForCpp.h"
#include "fsmc/cpp/ReferenceForCpp.h"
#include "fsmc/cpp/VariableForCpp.h"
#include "fsmc/cpp/FunctionForCpp.h"
#include "fsmc/cpp/LiteralForCpp.h"
#include "fsmc/cpp/ArgumentForCpp.h"
#include "fsmc/cpp/UnaryOperationForCpp.h"
#include "fsmc/cpp/BinaryOperationForCpp.h"
namespace ALS {
namespace SMC {
namespace PARSER {
namespace CPP {
ActionPtr FactoryForCpp::newAction(const string& name, int lineno) const {
return new ActionForCpp(name, lineno);
}
FSMPtr FactoryForCpp::newFSM(Parser* parser) const {
return new FSMForCpp(parser);
}
GuardPtr FactoryForCpp::newGuard(const string& name, int lineno) const {
return new GuardForCpp(name, lineno);
}
MapPtr FactoryForCpp::newMap(const string& name, int lineno) const {
return new MapForCpp(name, lineno);
}
ParameterPtr FactoryForCpp::newParameter(const string& name, int lineno) const{
return new ParameterForCpp(name, lineno);
}
StatePtr FactoryForCpp::newState(const string& name, int lineno) const{
return new StateForCpp(name, lineno);
}
EntryPtr FactoryForCpp::newEntry(const string& name, int lineno) const{
return new EntryForCpp(name, lineno);
}
ExitPtr FactoryForCpp::newExit(const string& name, int lineno) const {
return new ExitForCpp(name, lineno);
}
TransitionPtr FactoryForCpp::newTransition(const string& name, int lineno) const{
return new TransitionForCpp(name, lineno);
}
ReferencePtr FactoryForCpp::newReference(const VariablePtr variable, int lineno) const {
return new ReferenceForCpp(variable, lineno);
}
ReferencePtr FactoryForCpp::newReference(const FunctionPtr function, int lineno) const {
return new ReferenceForCpp(function, lineno);
}
ReferencePtr FactoryForCpp::newReference(const LiteralPtr literal, int lineno) const {
return new ReferenceForCpp(literal, lineno);
}
VariablePtr FactoryForCpp::newVariable(const string& name, int lineno) const{
return new VariableForCpp(name, lineno);
}
FunctionPtr FactoryForCpp::newFunction(const string& name, int lineno) const{
return new FunctionForCpp(name, lineno);
}
LiteralPtr FactoryForCpp::newLiteral(const string& name, int lineno) const{
return new LiteralForCpp(name, lineno);
}
ArgumentPtr FactoryForCpp::newArgument(const string& name, int lineno) const{
return new ArgumentForCpp(name, lineno);
}
UnaryOperationPtr FactoryForCpp::newUnaryOperation(ALS::SMC::MODEL::Operator op) const{
return new UnaryOperationForCpp(op);
}
BinaryOperationPtr FactoryForCpp::newBinaryOperation(ALS::SMC::MODEL::Operator op) const{
return new BinaryOperationForCpp(op);
}
}
}
}
} | 35.898876 | 93 | 0.723005 | Kampbell |
abedd777ba804ca48cd854ad5697bada7a81b89b | 1,458 | cxx | C++ | Libraries/VspData/vtkVsTrackInfo.cxx | PinkDiamond1/vivia | 70f7fbed4b33b14d34de35c69b2b14df3514d720 | [
"BSD-3-Clause"
] | 14 | 2016-09-16T12:33:05.000Z | 2021-02-14T02:16:33.000Z | Libraries/VspData/vtkVsTrackInfo.cxx | PinkDiamond1/vivia | 70f7fbed4b33b14d34de35c69b2b14df3514d720 | [
"BSD-3-Clause"
] | 44 | 2016-10-06T22:12:57.000Z | 2021-01-07T19:39:07.000Z | Libraries/VspData/vtkVsTrackInfo.cxx | PinkDiamond1/vivia | 70f7fbed4b33b14d34de35c69b2b14df3514d720 | [
"BSD-3-Clause"
] | 17 | 2015-06-30T13:41:47.000Z | 2021-11-22T17:38:48.000Z | // This file is part of ViViA, and is distributed under the
// OSI-approved BSD 3-Clause License. See top-level LICENSE file or
// https://github.com/Kitware/vivia/blob/master/LICENSE for details.
#include "vtkVsTrackInfo.h"
vtkImplementMetaObject(vtkVsTrackInfo, vtkVgEventTrackInfoBase);
//-----------------------------------------------------------------------------
vtkVsTrackInfo::vtkVsTrackInfo(
vsTrackId tid, const vtkVgTimeStamp& start, const vtkVgTimeStamp& end)
: vtkVgEventTrackInfoBase(-1, start, end), LogicalId(tid)
{
}
//-----------------------------------------------------------------------------
vtkVsTrackInfo::vtkVsTrackInfo(const vtkVsTrackInfo& other)
: vtkVgEventTrackInfoBase(other), LogicalId(other.LogicalId)
{
}
//-----------------------------------------------------------------------------
vtkVsTrackInfo::~vtkVsTrackInfo()
{
}
//-----------------------------------------------------------------------------
vtkVgEventTrackInfoBase* vtkVsTrackInfo::Clone() const
{
return new vtkVsTrackInfo(*this);
}
//-----------------------------------------------------------------------------
const char* vtkVsTrackInfo::CheckValid() const
{
if (this->LogicalId.Source < 0)
{
return "Only non-negative track sources are allowed.\n";
}
if (this->LogicalId.SerialNumber < 0)
{
return "Only non-negative track serial numbers are allowed.\n";
}
return vtkVgEventTrackInfoBase::CheckBaseValid();
}
| 30.375 | 79 | 0.542524 | PinkDiamond1 |
743970192dbe7ca1635dd25fdfaed1663a92f945 | 750 | cpp | C++ | mpi/cxx/other/type_matching.cpp | dmitrygx/HPCInfo | a41f701cc5a8f8b48b71967bd5b7b4b688856a6e | [
"MIT"
] | 210 | 2015-03-17T21:49:39.000Z | 2022-03-26T14:18:19.000Z | mpi/cxx/other/type_matching.cpp | dmitrygx/HPCInfo | a41f701cc5a8f8b48b71967bd5b7b4b688856a6e | [
"MIT"
] | 7 | 2015-12-13T05:06:47.000Z | 2020-11-11T02:16:00.000Z | mpi/cxx/other/type_matching.cpp | dmitrygx/HPCInfo | a41f701cc5a8f8b48b71967bd5b7b4b688856a6e | [
"MIT"
] | 55 | 2015-03-24T05:19:30.000Z | 2022-03-19T23:44:28.000Z | #include <iostream>
#include <climits>
#include <cstdint>
class Foo
{
public:
//Foo(int i) { std::cout << "Foo(I=" << i << ")" << std::endl; }
Foo(long i) { std::cout << "Foo(L=" << i << ")" << std::endl; }
//Foo(long long i) { std::cout << "Foo(LL=" << i << ")" << std::endl; }
Foo(unsigned int i) { std::cout << "Foo(UI=" << i << ")" << std::endl; }
//Foo(unsigned long i) { std::cout << "Foo(UL=" << i << ")" << std::endl; }
//Foo(unsigned long long i) { std::cout << "Foo(ULL=" << i << ")" << std::endl; }
};
int main(void)
{
char c = 7;
short s = 37;
int i = INT_MIN;
unsigned u = UINT_MAX;
Foo C(c);
Foo S(s);
Foo I(i);
Foo U(u);
return 0;
}
| 26.785714 | 89 | 0.445333 | dmitrygx |
743a8842b3091b531819bf40c8a6e9a0a86fd7a7 | 44 | cpp | C++ | engine/src/wolf.system/wolf.cpp | SiminBadri/Wolf.Engine | 3da04471ec26e162e1cbb7cc88c7ce37ee32c954 | [
"BSL-1.0",
"Apache-2.0",
"libpng-2.0"
] | 1 | 2020-07-15T13:14:26.000Z | 2020-07-15T13:14:26.000Z | engine/src/wolf.system/wolf.cpp | foroughmajidi/Wolf.Engine | f08a8cbd519ca2c70b1c8325250dc9af7ac4c498 | [
"BSL-1.0",
"Apache-2.0",
"libpng-2.0"
] | null | null | null | engine/src/wolf.system/wolf.cpp | foroughmajidi/Wolf.Engine | f08a8cbd519ca2c70b1c8325250dc9af7ac4c498 | [
"BSL-1.0",
"Apache-2.0",
"libpng-2.0"
] | null | null | null | #include "w_system_pch.h"
#include "wolf.h"
| 14.666667 | 25 | 0.727273 | SiminBadri |
743b4c50eaed31f885e75d5392de88ffc68400d3 | 25,971 | cpp | C++ | test/src/json/json_serialize_test.cpp | emseers/eelbot-framework | f5fec8357df2edcbd0bd2f8acfc86983970adbba | [
"MIT"
] | 2 | 2020-06-14T03:39:45.000Z | 2020-08-30T00:24:47.000Z | test/src/json/json_serialize_test.cpp | Emseers/eelbot-framework | f5fec8357df2edcbd0bd2f8acfc86983970adbba | [
"MIT"
] | 1 | 2021-04-30T03:18:54.000Z | 2021-05-10T01:56:53.000Z | test/src/json/json_serialize_test.cpp | emseers/eelbot-framework | f5fec8357df2edcbd0bd2f8acfc86983970adbba | [
"MIT"
] | null | null | null | // Part of the Eelbot Framework project, under the MIT License.
// Copyright (c) 2020 The Emseers.
#include "catch2/catch_test_macros.hpp"
#include "eelbot_framework/discord_bot/structs.hpp"
#include "eelbot_framework/json.hpp"
TEST_CASE("discord_bot::session_start_limit can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::session_start_limit session_start_limit;
session_start_limit.total = 1;
session_start_limit.remaining = -2;
session_start_limit.reset_after = 0;
REQUIRE(eelbot_framework::to_json_str(session_start_limit) == "{\"remaining\":-2,\"reset_after\":0,\"total\":1}");
}
TEST_CASE("discord_bot::gateway_response can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::gateway_response gateway_response;
gateway_response.url = "https://github.com/Emseers/eelbot-framework";
REQUIRE(
eelbot_framework::to_json_str(gateway_response) == "{\"url\":\"https://github.com/Emseers/eelbot-framework\"}");
}
TEST_CASE("discord_bot::gateway_bot_response can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::session_start_limit session_start_limit;
session_start_limit.total = 1;
session_start_limit.remaining = -2;
session_start_limit.reset_after = 0;
eelbot_framework::discord_bot::gateway_bot_response gateway_bot_response;
gateway_bot_response.url = "https://github.com/Emseers/eelbot-framework";
gateway_bot_response.shards = 99;
gateway_bot_response.sess_start_limit = session_start_limit;
REQUIRE(eelbot_framework::to_json_str(gateway_bot_response) ==
"{\"session_start_limit\":{\"remaining\":-2,\"reset_after\":0,\"total\":1},"
"\"shards\":99,\"url\":\"https://github.com/Emseers/eelbot-framework\"}");
}
TEST_CASE("discord_bot::shard_info can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::shard_info shard_info;
shard_info.shard_id = 1;
shard_info.num_shards = 2;
REQUIRE(eelbot_framework::to_json_str(shard_info) == "[1,2]");
}
TEST_CASE("discord_bot::party_size_info can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::party_size_info party_size_info;
party_size_info.current_size = 3;
party_size_info.max_size = 5;
REQUIRE(eelbot_framework::to_json_str(party_size_info) == "[3,5]");
}
TEST_CASE("discord_bot::activity_timestamps can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::activity_timestamps activity_timestamps;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(activity_timestamps) == "{\"end\":null,\"start\":null}");
}
SECTION("serialize some optional fields being null") {
activity_timestamps.start = 500;
REQUIRE(eelbot_framework::to_json_str(activity_timestamps) == "{\"end\":null,\"start\":500}");
}
SECTION("serialize no optional fields being null") {
activity_timestamps.start = 500;
activity_timestamps.end = 1000;
REQUIRE(eelbot_framework::to_json_str(activity_timestamps) == "{\"end\":1000,\"start\":500}");
}
}
TEST_CASE("discord_bot::activity_emoji can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::activity_emoji activity_emoji;
activity_emoji.name = "eel";
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(activity_emoji) == "{\"animated\":null,\"id\":null,\"name\":\"eel\"}");
}
SECTION("serialize some optional fields being null") {
activity_emoji.id = "123456789";
REQUIRE(eelbot_framework::to_json_str(activity_emoji) ==
"{\"animated\":null,\"id\":\"123456789\",\"name\":\"eel\"}");
}
SECTION("serialize no optional fields being null") {
activity_emoji.id = "123456789";
activity_emoji.animated = false;
REQUIRE(eelbot_framework::to_json_str(activity_emoji) ==
"{\"animated\":false,\"id\":\"123456789\",\"name\":\"eel\"}");
}
}
TEST_CASE("discord_bot::activity_party can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::activity_party activity_party;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(activity_party) == "{\"id\":null,\"size\":null}");
}
SECTION("serialize some optional fields being null") {
activity_party.id = "123456789";
REQUIRE(eelbot_framework::to_json_str(activity_party) == "{\"id\":\"123456789\",\"size\":null}");
}
SECTION("serialize no optional fields being null") {
eelbot_framework::discord_bot::party_size_info party_size_info;
party_size_info.current_size = 3;
party_size_info.max_size = 5;
activity_party.id = "123456789";
activity_party.size = party_size_info;
REQUIRE(eelbot_framework::to_json_str(activity_party) == "{\"id\":\"123456789\",\"size\":[3,5]}");
}
}
TEST_CASE("discord_bot::activity_assets can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::activity_assets activity_assets;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(activity_assets) ==
"{\"large_image\":null,\"large_text\":null,\"small_image\":null,\"small_text\":null}");
}
SECTION("serialize some optional fields being null") {
activity_assets.large_image = "123456789";
activity_assets.small_text = "tooltip";
REQUIRE(eelbot_framework::to_json_str(activity_assets) ==
"{\"large_image\":\"123456789\",\"large_text\":null,\"small_image\":null,"
"\"small_text\":\"tooltip\"}");
}
SECTION("serialize no optional fields being null") {
activity_assets.large_image = "123456789";
activity_assets.large_text = "tooltip";
activity_assets.small_image = "123456789";
activity_assets.small_text = "tooltip";
REQUIRE(eelbot_framework::to_json_str(activity_assets) ==
"{\"large_image\":\"123456789\",\"large_text\":\"tooltip\",\"small_image\":\"123456789\","
"\"small_text\":\"tooltip\"}");
}
}
TEST_CASE("discord_bot::activity_secrets can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::activity_secrets activity_secrets;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(activity_secrets) == "{\"join\":null,\"match\":null,\"spectate\":null}");
}
SECTION("serialize some optional fields being null") {
activity_secrets.join = "secret one";
REQUIRE(eelbot_framework::to_json_str(activity_secrets) ==
"{\"join\":\"secret one\",\"match\":null,\"spectate\":null}");
}
SECTION("serialize no optional fields being null") {
activity_secrets.join = "secret one";
activity_secrets.spectate = "secret two";
activity_secrets.match = "secret three";
REQUIRE(eelbot_framework::to_json_str(activity_secrets) ==
"{\"join\":\"secret one\",\"match\":\"secret three\",\"spectate\":\"secret two\"}");
}
}
TEST_CASE("discord_bot::activity can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::activity activity;
activity.name = "activity";
activity.type = 1;
activity.created_at = 500;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(activity) ==
"{\"application_id\":null,\"assets\":null,\"created_at\":500,\"details\":null,"
"\"emoji\":null,\"flags\":null,\"instance\":null,\"name\":\"activity\",\"party\":null,"
"\"secrets\":null,\"state\":null,\"timestamps\":null,\"type\":1,\"url\":null}");
}
SECTION("serialize some optional fields being null") {
eelbot_framework::discord_bot::activity_timestamps activity_timestamps;
activity_timestamps.start = 500;
eelbot_framework::discord_bot::activity_secrets activity_secrets;
activity.url = "https://github.com/Emseers/eelbot-framework";
activity.timestamps = activity_timestamps;
activity.secrets = activity_secrets;
REQUIRE(eelbot_framework::to_json_str(activity) ==
"{\"application_id\":null,\"assets\":null,\"created_at\":500,\"details\":null,"
"\"emoji\":null,\"flags\":null,\"instance\":null,\"name\":\"activity\",\"party\":null,"
"\"secrets\":{\"join\":null,\"match\":null,\"spectate\":null},\"state\":null,"
"\"timestamps\":{\"end\":null,\"start\":500},\"type\":1,\"url\":\"https://github.com/"
"Emseers/eelbot-framework\"}");
}
SECTION("serialize no optional fields being null") {
eelbot_framework::discord_bot::activity_timestamps activity_timestamps;
activity_timestamps.start = 500;
eelbot_framework::discord_bot::activity_emoji activity_emoji;
activity_emoji.name = "eel";
eelbot_framework::discord_bot::activity_party activity_party;
eelbot_framework::discord_bot::activity_assets activity_assets;
eelbot_framework::discord_bot::activity_secrets activity_secrets;
activity.url = "https://github.com/Emseers/eelbot-framework";
activity.timestamps = activity_timestamps;
activity.application_id = "123456789";
activity.details = "something";
activity.state = "in a match";
activity.emoji = activity_emoji;
activity.party = activity_party;
activity.assets = activity_assets;
activity.secrets = activity_secrets;
activity.instance = true;
activity.flags = 512;
REQUIRE(eelbot_framework::to_json_str(activity) ==
"{\"application_id\":\"123456789\",\"assets\":{\"large_image\":null,\"large_text\":"
"null,\"small_image\":null,\"small_text\":null},\"created_at\":500,\"details\":"
"\"something\",\"emoji\":{\"animated\":null,\"id\":null,\"name\":\"eel\"},\"flags\":512,"
"\"instance\":true,\"name\":\"activity\",\"party\":{\"id\":null,\"size\":null},\"secrets\":"
"{\"join\":null,\"match\":null,\"spectate\":null},\"state\":\"in a match\",\"timestamps\":"
"{\"end\":null,\"start\":500},\"type\":1,\"url\":\"https://github.com/Emseers/eelbot-"
"framework\"}");
}
}
TEST_CASE("discord_bot::status_type can be serialized to JSON", "[unit-test][json]") {
SECTION("serialize status_type = online") {
REQUIRE(eelbot_framework::to_json_str(eelbot_framework::discord_bot::status_type::online) == "\"online\"");
}
SECTION("serialize status_type = dnd") {
REQUIRE(eelbot_framework::to_json_str(eelbot_framework::discord_bot::status_type::dnd) == "\"dnd\"");
}
SECTION("serialize status_type = idle") {
REQUIRE(eelbot_framework::to_json_str(eelbot_framework::discord_bot::status_type::idle) == "\"idle\"");
}
SECTION("serialize status_type = invisible") {
REQUIRE(
eelbot_framework::to_json_str(eelbot_framework::discord_bot::status_type::invisible) == "\"invisible\"");
}
SECTION("serialize status_type = offline") {
REQUIRE(eelbot_framework::to_json_str(eelbot_framework::discord_bot::status_type::offline) == "\"offline\"");
}
}
TEST_CASE("discord_bot::status_update can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::status_update status_update;
status_update.status = eelbot_framework::discord_bot::status_type::online;
status_update.afk = false;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(status_update) ==
"{\"activities\":null,\"afk\":false,\"since\":null,\"status\":\"online\"}");
}
SECTION("serialize some optional fields being null") {
status_update.since = 500;
REQUIRE(eelbot_framework::to_json_str(status_update) ==
"{\"activities\":null,\"afk\":false,\"since\":500,\"status\":\"online\"}");
}
SECTION("serialize no optional fields being null") {
eelbot_framework::discord_bot::activity activity_one;
activity_one.name = "activity one";
activity_one.type = 1;
activity_one.created_at = 500;
eelbot_framework::discord_bot::activity activity_two;
activity_two.name = "activity two";
activity_two.type = 0;
activity_two.created_at = 1000;
status_update.since = 500;
status_update.activities.push_back(activity_one);
status_update.activities.push_back(activity_two);
REQUIRE(eelbot_framework::to_json_str(status_update) ==
"{\"activities\":[{\"application_id\":null,\"assets\":null,\"created_at\":500,"
"\"details\":null,\"emoji\":null,\"flags\":null,\"instance\":null,\"name\":\"activity "
"one\",\"party\":null,\"secrets\":null,\"state\":null,\"timestamps\":null,\"type\":1,"
"\"url\":null},{\"application_id\":null,\"assets\":null,\"created_at\":1000,\"details\":"
"null,\"emoji\":null,\"flags\":null,\"instance\":null,\"name\":\"activity two\",\"party\":"
"null,\"secrets\":null,\"state\":null,\"timestamps\":null,\"type\":0,\"url\":null}],"
"\"afk\":false,\"since\":500,\"status\":\"online\"}");
}
}
TEST_CASE("discord_bot::user can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::user user;
user.id = "123456789";
user.username = "eel";
user.discriminator = "1337";
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(user) ==
"{\"avatar\":null,\"bot\":null,\"discriminator\":\"1337\",\"email\":null,\"flags\":null,"
"\"id\":\"123456789\",\"locale\":null,\"mfa_enabled\":null,\"premium_type\":null,"
"\"public_flags\":null,\"system\":null,\"username\":\"eel\",\"verified\":null}");
}
SECTION("serialize some optional fields being null") {
user.avatar = "avatar";
user.bot = true;
user.email = "eel@emseers.com";
user.flags = 64;
REQUIRE(eelbot_framework::to_json_str(user) ==
"{\"avatar\":\"avatar\",\"bot\":true,\"discriminator\":\"1337\",\"email\":\"eel@emseers."
"com\",\"flags\":64,\"id\":\"123456789\",\"locale\":null,\"mfa_enabled\":null,"
"\"premium_type\":null,\"public_flags\":null,\"system\":null,\"username\":\"eel\","
"\"verified\":null}");
}
SECTION("serialize no optional fields being null") {
user.avatar = "avatar";
user.bot = true;
user.system = false;
user.mfa_enabled = false;
user.locale = "en";
user.verified = false;
user.email = "eel@emseers.com";
user.flags = 64;
user.premium_type = 1;
user.public_flags = 64;
REQUIRE(eelbot_framework::to_json_str(user) ==
"{\"avatar\":\"avatar\",\"bot\":true,\"discriminator\":\"1337\",\"email\":\"eel@emseers."
"com\",\"flags\":64,\"id\":\"123456789\",\"locale\":\"en\",\"mfa_enabled\":false,"
"\"premium_type\":1,\"public_flags\":64,\"system\":false,\"username\":\"eel\","
"\"verified\":false}");
}
}
TEST_CASE("discord_bot::unavailable_guild can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::unavailable_guild unavailable_guild;
unavailable_guild.id = "123456789";
unavailable_guild.unavailable = true;
REQUIRE(eelbot_framework::to_json_str(unavailable_guild) == "{\"id\":\"123456789\",\"unavailable\":true}");
}
TEST_CASE("discord_bot::partial_application can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::partial_application partial_application;
partial_application.id = "123456789";
partial_application.flags = 64;
REQUIRE(eelbot_framework::to_json_str(partial_application) == "{\"flags\":64,\"id\":\"123456789\"}");
}
TEST_CASE("discord_bot::identify_connection_properties can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::identify_connection_properties identify_connection_properties;
identify_connection_properties.os = "linux";
identify_connection_properties.browser = "eelbot_framework";
identify_connection_properties.device = "eelbot_framework";
REQUIRE(eelbot_framework::to_json_str(identify_connection_properties) ==
"{\"$browser\":\"eelbot_framework\",\"$device\":\"eelbot_framework\",\"$os\":\"linux\"}");
}
TEST_CASE("discord_bot::identify can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::identify_connection_properties identify_connection_properties;
identify_connection_properties.os = "linux";
identify_connection_properties.browser = "eelbot_framework";
identify_connection_properties.device = "eelbot_framework";
eelbot_framework::discord_bot::identify identify;
identify.token = "token";
identify.properties = identify_connection_properties;
identify.intents = 7;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(identify) ==
"{\"compress\":null,\"guild_subscriptions\":null,\"intents\":7,\"large_treshold\":"
"null,\"presence\":null,\"properties\":{\"$browser\":\"eelbot_framework\",\"$device\":"
"\"eelbot_framework\",\"$os\":\"linux\"},\"shard\":null,\"token\":\"token\"}");
}
SECTION("serialize some optional fields being null") {
eelbot_framework::discord_bot::status_update status_update;
status_update.status = eelbot_framework::discord_bot::status_type::online;
status_update.afk = false;
identify.compress = false;
identify.presence = status_update;
REQUIRE(eelbot_framework::to_json_str(identify) ==
"{\"compress\":false,\"guild_subscriptions\":null,\"intents\":7,\"large_treshold\":"
"null,\"presence\":{\"activities\":null,\"afk\":false,\"since\":null,\"status\":"
"\"online\"},\"properties\":{\"$browser\":\"eelbot_framework\",\"$device\":"
"\"eelbot_framework\",\"$os\":\"linux\"},\"shard\":null,\"token\":\"token\"}");
}
SECTION("serialize no optional fields being null") {
eelbot_framework::discord_bot::shard_info shard_info;
shard_info.shard_id = 1;
shard_info.num_shards = 2;
eelbot_framework::discord_bot::status_update status_update;
status_update.status = eelbot_framework::discord_bot::status_type::online;
status_update.afk = false;
identify.compress = false;
identify.large_treshold = 250;
identify.shard = shard_info;
identify.presence = status_update;
identify.guild_subscriptions = false;
REQUIRE(eelbot_framework::to_json_str(identify) ==
"{\"compress\":false,\"guild_subscriptions\":false,\"intents\":7,\"large_treshold\":"
"250,\"presence\":{\"activities\":null,\"afk\":false,\"since\":null,\"status\":\"online\"}"
",\"properties\":{\"$browser\":\"eelbot_framework\",\"$device\":\"eelbot_framework\","
"\"$os\":\"linux\"},\"shard\":[1,2],\"token\":\"token\"}");
}
}
TEST_CASE("discord_bot::resume can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::resume resume;
resume.token = "token";
resume.session_id = "123456789";
resume.seq = 5;
REQUIRE(eelbot_framework::to_json_str(resume) == "{\"seq\":5,\"session_id\":\"123456789\",\"token\":\"token\"}");
}
TEST_CASE("discord_bot::hello can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::hello hello;
hello.heartbeat_interval = 45000;
REQUIRE(eelbot_framework::to_json_str(hello) == "{\"heartbeat_interval\":45000}");
}
TEST_CASE("discord_bot::ready can be serialized to JSON", "[unit-test][json]") {
eelbot_framework::discord_bot::user user;
user.id = "123456789";
user.username = "eel";
user.discriminator = "1337";
eelbot_framework::discord_bot::unavailable_guild unavailable_guild_1;
unavailable_guild_1.id = "123456789";
unavailable_guild_1.unavailable = true;
eelbot_framework::discord_bot::unavailable_guild unavailable_guild_2;
unavailable_guild_2.id = "987654321";
unavailable_guild_2.unavailable = true;
eelbot_framework::discord_bot::partial_application partial_application;
partial_application.id = "123456789";
partial_application.flags = 64;
eelbot_framework::discord_bot::ready ready;
ready.v = 8;
ready.user_info = user;
ready.guilds.push_back(unavailable_guild_1);
ready.guilds.push_back(unavailable_guild_2);
ready.session_id = "123456789";
ready.application = partial_application;
SECTION("serialize all optional fields being null") {
REQUIRE(eelbot_framework::to_json_str(ready) ==
"{\"application\":{\"flags\":64,\"id\":\"123456789\"},\"guilds\":[{\"id\":\"123456789\","
"\"unavailable\":true},{\"id\":\"987654321\",\"unavailable\":true}],"
"\"private_channels\":[],\"session_id\":\"123456789\",\"shard\":null,\"user\":{\"avatar\":"
"null,\"bot\":null,\"discriminator\":\"1337\",\"email\":null,\"flags\":null,\"id\":"
"\"123456789\",\"locale\":null,\"mfa_enabled\":null,\"premium_type\":null,"
"\"public_flags\":null,\"system\":null,\"username\":\"eel\",\"verified\":null},\"v\":8}");
}
SECTION("serialize no optional fields being null") {
eelbot_framework::discord_bot::shard_info shard_info;
shard_info.shard_id = 1;
shard_info.num_shards = 2;
ready.shard = shard_info;
REQUIRE(eelbot_framework::to_json_str(ready) ==
"{\"application\":{\"flags\":64,\"id\":\"123456789\"},\"guilds\":[{\"id\":\"123456789\","
"\"unavailable\":true},{\"id\":\"987654321\",\"unavailable\":true}],"
"\"private_channels\":[],\"session_id\":\"123456789\",\"shard\":[1,2],\"user\":"
"{\"avatar\":null,\"bot\":null,\"discriminator\":\"1337\",\"email\":null,\"flags\":null,"
"\"id\":\"123456789\",\"locale\":null,\"mfa_enabled\":null,\"premium_type\":null,"
"\"public_flags\":null,\"system\":null,\"username\":\"eel\",\"verified\":null},\"v\":8}");
}
}
TEST_CASE("discord_bot::payload can be serialized to JSON", "[unit-test][json]") {
SECTION("serialize ready payload") {
eelbot_framework::discord_bot::user user;
user.id = "123456789";
user.username = "eel";
user.discriminator = "1337";
eelbot_framework::discord_bot::unavailable_guild unavailable_guild_1;
unavailable_guild_1.id = "123456789";
unavailable_guild_1.unavailable = true;
eelbot_framework::discord_bot::unavailable_guild unavailable_guild_2;
unavailable_guild_2.id = "987654321";
unavailable_guild_2.unavailable = true;
eelbot_framework::discord_bot::partial_application partial_application;
partial_application.id = "123456789";
partial_application.flags = 64;
eelbot_framework::discord_bot::ready ready;
ready.v = 8;
ready.user_info = user;
ready.guilds.push_back(unavailable_guild_1);
ready.guilds.push_back(unavailable_guild_2);
ready.session_id = "123456789";
ready.application = partial_application;
eelbot_framework::discord_bot::payload payload;
payload.op = eelbot_framework::discord_bot::opcode::dispatch;
payload.t = eelbot_framework::discord_bot::event::ready;
payload.d = ready;
REQUIRE(eelbot_framework::to_json_str(payload) ==
"{\"d\":{\"application\":{\"flags\":64,\"id\":\"123456789\"},\"guilds\":[{\"id\":"
"\"123456789\",\"unavailable\":true},{\"id\":\"987654321\",\"unavailable\":true}],"
"\"private_channels\":[],\"session_id\":\"123456789\",\"shard\":null,\"user\":{\"avatar\":"
"null,\"bot\":null,\"discriminator\":\"1337\",\"email\":null,\"flags\":null,\"id\":"
"\"123456789\",\"locale\":null,\"mfa_enabled\":null,\"premium_type\":null,"
"\"public_flags\":null,\"system\":null,\"username\":\"eel\",\"verified\":null},\"v\":8},"
"\"op\":0,\"s\":null,\"t\":\"READY\"}");
}
SECTION("serialize heartbeat payload with null seq") {
eelbot_framework::discord_bot::payload payload;
payload.op = eelbot_framework::discord_bot::opcode::heartbeat;
payload.d = -1;
REQUIRE(eelbot_framework::to_json_str(payload) == "{\"d\":null,\"op\":1,\"s\":null,\"t\":null}");
}
SECTION("serialize heartbeat payload without null seq") {
eelbot_framework::discord_bot::payload payload;
payload.op = eelbot_framework::discord_bot::opcode::heartbeat;
payload.d = 3;
REQUIRE(eelbot_framework::to_json_str(payload) == "{\"d\":3,\"op\":1,\"s\":null,\"t\":null}");
}
SECTION("serialize identify payload") {
eelbot_framework::discord_bot::identify_connection_properties identify_connection_properties;
identify_connection_properties.os = "linux";
identify_connection_properties.browser = "eelbot_framework";
identify_connection_properties.device = "eelbot_framework";
eelbot_framework::discord_bot::identify identify;
identify.token = "token";
identify.properties = identify_connection_properties;
identify.intents = 7;
eelbot_framework::discord_bot::payload payload;
payload.op = eelbot_framework::discord_bot::opcode::identify;
payload.d = identify;
REQUIRE(eelbot_framework::to_json_str(payload) ==
"{\"d\":{\"compress\":null,\"guild_subscriptions\":null,\"intents\":7,"
"\"large_treshold\":null,\"presence\":null,\"properties\":{\"$browser\":"
"\"eelbot_framework\",\"$device\":\"eelbot_framework\",\"$os\":\"linux\"},\"shard\":null,"
"\"token\":\"token\"},\"op\":2,\"s\":null,\"t\":null}");
}
SECTION("serialize hello payload") {
eelbot_framework::discord_bot::hello hello;
hello.heartbeat_interval = 45000;
eelbot_framework::discord_bot::payload payload;
payload.op = eelbot_framework::discord_bot::opcode::hello;
payload.d = hello;
REQUIRE(eelbot_framework::to_json_str(payload) ==
"{\"d\":{\"heartbeat_interval\":45000},\"op\":10,\"s\":null,\"t\":null}");
}
SECTION("serialize resume payload") {
eelbot_framework::discord_bot::resume resume;
resume.token = "token";
resume.session_id = "123456789";
resume.seq = 5;
eelbot_framework::discord_bot::payload payload;
payload.op = eelbot_framework::discord_bot::opcode::resume;
payload.d = resume;
REQUIRE(eelbot_framework::to_json_str(payload) ==
"{\"d\":{\"seq\":5,\"session_id\":\"123456789\",\"token\":\"token\"},\"op\":6,\"s\":null,\"t\":"
"null}");
}
}
| 42.092382 | 117 | 0.675754 | emseers |
743b9ca0eac07bbe1eaf42155ed18fdd7bf5f912 | 15,507 | cxx | C++ | panda/src/glstuff/glmisc_src.cxx | kestred/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | 3 | 2018-03-09T12:07:29.000Z | 2021-02-25T06:50:25.000Z | panda/src/glstuff/glmisc_src.cxx | Sinkay/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | null | null | null | panda/src/glstuff/glmisc_src.cxx | Sinkay/panda3d | 16bfd3750f726a8831771b81649d18d087917fd5 | [
"PHP-3.01",
"PHP-3.0"
] | null | null | null | // Filename: glmisc_src.cxx
// Created by: drose (09Feb04)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#include "pandaSystem.h"
ConfigVariableInt gl_version
("gl-version", "",
PRC_DESC("Set this to get an OpenGL context with a specific version."));
ConfigVariableBool gl_support_fbo
("gl-support-fbo", true,
PRC_DESC("Configure this false if your GL's implementation of "
"EXT_framebuffer_object is broken. The system might still be "
"able to create buffers using pbuffers or the like."));
ConfigVariableBool gl_cheap_textures
("gl-cheap-textures", false,
PRC_DESC("Configure this true to glHint the textures into the cheapest "
"possible mode."));
ConfigVariableBool gl_ignore_clamp
("gl-ignore-clamp", false,
PRC_DESC("Configure this true to disable texture clamp mode (all textures "
"repeat, a little cheaper for software renderers)."));
ConfigVariableBool gl_support_clamp_to_border
("gl-support-clamp-to-border", true,
PRC_DESC("Configure this true to enable the use of the clamp_to_border "
"extension if the GL claims to support it, or false not to "
"use it even if it appears to be available. (On some OpenGL "
"drivers, enabling this mode can force software rendering.)"));
ConfigVariableBool gl_support_rescale_normal
("gl-support-rescale-normal", true,
PRC_DESC("Configure this true to enable the use of the rescale_normal "
"extension if the GL claims to support it, or false not to use "
"it even if it appears to be available. (This appears to be "
"buggy on some drivers.)"));
ConfigVariableBool gl_ignore_filters
("gl-ignore-filters", false,
PRC_DESC("Configure this true to disable any texture filters at all (forcing "
"point sampling)."));
ConfigVariableBool gl_ignore_mipmaps
("gl-ignore-mipmaps", false,
PRC_DESC("Configure this true to disable mipmapping only."));
ConfigVariableBool gl_force_mipmaps
("gl-force-mipmaps", false,
PRC_DESC("Configure this true to enable full trilinear mipmapping on every "
"texture, whether it asks for it or not."));
ConfigVariableBool gl_show_texture_usage
("gl-show-texture-usage", false,
PRC_DESC("If you set this true, the screen will flash with textures drawn "
"in a special mode that shows the mipmap detail level and texture "
"size for each texture. Textures will be drawn in blue for "
"mipmap level 0, yellow for mipmap level 1, and red for all higher "
"mipmap levels. Brighter colors represent larger textures."));
ConfigVariableInt gl_show_texture_usage_max_size
("gl-show-texture-usage-max-size", 1024,
PRC_DESC("Specifies the texture size (along one side) of the largest "
"texture expected to be loaded. This controls the assignment "
"of the texture color in gl-show-texture-usage mode; colors "
"will be fully bright for textures of this size or larger."));
ConfigVariableBool gl_color_mask
("gl-color-mask", true,
PRC_DESC("Configure this false if your GL's implementation of glColorMask() "
"is broken (some are). This will force the use of a (presumably) "
"more expensive blending operation instead."));
ConfigVariableBool gl_support_occlusion_query
("gl-support-occlusion-query", true,
PRC_DESC("Configure this true to enable the use of the occlusion_query "
"extension if the GL claims to support it, or false not to "
"use it even if it appears to be available. (On some OpenGL "
"drivers, enabling this mode can force software rendering.)"));
ConfigVariableBool gl_compile_and_execute
("gl-compile-and-execute", false,
PRC_DESC("Configure this true if you know your GL's implementation of "
"glNewList(n, GL_COMPILE_AND_EXECUTE) works. It is "
"false by default, since it is known to cause a crash with "
"Intel 855GM driver 4.14.10.3889 at least. Turning this on "
"*may* reduce the chug you get for preparing display lists "
"for the first time, by allowing the display list to be "
"rendered at the same time it is being compiled."));
ConfigVariableBool gl_interleaved_arrays
("gl-interleaved-arrays", false,
PRC_DESC("Set this true to convert OpenGL geometry such that the "
"primary data columns vertex, normal, color, and texcoord "
"are interleaved into one array when possible, or false to "
"render geometry as it appears in the GeomVertexData. See "
"also gl-parallel-arrays."));
ConfigVariableBool gl_parallel_arrays
("gl-parallel-arrays", false,
PRC_DESC("Set this true to convert OpenGL geometry such that each "
"data column is a separate array, or false to "
"render geometry as it appears in the GeomVertexData. See "
"also gl-interleaved-arrays."));
ConfigVariableInt gl_max_errors
("gl-max-errors", 20,
PRC_DESC("This is the limit on the number of OpenGL errors Panda will "
"detect and report before it shuts down rendering. Set it to "
"-1 for no limit."));
ConfigVariableEnum<GeomEnums::UsageHint> gl_min_buffer_usage_hint
("gl-min-buffer-usage-hint", GeomEnums::UH_stream,
PRC_DESC("This specifies the first usage hint value that will be "
"loaded as a vertex buffer, instead of directly from the "
"client. Normally, this should be \"stream\", which means "
"to load the vertex buffer using GL_STREAM_DRAW. If this "
"is set to \"dynamic\", or \"static\", then only usage hints "
"at that level or higher will be loaded as a vertex buffer, "
"and stream or lower will be rendered directly from the "
"client array. If changing this results in a remarkable "
"performance improvement, you may have code that is "
"creating and destroying vertex buffers every frame, instead "
"of reusing the same buffers. Consider increasing "
"released-vbuffer-cache-size instead."));
ConfigVariableBool gl_debug
("gl-debug", false,
PRC_DESC("Setting this to true will cause OpenGL to emit more useful "
"error and debug messages, at a slight runtime performance cost. "
"notify-level-glgsg controls which severity levels are shown."));
ConfigVariableBool gl_debug_synchronous
("gl-debug-synchronous", false,
PRC_DESC("Set this true to make sure that the errors generated by "
"gl-debug are reported as soon as they happen. This is "
"highly recommended if you want to attach a debugger since "
"the call stack may otherwise not point to the GL call "
"where the error originated."));
ConfigVariableEnum<NotifySeverity> gl_debug_abort_level
("gl-debug-abort-level", NS_fatal,
PRC_DESC("Set this to a setting other than 'fatal' to cause an "
"abort to be triggered when an error of the indicated "
"severity level (or a more severe one) occurs. This is "
"useful if you want to attach a debugger. If you set this, "
"it is highly recommended to also set gl-debug-synchronous, "
"since the call stack will otherwise not point to the GL call "
"that triggered the error message. "
"This feature is not available when NDEBUG has been defined."));
ConfigVariableBool gl_debug_object_labels
("gl-debug-object-labels", true,
PRC_DESC("When gl-debug is set to true, this will tell OpenGL the "
"name of textures, shaders, and other objects, so that OpenGL "
"can display those in error messages. There's usually no "
"reason to disable this."));
ConfigVariableBool gl_debug_buffers
("gl-debug-buffers", false,
PRC_DESC("Set this true, in addition to enabling debug notify for "
"glgsg, to enable debug messages about the creation and "
"destruction of OpenGL vertex buffers."));
ConfigVariableBool gl_finish
("gl-finish", false,
PRC_DESC("Set this true to force a call to glFinish() after every major "
"graphics operation. This is likely to slow down rendering "
"performance substantially, but it will make PStats graphs "
"more accurately reflect where the graphics bottlenecks are, "
"although it is better to use timer queries when available. "
"This variable is enabled only if PStats is compiled in."));
ConfigVariableBool gl_force_depth_stencil
("gl-force-depth-stencil", false,
PRC_DESC("Temporary hack variable 7x00 vs 8x00 nVidia bug. See glGraphicsStateGuardian_src.cxx."));
ConfigVariableBool gl_check_errors
("gl-check-errors", false,
PRC_DESC("Regularly call glGetError() to check for OpenGL errors. "
"This will slow down rendering significantly. If your "
"video driver supports it, you should use gl-debug instead."));
ConfigVariableBool gl_force_flush
("gl-force-flush", false,
PRC_DESC("Call this to force a call to glFlush() after rendering a "
"frame, even when using a double-buffered framebuffer. "
"This can incur a significant performance penalty."));
ConfigVariableBool gl_separate_specular_color
("gl-separate-specular-color", true,
PRC_DESC("When separate specular mode is on, the specular component "
"will be written to the secondary instead of the primary "
"color, which is added after the texturing stage. In other "
"words, the specular highlight will be unmodulated by the "
"color of the texture."));
ConfigVariableBool gl_cube_map_seamless
("gl-cube-map-seamless", true,
PRC_DESC("This configures Panda to try and enable seamless cube map "
"sampling when supported. This will help to remove seams "
"that show up at cube map edges, especially at lower "
"resolutions. On by default; disable if you suspect that "
"this is causing problems or if you simply don't need the "
"functionality."));
ConfigVariableBool gl_dump_compiled_shaders
("gl-dump-compiled-shaders", false,
PRC_DESC("This configures Panda to dump the binary content of GLSL "
"programs to disk with a filename like glsl_program0.dump "
"into the current directory."));
ConfigVariableBool gl_validate_shaders
("gl-validate-shaders", true,
PRC_DESC("Set this to true to enable glValidateShader the first time "
"a shader is bound. This may cause helpful information about "
"shaders to be printed."));
ConfigVariableBool gl_immutable_texture_storage
("gl-immutable-texture-storage", false,
PRC_DESC("This configures Panda to pre-allocate immutable storage "
"for each texture. This improves runtime performance, but "
"changing the size or type of a texture will be slower."));
ConfigVariableBool gl_use_bindless_texture
("gl-use-bindless-texture", false,
PRC_DESC("Set this to let Panda use OpenGL's bindless texture "
"extension for all textures passed to shaders, for improved "
"performance. This is an experimental feature and comes "
"with a few caveats; for one, it requires that all sampler "
"uniforms have a layout(bindless_sampler) qualifier, and "
"it also requires that the texture properties are not "
"modified after the texture handle has been initialized."));
ConfigVariableBool gl_enable_memory_barriers
("gl-enable-memory-barriers", true,
PRC_DESC("If this is set, Panda will make sure that every write "
"to an image using an image2D (et al) binding will cause "
"Panda to issue a memory barrier before the next use of "
"said texture, to ensure that all reads and writes are "
"properly synchronized. This may not be strictly necessary "
"when using the 'coherent' qualifier, but Panda has no "
"way to detect whether you are using those. Turning "
"this off may give a slight performance increase, but you "
"have to know what you're doing."));
ConfigVariableBool gl_vertex_array_objects
("gl-vertex-array-objects", true,
PRC_DESC("Setting this causes Panda to make use of vertex array "
"objects to more efficiently switch between sets of "
"vertex arrays. This only has effect when vertex-arrays "
"and vertex-buffers are both set. This should usually be "
"true unless you suspect a bug in the implementation. "));
ConfigVariableBool gl_support_primitive_restart_index
("gl-support-primitive-restart-index", true,
PRC_DESC("Setting this causes Panda to make use of primitive "
"restart indices to more efficiently render line "
"segment primitives. Set to false if you suspect a bug "
"in the driver implementation."));
ConfigVariableBool gl_support_sampler_objects
("gl-support-sampler-objects", true,
PRC_DESC("Setting this allows Panda to make use of sampler "
"objects. Set to false if you suspect a bug in the "
"driver implementation."));
ConfigVariableBool gl_support_shadow_filter
("gl-support-shadow-filter", true,
PRC_DESC("Disable this if you suspect a bug in the driver "
"implementation of ARB_shadow. Particularly, older ATI "
"cards suffered from a broken implementation of the "
"shadow map filtering features."));
ConfigVariableEnum<CoordinateSystem> gl_coordinate_system
("gl-coordinate-system", CS_yup_right,
PRC_DESC("Which coordinate system to use as the internal "
"coordinate system for OpenGL operations. If you are "
"using features like fixed-function sphere mapping, it is "
"best to leave this to yup-right. However, if you are "
"creating a shader-only application, it may be easier and "
"more efficient to set this to default."));
extern ConfigVariableBool gl_parallel_arrays;
void CLP(init_classes)() {
CLP(GeomContext)::init_type();
CLP(GeomMunger)::init_type();
CLP(GraphicsStateGuardian)::init_type();
CLP(IndexBufferContext)::init_type();
#ifndef OPENGLES_1
CLP(ShaderContext)::init_type();
#endif
CLP(TextureContext)::init_type();
#ifndef OPENGLES
CLP(SamplerContext)::init_type();
#endif
CLP(VertexBufferContext)::init_type();
CLP(GraphicsBuffer)::init_type();
#ifndef OPENGLES
CLP(OcclusionQueryContext)::init_type();
CLP(TimerQueryContext)::init_type();
CLP(LatencyQueryContext)::init_type();
#endif
PandaSystem *ps = PandaSystem::get_global_ptr();
ps->add_system(GLSYSTEM_NAME);
// We can't add any tags defining the available OpenGL capabilities,
// since we won't know those until we create a graphics context (and
// the answer may be different for different contexts).
}
| 47.567485 | 103 | 0.681499 | kestred |
743be13f0a0a46ceade8ddaae28417c5ca8de768 | 1,777 | cpp | C++ | src/elona/lua_env/api/classes/class_LuaInventory.cpp | nanbansenji/ElonaFoobar | ddbd6639db8698e89f09b2512526e855d8016e46 | [
"MIT"
] | 84 | 2018-03-03T02:44:32.000Z | 2019-07-14T16:16:24.000Z | src/elona/lua_env/api/classes/class_LuaInventory.cpp | ki-foobar/ElonaFoobar | d251cf5bd8c21789db3b56b1c9b1302ce69b2c2e | [
"MIT"
] | 685 | 2018-02-27T04:31:17.000Z | 2019-07-12T13:43:00.000Z | src/elona/lua_env/api/classes/class_LuaInventory.cpp | nanbansenji/ElonaFoobar | ddbd6639db8698e89f09b2512526e855d8016e46 | [
"MIT"
] | 23 | 2019-07-26T08:52:38.000Z | 2021-11-09T09:21:58.000Z | #include <sstream>
#include "../../../inventory.hpp"
#include "../../../position.hpp"
#include "../common.hpp"
LUA_API_OPTOUT_SOL_AUTOMAGIC(elona::Inventory)
/**
* @luadoc
*
* Represents an item inventory, a list of items.
*/
namespace elona::lua::api::classes::class_LuaInventory
{
/**
* @luadoc has_free_slot
*
* Queries whether the inventory has at least one free slot.
*
* @treturn True if the inventory has at least one free slot; false if not.
*/
bool LuaInventory_has_free_slot(Inventory* self)
{
return self->has_free_slot();
}
// no doc
sol::table LuaInventory_as_table(Inventory* self, sol::this_state this_state)
{
sol::state_view L{this_state};
sol::table t = L.create_table();
for (const auto& item : *self)
{
t.add(item);
}
return t;
}
/**
* @luadoc stack
*
* Stacks an item in the inventory indicated. The item will no longer be valid
* for use.
*
* @tparam LuaItem item
* @treturn[1] LuaItem The modified item stack on success
* @treturn[2] nil
*/
sol::optional<ItemRef> LuaInventory_stack(
Inventory* self,
const ItemRef& item,
sol::optional<bool> show_message)
{
const auto stack_result =
inv_stack(self, item, show_message.value_or(false));
if (stack_result.stacked)
{
return stack_result.stacked_item;
}
else
{
return sol::nullopt;
}
}
void bind(sol::state& lua)
{
auto LuaInventory =
lua.new_usertype<Inventory>("LuaInventory", sol::no_constructor);
// Methods
LuaInventory.set("has_free_slot", &LuaInventory_has_free_slot);
LuaInventory.set("stack", &LuaInventory_stack);
LuaInventory.set("as_table", &LuaInventory_as_table);
}
} // namespace elona::lua::api::classes::class_LuaInventory
| 19.527473 | 78 | 0.668542 | nanbansenji |
743bf2d3a89892ad01ec24607e9876f54d1ad44e | 4,482 | cpp | C++ | src/rendering/nodes/GIComposeNode.cpp | Shimmen/ArkoseRenderer | d39e1b3d5f5b669370b8aeed5cd1cfada5216763 | [
"MIT"
] | 7 | 2020-11-02T22:27:27.000Z | 2022-01-11T04:25:48.000Z | src/rendering/nodes/GIComposeNode.cpp | Shimmen/ArkoseRenderer | d39e1b3d5f5b669370b8aeed5cd1cfada5216763 | [
"MIT"
] | null | null | null | src/rendering/nodes/GIComposeNode.cpp | Shimmen/ArkoseRenderer | d39e1b3d5f5b669370b8aeed5cd1cfada5216763 | [
"MIT"
] | 2 | 2020-12-09T03:40:05.000Z | 2021-09-14T03:12:40.000Z | #include "GIComposeNode.h"
#include "SceneNode.h"
#include "geometry/Frustum.h"
#include "utility/Logging.h"
#include "utility/Profiling.h"
#include <imgui.h>
GIComposeNode::GIComposeNode(Scene& scene)
: m_scene(scene)
{
}
RenderPipelineNode::ExecuteCallback GIComposeNode::constructFrame(Registry& reg) const
{
SCOPED_PROFILE_ZONE();
Texture& sceneColorBeforeGI = *reg.getTexture("SceneColor");
Texture& baseColorTex = *reg.getTexture("SceneBaseColor");
Texture& ambientOcclusionTex = *reg.getTexture("AmbientOcclusion");
Texture& diffuseGiTex = *reg.getTexture("DiffuseGI");
Texture& sceneColorWithGI = reg.createTexture2D(reg.windowRenderTarget().extent(), sceneColorBeforeGI.format(), Texture::Filters::nearest());
BindingSet& composeBindingSet = reg.createBindingSet({ { 0, ShaderStageCompute, &sceneColorWithGI, ShaderBindingType::StorageImage },
{ 1, ShaderStageCompute, &sceneColorBeforeGI, ShaderBindingType::TextureSampler },
{ 2, ShaderStageCompute, &baseColorTex, ShaderBindingType::TextureSampler },
{ 3, ShaderStageCompute, &ambientOcclusionTex, ShaderBindingType::TextureSampler },
{ 4, ShaderStageCompute, &diffuseGiTex, ShaderBindingType::TextureSampler } });
ComputeState& giComposeState = reg.createComputeState(Shader::createCompute("compose/compose-gi.comp"), { &composeBindingSet });
return [&](const AppState& appState, CommandList& cmdList) {
cmdList.setComputeState(giComposeState);
cmdList.bindSet(composeBindingSet, 0);
cmdList.setNamedUniform("targetSize", sceneColorWithGI.extent());
static bool includeSceneColor = true;
static bool includeDiffuseGI = true;
static bool withMaterialColor = true;
static bool withAmbientOcclusion = true;
#if 0
ImGui::Checkbox("Include scene color", &includeSceneColor);
ImGui::Checkbox("Include diffuse GI", &includeDiffuseGI);
if (includeDiffuseGI) {
ImGui::Checkbox("... with material color", &withMaterialColor);
ImGui::Checkbox("... with ambient occlusion", &withAmbientOcclusion);
}
#else
enum class ComposeMode {
FullCompose,
DirectOnly,
IndirectOnly,
IndirectOnlyNoBaseColor,
};
static ComposeMode composeMode = ComposeMode::FullCompose;
if (ImGui::RadioButton("Full compose", composeMode == ComposeMode::FullCompose)) {
composeMode = ComposeMode::FullCompose;
includeSceneColor = true;
includeDiffuseGI = true;
withMaterialColor = true;
}
if (ImGui::RadioButton("Direct light only", composeMode == ComposeMode::DirectOnly)) {
composeMode = ComposeMode::DirectOnly;
includeSceneColor = true;
includeDiffuseGI = false;
}
if (ImGui::RadioButton("Diffuse indirect only", composeMode == ComposeMode::IndirectOnly)) {
composeMode = ComposeMode::IndirectOnly;
includeSceneColor = false;
includeDiffuseGI = true;
withMaterialColor = true;
}
if (ImGui::RadioButton("Diffuse indirect only (ignore material color)", composeMode == ComposeMode::IndirectOnlyNoBaseColor)) {
composeMode = ComposeMode::IndirectOnlyNoBaseColor;
includeSceneColor = false;
includeDiffuseGI = true;
withMaterialColor = false;
}
ImGui::Separator();
ImGui::Checkbox("Include ambient occlusion (for diffuse indirect)", &withAmbientOcclusion);
#endif
cmdList.setNamedUniform("includeSceneColor", includeSceneColor);
cmdList.setNamedUniform("includeDiffuseGI", includeDiffuseGI);
cmdList.setNamedUniform("withMaterialColor", withMaterialColor);
cmdList.setNamedUniform("withAmbientOcclusion", withAmbientOcclusion);
cmdList.dispatch({ sceneColorWithGI.extent(), 1 }, { 32, 32, 1 });
// TODO: Figure out a good way of actually chaining these calls & reusing textures etc.
cmdList.textureWriteBarrier(sceneColorWithGI);
cmdList.copyTexture(sceneColorWithGI, sceneColorBeforeGI);
cmdList.textureWriteBarrier(sceneColorBeforeGI);
};
}
| 44.82 | 145 | 0.651272 | Shimmen |
743cde608a05bbb3a0bd2a91f9db0abec55c34c4 | 992 | cc | C++ | src/q_251_300/q0258.cc | vNaonLu/daily-leetcode | 2830c2cd413d950abe7c6d9b833c771f784443b0 | [
"MIT"
] | 2 | 2021-09-28T18:41:03.000Z | 2021-09-28T18:42:57.000Z | src/q_251_300/q0258.cc | vNaonLu/Daily_LeetCode | 30024b561611d390931cef1b22afd6a5060cf586 | [
"MIT"
] | 16 | 2021-09-26T11:44:20.000Z | 2021-11-28T06:44:02.000Z | src/q_251_300/q0258.cc | vNaonLu/daily-leetcode | 2830c2cd413d950abe7c6d9b833c771f784443b0 | [
"MIT"
] | 1 | 2021-11-22T09:11:36.000Z | 2021-11-22T09:11:36.000Z | #include <gtest/gtest.h>
#include <iostream>
using namespace std;
/**
* This file is generated by leetcode_add.py v1.0
*
* 258.
* Add Digits
*
* ––––––––––––––––––––––––––––– Description –––––––––––––––––––––––––––––
*
* Given an integer ‘num’ , repeatedly add all its digits until the
* result has only one digit, and return it.
*
* ––––––––––––––––––––––––––––– Constraints –––––––––––––––––––––––––––––
*
* • ‘0 ≤ num ≤ 2³¹ - 1’
*
*/
struct q258 : public ::testing::Test {
// Leetcode answer here
class Solution {
public:
int addDigits(int num) {
return num == 0 ? 0 : 1 + (num - 1) % 9;
}
};
class Solution *solution;
};
TEST_F(q258, sample_input01) {
solution = new Solution();
int num = 38;
int exp = 2;
EXPECT_EQ(solution->addDigits(num), exp);
delete solution;
}
TEST_F(q258, sample_input02) {
solution = new Solution();
int num = 0;
int exp = 0;
EXPECT_EQ(solution->addDigits(num), exp);
delete solution;
} | 20.244898 | 74 | 0.543347 | vNaonLu |
743e6fe2ac450c77ff5de332c10e70cb73bd686a | 6,244 | cpp | C++ | projects/Application/source/scenes/PlaygroundScene.cpp | antjowie/Empires | 15023e3b3d3f51dca6af7d477dca0c0a17c6f7cf | [
"MIT"
] | null | null | null | projects/Application/source/scenes/PlaygroundScene.cpp | antjowie/Empires | 15023e3b3d3f51dca6af7d477dca0c0a17c6f7cf | [
"MIT"
] | null | null | null | projects/Application/source/scenes/PlaygroundScene.cpp | antjowie/Empires | 15023e3b3d3f51dca6af7d477dca0c0a17c6f7cf | [
"MIT"
] | null | null | null | #include "scenes/PlaygroundScene.h"
#include "cameras/FreelookCamera.h"
#include "GalaxyGenerator.h"
#include "prngs/xorshf96.h"
#include <algorithm>
void PlaygroundScene::onCreate(const DrawableFactory & drawableFactory)
{
Timer timer;
m_fullscreen = false;
m_fullscreenCooldown = 0.f;
m_lineRenderer.init(400,1.f);
m_textRenderer.init();
m_textRenderer.loadFont("resources/fonts/roboto.ttf");
GalaxyGenerator generator;
generator.m_xMax = 11.f * 12.f;
generator.m_zMax = -7.f * 12.f;
//constexpr float xMax = 11.f * 12.f;
//constexpr float zMax = -7.f * 12.f;
generator.generate(
m_planets,
m_vessels,
m_clickableSelector,
m_textRenderer,
m_lineRenderer,
drawableFactory,
std::make_unique<Xorshf96>(0xDEADBEEF));
// Comment this out if you are prototyping, it takes a long time to boot the game but
// saves on lag during runtime
//Timer t2;
//std::cout << "Calculating planets contained in SOIs...\n";
//for (size_t i = 0; i < m_planets.size(); i++)
//{
// m_planets[i]->fillPlanetsInSOI();
// if (t2.elapsedTime() > 3.f)
// {
// t2.restart();
// std::printf("%i/%i (%.2f) elapsed: %.2f seconds\n", i, m_planets.size(), float(i) / float(m_planets.size()) * 100.f, t2.totalTime());
// }
//}
//std::cout << "Finished filling SOIs in " << t2.totalTime() << " seconds\n";
m_camera = std::make_unique<FreelookCamera>(50.f, 25.f);
m_camera->setNearFar(glm::vec2(0.1f, 10000.f));
m_camera->setPos(glm::vec3(m_planets.back()->pos().x * 0.5f, 50, -9 * 12));
//m_camera->setTarget(glm::vec3(96, 20, -60));
m_cursor = drawableFactory.createDrawable<Cursor>("cursor");
m_cursor->setScale(0.025f);
m_skybox = drawableFactory.createDrawable<Skybox>("skybox");
m_skybox->setColor(glm::vec4(0, 0, 0, 1));
m_empire.setColor(glm::vec3(0.25f, 1.f, 0.25f));
m_empire.setName("Good dictator");
m_empire.setHomePlanet(*m_planets[0].get());
m_planets.front()->setEmpire(m_empire);
m_empire.markAsPlayer();
m_empire2.setColor(glm::vec3(1.f, 0.25f, 0.25f));
m_empire2.setName("Bad dictator");
m_empire2.setHomePlanet(*m_planets.back());
m_planets.back()->setEmpire(m_empire2);
m_map = drawableFactory.createDrawable<Map>("map");
m_map->setClickableSelector(m_clickableSelector);
//m_map->setLevelBounds(glm::vec3(16 * 12, 9 * 12, 1));
m_map->setLevelBounds(glm::vec3(generator.m_xMax, -generator.m_zMax, 1));
m_map->setViewportHeight(800);
m_map->generateMap(m_planets);
m_map->generateMarkers(4); // 4 represents 4 empires although this should be seen as a capacity (like vector)
m_planetRenderer.fillPlanetsVBO(m_planets);
m_camera->setPos(m_empire.homePlanet()->pos() + glm::vec3(0, 0, 10.f));
std::printf("Initialized scene in %f seconds\n", timer.elapsedTime());
}
Scene * PlaygroundScene::run(const DrawableFactory & drawableFactory, const Input & input, float elapsedTime)
{
// Input phase
// ------------------
if (input.Keys[KEY_ESC])
m_wantToPop = true;
if (input.Keys[KEY_M] && m_fullscreenCooldown == 0.f)
{
m_fullscreen = !m_fullscreen;
m_map->setFullscreen(m_fullscreen);
m_fullscreenCooldown = 1.f;
m_map->updatePlanetsSOI(m_planets);
}
m_fullscreenCooldown -= elapsedTime;
if (m_fullscreenCooldown < 0.f)
m_fullscreenCooldown = 0.f;
// Update map zoom
if (input.Keys[KEY_MINUS])
{
m_map->zoom(1.f - 0.5f * elapsedTime);
m_map->updatePlanetsSOI(m_planets);
}
if (input.Keys[KEY_EQUAL])
{
m_map->zoom(1.f + 0.5f * elapsedTime);
m_map->updatePlanetsSOI(m_planets);
}
if (input.Keys[KEY_BACKSPACE])
{
m_map->setZoom(1);
m_map->updatePlanetsSOI(m_planets);
}
// Update fase
// -----------------
m_camera->handleInput(input, elapsedTime);
//elapsedTime *= 500.f;
m_clickableSelector.updateIntersection(drawableFactory, input, elapsedTime, *m_camera);
if (m_updateVBOs.elapsedTime() > 2.5f)
{
m_map->updatePlanetsSOI(m_planets);
m_planetRenderer.fillPlanetsVBO(m_planets);
m_updateVBOs.restart();
}
m_map->setFocus(glm::vec2(m_camera->pos().x,m_camera->pos().z));
// Draw/semi update fase
// -----------------
glDisable(GL_BLEND);
m_skybox->draw(*m_camera);
for (std::vector<std::unique_ptr<Planet>>::iterator planet = m_planets.begin(); planet != m_planets.end(); planet++)
{
(*planet)->update(elapsedTime);
}
for (std::vector<std::unique_ptr<Vessel>>::iterator vessel = m_vessels.begin(); vessel != m_vessels.end(); vessel++)
{
(*vessel)->update(elapsedTime);
}
// Because vessels and planets are not in the same data structure, I don't have to worry about moving over stuff from the vectors
// Brian's object files don't work
// or I don't understand OpenGL
if (!m_vessels.empty() && !m_vesselsToRemove.empty())
{
m_vessels.erase(std::remove_if(m_vessels.begin(), m_vessels.end(), [this](const std::unique_ptr<Vessel> &vessel)
{
for (Vessel * address : m_vesselsToRemove)
if (vessel.get() == address)
return true;
return false;
}));
m_vesselsToRemove.clear();
}
glDisable(GL_CULL_FACE);
for (std::vector<std::unique_ptr<Vessel>>::iterator vessel = m_vessels.begin(); vessel != m_vessels.end(); vessel++)
{
if ((*vessel)->isDead())
m_vesselsToRemove.push_back(&(**vessel));
(*vessel)->draw(*m_camera);
}
glEnable(GL_CULL_FACE);
// Don't render all the other stuff if fullscreen map
glEnable(GL_BLEND);
m_map->addMarker(m_map->createMarker(m_camera->pos(), glm::vec4(m_empire.color(), 1.f), 1));
if (m_fullscreen)
{
m_map->displayMarkers();
m_map->drawTransparent(*m_camera);
m_lineRenderer.display(*m_camera);
}
else
{
m_planetRenderer.display(*m_camera);
m_empire.emitLine(m_lineRenderer);
m_empire2.emitLine(m_lineRenderer);
m_lineRenderer.display(*m_camera);
for (std::vector<std::unique_ptr<Planet>>::iterator planet = m_planets.begin(); planet != m_planets.end(); planet++)
(*planet)->drawTransparent(*m_camera);
for (std::vector<std::unique_ptr<Vessel>>::iterator vessel = m_vessels.begin(); vessel != m_vessels.end(); vessel++)
(*vessel)->drawTransparent(*m_camera);
m_textRenderer.render(*m_camera);
m_map->displayMarkers();
m_map->drawTransparent(*m_camera);
m_cursor->setPos(glm::vec3(input.GetMousePos(), -0.1f));
m_cursor->drawTransparent(*m_camera);
}
return nullptr;
} | 29.314554 | 138 | 0.695067 | antjowie |
743f292987b1a62732867617cc225471d696d782 | 8,738 | cpp | C++ | src/databasetool.cpp | AlvaroIT/qbrew-master | 2f6a98ee99779863d585839d3f254a957ea9fbf6 | [
"BSD-2-Clause"
] | null | null | null | src/databasetool.cpp | AlvaroIT/qbrew-master | 2f6a98ee99779863d585839d3f254a957ea9fbf6 | [
"BSD-2-Clause"
] | null | null | null | src/databasetool.cpp | AlvaroIT/qbrew-master | 2f6a98ee99779863d585839d3f254a957ea9fbf6 | [
"BSD-2-Clause"
] | null | null | null | /***************************************************************************
databasetool.cpp
-------------------
Database editor for QBrew
-------------------
Copyright 2005-2008, David Johnson
Please see the header file for copyright and license information
***************************************************************************/
#include <QDir>
#include <QFile>
#include <QHeaderView>
#include <QMessageBox>
#include <QTableView>
#include "data.h"
#include "resource.h"
#include "graindelegate.h"
#include "grainmodel.h"
#include "hopdelegate.h"
#include "hopmodel.h"
#include "miscdelegate.h"
#include "miscmodel.h"
#include "styledelegate.h"
#include "stylemodel.h"
#include "databasetool.h"
//////////////////////////////////////////////////////////////////////////////
// Construction, Destruction //
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// DatabaseTool()
// --------------
// Constructor
DatabaseTool::DatabaseTool(QWidget* parent)
: QMainWindow(parent), grainmodel_(0), hopmodel_(0), miscmodel_(0),
modified_(false)
{
ui.setupUi(this);
statusBar()->hide();
// setup actions
QIcon icon = QIcon(":/icons/22x22/document-save.png");
icon.addFile(":/icons/16x16/document-save.png");
ui.actionsave->setIcon(icon);
ui.actionsave->setEnabled(false);
connect(ui.actionsave, SIGNAL(triggered()), this, SLOT(fileSave()));
icon = QIcon(":/icons/22x22/application-exit.png");
icon.addFile(":/icons/16x16/application-exit.png");
ui.actionquit->setIcon(icon);
connect(ui.actionquit, SIGNAL(triggered()), this, SLOT(close()));
// get current font information, for sizing
QFontMetrics fm(font());
unsigned mh = (unsigned)(fm.lineSpacing() * 1.5);
unsigned mw = fm.width('M');
// grain page
QWidget *widget = new QWidget();
grainpage.setupUi(widget);
ui.ingredients->addTab(widget, tr("&Grains"));
grains_ = Data::instance()->grainmap_.values();
grainmodel_ = new GrainModel(this, &grains_);
grainpage.view->setModel(grainmodel_);
QItemDelegate *delegate = new GrainDelegate(this);
grainpage.view->setItemDelegate(delegate);
grainpage.view->verticalHeader()->setDefaultSectionSize(mh);
grainpage.view->verticalHeader()->hide();
//grainpage.view->horizontalHeader()->setClickable(true);
grainpage.view->horizontalHeader()->setHighlightSections(false);
grainpage.view->setColumnWidth(GrainModel::NAME, 20*mw);
grainpage.view->setColumnHidden(GrainModel::WEIGHT, true);
grainpage.view->setColumnWidth(GrainModel::EXTRACT, 8*mw);
grainpage.view->setColumnWidth(GrainModel::COLOR, 8*mw);
grainpage.view->setColumnWidth(GrainModel::TYPE, 8*mw);
grainpage.view->setColumnWidth(GrainModel::USE, 8*mw);
// hop page
widget = new QWidget();
hoppage.setupUi(widget);
ui.ingredients->addTab(widget, tr("&Hops"));
hops_ = Data::instance()->hopmap_.values();
hopmodel_ = new HopModel(this, &hops_);
hoppage.view->setModel(hopmodel_);
delegate = new HopDelegate(this);
hoppage.view->setItemDelegate(delegate);
hoppage.view->verticalHeader()->setDefaultSectionSize(mh);
hoppage.view->verticalHeader()->hide();
//hoppage.view->horizontalHeader()->setClickable(true);
hoppage.view->horizontalHeader()->setHighlightSections(false);
hoppage.view->setColumnHidden(HopModel::WEIGHT, true);
hoppage.view->setColumnHidden(HopModel::TIME, true);
hoppage.view->setColumnHidden(HopModel::TYPE, true);
hoppage.view->setColumnWidth(HopModel::NAME, 20*mw);
hoppage.view->setColumnWidth(HopModel::ALPHA, 8*mw);
// misc page
widget = new QWidget();
miscpage.setupUi(widget);
ui.ingredients->addTab(widget, tr("&Miscellaneous"));
miscs_ = Data::instance()->miscmap_.values();
miscmodel_ = new MiscModel(this, &miscs_);
miscpage.view->setModel(miscmodel_);
delegate = new MiscDelegate(this);
miscpage.view->setItemDelegate(delegate);
miscpage.view->verticalHeader()->setDefaultSectionSize(mh);
miscpage.view->verticalHeader()->hide();
//miscpage.view->horizontalHeader()->setClickable(true);
miscpage.view->horizontalHeader()->setHighlightSections(false);
miscpage.view->setColumnHidden(MiscModel::QUANTITY, true);
miscpage.view->setColumnWidth(MiscModel::NAME, 20*mw);
miscpage.view->setColumnWidth(MiscModel::TYPE, 8*mw);
miscpage.view->horizontalHeader()->setStretchLastSection(true);
// style page
widget = new QWidget();
stylepage.setupUi(widget);
ui.ingredients->addTab(widget, tr("&Styles"));
styles_ = Data::instance()->stylemap_.values();
stylemodel_ = new StyleModel(this, &styles_);
stylepage.view->setModel(stylemodel_);
delegate = new StyleDelegate(this);
stylepage.view->setItemDelegate(delegate);
stylepage.view->verticalHeader()->setDefaultSectionSize(mh);
stylepage.view->verticalHeader()->hide();
//stylepage.view->horizontalHeader()->setClickable(true);
stylepage.view->horizontalHeader()->setHighlightSections(false);
stylepage.view->setColumnWidth(StyleModel::NAME, 20*mw);
stylepage.view->setColumnWidth(StyleModel::OGLOW, 8*mw);
stylepage.view->setColumnWidth(StyleModel::OGHI, 8*mw);
stylepage.view->setColumnWidth(StyleModel::FGLOW, 8*mw);
stylepage.view->setColumnWidth(StyleModel::FGHI, 8*mw);
stylepage.view->setColumnWidth(StyleModel::IBULOW, 8*mw);
stylepage.view->setColumnWidth(StyleModel::IBUHI, 8*mw);
stylepage.view->setColumnWidth(StyleModel::SRMLOW, 8*mw);
stylepage.view->setColumnWidth(StyleModel::SRMHI, 8*mw);
// setup connections
connect(grainmodel_, SIGNAL(modified()),
this, SLOT(dataModified()));
connect(grainpage.addbutton, SIGNAL(clicked()),
grainpage.view, SLOT(addIngredient()));
connect(grainpage.removebutton, SIGNAL(clicked()),
grainpage.view, SLOT(removeIngredient()));
connect(hopmodel_, SIGNAL(modified()),
this, SLOT(dataModified()));
connect(hoppage.addbutton, SIGNAL(clicked()),
hoppage.view, SLOT(addIngredient()));
connect(hoppage.removebutton, SIGNAL(clicked()),
hoppage.view, SLOT(removeIngredient()));
connect(miscmodel_, SIGNAL(modified()),
this, SLOT(dataModified()));
connect(miscpage.addbutton, SIGNAL(clicked()),
miscpage.view, SLOT(addIngredient()));
connect(miscpage.removebutton, SIGNAL(clicked()),
miscpage.view, SLOT(removeIngredient()));
connect(stylemodel_, SIGNAL(modified()),
this, SLOT(dataModified()));
connect(stylepage.addbutton, SIGNAL(clicked()),
stylepage.view, SLOT(addIngredient()));
connect(stylepage.removebutton, SIGNAL(clicked()),
stylepage.view, SLOT(removeIngredient()));
grainmodel_->flush();
hopmodel_->flush();
miscmodel_->flush();
stylemodel_->flush();
}
DatabaseTool::~DatabaseTool() {}
void DatabaseTool::fileSave()
{
// TODO: use QDesktopServices in next non-bugfix release (0.5.0)
QString localbase = QDIR_HOME + "/." + Resource::DATA_FILE;
QFileInfo finfo(localbase);
if (finfo.exists() && !finfo.isWritable()) {
// no write permission
QMessageBox::warning(this, Resource::TITLE,
tr("<p>Unable to save the database."
"You do not have permission "
"to write to %1").arg(localbase));
} else {
// sync with Data...
Data::instance()->clearGrains();
foreach(Grain grain, grains_) {
Data::instance()->insertGrain(grain);
}
Data::instance()->clearHops();
foreach(Hop hop, hops_) {
Data::instance()->insertHop(hop);
}
Data::instance()->clearMiscs();
foreach(Misc misc, miscs_) {
Data::instance()->insertMisc(misc);
}
Data::instance()->clearStyles();
foreach(Style style, styles_) {
Data::instance()->insertStyle(style);
}
if (!Data::instance()->saveData(localbase)) {
// error in saving file
QMessageBox::warning(this, Resource::TITLE,
tr("<p>Unable to save the database."
"Error in saving %1").arg(localbase));
}
ui.actionsave->setEnabled(false);
modified_ = false;
}
}
void DatabaseTool::dataModified()
{
ui.actionsave->setEnabled(true);
modified_ = true;
}
| 36.869198 | 78 | 0.623369 | AlvaroIT |
7442a187f4ae6f8ca5172a8630cad7c5c8527a1d | 1,321 | cpp | C++ | OrcLevel.cpp | JTuthill01/Nightmare | e4b712e28c228c66a33664418cc176cf527c28c9 | [
"MIT"
] | null | null | null | OrcLevel.cpp | JTuthill01/Nightmare | e4b712e28c228c66a33664418cc176cf527c28c9 | [
"MIT"
] | null | null | null | OrcLevel.cpp | JTuthill01/Nightmare | e4b712e28c228c66a33664418cc176cf527c28c9 | [
"MIT"
] | null | null | null | #include "stdafx.hpp"
#include "OrcLevel.hpp"
OrcLevel::OrcLevel(sf::RenderWindow * window, std::stack<Level*>* level) : Level(window, level)
{
this->initLevel();
this->spawnOrcs();
}
OrcLevel::~OrcLevel()
{
}
void OrcLevel::update(const float & deltaTime)
{
this->pPlayer.update(deltaTime);
this->playerInput(deltaTime);
for (size_t i = 0; i < this->mOrcs.size(); i++)
this->mOrcs[i]->update(deltaTime);
}
void OrcLevel::render(sf::RenderTarget & target)
{
target.draw(this->mBackgroundSprite);
this->pPlayer.render(target);
this->renderOrcs();
}
void OrcLevel::initLevel()
{
if (!this->mBackgroundTexture.loadFromFile("Resources/Textures/Backgrounds/bitmap.png"))
{
std::cerr << "Level failed to fucking load" << "\n";
EXIT_FAILURE;
}
this->mBackgroundSprite.setTexture(this->mBackgroundTexture);
}
void OrcLevel::spawnOrcs()
{
sf::Texture temp;
if (!temp.loadFromFile("Resources/Textures/Orcs/Combined.png"))
std::cerr << "Orcs not found" << "\n";
this->mOrcTextures.push_back(temp);
this->mOrcs.push_back(new Orcs(this->mOrcTextures, sf::Vector2f(1700.F, 800.F), this->pWindow->getSize()));
}
void OrcLevel::renderOrcs()
{
for (size_t i = 0; i < this->mOrcs.size(); i++)
this->mOrcs[i]->render(*this->pWindow);
}
| 21.306452 | 109 | 0.656321 | JTuthill01 |
7443e2e05eb37e6b4ebc9b39f8855bc08eb65dd1 | 4,644 | cpp | C++ | opticalFlow.cpp | axessta/city3115-contrib | 89859979c9e90133a1037a0c8fffc27bb9cf66e0 | [
"Apache-2.0"
] | null | null | null | opticalFlow.cpp | axessta/city3115-contrib | 89859979c9e90133a1037a0c8fffc27bb9cf66e0 | [
"Apache-2.0"
] | null | null | null | opticalFlow.cpp | axessta/city3115-contrib | 89859979c9e90133a1037a0c8fffc27bb9cf66e0 | [
"Apache-2.0"
] | null | null | null | // opticalFlow.cpp, jake deery, 2020
#include "opticalFlow.h"
opticalFlow::opticalFlow(VideoCapture inputVideo) {
// init - load vars into object
capSource = inputVideo;
// Check for failure
if(capSource.isOpened() == false) {
cout << "[E] Could not open or find the webcam . . . " << "\n";
delete this;
}
// recalculate the fps value
if((fps / 1000) < 1) fps = 1;
else fps = ceil(fps / 1000);
cout << "[I] Class created successfully . . . " << "\n";
}
opticalFlow::~opticalFlow() {
// destructor - delete windows
cout << "[I] Deleting all windows . . . " << "\n";
destroyAllWindows();
cout << "[I] Class deleted successfully . . . " << "\n";
}
int opticalFlow::doDenseProcess() {
// vars
Mat frame1;
Mat prvs;
char checkForEscKey;
// intro
cout << "[I] Calling on method doDenseProcess . . . " << "\n";
// copy webcam frame to Mat & make it grey
capSource >> frame1;
if (frame1.empty()) {
cout << "[E] Could not open or find the webcam . . . " << "\n";
return -1;
}
// get the material ready for processing
flip(frame1, frame1, 1);
cvtColor(frame1, prvs, COLOR_BGR2GRAY);
// create blank window
namedWindow("doDenseProcess");
// begin process
cout << "[W] Entering program loop . . . " << "\n";
while (checkForEscKey != 27) {
// vars
Mat frame2;
Mat next;
Mat flow_parts[2];
Mat magnitude;
Mat angle;
Mat magn_norm;
Mat flow(prvs.size(), CV_32FC2);
Mat _hsv[3];
Mat hsv;
Mat hsv8;
Mat bgr;
// copy webcam frame to Mat & make it grey
capSource >> frame2;
if (frame2.empty()) {
cout << "[E] Could not open or find the webcam . . . " << "\n";
return -1;
break;
}
// get the material ready for processing
flip(frame2, frame2, 1);
cvtColor(frame2, next, COLOR_BGR2GRAY);
// calculate the flow
calcOpticalFlowFarneback(prvs, next, flow, 0.5, 3, 15, 3, 5, 1.2, 0);
// visualise the flow
split(flow, flow_parts);
cartToPolar(flow_parts[0], flow_parts[1], magnitude, angle, true);
normalize(magnitude, magn_norm, 0.0f, 1.0f, NORM_MINMAX);
angle *= ((1.f / 360.f) * (180.f / 255.f));
//build hsv image
_hsv[0] = angle;
_hsv[1] = Mat::ones(angle.size(), CV_32F);
_hsv[2] = magn_norm;
merge(_hsv, 3, hsv);
hsv.convertTo(hsv8, CV_8U, 255.0);
cvtColor(hsv8, bgr, COLOR_HSV2BGR);
// display the image
imshow("doDenseProcess", bgr);
// detect exit
checkForEscKey = waitKey(fps);
// blit
prvs = next;
}
return 0;
}
int opticalFlow::doSparseProcess() {
// vars
Mat oldFrame;
Mat oldGrey;
Mat mask;
RNG rng;
vector<Scalar> colors;
vector<Point2f> p0;
vector<Point2f> p1;
char checkForEscKey;
// intro
cout << "[I] Calling on method doSparseProcess . . . " << "\n";
// create some random colours
for(int i = 0; i < 100; i++) {
int r = rng.uniform(0, 256);
int g = rng.uniform(0, 256);
int b = rng.uniform(0, 256);
colors.push_back(Scalar(r,g,b));
}
// take first frame
capSource >> oldFrame;
if (oldFrame.empty()) {
cout << "[E] Could not open or find the webcam . . . " << "\n";
return -1;
}
// flip the frame for natural movement
flip(oldFrame, oldFrame, 1);
// find corners in the mat
cvtColor(oldFrame, oldGrey, COLOR_BGR2GRAY);
goodFeaturesToTrack(oldGrey, p0, 100, 0.3, 7, Mat(), 7, false, 0.04);
// create a mask image for drawing purposes
mask = Mat::zeros(oldFrame.size(), oldFrame.type());
// create blank window
namedWindow("doSparseProcess");
cout << "[W] Entering program loop . . . " << "\n";
while(checkForEscKey != 27) {
// vars
Mat frame;
Mat frameGrey;
Mat img;
vector<Point2f> goodNew;
vector<uchar> status;
vector<float> err;
// copy frame to mat
capSource >> frame;
if (frame.empty()) {
cout << "[E] Could not open or find the webcam . . . " << "\n";
return -1;
break;
}
// flip the frame for natural movement
flip(frame, frame, 1);
// prep the mat
cvtColor(frame, frameGrey, COLOR_BGR2GRAY);
// do the special stuff (optical flow)
TermCriteria criteria = TermCriteria((TermCriteria::COUNT) + (TermCriteria::EPS), 10, 0.03);
calcOpticalFlowPyrLK(oldGrey, frameGrey, p0, p1, status, err, Size(15,15), 2, criteria);
for(uint i = 0; i < p0.size(); i++) {
// select good points
if(status[i] == 1) {
goodNew.push_back(p1[i]);
// draw the tracks
line(mask,p1[i], p0[i], colors[i], 2);
circle(frame, p1[i], 5, colors[i], -1);
}
}
add(frame, mask, img);
imshow("doSparseProcess", img);
// detect exit
checkForEscKey = waitKey(fps);
// now update the previous frame and previous points
oldGrey = frameGrey.clone();
p0 = goodNew;
}
return 0;
}
| 23.22 | 94 | 0.626184 | axessta |
7445f5925c64a4bd05bed89c4ad74b42b43f08b2 | 2,993 | cxx | C++ | src/main.cxx | C0MPU73R/tlopo-stats | 7a7c2bfb5c2a1b9888e94ac611ad76da193f9405 | [
"MIT"
] | 1 | 2021-11-08T03:44:13.000Z | 2021-11-08T03:44:13.000Z | src/main.cxx | C0MPU73R/tlopo-stats | 7a7c2bfb5c2a1b9888e94ac611ad76da193f9405 | [
"MIT"
] | null | null | null | src/main.cxx | C0MPU73R/tlopo-stats | 7a7c2bfb5c2a1b9888e94ac611ad76da193f9405 | [
"MIT"
] | null | null | null | #include "collector/eventCollector.h"
#include "avatar/avatarManager.h"
#include "database/database.h"
#include "collector/statCollectorManager.h"
#include "net/rpcServer.h"
#include <iostream>
void usage(const std::string& error = "")
{
std::cerr << "tlopostats [options]" << std::endl;
std::cerr << "options:" << std::endl;
std::cerr << std::endl;
std::cerr << "--listen addr: address to listen on (default: 127.0.0.1:8963)" << std::endl;
std::cerr << "--rpc addr: address to listen on (default: 127.0.0.1:8964)" << std::endl;
std::cerr << "--dummy-db: use DummyDatabase backend instead of MongoDatabase" << std::endl;
std::cerr << "--redis-db addr: Redis IP, port prefix (default: 127.0.0.1, 6379, tlopo_stats_test)" << std::endl;
if (error.size()) {
std::cerr << std::endl;
std::cerr << error << std::endl;
}
exit(1);
}
int main(int argc, char** argv)
{
boost::asio::io_service io_service;
// Parse argv
bool use_dummy_db = false;
std::string addr = "127.0.0.1";
std::string rpc_addr = "127.0.0.1";
std::string db_addr = "127.0.0.1";
std::string db_prefix = "tlopo_stats_test";
int db_port = 6379;
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--dummy-db") == 0) {
use_dummy_db = true;
} else if (strcmp(argv[i], "--listen") == 0) {
if (i == argc - 1) {
usage("--listen takes 1 argument");
return 1;
}
addr = std::string(argv[++i]);
}
else if (strcmp(argv[i], "--rpc") == 0) {
if (i == argc - 1) {
usage("--rpc takes 1 argument");
return 1;
}
rpc_addr = std::string(argv[++i]);
}
else if (strcmp(argv[i], "--redis-db") == 0) {
if (i == argc - 3) {
usage("--db-addr takes 3 arguments");
return 1;
}
db_addr = std::string(argv[++i]);
db_port = atoi(argv[++i]);
db_prefix = std::string(argv[++i]);
} else {
usage();
return 1;
}
}
// Create the DB
Database* db;
if (use_dummy_db) {
std::cout << "Using DummyDatabase backend" << std::endl;
db = get_dummy_db();
} else {
std::cout << "Using Redis backend, db_addr = " << db_addr << ":" << db_port << std::endl;
db = get_redis_db(db_addr, db_port, db_prefix);
}
// Init AvatarManager
AvatarManager::get_global_ptr()->init(db);
// Init StatCollectorManager
StatCollectorManager::get_global_ptr()->init(db, io_service);
// Start EventCollector
std::cout << "Listening on " << addr << std::endl;
EventCollector evcoll(io_service, addr);
// Start the RPC server
std::cout << "RPC: Listening on " << rpc_addr << std::endl;
RPCServer rpc(io_service, rpc_addr);
// Run
io_service.run();
return 0;
}
| 29.058252 | 116 | 0.531908 | C0MPU73R |
744787492330da29e14b648d0d2c2c356dc3f44f | 760 | cpp | C++ | 999_Practice/Day_19/0091_smallest_poitive_missing_number.cpp | Gandham-Srinithya/Data-Structure-and-Algorithms | 177d03105188c83a157947ca9870bf8037e92528 | [
"MIT"
] | 126 | 2019-12-22T17:49:08.000Z | 2021-12-14T18:45:51.000Z | 999_Practice/Day_19/0091_smallest_poitive_missing_number.cpp | Gandham-Srinithya/Data-Structure-and-Algorithms | 177d03105188c83a157947ca9870bf8037e92528 | [
"MIT"
] | 7 | 2019-12-25T18:03:41.000Z | 2021-02-20T06:25:27.000Z | 999_Practice/Day_19/0091_smallest_poitive_missing_number.cpp | Gandham-Srinithya/Data-Structure-and-Algorithms | 177d03105188c83a157947ca9870bf8037e92528 | [
"MIT"
] | 54 | 2019-12-26T06:28:39.000Z | 2022-02-01T05:04:43.000Z | // You are given an array arr[] of N integers including 0. The task is to find the smallest
// positive number missing from the array.
// CONSTRAINS
// 1 <= N <= 10^6
// -10^6 <= Ai <= 10^6
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int arr[n];
for(int i=0; i<n; i++)
{
cin>>arr[i];
}
const int N = 1e6 + 2;
bool check[N];
for(int i=0; i<n; i++)
{
check[i]=false;
}
for(int i=0; i<n; i++)
{
if(arr[i] >= 0)
{
check[arr[i]] = true;
}
}
int ans = -1;
for(int i=1; i<N; i++)
{
if(!check[i])
{
ans = i;
break;
}
}
cout<<ans<<endl;
return 0;
} | 14.615385 | 91 | 0.428947 | Gandham-Srinithya |
744819f31e99ee12b580f8c8372d781fa5b2073f | 457 | hpp | C++ | Phoenix3D/Projects/Client/GameX/X_Event.hpp | PheonixFoundation/Phoenix3D | bfb2e3757bf61ac461aeeda9216bf8c8fdf76d99 | [
"BSL-1.0"
] | 36 | 2016-04-24T01:40:38.000Z | 2022-01-18T07:32:26.000Z | Phoenix3D/Projects/Client/GameX/X_Event.hpp | PheonixFoundation/Phoenix3D | bfb2e3757bf61ac461aeeda9216bf8c8fdf76d99 | [
"BSL-1.0"
] | null | null | null | Phoenix3D/Projects/Client/GameX/X_Event.hpp | PheonixFoundation/Phoenix3D | bfb2e3757bf61ac461aeeda9216bf8c8fdf76d99 | [
"BSL-1.0"
] | 16 | 2016-06-13T08:43:51.000Z | 2020-09-15T13:25:58.000Z | // X_Event.hpp
#ifndef X_EVENT_HPP
#define X_EVENT_HPP
#include "PX2EventSystem.hpp"
#include "PX2EventSpace.hpp"
#include "PX2Event.hpp"
namespace PX2
{
PX2_DECLARE_EVENT_BEGIN(X_EventSpace)
PX2_EVENT(Show_SplashOver)
PX2_EVENT(EnterMap)
PX2_DECLARE_EVENT_END(X_EventSpace)
struct MoveDistData
{
MoveDistData()
{
ID = 0;
Time = 0.0f;
Dist = 0.0f;
}
~MoveDistData()
{
}
int ID;
float Time;
float Dist;
};
}
#endif | 11.717949 | 38 | 0.693654 | PheonixFoundation |
744d28368237f5df345626301e874d44808526b8 | 3,174 | cpp | C++ | src/runtime/eval/ast/new_object_expression.cpp | canerdogan/hiphop-php | c1dab3c1e33f03c352de7bd8031d924b6a361ddd | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | src/runtime/eval/ast/new_object_expression.cpp | canerdogan/hiphop-php | c1dab3c1e33f03c352de7bd8031d924b6a361ddd | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | src/runtime/eval/ast/new_object_expression.cpp | canerdogan/hiphop-php | c1dab3c1e33f03c352de7bd8031d924b6a361ddd | [
"PHP-3.01",
"Zend-2.0"
] | null | null | null | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/
#include <runtime/eval/ast/new_object_expression.h>
#include <runtime/eval/ast/name.h>
#include <runtime/eval/runtime/eval_state.h>
#include <runtime/eval/ast/class_statement.h>
#include <runtime/eval/ast/method_statement.h>
namespace HPHP {
namespace Eval {
using namespace std;
///////////////////////////////////////////////////////////////////////////////
NewObjectExpression::NewObjectExpression(EXPRESSION_ARGS, NamePtr name,
const std::vector<ExpressionPtr> ¶ms)
: FunctionCallExpression(EXPRESSION_PASS, params), m_name(name) {}
Variant NewObjectExpression::eval(VariableEnvironment &env) const {
String name(m_name->get(env));
Object o(create_object_only(name));
SET_LINE;
const MethodStatement* ms = o.get()->getConstructorStatement();
if (ms) {
ms->invokeInstanceDirect(o, env, this);
return o;
}
// Handle builtins
MethodCallPackage mcp1;
mcp1.construct(o);
const CallInfo* ci = mcp1.ci;
ASSERT(ci);
unsigned int count = m_params.size();
// few args
if (count <= 6) {
CVarRef a0 = (count > 0) ? evalParam(env, ci, 0) : null;
CVarRef a1 = (count > 1) ? evalParam(env, ci, 1) : null;
CVarRef a2 = (count > 2) ? evalParam(env, ci, 2) : null;
CVarRef a3 = (count > 3) ? evalParam(env, ci, 3) : null;
CVarRef a4 = (count > 4) ? evalParam(env, ci, 4) : null;
CVarRef a5 = (count > 5) ? evalParam(env, ci, 5) : null;
(ci->getMethFewArgs())(mcp1, count, a0, a1, a2, a3, a4, a5);
return o;
}
if (RuntimeOption::UseArgArray) {
ArgArray *args = prepareArgArray(env, ci, count);
(ci->getMeth())(mcp1, args);
return o;
}
ArrayInit ai(count);
for (unsigned int i = 0; i < count; ++i) {
if (ci->mustBeRef(i)) {
ai.setRef(m_params[i]->refval(env));
} else if (ci->isRef(i)) {
ai.setRef(m_params[i]->refval(env, 0));
} else {
ai.set(m_params[i]->eval(env));
}
}
(ci->getMeth())(mcp1, Array(ai.create()));
return o;
}
void NewObjectExpression::dump(std::ostream &out) const {
out << "new ";
m_name->dump(out);
dumpParams(out);
}
///////////////////////////////////////////////////////////////////////////////
}
}
| 35.662921 | 79 | 0.523314 | canerdogan |
74506816c242e2cbfa50508d85e196ba8641ff28 | 7,850 | hxx | C++ | Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx | nalinimsingh/ITK_4D | 95a2eacaeaffe572889832ef0894239f89e3f303 | [
"Apache-2.0"
] | 3 | 2018-10-01T20:46:17.000Z | 2019-12-17T19:39:50.000Z | Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx | nalinimsingh/ITK_4D | 95a2eacaeaffe572889832ef0894239f89e3f303 | [
"Apache-2.0"
] | null | null | null | Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx | nalinimsingh/ITK_4D | 95a2eacaeaffe572889832ef0894239f89e3f303 | [
"Apache-2.0"
] | 4 | 2018-05-17T16:34:54.000Z | 2020-09-24T02:12:40.000Z | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkStochasticFractalDimensionImageFilter_hxx
#define itkStochasticFractalDimensionImageFilter_hxx
#include "itkStochasticFractalDimensionImageFilter.h"
#include "itkNeighborhoodAlgorithm.h"
#include "itkProgressReporter.h"
#include <vector>
namespace itk
{
template< typename TInputImage, typename TMaskImage, typename TOutputImage >
StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >
::StochasticFractalDimensionImageFilter()
{
this->m_NeighborhoodRadius.Fill(2);
this->m_MaskImage = ITK_NULLPTR;
}
template< typename TInputImage, typename TMaskImage, typename TOutputImage >
StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >
::~StochasticFractalDimensionImageFilter()
{}
template< typename TInputImage, typename TMaskImage, typename TOutputImage >
void
StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >
::SetMaskImage(const MaskImageType *mask)
{
this->SetNthInput( 1, const_cast< MaskImageType * >( mask ) );
}
template< typename TInputImage, typename TMaskImage, typename TOutputImage >
const typename StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >::MaskImageType *
StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >
::GetMaskImage() const
{
const MaskImageType *maskImage =
dynamic_cast< const MaskImageType * >( this->ProcessObject::GetInput(1) );
return maskImage;
}
template< typename TInputImage, typename TMaskImage, typename TOutputImage >
void
StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >
::GenerateData()
{
this->AllocateOutputs();
typedef typename InputImageType::PixelType InputPixelType;
typedef typename OutputImageType::PixelType OutputPixelType;
typedef typename InputImageType::PointType PointType;
const InputImageType *inputImage = this->GetInput();
OutputImageType *outputImage = this->GetOutput();
typename InputImageType::RegionType region = inputImage->GetRequestedRegion();
ProgressReporter progress(this, 0, region.GetNumberOfPixels(), 100);
typedef typename NeighborhoodAlgorithm
::ImageBoundaryFacesCalculator< InputImageType > FaceCalculatorType;
FaceCalculatorType faceCalculator;
typename FaceCalculatorType::FaceListType faceList =
faceCalculator(inputImage, region, this->m_NeighborhoodRadius);
typename FaceCalculatorType::FaceListType::iterator fit;
typename InputImageType::SpacingType spacing = inputImage->GetSpacing();
RealType minSpacing = spacing[0];
for ( unsigned int d = 0; d < ImageDimension; d++ )
{
if ( spacing[d] < minSpacing )
{
minSpacing = spacing[d];
}
}
std::vector< RealType > distances;
std::vector< RealType > distancesFrequency;
std::vector< RealType > averageAbsoluteIntensityDifference;
for ( fit = faceList.begin(); fit != faceList.end(); ++fit )
{
ConstNeighborhoodIteratorType It(
this->m_NeighborhoodRadius, inputImage, *fit);
NeighborhoodIterator< OutputImageType > ItO(
this->m_NeighborhoodRadius, outputImage, *fit);
for ( It.GoToBegin(), ItO.GoToBegin(); !It.IsAtEnd(); ++It, ++ItO )
{
if ( this->m_MaskImage && !this->m_MaskImage->GetPixel( It.GetIndex() ) )
{
ItO.SetCenterPixel(NumericTraits< OutputPixelType >::ZeroValue());
progress.CompletedPixel();
continue;
}
distances.clear();
distancesFrequency.clear();
averageAbsoluteIntensityDifference.clear();
for ( unsigned int i = 0; i < It.GetNeighborhood().Size(); i++ )
{
bool IsInBounds1;
InputPixelType pixel1 = It.GetPixel(i, IsInBounds1);
if ( !IsInBounds1 )
{
continue;
}
if ( !this->m_MaskImage || this->m_MaskImage->GetPixel( It.GetIndex(i) ) )
{
PointType point1;
inputImage->TransformIndexToPhysicalPoint(It.GetIndex(i), point1);
for ( unsigned int j = 0; j < It.GetNeighborhood().Size(); j++ )
{
if ( i == j )
{
continue;
}
bool IsInBounds2;
InputPixelType pixel2 = It.GetPixel(j, IsInBounds2);
if ( !IsInBounds2 )
{
continue;
}
if ( !this->m_MaskImage || this->m_MaskImage->GetPixel( It.GetIndex(j) ) )
{
PointType point2;
inputImage->TransformIndexToPhysicalPoint(It.GetIndex(j), point2);
const RealType distance = point1.SquaredEuclideanDistanceTo(point2);
bool distanceFound = false;
for ( unsigned int k = 0; k < distances.size(); k++ )
{
if ( itk::Math::abs(distances[k] - distance) < 0.5 * minSpacing )
{
distancesFrequency[k]++;
averageAbsoluteIntensityDifference[k] += itk::Math::abs(pixel1 - pixel2);
distanceFound = true;
break;
}
}
if ( !distanceFound )
{
distances.push_back(distance);
distancesFrequency.push_back(1);
averageAbsoluteIntensityDifference.push_back( itk::Math::abs(pixel1 - pixel2) );
}
}
}
}
}
RealType sumY = 0.0;
RealType sumX = 0.0;
RealType sumXY = 0.0;
RealType sumXX = 0.0;
for ( unsigned int k = 0; k < distances.size(); k++ )
{
if ( distancesFrequency[k] == 0 )
{
continue;
}
averageAbsoluteIntensityDifference[k] /= static_cast< RealType >( distancesFrequency[k] );
averageAbsoluteIntensityDifference[k] = std::log(averageAbsoluteIntensityDifference[k]);
const RealType distance = std::log( std::sqrt(distances[k]) );
sumY += averageAbsoluteIntensityDifference[k];
sumX += distance;
sumXX += ( distance * distance );
sumXY += ( averageAbsoluteIntensityDifference[k] * distance );
}
const RealType N = static_cast< RealType >( distances.size() );
const RealType slope = ( N * sumXY - sumX * sumY ) / ( N * sumXX - sumX * sumX );
ItO.SetCenterPixel( static_cast< OutputPixelType >( 3.0 - slope ) );
progress.CompletedPixel();
}
}
}
template< typename TInputImage, typename TMaskImage, typename TOutputImage >
void
StochasticFractalDimensionImageFilter< TInputImage, TMaskImage, TOutputImage >
::PrintSelf(std::ostream & os, Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << "Neighborhood radius: " << this->m_NeighborhoodRadius << std::endl;
}
} // end namespace itk
#endif
| 33.836207 | 111 | 0.623949 | nalinimsingh |
7450919578d9b6172f30fb96c3b6b3fdd3470830 | 1,192 | cpp | C++ | src/test/AuxDataSchemaRegistration.test.cpp | clayne/gtirb | df9bf69537c36136d40fbff98588df37b8c5875f | [
"MIT"
] | 230 | 2018-10-14T11:07:14.000Z | 2022-03-31T21:25:43.000Z | src/test/AuxDataSchemaRegistration.test.cpp | clayne/gtirb | df9bf69537c36136d40fbff98588df37b8c5875f | [
"MIT"
] | 33 | 2018-10-25T15:48:48.000Z | 2022-03-25T03:10:13.000Z | src/test/AuxDataSchemaRegistration.test.cpp | clayne/gtirb | df9bf69537c36136d40fbff98588df37b8c5875f | [
"MIT"
] | 33 | 2018-10-14T11:07:17.000Z | 2022-03-31T16:12:00.000Z | // Note: this file tests schema registration for AuxData. It is
// purposely built as a separate test program so that we can keep the
// type map unlocked. This means, one can write tests that register
// schema, but one should *not* write tests that actually involve
// constructing GTIRB IR.
// Note also: Because schema registration is global, keeping this file
// to a single unit test explicitly guarantees ordering in the state
// of the registration.
#include "AuxDataContainerSchema.hpp"
#include "PrepDeathTest.hpp"
#include <gtirb/AuxDataContainer.hpp>
#include <gtest/gtest.h>
using namespace gtirb;
using namespace schema;
#ifndef NDEBUG
TEST(Unit_AuxDataContainerDeathTest, SchemaRegistration) {
AuxDataContainer::registerAuxDataType<RegisteredType>();
// Able to re-register the same schema with no error.
AuxDataContainer::registerAuxDataType<RegisteredType>();
// Assertion if registering a second schema w/ duplicate name but
// incompatibable type.
{
[[maybe_unused]] PrepDeathTest PDT;
EXPECT_DEATH(AuxDataContainer::registerAuxDataType<DuplicateNameType>(),
"Different types registered for the same AuxData name.");
}
}
#endif
| 34.057143 | 76 | 0.762584 | clayne |
7452a8885c674b23ea68fe2bfe00861ef8c9af43 | 2,916 | cpp | C++ | third-party/qthread/qthread-src/test/benchmarks/mantevo/hpccg/mytimer.cpp | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 1,602 | 2015-01-06T11:26:31.000Z | 2022-03-30T06:17:21.000Z | third-party/qthread/qthread-src/test/benchmarks/mantevo/hpccg/mytimer.cpp | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 11,789 | 2015-01-05T04:50:15.000Z | 2022-03-31T23:39:19.000Z | third-party/qthread/qthread-src/test/benchmarks/mantevo/hpccg/mytimer.cpp | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 498 | 2015-01-08T18:58:18.000Z | 2022-03-20T15:37:45.000Z |
//@HEADER
// ************************************************************************
//
// HPCCG: Simple Conjugate Gradient Benchmark Code
// Copyright (2006) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S. Government.
//
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
//
// ************************************************************************
//@HEADER
/////////////////////////////////////////////////////////////////////////
// Function to return time in seconds.
// If compiled with no flags, return CPU time (user and system).
// If compiled with -DWALL, returns elapsed time.
/////////////////////////////////////////////////////////////////////////
#ifdef USING_MPI
#include <mpi.h> // If this routine is compiled with -DUSING_MPI
// then include mpi.h
double mytimer(void)
{
return(MPI_Wtime());
}
#elif defined(UseClock)
#include <time.hpp>
double mytimer(void)
{
clock_t t1;
static clock_t t0=0;
static double CPS = CLOCKS_PER_SEC;
double d;
if (t0 == 0) t0 = clock();
t1 = clock() - t0;
d = t1 / CPS;
return(d);
}
#elif defined(WALL)
#include <cstdlib>
#include <sys/time.h>
#include <sys/resource.h>
double mytimer(void)
{
struct timeval tp;
static long start=0, startu;
if (!start)
{
gettimeofday(&tp, NULL);
start = tp.tv_sec;
startu = tp.tv_usec;
return(0.0);
}
gettimeofday(&tp, NULL);
return( ((double) (tp.tv_sec - start)) + (tp.tv_usec-startu)/1000000.0 );
}
#elif defined(UseTimes)
#include <cstdlib>
#include <sys/times.h>
#include <unistd.h>
double mytimer(void)
{
struct tms ts;
static double ClockTick=0.0;
if (ClockTick == 0.0) ClockTick = (double) sysconf(_SC_CLK_TCK);
times(&ts);
return( (double) ts.tms_utime / ClockTick );
}
#else
#include <cstdlib>
#include <sys/time.h>
#include <sys/resource.h>
double mytimer(void)
{
struct rusage ruse;
getrusage(RUSAGE_SELF, &ruse);
return( (double)(ruse.ru_utime.tv_sec+ruse.ru_utime.tv_usec / 1000000.0) );
}
#endif
| 26.509091 | 78 | 0.608368 | jhh67 |
7452dbf34f38250e6c28d9cf4e057d30ce33af19 | 12,829 | cpp | C++ | tests/src/runtimeApi/synchronization/copy_coherency.cpp | parmance/HIP | 96ee9d1397f02ac4b4badd9243994728f6a89fe5 | [
"MIT"
] | 1,935 | 2017-05-28T04:52:18.000Z | 2022-03-30T23:50:43.000Z | tests/src/runtimeApi/synchronization/copy_coherency.cpp | JCLYHY23/HIP | 6a09344dba91a1a9816cb6bcdcc6d8bc6ea564c3 | [
"MIT"
] | 1,310 | 2017-05-30T22:16:09.000Z | 2022-03-31T08:25:58.000Z | tests/src/runtimeApi/synchronization/copy_coherency.cpp | JCLYHY23/HIP | 6a09344dba91a1a9816cb6bcdcc6d8bc6ea564c3 | [
"MIT"
] | 495 | 2017-06-01T01:26:27.000Z | 2022-03-28T16:36:51.000Z | /*
Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. 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.
*/
// ROCM_TARGET=gfx900 hipcc --genco memcpyInt.device.cpp -o memcpyInt.hsaco
// hipcc copy_coherency.cpp -I ~/X/HIP/tests/src/ ~/X/HIP/tests/src/test_common.cpp
// TODO - add code object support here.
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
* TEST: %t
* HIT_END
*/
// Test cache management (fences) and synchronization between kernel and copy commands.
// Exhaustively tests 3 command types (copy, kernel, module kernel),
// many sync types (see SyncType), followed by another command, across a sweep
// of data sizes designed to stress various levels of the memory hierarchy.
#include "hip/hip_runtime.h"
#include "test_common.h"
// TODO - turn this back on when test infra can copy the module files to use as test inputs.
#define SKIP_MODULE_KERNEL 1
class MemcpyFunction {
public:
MemcpyFunction(const char* fileName, const char* functionName) {
load(fileName, functionName);
};
void load(const char* fileName, const char* functionName);
void launch(int* dst, const int* src, size_t numElements, hipStream_t s);
private:
hipFunction_t _function;
hipModule_t _module;
};
void MemcpyFunction::load(const char* fileName, const char* functionName) {
#if SKIP_MODULE_KERNEL != 1
HIPCHECK(hipModuleLoad(&_module, fileName));
HIPCHECK(hipModuleGetFunction(&_function, _module, functionName));
#endif
};
void MemcpyFunction::launch(int* dst, const int* src, size_t numElements, hipStream_t s) {
struct {
int* _dst;
const int* _src;
size_t _numElements;
} args;
args._dst = dst;
args._src = src;
args._numElements = numElements;
size_t size = sizeof(args);
void* config[] = {HIP_LAUNCH_PARAM_BUFFER_POINTER, &args, HIP_LAUNCH_PARAM_BUFFER_SIZE, &size,
HIP_LAUNCH_PARAM_END};
unsigned blocks = HipTest::setNumBlocks(blocksPerCU, threadsPerBlock, numElements);
HIPCHECK(hipModuleLaunchKernel(_function, blocks, 1, 1, threadsPerBlock, 1, 1,
0 /*dynamicShared*/, s, NULL, (void**)&config));
};
bool g_warnOnFail = true;
// int g_elementSizes[] = {1, 16, 1024, 524288, 16*1000*1000}; // TODO
int g_elementSizes[] = {128 * 1000, 256 * 1000, 16 * 1000 * 1000};
MemcpyFunction g_moduleMemcpy("memcpyInt.hsaco", "memcpyIntKernel");
// Set value of array to specified 32-bit integer:
__global__ void memsetIntKernel(int* ptr, const int val, size_t numElements) {
int gid = (blockIdx.x * blockDim.x + threadIdx.x);
int stride = blockDim.x * gridDim.x;
for (size_t i = gid; i < numElements; i += stride) {
ptr[i] = val;
}
};
__global__ void memcpyIntKernel(int* dst, const int* src, size_t numElements) {
int gid = (blockIdx.x * blockDim.x + threadIdx.x);
int stride = blockDim.x * gridDim.x;
for (size_t i = gid; i < numElements; i += stride) {
dst[i] = src[i];
}
};
// CHeck arrays in reverse order, to more easily detect cases where
// the copy is "partially" done.
void checkReverse(const int* ptr, int numElements, int expected) {
int mismatchCnt = 0;
for (int i = numElements - 1; i >= 0; i--) {
if (ptr[i] != expected) {
fprintf(stderr, "%s**error: i=%d, ptr[i] == (%x) , does not equal expected (%x)\n%s",
KRED, i, ptr[i], expected, KNRM);
if (!g_warnOnFail) {
assert(ptr[i] == expected);
}
if (++mismatchCnt >= 10) {
break;
}
}
}
fprintf(stderr, "test: OK\n");
}
#define ENUM_CASE_STR(x) \
case x: \
return #x
enum CmdType { COPY, KERNEL, MODULE_KERNEL, MAX_CmdType };
const char* CmdTypeStr(CmdType c) {
switch (c) {
ENUM_CASE_STR(COPY);
ENUM_CASE_STR(KERNEL);
ENUM_CASE_STR(MODULE_KERNEL);
default:
return "UNKNOWN";
};
}
enum SyncType {
NONE,
EVENT_QUERY,
EVENT_SYNC,
STREAM_WAIT_EVENT,
STREAM_QUERY,
STREAM_SYNC,
DEVICE_SYNC,
MAX_SyncType
};
const char* SyncTypeStr(SyncType s) {
switch (s) {
ENUM_CASE_STR(NONE);
ENUM_CASE_STR(EVENT_QUERY);
ENUM_CASE_STR(EVENT_SYNC);
ENUM_CASE_STR(STREAM_WAIT_EVENT);
ENUM_CASE_STR(STREAM_QUERY);
ENUM_CASE_STR(STREAM_SYNC);
ENUM_CASE_STR(DEVICE_SYNC);
default:
return "UNKNOWN";
};
};
void runCmd(CmdType cmd, int* dst, const int* src, hipStream_t s, size_t numElements) {
switch (cmd) {
case COPY:
HIPCHECK(
hipMemcpyAsync(dst, src, numElements * sizeof(int), hipMemcpyDeviceToDevice, s));
break;
case KERNEL: {
unsigned blocks = HipTest::setNumBlocks(blocksPerCU, threadsPerBlock, numElements);
hipLaunchKernelGGL(memcpyIntKernel, dim3(blocks), dim3(threadsPerBlock), 0, s, dst, src,
numElements);
} break;
case MODULE_KERNEL:
g_moduleMemcpy.launch(dst, src, numElements, s);
break;
default:
failed("unknown cmd=%d type", cmd);
};
}
void resetInputs(int* Ad, int* Bd, int* Cd, int* Ch, size_t numElements, int expected) {
unsigned blocks = HipTest::setNumBlocks(blocksPerCU, threadsPerBlock, numElements);
hipLaunchKernelGGL(memsetIntKernel, dim3(blocks), dim3(threadsPerBlock), 0, hipStream_t(0), Ad,
expected, numElements);
hipLaunchKernelGGL(memsetIntKernel, dim3(blocks), dim3(threadsPerBlock), 0, hipStream_t(0), Bd,
0xDEADBEEF,
numElements); // poison with bad value to ensure is overwritten correctly
hipLaunchKernelGGL(memsetIntKernel, dim3(blocks), dim3(threadsPerBlock), 0, hipStream_t(0), Bd,
0xF000BA55,
numElements); // poison with bad value to ensure is overwritten correctly
memset(Ch, 13,
numElements * sizeof(int)); // poison with bad value to ensure is overwritten correctly
HIPCHECK(hipDeviceSynchronize());
}
// Intended to test proper synchronization and cache flushing between CMDA and CMDB.
// CMD are of type CmdType. All command copy memory, using either hipMemcpyAsync or kernel
// implementations. CmdA copies from Ad to Bd, Some form of synchronization is applied. Then cmdB
// copies from Bd to Cd.
//
// Cd is then copied to host Ch using a memory copy.
//
// Correct result at the end is that Ch contains the contents originally in Ad (integer 0x42)
void runTestImpl(CmdType cmdAType, SyncType syncType, CmdType cmdBType, hipStream_t stream1,
hipStream_t stream2, int numElements, int* Ad, int* Bd, int* Cd, int* Ch,
int expected) {
hipEvent_t e;
HIPCHECK(hipEventCreateWithFlags(&e, 0));
resetInputs(Ad, Bd, Cd, Ch, numElements, expected);
const size_t sizeElements = numElements * sizeof(int);
fprintf(stderr, "test: runTest with %zu bytes (%6.2f MB) cmdA=%s; sync=%s; cmdB=%s\n",
sizeElements, (double)(sizeElements / 1024.0), CmdTypeStr(cmdAType),
SyncTypeStr(syncType), CmdTypeStr(cmdBType));
if (SKIP_MODULE_KERNEL && ((cmdAType == MODULE_KERNEL) || (cmdBType == MODULE_KERNEL))) {
fprintf(stderr, "warn: skipping since test infra does not yet support modules\n");
return;
}
// Step A:
runCmd(cmdAType, Bd, Ad, stream1, numElements);
// Sync in-between?
switch (syncType) {
case NONE:
break;
case EVENT_QUERY: {
hipError_t st = hipErrorNotReady;
HIPCHECK(hipEventRecord(e, stream1));
do {
st = hipEventQuery(e);
} while (st == hipErrorNotReady);
HIPCHECK(st);
} break;
case EVENT_SYNC:
HIPCHECK(hipEventRecord(e, stream1));
HIPCHECK(hipEventSynchronize(e));
break;
case STREAM_WAIT_EVENT:
HIPCHECK(hipEventRecord(e, stream1));
HIPCHECK(hipStreamWaitEvent(stream2, e, 0));
break;
case STREAM_QUERY: {
hipError_t st = hipErrorNotReady;
do {
st = hipStreamQuery(stream1);
} while (st == hipErrorNotReady);
HIPCHECK(st);
} break;
case STREAM_SYNC:
HIPCHECK(hipStreamSynchronize(stream1));
break;
case DEVICE_SYNC:
HIPCHECK(hipDeviceSynchronize());
break;
default:
fprintf(stderr, "warning: unknown sync type=%s", SyncTypeStr(syncType));
return; // FIXME, this doesn't clean up
// failed("unknown sync type=%s", SyncTypeStr(syncType));
};
runCmd(cmdBType, Cd, Bd, stream2, numElements);
// Copy back to host, use async copy to avoid any extra synchronization that might mask issues.
HIPCHECK(hipMemcpyAsync(Ch, Cd, sizeElements, hipMemcpyDeviceToHost, stream2));
HIPCHECK(hipStreamSynchronize(stream2));
checkReverse(Ch, numElements, expected);
HIPCHECK(hipEventDestroy(e));
};
void testWrapper(size_t numElements) {
const size_t sizeElements = numElements * sizeof(int);
const int expected = 0x42;
int *Ad, *Bd, *Cd, *Ch;
HIPCHECK(hipMalloc(&Ad, sizeElements));
HIPCHECK(hipMalloc(&Bd, sizeElements));
HIPCHECK(hipMalloc(&Cd, sizeElements));
HIPCHECK(hipHostMalloc(&Ch, sizeElements)); // Ch is the end array
hipStream_t stream1, stream2;
HIPCHECK(hipStreamCreate(&stream1));
HIPCHECK(hipStreamCreate(&stream2));
HIPCHECK(hipDeviceSynchronize());
fprintf(stderr, "test: init complete, start running tests\n");
runTestImpl(COPY, EVENT_SYNC, KERNEL, stream1, stream2, numElements, Ad, Bd, Cd, Ch, expected);
for (int cmdA = 0; cmdA < MAX_CmdType; cmdA++) {
for (int cmdB = 0; cmdB < MAX_CmdType; cmdB++) {
for (int syncMode = 0; syncMode < MAX_SyncType; syncMode++) {
switch (syncMode) {
// case NONE::
case EVENT_QUERY:
case EVENT_SYNC:
case STREAM_WAIT_EVENT:
// case STREAM_QUERY:
case STREAM_SYNC:
case DEVICE_SYNC:
runTestImpl(CmdType(cmdA), SyncType(syncMode), CmdType(cmdB), stream1,
stream2, numElements, Ad, Bd, Cd, Ch, expected);
break;
default:
break;
}
}
}
}
#if 0
runTestImpl(COPY, STREAM_SYNC, MODULE_KERNEL, stream1, stream2, numElements, Ad, Bd, Cd, Ch, expected);
runTestImpl(COPY, STREAM_SYNC, KERNEL, stream1, stream2, numElements, Ad, Bd, Cd, Ch, expected);
runTestImpl(COPY, STREAM_WAIT_EVENT, MODULE_KERNEL, stream1, stream2, numElements, Ad, Bd, Cd, Ch, expected);
runTestImpl(COPY, STREAM_WAIT_EVENT, KERNEL, stream1, stream2, numElements, Ad, Bd, Cd, Ch, expected);
#endif
HIPCHECK(hipFree(Ad));
HIPCHECK(hipFree(Bd));
HIPCHECK(hipFree(Cd));
HIPCHECK(hipHostFree(Ch));
HIPCHECK(hipStreamDestroy(stream1));
HIPCHECK(hipStreamDestroy(stream2));
}
int main(int argc, char* argv[]) {
for (int index = 0; index < sizeof(g_elementSizes) / sizeof(int); index++) {
size_t numElements = g_elementSizes[index];
testWrapper(numElements);
}
passed();
}
// TODO
// - test environment variables
| 34.579515 | 113 | 0.628342 | parmance |
74532d6ffd32bd2419c23ebb30fa60d76516517c | 16,683 | cpp | C++ | src/CharacterMgr.cpp | CoderRaka/Game-Server | 3b3c5a5492653be682f0bb841aab047c62981237 | [
"MIT"
] | 85 | 2015-02-05T18:28:15.000Z | 2022-02-16T18:29:21.000Z | src/CharacterMgr.cpp | CoderRaka/Game-Server | 3b3c5a5492653be682f0bb841aab047c62981237 | [
"MIT"
] | 8 | 2015-03-10T01:28:22.000Z | 2018-01-19T16:26:57.000Z | src/CharacterMgr.cpp | CoderRaka/Game-Server | 3b3c5a5492653be682f0bb841aab047c62981237 | [
"MIT"
] | 70 | 2015-01-08T16:25:11.000Z | 2021-11-11T19:10:00.000Z | #include"Global.h"
void charMgr_beginCharacterSelection(clientGamemain_t *cgm)
{
pyMarshalString_t pms;
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addUnicode(&pms, (sint8*)"Name"); // familyName // this should be null if hasCharacters is 0
pym_addInt(&pms, 0); // hasCharacters
pym_addInt(&pms, cgm->userID); // userId
//pym_addInt(&pms, 5); // enabledRaceList
pym_tuple_begin(&pms);
pym_addInt(&pms, 1); // human
pym_addInt(&pms, 2); // forean_hybrid
pym_addInt(&pms, 3); // brann_hybrid
pym_addInt(&pms, 4); // thrax_hybrid
pym_tuple_end(&pms);
pym_addInt(&pms, 1); // bCanSkipBootcamp
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, BeginCharacterSelection, pym_getData(&pms), pym_getLen(&pms));
}
void charMgr_sendCharacterCreateSuccess(clientGamemain_t *cgm, sint8* familyName, sint32 slotNum)
{
pyMarshalString_t pms;
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addInt(&pms, slotNum); // slotNum
pym_addUnicode(&pms, familyName); // familyName
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, CharacterCreateSuccess, pym_getData(&pms), pym_getLen(&pms)); // 426 = CharacterCreateSuccess
}
void charMgr_sendCharacterCreateFailed(clientGamemain_t *cgm, sint32 errorCode)
{
pyMarshalString_t pms;
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addInt(&pms, errorCode); // errorCode
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, UserCreationFailed, pym_getData(&pms), pym_getLen(&pms));
}
void charMgr_sendCharacterDeleteSuccess(clientGamemain_t *cgm)
{
pyMarshalString_t pms;
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addInt(&pms, 1); // hasCharacters
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, CharacterDeleteSuccess, pym_getData(&pms), pym_getLen(&pms));
}
void charMgr_sendGeneratedCharacterName(clientGamemain_t *cgm, bool isMale)
{
pym_init(&cgm->pyms);
pym_tuple_begin(&cgm->pyms);
if( isMale )
pym_addUnicode(&cgm->pyms, (sint8*)"Richard");
else
pym_addUnicode(&cgm->pyms, (sint8*)"Rachel");
pym_tuple_end(&cgm->pyms);
netMgr_pythonAddMethodCallRaw(cgm, 5, GeneratedCharacterName, pym_getData(&cgm->pyms), pym_getLen(&cgm->pyms));
}
void charMgr_sendGeneratedFamilyName(clientGamemain_t *cgm)
{
pym_init(&cgm->pyms);
pym_tuple_begin(&cgm->pyms);
pym_addUnicode(&cgm->pyms, (sint8*)"Garriott");
pym_tuple_end(&cgm->pyms);
netMgr_pythonAddMethodCallRaw(cgm, 5, 456, pym_getData(&cgm->pyms), pym_getLen(&cgm->pyms));
}
// podIdx --> 0 to 15
void _charMgr_sendUpdateEmptyPod(clientGamemain_t *cgm, sint32 podIdx)
{
pyMarshalString_t pms;
pym_init(&pms);
pym_tuple_begin(&pms);
pym_dict_begin(&pms);
//SlotId
pym_dict_addKey(&pms, (sint8*)"SlotId");
pym_addInt(&pms, podIdx);
//IsSelected
pym_dict_addKey(&pms, (sint8*)"IsSelected");
if( podIdx == 1 )
pym_addInt(&pms, 1);
else
pym_addInt(&pms, 0);
//BodyData
pym_dict_addKey(&pms, (sint8*)"BodyData");
pym_addNoneStruct(&pms);
pym_dict_addKey(&pms, (sint8*)"AppearanceData");
pym_tuple_begin(&pms);
pym_tuple_end(&pms);
//CharacterData
pym_dict_addKey(&pms, (sint8*)"CharacterData");
pym_addNoneStruct(&pms);
//UserName
pym_dict_addKey(&pms, (sint8*)"UserName");
pym_addNoneStruct(&pms);
//GameContextId
pym_dict_addKey(&pms, (sint8*)"GameContextId");
pym_addNoneStruct(&pms);
//LoginData
pym_dict_addKey(&pms, (sint8*)"LoginData");
pym_addNoneStruct(&pms);
//ClanData
pym_dict_addKey(&pms, (sint8*)"ClanData");
pym_addNoneStruct(&pms);
pym_dict_end(&pms);
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, entityID_charPodFirst+podIdx-1, CharacterInfo, pym_getData(&pms), pym_getLen(&pms));
}
void charMgr_createSelectionPodEntitys(clientGamemain_t *cgm)
{
pyMarshalString_t pms;
for(sint32 i=0; i<16; i++)
{
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addInt(&pms, entityID_charPodFirst+i); // entityID
pym_addInt(&pms, 3543); // classID
pym_addNoneStruct(&pms); // entityData (dunno)
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, CreatePhysicalEntity, pym_getData(&pms), pym_getLen(&pms));
}
}
// slotId: 1-16
void charMgr_sendCharacterInfo(clientGamemain_t *cgm, sint32 slotId, di_characterPreview_t *charInfo)
{
if( charInfo == NULL )
{
_charMgr_sendUpdateEmptyPod(cgm, slotId);
return;
}
pyMarshalString_t pms;
pym_init(&pms);
pym_tuple_begin(&pms);
pym_dict_begin(&pms);
//SlotId
pym_dict_addKey(&pms, (sint8*)"SlotId");
pym_addInt(&pms, slotId);
//IsSelected
pym_dict_addKey(&pms, (sint8*)"IsSelected");
if( slotId == 0 )
pym_addInt(&pms, 1);
else
pym_addInt(&pms, 0);
//BodyData
pym_dict_addKey(&pms, (sint8*)"BodyData");
pym_tuple_begin(&pms);
pym_addInt(&pms, charInfo->genderIsMale?692:691); // 0 - genderClassId (human: m692,f691 )
pym_addInt(&pms, 1); // 1 - scale, actually is a float!
pym_tuple_end(&pms);
//CharacterData
pym_dict_addKey(&pms, (sint8*)"CharacterData");
pym_tuple_begin(&pms);
pym_addUnicode(&pms, charInfo->unicodeName); // 0 charname
pym_addInt(&pms, 1); // 1 Pos
pym_addInt(&pms, charInfo->experience); // 2 XPPtrs
pym_addInt(&pms, charInfo->level); // 3 XPLvl
pym_addInt(&pms, charInfo->body); // 4 Body
pym_addInt(&pms, charInfo->mind); // 5 Mind
pym_addInt(&pms, charInfo->spirit); // 6 Spirit
pym_addInt(&pms, charInfo->classID); // 7 Class
pym_addInt(&pms, charInfo->clonecredits); // 8 CloneCredits
pym_addInt(&pms, charInfo->raceID); // 9 RaceID
pym_tuple_end(&pms);
//AppearanceData
pym_dict_addKey(&pms, (sint8*)"AppearanceData");
pym_dict_begin(&pms);
for(sint32 i=0; i<SWAPSET_SIZE; i++)
{
if( charInfo->appearanceData[i].classId )
{
pym_addInt(&pms, i+1); // index(equipmentSlotId)
pym_tuple_begin(&pms);
pym_addInt(&pms, charInfo->appearanceData[i].classId); // classId
pym_tuple_begin(&pms);
uint32 hueR = (charInfo->appearanceData[i].hue>>0)&0xFF;
uint32 hueG = (charInfo->appearanceData[i].hue>>8)&0xFF;
uint32 hueB = (charInfo->appearanceData[i].hue>>16)&0xFF;
uint32 hueA = (charInfo->appearanceData[i].hue>>24)&0xFF;
pym_addInt(&pms, (sint32)hueR);
pym_addInt(&pms, (sint32)hueG);
pym_addInt(&pms, (sint32)hueB);
pym_addInt(&pms, (sint32)hueA);
pym_tuple_end(&pms);
pym_tuple_end(&pms);
}
}
pym_dict_end(&pms);
//UserName
pym_dict_addKey(&pms, (sint8*)"UserName");
pym_addUnicode(&pms, charInfo->unicodeFamily);
//GameContextId
pym_dict_addKey(&pms, (sint8*)"GameContextId");
pym_addInt(&pms, charInfo->currentContextId); // see gamecontextlanguage.txt
//LoginData
pym_dict_addKey(&pms, (sint8*)"LoginData");
pym_tuple_begin(&pms);
pym_addInt(&pms, charInfo->numLogins); // 0 numLogins
pym_addInt(&pms, charInfo->totalTimePlayed); // 1 totalTimePlayed
pym_addInt(&pms, charInfo->timeSinceLastPlayed); // 2 timeSinceLastPlayed
pym_tuple_end(&pms);
//ClanData
pym_dict_addKey(&pms, (sint8*)"ClanData");
pym_tuple_begin(&pms);
pym_addInt(&pms, 0); // 0 clanID (0 marks no-clan)
pym_addUnicode(&pms, ""); // 1 clanName
pym_tuple_end(&pms);
pym_dict_end(&pms);
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, entityID_charPodFirst+slotId-1, CharacterInfo, pym_getData(&pms), pym_getLen(&pms));
}
sint32 charMgr_recv_requestCharacterName(clientGamemain_t *cgm, uint8 *pyString, sint32 pyStringLen)
{
pym_init(&cgm->pyums, pyString, pyStringLen);
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
uint32 gender = pym_unpackInt(&cgm->pyums); // gender (0 - male, 1 - female)
uint32 langID = pym_unpackInt(&cgm->pyums); // Language ID "always 1"
charMgr_sendGeneratedCharacterName(cgm, gender==0);
return 1;
}
sint32 charMgr_recv_requestFamilyName(clientGamemain_t *cgm, uint8 *pyString, sint32 pyStringLen)
{
pym_init(&cgm->pyums, pyString, pyStringLen);
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
uint32 langID = pym_unpackInt(&cgm->pyums); // Language ID "always 1"
charMgr_sendGeneratedFamilyName(cgm);
return 1;
}
void _cb_charMgr_recv_requestCreateCharacterInSlot(void *param, di_characterLayout_t *characterData)
{
clientGamemain_t *cgm = (clientGamemain_t*)param;
if( characterData->error )
{
if( characterData->error_nameAlreadyInUse )
charMgr_sendCharacterCreateFailed(cgm, 7); // name in use
free(characterData);
return;
}
charMgr_sendCharacterCreateSuccess(cgm, characterData->unicodeFamily, characterData->slotIndex);
charMgr_updateCharacterSelection(cgm);
free(characterData);
}
sint32 charMgr_recv_requestCreateCharacterInSlot(clientGamemain_t *cgm, uint8 *pyString, sint32 pyStringLen)
{
di_characterLayout_t *characterData = (di_characterLayout_t*)malloc(sizeof(di_characterLayout_t));
RtlZeroMemory((void*)characterData, sizeof(di_characterLayout_t));
pym_init(&cgm->pyums, pyString, pyStringLen);
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
uint32 slotNum = pym_unpackInt(&cgm->pyums);
characterData->slotIndex = slotNum;
//sint8 familyName[128];
//sint8 firstName[128];
characterData->unicodeFamily[0] = '\0';
characterData->unicodeName[0] = '\0';
pym_unpackUnicode(&cgm->pyums, characterData->unicodeFamily, CHARACTER_FIRSTNAMELIMIT);
pym_unpackUnicode(&cgm->pyums, characterData->unicodeName, CHARACTER_FIRSTNAMELIMIT);
sint8 gender = pym_unpackInt(&cgm->pyums); // 0 --> male, 1 --> female
float scale = pym_unpackFloat(&cgm->pyums);
if( pym_unpackDict_begin(&cgm->pyums) == false )
return 0;
characterData->genderIsMale = gender == 0;
// scale is still todo
sint32 aCount = pym_getContainerSize(&cgm->pyums);
for(sint32 i=0; i<aCount; i++)
{
sint32 key = pym_unpackInt(&cgm->pyums);
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
sint32 templateId = pym_unpackInt(&cgm->pyums);
sint32 classId = gameData_getStarterItemTemplateClassId(templateId);
if( classId == 0 )
return 0; // unknown starter item
sint32 equipmentSlotId = gameData_getEquipmentClassIdSlot(classId);
if( equipmentSlotId == 0 )
return 0; // unknown starter item class id
if( key != equipmentSlotId )
return 0; // client has unsychrounous data
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
sint32 cLen = pym_getContainerSize(&cgm->pyums);
if( cLen != 4 ) // no 4 subelements
return 0;
sint32 hue1 = pym_unpackLongLong(&cgm->pyums); // R
sint32 hue2 = pym_unpackLongLong(&cgm->pyums); // G
sint32 hue3 = pym_unpackLongLong(&cgm->pyums); // B
sint32 hue4 = pym_unpackLongLong(&cgm->pyums); // A
uint32 hueRGBA = (hue1) | (hue2<<8) | (hue3<<16) | (hue4<<24);
characterData->appearanceData[equipmentSlotId-1].classId = classId;
characterData->appearanceData[equipmentSlotId-1].hue = hueRGBA;
}
// Default armor
characterData->appearanceData[0].classId = 10908; // helm
characterData->appearanceData[0].hue = 0xFF808080;
characterData->appearanceData[1].classId = 7054; // boots
characterData->appearanceData[1].hue = 0xFF808080;
characterData->appearanceData[2].classId = 10909; // gloves
characterData->appearanceData[2].hue = 0xFF808080;
characterData->appearanceData[14].classId = 7052; // torso
characterData->appearanceData[14].hue = 0xFF808080;
characterData->appearanceData[15].classId = 7053; // legs
characterData->appearanceData[15].hue = 0xFF808080;
// Default armor end
sint32 raceId = pym_unpackInt(&cgm->pyums);
if( raceId < 1 || raceId > 4 )
return 0; // invalid race
// setup other characterData
characterData->userID = cgm->userID;
characterData->raceID = raceId;
characterData->classId = 1; // recruit
// setup starting location
characterData->currentContextId = 1220 ; // wilderness (alia das)
characterData->posX = 894.9f;
characterData->posY = 307.9f;
characterData->posZ = 347.1f;
// check name for valid letters
bool validName = true;
sint32 nameLength = strlen((char*)characterData->unicodeName);
for(sint32 i=0; i<127; i++)
{
sint8 c = characterData->unicodeName[i];
if( !c )
break;
if( c >= 'a' && c <= 'z' )
continue;
if( c >= 'A' && c <= 'Z' )
continue;
if( c >= '0' && c <= '9' )
continue;
if( c == '_' || c == ' ' )
continue;
// passed through all, invalid character
validName = false;
break;
}
if( nameLength < 3 )
{
charMgr_sendCharacterCreateFailed(cgm, 2);
return 1;
}
if( nameLength > 20 )
{
charMgr_sendCharacterCreateFailed(cgm, 3);
return 1;
}
if( validName == false )
{
charMgr_sendCharacterCreateFailed(cgm, 4);
return 1;
}
// queue job for character creation
DataInterface_Character_createCharacter(characterData, _cb_charMgr_recv_requestCreateCharacterInSlot, cgm);
return 1;
}
void _cb_charMgr_recv_requestDeleteCharacterInSlot(void *param, diJob_deleteCharacter_t *jobData)
{
clientGamemain_t *cgm = (clientGamemain_t*)param;
charMgr_sendCharacterDeleteSuccess(cgm);
if( jobData->error == false )
if( jobData->slotId >= 1 && jobData->slotId <= 16 )
_charMgr_sendUpdateEmptyPod(cgm, jobData->slotId);
}
sint32 charMgr_recv_requestDeleteCharacterInSlot(clientGamemain_t *cgm, uint8 *pyString, sint32 pyStringLen)
{
pym_init(&cgm->pyums, pyString, pyStringLen);
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
uint32 slotId = pym_unpackInt(&cgm->pyums); // slotIndex
DataInterface_Character_deleteCharacter(cgm->userID, slotId, _cb_charMgr_recv_requestDeleteCharacterInSlot, cgm);
return 1;
}
void _cb_charMgr_initCharacterSelection(void *param, diJob_getCharacterPreviewInfo_t *jobData)
{
for(sint32 i=0; i<16; i++)
charMgr_sendCharacterInfo((clientGamemain_t*)param, i+1, jobData->outPreviewData[i]);
}
void charMgr_initCharacterSelection(clientGamemain_t *cgm)
{
charMgr_beginCharacterSelection(cgm);
charMgr_createSelectionPodEntitys(cgm);
// request character info
DataInterface_Character_getCharacterPreviewInfo(cgm->userID, -1, _cb_charMgr_initCharacterSelection, cgm);
}
void charMgr_updateCharacterSelection(clientGamemain_t *cgm)
{
// request character info
DataInterface_Character_getCharacterPreviewInfo(cgm->userID, -1, _cb_charMgr_initCharacterSelection, cgm);
}
/*selects the current character*/
void _cb_charMgr_recv_requestSwitchToCharacterInSlot(void *param, diJob_getCharacterPreviewInfo_t *jobData)
{
clientGamemain_t *cgm = (clientGamemain_t*)param;
sint32 slotIndex = jobData->slotIndex;
if( slotIndex < 1 || slotIndex > 16 )
return;
// check if character was found
di_characterPreview_t *characterData;
characterData = jobData->outPreviewData[slotIndex-1];
if( !characterData )
return;
cgm->mapLoadSlotId = slotIndex;
pyMarshalString_t pms;
// Test: send GM enabled
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addBool(&pms, true);
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, 366, pym_getData(&pms), pym_getLen(&pms));
// send PreWonkavate (clientMethod.134)
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addInt(&pms, 0); // wonkType - actually not used by the game
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 5, 134, pym_getData(&pms), pym_getLen(&pms));
// send Wonkavate (inputstateRouter.242)
pym_init(&pms);
pym_tuple_begin(&pms);
pym_addInt(&pms, characterData->currentContextId); // gameContextId (alias mapId)
cgm->mapLoadContextId = characterData->currentContextId;
pym_addInt(&pms, 0); // instanceId ( not important for now )
// find map version
sint32 mapVersion = 0;
for(sint32 i=0; i<mapInfoCount; i++)
{
if( mapInfoArray[i].contextId == characterData->currentContextId )
{
mapVersion = mapInfoArray[i].version;
break;
}
}
pym_addInt(&pms, mapVersion); // templateVersion ( from the map file? )
pym_tuple_begin(&pms); // startPosition
pym_addInt(&pms, characterData->posX); // x (todo: send as float)
pym_addInt(&pms, characterData->posY); // y (todo: send as float)
pym_addInt(&pms, characterData->posZ); // z (todo: send as float)
pym_tuple_end(&pms);
pym_addInt(&pms, 0); // startRotation (todo, read from db and send as float)
pym_tuple_end(&pms);
netMgr_pythonAddMethodCallRaw(cgm, 6, Wonkavate, pym_getData(&pms), pym_getLen(&pms));
// early pass the client to the mapChannel ( since it must load character )
cgm->State = GAMEMAIN_STATE_RELIEVED; // the gameMain thread will pass the client to the mapChannel
return;
}
sint32 charMgr_recv_requestSwitchToCharacterInSlot(clientGamemain_t *cgm, uint8 *pyString, sint32 pyStringLen)
{
pym_init(&cgm->pyums, pyString, pyStringLen);
if( pym_unpackTuple_begin(&cgm->pyums) == false )
return 0;
uint32 slotId = pym_unpackInt(&cgm->pyums); // slotIndex
//bool canSkipBootcamp = pym_readBool(&cgm->pymus); --> bool: 02(true false?)
// request character info
DataInterface_Character_getCharacterPreviewInfo(cgm->userID, slotId, _cb_charMgr_recv_requestSwitchToCharacterInSlot, cgm);
return true;
}
| 33.70303 | 132 | 0.735599 | CoderRaka |
7455ae178539249381cc24a9a7f492a583791938 | 646 | cpp | C++ | 10.12.2020/Task_2.cpp | andzh1/Advent_of_Code_2020 | a953e0977a6ee44bfcc0df66d50335be62c60cfb | [
"MIT"
] | null | null | null | 10.12.2020/Task_2.cpp | andzh1/Advent_of_Code_2020 | a953e0977a6ee44bfcc0df66d50335be62c60cfb | [
"MIT"
] | null | null | null | 10.12.2020/Task_2.cpp | andzh1/Advent_of_Code_2020 | a953e0977a6ee44bfcc0df66d50335be62c60cfb | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
int main(){
freopen("Puzzle_Input.txt", "r", stdin);
string s;
vector <int> input;
input.push_back(0);
while(cin >> s) input.push_back(stoi(s));
long long answer = 1;
sort(input.begin(), input.end());
for(int i = 0; i < input.size(); i++){
int dif = 1, ip = i;
while(dif == 1 && ip < input.size()){
dif = input[ip+1] - input[ip];
ip++;
} ip--;
if(ip != i && ip - i < 4) answer *= pow(2, ip - i - 1);
else if(ip - i == 4) answer *= 7;
i = ip;
}
cout << answer;
}
//Answer = 3947645370368 | 25.84 | 63 | 0.482972 | andzh1 |
745696ff98dbba1745faca706c9d6069f010bb8a | 7,403 | cpp | C++ | src/cascadia/TerminalCore/TerminalApi.cpp | Kapperchino/Terminal | 4c47631bf4aa907aad4f7088bc7edc7e5cde11b9 | [
"MIT"
] | 3 | 2019-05-31T13:51:53.000Z | 2020-05-11T15:01:08.000Z | src/cascadia/TerminalCore/TerminalApi.cpp | Kapperchino/Terminal | 4c47631bf4aa907aad4f7088bc7edc7e5cde11b9 | [
"MIT"
] | 1 | 2019-06-03T20:03:55.000Z | 2019-06-03T20:03:55.000Z | src/cascadia/TerminalCore/TerminalApi.cpp | vstoms/Terminal | 53f5ba294c5f84191dad517593cf6b330ee083c0 | [
"MIT"
] | 1 | 2019-09-15T10:27:17.000Z | 2019-09-15T10:27:17.000Z | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "Terminal.hpp"
using namespace Microsoft::Terminal::Core;
using namespace Microsoft::Console::Types;
using namespace Microsoft::Console::VirtualTerminal;
// Print puts the text in the buffer and moves the cursor
bool Terminal::PrintString(std::wstring_view stringView)
{
_WriteBuffer(stringView);
return true;
}
bool Terminal::ExecuteChar(wchar_t wch)
{
std::wstring_view view{&wch, 1};
_WriteBuffer(view);
return true;
}
bool Terminal::SetTextToDefaults(bool foreground, bool background)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
if (foreground)
{
attrs.SetDefaultForeground();
}
if (background)
{
attrs.SetDefaultBackground();
}
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::SetTextForegroundIndex(BYTE colorIndex)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
attrs.SetIndexedAttributes({ colorIndex }, {});
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::SetTextBackgroundIndex(BYTE colorIndex)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
attrs.SetIndexedAttributes({}, { colorIndex });
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::SetTextRgbColor(COLORREF color, bool foreground)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
attrs.SetColor(color, foreground);
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::BoldText(bool boldOn)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
if (boldOn)
{
attrs.Embolden();
}
else
{
attrs.Debolden();
}
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::UnderlineText(bool underlineOn)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
WORD metaAttrs = attrs.GetMetaAttributes();
WI_UpdateFlag(metaAttrs, COMMON_LVB_UNDERSCORE, underlineOn);
attrs.SetMetaAttributes(metaAttrs);
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::ReverseText(bool reversed)
{
TextAttribute attrs = _buffer->GetCurrentAttributes();
WORD metaAttrs = attrs.GetMetaAttributes();
WI_UpdateFlag(metaAttrs, COMMON_LVB_REVERSE_VIDEO, reversed);
attrs.SetMetaAttributes(metaAttrs);
_buffer->SetCurrentAttributes(attrs);
return true;
}
bool Terminal::SetCursorPosition(short x, short y)
{
const auto viewport = _GetMutableViewport();
const auto viewOrigin = viewport.Origin();
const short absoluteX = viewOrigin.X + x;
const short absoluteY = viewOrigin.Y + y;
COORD newPos{absoluteX, absoluteY};
viewport.Clamp(newPos);
_buffer->GetCursor().SetPosition(newPos);
return true;
}
COORD Terminal::GetCursorPosition()
{
const auto absoluteCursorPos = _buffer->GetCursor().GetPosition();
const auto viewport = _GetMutableViewport();
const auto viewOrigin = viewport.Origin();
const short relativeX = absoluteCursorPos.X - viewOrigin.X;
const short relativeY = absoluteCursorPos.Y - viewOrigin.Y;
COORD newPos{ relativeX, relativeY };
// TODO assert that the coord is > (0, 0) && <(view.W, view.H)
return newPos;
}
bool Terminal::EraseCharacters(const unsigned int numChars)
{
const auto absoluteCursorPos = _buffer->GetCursor().GetPosition();
const auto viewport = _GetMutableViewport();
const short distanceToRight = viewport.RightExclusive() - absoluteCursorPos.X;
const short fillLimit = std::min(static_cast<short>(numChars), distanceToRight);
auto eraseIter = OutputCellIterator(L' ', _buffer->GetCurrentAttributes(), fillLimit);
_buffer->Write(eraseIter, absoluteCursorPos);
return true;
}
bool Terminal::SetWindowTitle(std::wstring_view title)
{
_title = title;
if (_pfnTitleChanged)
{
_pfnTitleChanged(title);
}
return true;
}
// Method Description:
// - Updates the value in the colortable at index tableIndex to the new color
// dwColor. dwColor is a COLORREF, format 0x00BBGGRR.
// Arguments:
// - tableIndex: the index of the color table to update.
// - dwColor: the new COLORREF to use as that color table value.
// Return Value:
// - true iff we successfully updated the color table entry.
bool Terminal::SetColorTableEntry(const size_t tableIndex, const COLORREF dwColor)
{
if (tableIndex > _colorTable.size())
{
return false;
}
_colorTable.at(tableIndex) = dwColor;
// Repaint everything - the colors might have changed
_buffer->GetRenderTarget().TriggerRedrawAll();
return true;
}
// Method Description:
// - Sets the cursor style to the given style.
// Arguments:
// - cursorStyle: the style to be set for the cursor
// Return Value:
// - true iff we successfully set the cursor style
bool Terminal::SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle)
{
CursorType finalCursorType;
bool fShouldBlink;
switch (cursorStyle)
{
case DispatchTypes::CursorStyle::BlinkingBlockDefault:
[[fallthrough]];
case DispatchTypes::CursorStyle::BlinkingBlock:
finalCursorType = CursorType::FullBox;
fShouldBlink = true;
break;
case DispatchTypes::CursorStyle::SteadyBlock:
finalCursorType = CursorType::FullBox;
fShouldBlink = false;
break;
case DispatchTypes::CursorStyle::BlinkingUnderline:
finalCursorType = CursorType::Underscore;
fShouldBlink = true;
break;
case DispatchTypes::CursorStyle::SteadyUnderline:
finalCursorType = CursorType::Underscore;
fShouldBlink = false;
break;
case DispatchTypes::CursorStyle::BlinkingBar:
finalCursorType = CursorType::VerticalBar;
fShouldBlink = true;
break;
case DispatchTypes::CursorStyle::SteadyBar:
finalCursorType = CursorType::VerticalBar;
fShouldBlink = false;
break;
default:
finalCursorType = CursorType::Legacy;
fShouldBlink = false;
}
_buffer->GetCursor().SetType(finalCursorType);
_buffer->GetCursor().SetBlinkingAllowed(fShouldBlink);
return true;
}
// Method Description:
// - Updates the default foreground color from a COLORREF, format 0x00BBGGRR.
// Arguments:
// - dwColor: the new COLORREF to use as the default foreground color
// Return Value:
// - true
bool Terminal::SetDefaultForeground(const COLORREF dwColor)
{
_defaultFg = dwColor;
// Repaint everything - the colors might have changed
_buffer->GetRenderTarget().TriggerRedrawAll();
return true;
}
// Method Description:
// - Updates the default background color from a COLORREF, format 0x00BBGGRR.
// Arguments:
// - dwColor: the new COLORREF to use as the default background color
// Return Value:
// - true
bool Terminal::SetDefaultBackground(const COLORREF dwColor)
{
_defaultBg = dwColor;
_pfnBackgroundColorChanged(dwColor);
// Repaint everything - the colors might have changed
_buffer->GetRenderTarget().TriggerRedrawAll();
return true;
}
| 29.26087 | 91 | 0.685533 | Kapperchino |
745804fd65413743e46223c1e6d4cd30cbd24b9d | 16,989 | cpp | C++ | src/codegen/compiler/site.cpp | lostdj/avian | 394c5cacce092967d38fccee2f8a9c3b9160cccb | [
"0BSD"
] | null | null | null | src/codegen/compiler/site.cpp | lostdj/avian | 394c5cacce092967d38fccee2f8a9c3b9160cccb | [
"0BSD"
] | null | null | null | src/codegen/compiler/site.cpp | lostdj/avian | 394c5cacce092967d38fccee2f8a9c3b9160cccb | [
"0BSD"
] | null | null | null | /* Copyright (c) 2008-2014, Avian Contributors
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.
There is NO WARRANTY for this software. See license.txt for
details. */
#include "avian/target.h"
#include "codegen/compiler/context.h"
#include "codegen/compiler/value.h"
#include "codegen/compiler/site.h"
#include "codegen/compiler/resource.h"
#include "codegen/compiler/frame.h"
#include "codegen/compiler/promise.h"
namespace avian {
namespace codegen {
namespace compiler {
int intersectFrameIndexes(int a, int b)
{
if (a == NoFrameIndex or b == NoFrameIndex)
return NoFrameIndex;
if (a == AnyFrameIndex)
return b;
if (b == AnyFrameIndex)
return a;
if (a == b)
return a;
return NoFrameIndex;
}
SiteMask SiteMask::intersectionWith(const SiteMask& b)
{
return SiteMask(typeMask & b.typeMask,
registerMask & b.registerMask,
intersectFrameIndexes(frameIndex, b.frameIndex));
}
SiteIterator::SiteIterator(Context* c,
Value* v,
bool includeBuddies,
bool includeNextWord)
: c(c),
originalValue(v),
currentValue(v),
includeBuddies(includeBuddies),
includeNextWord(includeNextWord),
pass(0),
next_(findNext(&(v->sites))),
previous(0)
{
}
Site** SiteIterator::findNext(Site** p)
{
while (true) {
if (*p) {
if (pass == 0 or (*p)->registerSize(c) > c->targetInfo.pointerSize) {
return p;
} else {
p = &((*p)->next);
}
} else {
if (includeBuddies) {
Value* v = currentValue->buddy;
if (v != originalValue) {
currentValue = v;
p = &(v->sites);
continue;
}
}
if (includeNextWord and pass == 0) {
Value* v = originalValue->nextWord;
if (v != originalValue) {
pass = 1;
originalValue = v;
currentValue = v;
p = &(v->sites);
continue;
}
}
return 0;
}
}
}
bool SiteIterator::hasMore()
{
if (previous) {
next_ = findNext(&((*previous)->next));
previous = 0;
}
return next_ != 0;
}
Site* SiteIterator::next()
{
previous = next_;
return *previous;
}
void SiteIterator::remove(Context* c)
{
(*previous)->release(c, originalValue);
*previous = (*previous)->next;
next_ = findNext(previous);
previous = 0;
}
unsigned Site::registerSize(Context* c)
{
return c->targetInfo.pointerSize;
}
Site* constantSite(Context* c, Promise* value)
{
return new (c->zone) ConstantSite(value);
}
Site* constantSite(Context* c, int64_t value)
{
return constantSite(c, resolvedPromise(c, value));
}
class AddressSite : public Site {
public:
AddressSite(Promise* address) : address(address)
{
}
virtual unsigned toString(Context*, char* buffer, unsigned bufferSize)
{
if (address->resolved()) {
return vm::snprintf(
buffer, bufferSize, "address %" LLD, address->value());
} else {
return vm::snprintf(buffer, bufferSize, "address unresolved");
}
}
virtual unsigned copyCost(Context*, Site* s)
{
return (s == this ? 0 : AddressCopyCost);
}
virtual bool match(Context*, const SiteMask& mask)
{
return mask.typeMask & lir::Operand::AddressMask;
}
virtual bool loneMatch(Context*, const SiteMask&)
{
return false;
}
virtual bool matchNextWord(Context* c, Site*, unsigned)
{
abort(c);
}
virtual lir::Operand::Type type(Context*)
{
return lir::Operand::Type::Address;
}
virtual void asAssemblerOperand(Context* c UNUSED,
Site* high UNUSED,
lir::Operand* result)
{
assertT(c, high == this);
new (result) lir::Address(address);
}
virtual Site* copy(Context* c)
{
return addressSite(c, address);
}
virtual Site* copyLow(Context* c)
{
abort(c);
}
virtual Site* copyHigh(Context* c)
{
abort(c);
}
virtual Site* makeNextWord(Context* c, unsigned)
{
abort(c);
}
virtual SiteMask mask(Context*)
{
return SiteMask(lir::Operand::AddressMask, 0, NoFrameIndex);
}
virtual SiteMask nextWordMask(Context* c, unsigned)
{
abort(c);
}
Promise* address;
};
Site* addressSite(Context* c, Promise* address)
{
return new (c->zone) AddressSite(address);
}
RegisterSite::RegisterSite(RegisterMask mask, Register number)
: mask_(mask), number(number)
{
}
unsigned RegisterSite::toString(Context*, char* buffer, unsigned bufferSize)
{
if (number != NoRegister) {
return vm::snprintf(buffer, bufferSize, "%p register %d", this, number);
} else {
return vm::snprintf(
buffer, bufferSize, "%p register unacquired (mask %d)", this, mask_);
}
}
unsigned RegisterSite::copyCost(Context* c, Site* s)
{
assertT(c, number != NoRegister);
if (s and (this == s
or (s->type(c) == lir::Operand::Type::RegisterPair
and (static_cast<RegisterSite*>(s)->mask_.contains(number))))) {
return 0;
} else {
return RegisterCopyCost;
}
}
bool RegisterSite::match(Context* c UNUSED, const SiteMask& mask)
{
assertT(c, number != NoRegister);
if ((mask.typeMask & lir::Operand::RegisterPairMask)) {
return mask.registerMask.contains(number);
} else {
return false;
}
}
bool RegisterSite::loneMatch(Context* c UNUSED, const SiteMask& mask)
{
assertT(c, number != NoRegister);
if ((mask.typeMask & lir::Operand::RegisterPairMask)) {
return mask.registerMask.containsExactly(number);
} else {
return false;
}
}
bool RegisterSite::matchNextWord(Context* c, Site* s, unsigned)
{
assertT(c, number != NoRegister);
if (s->type(c) != lir::Operand::Type::RegisterPair) {
return false;
}
RegisterSite* rs = static_cast<RegisterSite*>(s);
unsigned size = rs->registerSize(c);
if (size > c->targetInfo.pointerSize) {
assertT(c, number != NoRegister);
return number == rs->number;
} else {
RegisterMask mask = c->regFile->generalRegisters;
return mask.contains(number) and mask.contains(rs->number);
}
}
void RegisterSite::acquire(Context* c, Value* v)
{
Target target;
if (number != NoRegister) {
target = Target(number, 0);
} else {
target = pickRegisterTarget(c, v, mask_);
expect(c, target.cost < Target::Impossible);
}
RegisterResource* resource = c->registerResources + target.index;
compiler::acquire(c, resource, v, this);
number = Register(target.index);
}
void RegisterSite::release(Context* c, Value* v)
{
assertT(c, number != NoRegister);
compiler::release(c, c->registerResources + number.index(), v, this);
}
void RegisterSite::freeze(Context* c, Value* v)
{
assertT(c, number != NoRegister);
c->registerResources[number.index()].freeze(c, v);
}
void RegisterSite::thaw(Context* c, Value* v)
{
assertT(c, number != NoRegister);
c->registerResources[number.index()].thaw(c, v);
}
bool RegisterSite::frozen(Context* c UNUSED)
{
assertT(c, number != NoRegister);
return c->registerResources[number.index()].freezeCount != 0;
}
lir::Operand::Type RegisterSite::type(Context*)
{
return lir::Operand::Type::RegisterPair;
}
void RegisterSite::asAssemblerOperand(Context* c UNUSED,
Site* high,
lir::Operand* result)
{
assertT(c, number != NoRegister);
Register highNumber;
if (high != this) {
highNumber = static_cast<RegisterSite*>(high)->number;
assertT(c, highNumber != NoRegister);
} else {
highNumber = NoRegister;
}
new (result) lir::RegisterPair(number, highNumber);
}
Site* RegisterSite::copy(Context* c)
{
RegisterMask mask;
if (number != NoRegister) {
mask = RegisterMask(number);
} else {
mask = mask_;
}
return freeRegisterSite(c, mask);
}
Site* RegisterSite::copyLow(Context* c)
{
abort(c);
}
Site* RegisterSite::copyHigh(Context* c)
{
abort(c);
}
Site* RegisterSite::makeNextWord(Context* c, unsigned)
{
assertT(c, number != NoRegister);
assertT(c, c->regFile->generalRegisters.contains(number));
return freeRegisterSite(c, c->regFile->generalRegisters);
}
SiteMask RegisterSite::mask(Context* c UNUSED)
{
return SiteMask(lir::Operand::RegisterPairMask, mask_, NoFrameIndex);
}
SiteMask RegisterSite::nextWordMask(Context* c, unsigned)
{
assertT(c, number != NoRegister);
if (registerSize(c) > c->targetInfo.pointerSize) {
return SiteMask(lir::Operand::RegisterPairMask, number, NoFrameIndex);
} else {
return SiteMask(lir::Operand::RegisterPairMask,
c->regFile->generalRegisters,
NoFrameIndex);
}
}
unsigned RegisterSite::registerSize(Context* c)
{
assertT(c, number != NoRegister);
if (c->regFile->floatRegisters.contains(number)) {
return c->arch->floatRegisterSize();
} else {
return c->targetInfo.pointerSize;
}
}
RegisterMask RegisterSite::registerMask(Context* c UNUSED)
{
assertT(c, number != NoRegister);
return RegisterMask(number);
}
Site* registerSite(Context* c, Register number)
{
assertT(c, number != NoRegister);
assertT(c,
(c->regFile->generalRegisters
| c->regFile->floatRegisters).contains(number));
return new (c->zone) RegisterSite(RegisterMask(number), number);
}
Site* freeRegisterSite(Context* c, RegisterMask mask)
{
return new (c->zone) RegisterSite(mask, NoRegister);
}
MemorySite::MemorySite(Register base, int offset, Register index, unsigned scale)
: acquired(false), base(base), offset(offset), index(index), scale(scale)
{
}
unsigned MemorySite::toString(Context*, char* buffer, unsigned bufferSize)
{
if (acquired) {
return vm::snprintf(
buffer, bufferSize, "memory %d 0x%x %d %d", base, offset, index, scale);
} else {
return vm::snprintf(buffer, bufferSize, "memory unacquired");
}
}
unsigned MemorySite::copyCost(Context* c, Site* s)
{
assertT(c, acquired);
if (s and (this == s or (s->type(c) == lir::Operand::Type::Memory
and static_cast<MemorySite*>(s)->base == base
and static_cast<MemorySite*>(s)->offset == offset
and static_cast<MemorySite*>(s)->index == index
and static_cast<MemorySite*>(s)->scale == scale))) {
return 0;
} else {
return MemoryCopyCost;
}
}
bool MemorySite::conflicts(const SiteMask& mask)
{
return (mask.typeMask & lir::Operand::RegisterPairMask) != 0
and (!mask.registerMask.contains(base)
or (index != NoRegister
and !mask.registerMask.contains(index)));
}
bool MemorySite::match(Context* c, const SiteMask& mask)
{
assertT(c, acquired);
if (mask.typeMask & lir::Operand::MemoryMask) {
if (mask.frameIndex >= 0) {
if (base == c->arch->stack()) {
assertT(c, index == NoRegister);
return static_cast<int>(frameIndexToOffset(c, mask.frameIndex))
== offset;
} else {
return false;
}
} else {
return true;
}
} else {
return false;
}
}
bool MemorySite::loneMatch(Context* c, const SiteMask& mask)
{
assertT(c, acquired);
if (mask.typeMask & lir::Operand::MemoryMask) {
if (base == c->arch->stack()) {
assertT(c, index == NoRegister);
if (mask.frameIndex == AnyFrameIndex) {
return false;
} else {
return true;
}
}
}
return false;
}
bool MemorySite::matchNextWord(Context* c, Site* s, unsigned index)
{
if (s->type(c) == lir::Operand::Type::Memory) {
MemorySite* ms = static_cast<MemorySite*>(s);
return ms->base == this->base
and ((index == 1
and ms->offset
== static_cast<int>(this->offset
+ c->targetInfo.pointerSize))
or (index == 0
and this->offset
== static_cast<int>(ms->offset
+ c->targetInfo.pointerSize)))
and ms->index == this->index and ms->scale == this->scale;
} else {
return false;
}
}
void MemorySite::acquire(Context* c, Value* v)
{
c->registerResources[base.index()].increment(c);
if (index != NoRegister) {
c->registerResources[index.index()].increment(c);
}
if (base == c->arch->stack()) {
assertT(c, index == NoRegister);
assertT(c, not c->frameResources[offsetToFrameIndex(c, offset)].reserved);
compiler::acquire(
c, c->frameResources + offsetToFrameIndex(c, offset), v, this);
}
acquired = true;
}
void MemorySite::release(Context* c, Value* v)
{
if (base == c->arch->stack()) {
assertT(c, index == NoRegister);
assertT(c, not c->frameResources[offsetToFrameIndex(c, offset)].reserved);
compiler::release(
c, c->frameResources + offsetToFrameIndex(c, offset), v, this);
}
c->registerResources[base.index()].decrement(c);
if (index != NoRegister) {
c->registerResources[index.index()].decrement(c);
}
acquired = false;
}
void MemorySite::freeze(Context* c, Value* v)
{
if (base == c->arch->stack()) {
c->frameResources[offsetToFrameIndex(c, offset)].freeze(c, v);
} else {
c->registerResources[base.index()].increment(c);
if (index != NoRegister) {
c->registerResources[index.index()].increment(c);
}
}
}
void MemorySite::thaw(Context* c, Value* v)
{
if (base == c->arch->stack()) {
c->frameResources[offsetToFrameIndex(c, offset)].thaw(c, v);
} else {
c->registerResources[base.index()].decrement(c);
if (index != NoRegister) {
c->registerResources[index.index()].decrement(c);
}
}
}
bool MemorySite::frozen(Context* c)
{
return base == c->arch->stack()
and c->frameResources[offsetToFrameIndex(c, offset)].freezeCount != 0;
}
lir::Operand::Type MemorySite::type(Context*)
{
return lir::Operand::Type::Memory;
}
void MemorySite::asAssemblerOperand(Context* c UNUSED,
Site* high UNUSED,
lir::Operand* result)
{
// todo: endianness?
assertT(c,
high == this
or (static_cast<MemorySite*>(high)->base == base
and static_cast<MemorySite*>(high)->offset
== static_cast<int>(offset + c->targetInfo.pointerSize)
and static_cast<MemorySite*>(high)->index == index
and static_cast<MemorySite*>(high)->scale == scale));
assertT(c, acquired);
new (result) lir::Memory(base, offset, index, scale);
}
Site* MemorySite::copy(Context* c)
{
return memorySite(c, base, offset, index, scale);
}
Site* MemorySite::copyHalf(Context* c, bool add)
{
if (add) {
return memorySite(
c, base, offset + c->targetInfo.pointerSize, index, scale);
} else {
return copy(c);
}
}
Site* MemorySite::copyLow(Context* c)
{
return copyHalf(c, c->arch->bigEndian());
}
Site* MemorySite::copyHigh(Context* c)
{
return copyHalf(c, not c->arch->bigEndian());
}
Site* MemorySite::makeNextWord(Context* c, unsigned index)
{
return memorySite(c,
base,
offset + ((index == 1) xor c->arch->bigEndian()
? c->targetInfo.pointerSize
: -c->targetInfo.pointerSize),
this->index,
scale);
}
SiteMask MemorySite::mask(Context* c)
{
return SiteMask(lir::Operand::MemoryMask,
0,
(base == c->arch->stack())
? static_cast<int>(offsetToFrameIndex(c, offset))
: NoFrameIndex);
}
SiteMask MemorySite::nextWordMask(Context* c, unsigned index)
{
int frameIndex;
if (base == c->arch->stack()) {
assertT(c, this->index == NoRegister);
frameIndex = static_cast<int>(offsetToFrameIndex(c, offset))
+ ((index == 1) xor c->arch->bigEndian() ? 1 : -1);
} else {
frameIndex = NoFrameIndex;
}
return SiteMask(lir::Operand::MemoryMask, 0, frameIndex);
}
bool MemorySite::isVolatile(Context* c)
{
return base != c->arch->stack();
}
MemorySite* memorySite(Context* c,
Register base,
int offset,
Register index,
unsigned scale)
{
return new (c->zone) MemorySite(base, offset, index, scale);
}
MemorySite* frameSite(Context* c, int frameIndex)
{
assertT(c, frameIndex >= 0);
return memorySite(c,
c->arch->stack(),
frameIndexToOffset(c, frameIndex),
NoRegister,
0);
}
} // namespace compiler
} // namespace codegen
} // namespace avian
| 24.029703 | 81 | 0.608747 | lostdj |
745b39a581c9e05e896d866408e9fa27a77a7fd3 | 1,832 | cpp | C++ | source/circle.cpp | momenarahmati/programmiersprachen-aufgabenblatt-2 | b1e3725cfb61dcd58e1e22bbe0ed25646f7d068e | [
"MIT"
] | null | null | null | source/circle.cpp | momenarahmati/programmiersprachen-aufgabenblatt-2 | b1e3725cfb61dcd58e1e22bbe0ed25646f7d068e | [
"MIT"
] | null | null | null | source/circle.cpp | momenarahmati/programmiersprachen-aufgabenblatt-2 | b1e3725cfb61dcd58e1e22bbe0ed25646f7d068e | [
"MIT"
] | null | null | null | #include "circle.hpp"
#include <cmath>
#include "color.hpp"
#include "mat2.hpp"
#include "vec2.hpp"
#include "window.hpp"
#define Pi 3.1415926
Circle::Circle() :
center_{ 0.0,0.0 },
radius_{ 1.0 },
color_{ 0,0,0 }
{}
Circle::Circle(Vec2 const& center, float const& radius) :
center_{ center },
radius_{ radius }
{}
Circle::Circle(Vec2 const& center, float const& radius, Color const& color) :
center_{ center },
radius_{ radius },
color_{ color }
{}
float Circle::diameter()const
{
float diameter = (radius_ * 2);
return diameter;
}
float Circle::circumrefrence() const
{
return Pi * radius() * 2;
}
Vec2 Circle::center() const //getter Function
{
return center_;
}
float Circle::radius() const //getter Function
{
return radius_;
}
void Circle::center(Vec2 const& center) //setter Function
{
center_ = center;
}
void Circle::radius(float radius) //setter Function
{
radius_ = radius;
}
void Circle::drawCircle(Window const& win)
{
win.draw_point(center_.x, center_.y, 0.0f, 0.0f, 0.0f);
for (int i = 1; i <= 360; i++) {
float M_PI = std::acos(-1.0);
Vec2 start = ((make_rotation_mat2(2 * i * M_PI / 360)) * Vec2(radius_, 0.0f) + center_);
Vec2 end = ((make_rotation_mat2(2 * M_PI * (i + 1) / 360)) * Vec2(radius_, 0.0f) + center_);
win.draw_line(start.x, start.y, end.x, end.y, 0.0f, 0.0f, 0.0f);
}
return;
}
void Circle::drawCircle(Window const& win, Color const& color) {
win.draw_point(center_.x, center_.y, color.r, color.g, color.b);
for (int i = 1; i <= 360; i++) {
float M_PI = std::acos(-1.0);
Vec2 start = ((make_rotation_mat2(2 * i * M_PI / 360)) * Vec2(radius_, 0.0f) + center_);
Vec2 end = ((make_rotation_mat2(2 * M_PI * (i + 1) / 360)) * Vec2(radius_, 0.0f) + center_);
win.draw_line(start.x, start.y, end.x, end.y, color.r, color.g, color.b);
}
return;
} | 24.756757 | 94 | 0.644105 | momenarahmati |
746108a2246c09087ec538a341c4a6cb9ff7eea5 | 370 | cpp | C++ | LydiaLabExpPlugins/modeDebug/ModeDebugPluginWidget.cpp | mcoder2014/LydiaLabExpPlugins | b3d33ad8acdbb8bea2d6fe81ca2552cb9e6d0a08 | [
"MIT"
] | 1 | 2020-10-26T09:24:29.000Z | 2020-10-26T09:24:29.000Z | LydiaLabExpPlugins/modeDebug/ModeDebugPluginWidget.cpp | mcoder2014/LydiaLabExpPlugins | b3d33ad8acdbb8bea2d6fe81ca2552cb9e6d0a08 | [
"MIT"
] | null | null | null | LydiaLabExpPlugins/modeDebug/ModeDebugPluginWidget.cpp | mcoder2014/LydiaLabExpPlugins | b3d33ad8acdbb8bea2d6fe81ca2552cb9e6d0a08 | [
"MIT"
] | 1 | 2022-03-06T18:52:28.000Z | 2022-03-06T18:52:28.000Z | #include "ModeDebugPluginWidget.h"
#include "ui_ModeDebugPluginWidget.h"
ModeDebugPluginWidget::ModeDebugPluginWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::ModeDebugPluginWidget)
{
ui->setupUi(this);
}
ModeDebugPluginWidget::~ModeDebugPluginWidget()
{
delete ui;
}
Ui::ModeDebugPluginWidget *ModeDebugPluginWidget::getUi()
{
return ui;
}
| 18.5 | 63 | 0.748649 | mcoder2014 |
746113cc75ef14c42f8707fe6bf5c04e63d4b149 | 679 | cpp | C++ | qrecthf.cpp | koalakoker/resParser | 263eee6f4660628161ee5e47e9e6bf8f6709b638 | [
"Unlicense"
] | null | null | null | qrecthf.cpp | koalakoker/resParser | 263eee6f4660628161ee5e47e9e6bf8f6709b638 | [
"Unlicense"
] | null | null | null | qrecthf.cpp | koalakoker/resParser | 263eee6f4660628161ee5e47e9e6bf8f6709b638 | [
"Unlicense"
] | null | null | null | #include "qrecthf.h"
QRectHF::QRectHF()
{
}
QRectHF::QRectHF(QPoint topleft, QPoint bottomright) : QRect(topleft,bottomright)
{
m_topHF = hfloat(topleft.y());
m_leftHF = hfloat(topleft.x());
m_bottomHF = hfloat(bottomright.y());
m_rightHF = hfloat(bottomright.x());
}
QRectHF::QRectHF(QRectHF& val) : QRect(val)
{
m_topHF = val.topHF();
m_bottomHF = val.bottomHF();
m_rightHF = val.rightHF();
m_leftHF = val.leftHF();
}
hfloat QRectHF::topHF(void)
{
return m_topHF;
}
hfloat QRectHF::bottomHF(void)
{
return m_bottomHF;
}
hfloat QRectHF::rightHF(void)
{
return m_rightHF;
}
hfloat QRectHF::leftHF(void)
{
return m_leftHF;
}
| 16.166667 | 81 | 0.662739 | koalakoker |
746277a9d0db4bb2ade9d2f1defa1e886de10f36 | 4,929 | cpp | C++ | framework/application/xlib_context.cpp | jbmcgee/gfxreconstruct | 54d822176aa0fd3269b7273283b1376cd1bd85b6 | [
"BSD-2-Clause",
"MIT"
] | 175 | 2019-02-22T23:13:03.000Z | 2022-03-15T15:20:25.000Z | framework/application/xlib_context.cpp | jbmcgee/gfxreconstruct | 54d822176aa0fd3269b7273283b1376cd1bd85b6 | [
"BSD-2-Clause",
"MIT"
] | 271 | 2019-02-22T21:04:41.000Z | 2022-03-31T05:22:36.000Z | framework/application/xlib_context.cpp | jbmcgee/gfxreconstruct | 54d822176aa0fd3269b7273283b1376cd1bd85b6 | [
"BSD-2-Clause",
"MIT"
] | 44 | 2019-03-29T22:54:46.000Z | 2022-03-22T21:01:20.000Z | /*
** Copyright (c) 2018 Valve Corporation
** Copyright (c) 2018-2021 LunarG, Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and associated documentation files (the "Software"),
** to deal in the Software without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Software, and to permit persons to whom the
** Software is furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
** DEALINGS IN THE SOFTWARE.
*/
#include "application/xlib_context.h"
#include "application/application.h"
#include "application/xlib_window.h"
#include "util/logging.h"
#include <cstdlib>
GFXRECON_BEGIN_NAMESPACE(gfxrecon)
GFXRECON_BEGIN_NAMESPACE(application)
static int ErrorHandler(Display* display, XErrorEvent* error_event)
{
GFXRECON_LOG_ERROR("Xlib error: %d", error_event->error_code);
return 0;
}
XlibContext::XlibContext(Application* application) : WsiContext(application)
{
if (!xlib_loader_.Initialize())
{
GFXRECON_LOG_DEBUG("Failed to initialize xlib loader");
return;
}
const auto xlib = xlib_loader_.GetFunctionTable();
xlib.SetErrorHandler(ErrorHandler);
display_ = xlib.OpenDisplay(nullptr);
if (!display_)
{
GFXRECON_LOG_DEBUG("Failed to open xlib display");
return;
}
window_factory_ = std::make_unique<XlibWindowFactory>(this);
}
XlibContext::~XlibContext()
{
if (display_ != nullptr)
{
const auto xlib = xlib_loader_.GetFunctionTable();
xlib.CloseDisplay(display_);
}
}
// A reference-counting interface to to XOpenDisplay/XCloseDisplay which shares
// a single display connection among multiple windows, and closes it when the
// last window is destroyed. This is a workaround for an issue with the NVIDIA
// driver which registers a callback for XCloseDisplay that needs to happen
// before the ICD is unloaded at vkDestroyInstance time.
// https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1894
Display* XlibContext::OpenDisplay()
{
if (display_ == nullptr)
{
auto xlib = xlib_loader_.GetFunctionTable();
display_ = xlib.OpenDisplay(nullptr);
}
++display_open_count_;
return display_;
}
void XlibContext::CloseDisplay(Display* display)
{
assert(display == display_);
if ((--display_open_count_ == 0) && (display_ != nullptr))
{
auto xlib = xlib_loader_.GetFunctionTable();
xlib.CloseDisplay(display_);
display_ = nullptr;
}
}
bool XlibContext::RegisterXlibWindow(XlibWindow* window)
{
return WsiContext::RegisterWindow(window);
}
bool XlibContext::UnregisterXlibWindow(XlibWindow* window)
{
return WsiContext::UnregisterWindow(window);
}
void XlibContext::ProcessEvents(bool wait_for_input)
{
assert(application_);
const auto xlib = xlib_loader_.GetFunctionTable();
while (application_->IsRunning() && (wait_for_input || (xlib.Pending(display_) > 0)))
{
wait_for_input = false;
XEvent event;
xlib.NextEvent(display_, &event);
switch (event.type)
{
case KeyRelease:
switch (event.xkey.keycode)
{
case 0x9: // Escape
application_->StopRunning();
break;
case 0x21: // p
case 0x41: // Space
application_->SetPaused(!application_->GetPaused());
break;
default:
break;
}
break;
case KeyPress:
switch (event.xkey.keycode)
{
// Using XCB_KEY_PRESS for repeat when key is held down.
case 0x72: // Right arrow
case 0x39: // n
if (application_->GetPaused())
{
application_->PlaySingleFrame();
}
break;
default:
break;
}
break;
}
}
}
GFXRECON_END_NAMESPACE(application)
GFXRECON_END_NAMESPACE(gfxrecon)
| 31 | 89 | 0.636437 | jbmcgee |
7463b5d92f96ee60aaea7a30bbb667b12e1632b1 | 897 | cpp | C++ | Scr/lab_huffman/src/print_as_ascii.cpp | bo-rc/data_structures | d568b240aff9ceaf5c220684358e32643b8b1864 | [
"MIT"
] | null | null | null | Scr/lab_huffman/src/print_as_ascii.cpp | bo-rc/data_structures | d568b240aff9ceaf5c220684358e32643b8b1864 | [
"MIT"
] | null | null | null | Scr/lab_huffman/src/print_as_ascii.cpp | bo-rc/data_structures | d568b240aff9ceaf5c220684358e32643b8b1864 | [
"MIT"
] | null | null | null | /**
* @file print_as_ascii.cpp
* A simple command line program that prints a binary file (as created from
* a BinaryFileWriter) as a sequence of ascii 0s and 1s.
*/
#include <iostream>
#include <string>
#include <vector>
#include "binary_file_reader.h"
void print_usage(const std::string& name)
{
std::cout
<< "Usage: " << name << " filename"
<< "\n\tPrints filename (a binary file) to standard out as a sequence"
" of ASCII 0s and 1s." << std::endl;
}
void print_as_ascii(const std::string& filename)
{
binary_file_reader file(filename);
while (file.has_bits())
std::cout << file.next_bit();
std::cout << std::endl;
}
int main(int argc, char** argv)
{
std::vector<std::string> args(argv, argv + argc);
if (args.size() < 2)
{
print_usage(args[0]);
return 1;
}
print_as_ascii(args[1]);
return 0;
}
| 22.425 | 78 | 0.617614 | bo-rc |
7464fe00bf0fe24c13b400af9da5d954590f232c | 4,747 | cpp | C++ | src/sequence/hmm/tools/hmm_train.cpp | Lolik111/meta | c7019401185cdfa15e1193aad821894c35a83e3f | [
"MIT"
] | 615 | 2015-01-31T17:14:03.000Z | 2022-03-27T03:03:02.000Z | src/sequence/hmm/tools/hmm_train.cpp | Lolik111/meta | c7019401185cdfa15e1193aad821894c35a83e3f | [
"MIT"
] | 167 | 2015-01-20T17:48:16.000Z | 2021-12-20T00:15:29.000Z | src/sequence/hmm/tools/hmm_train.cpp | Lolik111/meta | c7019401185cdfa15e1193aad821894c35a83e3f | [
"MIT"
] | 264 | 2015-01-30T00:08:01.000Z | 2022-03-02T17:19:11.000Z | /**
* @file hmm_train.cpp
* @author Chase Geigle
*/
#include <iostream>
#include "cpptoml.h"
#include "meta/hashing/probe_map.h"
#include "meta/io/filesystem.h"
#include "meta/io/gzstream.h"
#include "meta/logging/logger.h"
#include "meta/sequence/hmm/discrete_observations.h"
#include "meta/sequence/hmm/hmm.h"
#include "meta/sequence/io/ptb_parser.h"
#include "meta/util/progress.h"
using namespace meta;
std::string two_digit(uint8_t num)
{
std::stringstream ss;
ss << std::setw(2) << std::setfill('0') << static_cast<int>(num);
return ss.str();
}
/**
* Required config parameters:
* ~~~toml
* prefix = "global-data-prefix"
*
* [hmm]
* prefix = "path-to-model"
* treebank = "penn-treebank" # relative to data prefix
* corpus = "wsj"
* section-size = 99
* train-sections = [0, 18]
* dev-sections = [19, 21]
* test-sections = [22, 24]
* ~~~
*
* Optional config parameters: none
*/
int main(int argc, char** argv)
{
if (argc < 2)
{
std::cerr << "Usage: " << argv[0] << " config.toml" << std::endl;
return 1;
}
logging::set_cerr_logging();
auto config = cpptoml::parse_file(argv[1]);
auto prefix = config->get_as<std::string>("prefix");
if (!prefix)
{
LOG(fatal) << "Global configuration must have a prefix key" << ENDLG;
return 1;
}
auto seq_grp = config->get_table("hmm");
if (!seq_grp)
{
LOG(fatal) << "Configuration must contain a [hmm] group" << ENDLG;
return 1;
}
auto seq_prefix = seq_grp->get_as<std::string>("prefix");
if (!seq_prefix)
{
LOG(fatal) << "[hmm] group must contain a prefix to store model files"
<< ENDLG;
return 1;
}
auto treebank = seq_grp->get_as<std::string>("treebank");
if (!treebank)
{
LOG(fatal) << "[hmm] group must contain a treebank path" << ENDLG;
return 1;
}
auto corpus = seq_grp->get_as<std::string>("corpus");
if (!corpus)
{
LOG(fatal) << "[hmm] group must contain a corpus" << ENDLG;
return 1;
}
auto train_sections = seq_grp->get_array("train-sections");
if (!train_sections)
{
LOG(fatal) << "[hmm] group must contain train-sections" << ENDLG;
return 1;
}
auto section_size = seq_grp->get_as<int64_t>("section-size");
if (!section_size)
{
LOG(fatal) << "[hmm] group must contain section-size" << ENDLG;
return 1;
}
std::string path
= *prefix + "/" + *treebank + "/treebank-2/tagged/" + *corpus;
hashing::probe_map<std::string, term_id> vocab;
std::vector<std::vector<term_id>> training;
{
auto begin = train_sections->at(0)->as<int64_t>()->get();
auto end = train_sections->at(1)->as<int64_t>()->get();
printing::progress progress(
" > Reading training data: ",
static_cast<uint64_t>((end - begin + 1) * *section_size));
for (auto i = static_cast<uint8_t>(begin); i <= end; ++i)
{
auto folder = two_digit(i);
for (uint8_t j = 0; j <= *section_size; ++j)
{
progress(static_cast<uint64_t>(i - begin) * 99 + j);
auto file = *corpus + "_" + folder + two_digit(j) + ".pos";
auto filename = path + "/" + folder + "/" + file;
auto sequences = sequence::extract_sequences(filename);
for (auto& seq : sequences)
{
std::vector<term_id> instance;
instance.reserve(seq.size());
for (const auto& obs : seq)
{
auto it = vocab.find(obs.symbol());
if (it == vocab.end())
it = vocab.insert(obs.symbol(),
term_id{vocab.size()});
instance.push_back(it->value());
}
training.emplace_back(std::move(instance));
}
}
}
}
using namespace sequence;
using namespace hmm;
std::mt19937 rng{47};
discrete_observations<> obs_dist{
30, vocab.size(), rng, stats::dirichlet<term_id>{1e-6, vocab.size()}};
parallel::thread_pool pool;
hidden_markov_model<discrete_observations<>> hmm{
30, rng, std::move(obs_dist), stats::dirichlet<state_id>{1e-6, 30}};
decltype(hmm)::training_options options;
options.delta = 1e-5;
options.max_iters = 50;
hmm.fit(training, pool, options);
filesystem::make_directories(*seq_prefix);
{
io::gzofstream file{*seq_prefix + "/model.gz"};
hmm.save(file);
}
return 0;
}
| 28.42515 | 78 | 0.547925 | Lolik111 |
7468f4823bb7c06688068ccd69e9bfb46fa2c940 | 7,307 | cpp | C++ | src/impl.util.windows.cpp | stlsoft/recls | 8ffe32ce0fcf9cf9aeb6fa00c0a6e0bc3be78367 | [
"BSD-3-Clause"
] | 2 | 2015-10-08T09:46:51.000Z | 2019-10-11T20:32:24.000Z | src/impl.util.windows.cpp | stlsoft/recls | 8ffe32ce0fcf9cf9aeb6fa00c0a6e0bc3be78367 | [
"BSD-3-Clause"
] | null | null | null | src/impl.util.windows.cpp | stlsoft/recls | 8ffe32ce0fcf9cf9aeb6fa00c0a6e0bc3be78367 | [
"BSD-3-Clause"
] | 1 | 2021-02-15T23:42:24.000Z | 2021-02-15T23:42:24.000Z | /* /////////////////////////////////////////////////////////////////////////
* File: impl.util.windows.cpp
*
* Purpose: Windows utility functions for the recls API.
*
* Created: 17th August 2003
* Updated: 10th January 2017
*
* Home: http://recls.org/
*
* Copyright (c) 2003-2017, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* - 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(s) of Matthew Wilson and Synesis Software nor the
* names of any 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.
*
* ////////////////////////////////////////////////////////////////////// */
/* /////////////////////////////////////////////////////////////////////////
* includes
*/
#include <recls/recls.h>
#include <recls/assert.h>
#include "impl.root.h"
#include "impl.types.hpp"
#include "impl.util.h"
#include "impl.cover.h"
#include "impl.trace.h"
#include <ctype.h>
/* /////////////////////////////////////////////////////////////////////////
* namespace
*/
#if !defined(RECLS_NO_NAMESPACE)
namespace recls
{
namespace impl
{
#endif /* !RECLS_NO_NAMESPACE */
/* ////////////////////////////////////////////////////////////////////// */
RECLS_LINKAGE_C recls_char_t const* recls_find_directory_0_(recls_char_t const* path)
{
RECLS_COVER_MARK_LINE();
if(':' == path[1])
{
RECLS_COVER_MARK_LINE();
// It's a drive-prefixed absolute path, so ...
#if RECLS_TRACE_LEVEL > 0
if(!isalpha(path[0]))
{
RECLS_COVER_MARK_LINE();
recls_trace_printf_("recls_find_directory_0_() given an invalid path: %s", path);
}
#endif /* RECLS_TRACE_LEVEL > 0 */
// ... we just skip the drive
return &path[2];
}
else if('\\' == path[0] &&
'\\' == path[1])
{
RECLS_COVER_MARK_LINE();
// It's a UNC absolute path, so we have to find the share name (with a '\')
// and then the next slash or backslash
recls_char_t const* share = types::traits_type::str_chr(path + 2, '\\');
if(NULL == share)
{
RECLS_COVER_MARK_LINE();
goto bad_path_given;
}
else
{
RECLS_COVER_MARK_LINE();
recls_char_t const* slash = types::traits_type::str_chr(share + 1, '\\');
recls_char_t const* slash_a = types::traits_type::str_chr(share + 1, '/');
if( NULL == slash ||
( NULL != slash_a &&
slash_a < slash))
{
RECLS_COVER_MARK_LINE();
slash = slash_a;
}
if(NULL == slash)
{
RECLS_COVER_MARK_LINE();
goto bad_path_given;
}
else
{
RECLS_COVER_MARK_LINE();
return slash;
}
}
}
else
{
RECLS_ASSERT(2 < types::traits_type::str_len(path));
RECLS_COVER_MARK_LINE();
return path;
}
bad_path_given:
// Can't really do _anything_ sensible here, so we just return the
// end of the string.
#if RECLS_TRACE_LEVEL > 0
recls_trace_printf_("recls_find_directory_0_() given an invalid path: %s", path);
#endif /* RECLS_TRACE_LEVEL > 0 */
return path + types::traits_type::str_len(path);
}
RECLS_LINKAGE_C size_t recls_get_home_(recls_char_t* buff, size_t cchBuff)
{
RECLS_COVER_MARK_LINE();
recls_char_t homeDrive[1 + _MAX_DRIVE];
recls_char_t homeDir[1 + _MAX_DIR];
const size_t cchHomeDrive = types::traits_type::get_environment_variable( RECLS_LITERAL("HOMEDRIVE")
, &homeDrive[0]
, RECLS_NUM_ELEMENTS(homeDrive));
size_t cchHomeDir = types::traits_type::get_environment_variable( RECLS_LITERAL("HOMEPATH")
, &homeDir[0]
, RECLS_NUM_ELEMENTS(homeDir));
if( 0 == cchHomeDrive ||
RECLS_NUM_ELEMENTS(homeDrive) == cchHomeDrive)
{
RECLS_COVER_MARK_LINE();
return 0;
}
if( 0 == cchHomeDir ||
RECLS_NUM_ELEMENTS(homeDir) == cchHomeDir)
{
RECLS_COVER_MARK_LINE();
return 0;
}
if(!types::traits_type::has_dir_end(homeDir))
{
RECLS_COVER_MARK_LINE();
types::traits_type::ensure_dir_end(&homeDir[0] + cchHomeDir - 1);
++cchHomeDir;
}
if(NULL == buff)
{
RECLS_COVER_MARK_LINE();
return cchHomeDrive + cchHomeDir;
}
else
{
RECLS_COVER_MARK_LINE();
if(cchBuff <= cchHomeDrive)
{
RECLS_COVER_MARK_LINE();
recls_strncpy_(buff, cchBuff, homeDrive, cchHomeDrive);
return cchHomeDrive;
}
else if(cchBuff <= cchHomeDrive + cchHomeDir)
{
RECLS_COVER_MARK_LINE();
recls_strncpy_(buff, cchBuff, homeDrive, cchHomeDrive);
recls_strncpy_(buff + cchHomeDrive, cchBuff - cchHomeDrive, homeDir, cchHomeDir);
return cchBuff;
}
else
{
RECLS_COVER_MARK_LINE();
recls_strncpy_(buff, cchBuff, homeDrive, cchHomeDrive);
recls_strncpy_(buff + cchHomeDrive, cchBuff - cchHomeDrive, homeDir, cchHomeDir);
RECLS_ASSERT('\0' == buff[cchHomeDrive + cchHomeDir]);
return cchHomeDrive + cchHomeDir;
}
}
}
/* /////////////////////////////////////////////////////////////////////////
* namespace
*/
#if !defined(RECLS_NO_NAMESPACE)
} /* namespace impl */
} /* namespace recls */
#endif /* !RECLS_NO_NAMESPACE */
/* ///////////////////////////// end of file //////////////////////////// */
| 29.946721 | 112 | 0.553989 | stlsoft |
7469a566c41889448e7d6f34552233b07eacefaf | 7,185 | cpp | C++ | src/Algorithm/DataStructure/GridCluster.cpp | intellistream/Sesame | efbd40084c591059af851f71bdafd96ab021f524 | [
"MIT"
] | null | null | null | src/Algorithm/DataStructure/GridCluster.cpp | intellistream/Sesame | efbd40084c591059af851f71bdafd96ab021f524 | [
"MIT"
] | 48 | 2022-03-14T09:33:09.000Z | 2022-03-31T08:41:46.000Z | src/Algorithm/DataStructure/GridCluster.cpp | intellistream/Sesame | efbd40084c591059af851f71bdafd96ab021f524 | [
"MIT"
] | null | null | null | //
// Created by 1124a on 2021/10/27.
//
#include <Algorithm/DataStructure/GridCluster.hpp>
#include <Utils/Logger.hpp>
SESAME::GridCluster::GridCluster()
{
}
SESAME::GridCluster::GridCluster( int label)
{
this->clusterLabel = label;
}
//TODO: if Using this function, be careful when grids are not NULL
SESAME::GridCluster::GridCluster(HashGrids hashMap, int label)
{
HashGrids::iterator iterW;
for (iterW = hashMap.begin(); iterW != hashMap.end(); iterW++)
{
DensityGrid grid = iterW->first;
bool inside = iterW->second;
this->grids.insert(std::make_pair(grid, inside));
}
this->clusterLabel = label;
}
/**
* @param grid the density grid to add to the cluster
*/
void SESAME::GridCluster::addGrid(DensityGrid grid)
{
bool inside = isInside(grid);
if(this->grids.find(grid)!=this->grids.end())
this->grids.find(grid)->second=inside;
else
this->grids.insert(std::make_pair(grid,inside));
HashGrids::iterator iterW;
//Iterate on grids and judge whether they are inside grids or not
for (iterW = this->grids.begin(); iterW != this->grids.end(); iterW++)
{
bool inside2U = iterW->second;
if(!inside2U)
{
DensityGrid dg2U = iterW->first;
iterW->second=isInside(dg2U);
}
}
}
/**
* @param dg the density grid to remove from the cluster
*/
void SESAME::GridCluster::removeGrid(DensityGrid grid)
{
this->grids.erase(grid);
}
/**
* @param gridClus the GridCluster to be absorbed into this cluster
*/
void SESAME::GridCluster::absorbCluster(GridCluster gridCluster)
{
bool inside;
SESAME::HashGrids newCluster;
SESAME_INFO("Absorb cluster "<< gridCluster.clusterLabel <<" into cluster "<<this->clusterLabel<<".");
// Add each density grid from gridCluster into this->grids
auto grid=gridCluster.grids.begin();
while ( grid != gridCluster.grids.end())
{
//TODO whether they have same grids?
this->grids.insert(std::make_pair(grid->first, false));
grid++;
}
SESAME_INFO("...density grids added");
//Determine which density grids in this.grids are 'inside' and which are 'outside'
auto thisGrid=this->grids.begin();
while( thisGrid != this->grids.end())
{
inside = isInside(thisGrid->first);
if(newCluster.find(thisGrid->first)!= newCluster.end())
{
newCluster.find(thisGrid->first)->second=inside;
}
else
{
newCluster.insert(std::make_pair(thisGrid->first, inside));
}
thisGrid++;
}
this->grids = newCluster;
SESAME_INFO("...inside/outside determined");
}
/**
* Inside Grids are defined in Definition 3.5 of Chen and Tu 2007 as:
* Consider a grid group G and a grid g ∈ G, suppose g =(j1, ··· ,jd), if g has
* neighboring grids in every dimension i =1, ·· · ,d, then g is an inside grid
* in G.Otherwise g is an outside grid in G.
*
* @param grid the density grid to label as being inside or out
* @return TRUE if g is an inside grid, FALSE otherwise
*/
bool SESAME::GridCluster::isInside(DensityGrid grid)
{
std::vector<DensityGrid> neighbour= grid.getNeighbours();
for(auto gridNeighbourhood : neighbour)
{
if(this->grids.find(gridNeighbourhood)==this->grids.end())
{
return false;
}
}
return true;
}
/**
* Inside Grids are defined in Definition 3.5 of Chen and Tu 2007 as:
* Consider a grid group G and a grid g ∈ G, suppose g =(j1, ··· ,jd), if g has
* neighboring grids in every dimension i =1, ·· · ,d, then g is an inside grid
* in G. Otherwise g is an outside grid in G.
*
* @param grid the density grid being labelled as inside or outside
* @param other the density grid being proposed for addition
* @return TRUE if g would be an inside grid, FALSE otherwise
*/
bool SESAME::GridCluster::isInside(DensityGrid grid, DensityGrid other)
{
std::vector<DensityGrid> neighbour= grid.getNeighbours();
for(auto gridNeighbourhood : neighbour)
{
if(this->grids.find(gridNeighbourhood)!=this->grids.end()&&gridNeighbourhood == other)
{
return false;
}
}
return true;
}
/**
* Tests a grid cluster for connectedness according to Definition 3.4, Grid Group, from
* Chen and Tu 2007.
*
* Selects one density grid in the grid cluster as a starting point and iterates repeatedly
* through its neighbours until no more density grids in the grid cluster can be visited.
*
* @return TRUE if the cluster represent one single grid group; FALSE otherwise.
*/
bool SESAME::GridCluster::isConnected()
{
//TODO A little confused about here
if (!this->grids.empty())
{
DensityGrid grid = this->grids.begin()->first;
if(this->visited.find(grid)!=this->visited.end())
this->visited.find(grid)->second=this->grids.begin()->second;
else
this->visited.insert(std::make_pair(grid,this->grids.begin()->second));
bool changesMade;
do{
changesMade = false;
auto visIter= this->visited.begin();
HashGrids toAdd;
while(visIter!= this->visited.end() && toAdd.empty())
{
DensityGrid dg2V = visIter->first;
std::vector<DensityGrid> neighbour= dg2V.getNeighbours();
for(auto dg2VNeighbourhood : neighbour)
{
if(this->grids.find(dg2VNeighbourhood)!=this->grids.end()
&& this->visited.find(dg2VNeighbourhood)==this->visited.end())
toAdd.insert(std::make_pair(dg2VNeighbourhood, this->grids.find(dg2VNeighbourhood)->second));
}
visIter++;
}
if(!toAdd.empty())
{
HashGrids::iterator gridToAdd;
for (gridToAdd = toAdd.begin(); gridToAdd != toAdd.end(); gridToAdd++)
{
if(this->visited.find(gridToAdd->first)!=this->visited.end())
this->visited.find(gridToAdd->first)->second=gridToAdd->second;
else
this->visited.insert(std::make_pair(gridToAdd->first,gridToAdd->second));
}
changesMade = true;
}
}while(changesMade);
}
if (this->visited.size() == this->grids.size())
{
//SESAME_INFO("The cluster is still connected. "<<this->visited.size()+" of "<<this->grids.size()<<" reached.");
return true;
}
else
{
//SESAME_INFO("The cluster is no longer connected. "<<this.visited.size()<<" of "+this.grids.size()+" reached.");
return false;
}
}
/**
* Iterates through the DensityGrids in the cluster and calculates the inclusion probability for each.
*
* @return 1.0 if instance matches any of the density grids; 0.0 otherwise.
*/
double SESAME::GridCluster::getInclusionProb(Point point) {
HashGrids::iterator iterW;
//Iterate on grids and judge whether they are inside grids or not
for (iterW = this->grids.begin(); iterW != this->grids.end(); iterW++)
{
DensityGrid grid = iterW->first;
if(grid.getInclusionProbability(point) == 1.0)
return 1.0;
}
return 0.0;
}
bool SESAME::GridCluster::operator==(GridCluster& other)const {
bool equal = false;
if( clusterLabel == other.clusterLabel && grids.size()==other.grids.size()
&& visited.size()==other.visited.size())
equal = true;
return equal;
} | 30.062762 | 117 | 0.652192 | intellistream |
746c1ffc08fbe7812a9c30bd08f3bb6127ae702b | 235 | cpp | C++ | SeriesSum/series1/main.cpp | narendrajethi220/DSA | 26888fa0d529d6ee866f37e5305af50b1e9923e5 | [
"MIT"
] | null | null | null | SeriesSum/series1/main.cpp | narendrajethi220/DSA | 26888fa0d529d6ee866f37e5305af50b1e9923e5 | [
"MIT"
] | null | null | null | SeriesSum/series1/main.cpp | narendrajethi220/DSA | 26888fa0d529d6ee866f37e5305af50b1e9923e5 | [
"MIT"
] | null | null | null | #include <iostream>
using namespace std;
int main()
{
int N;
cout<<"Enter the range";
cin>>N;
double sum=0.0;
for(int i=1;i<=N;i++)
{
sum+=((double)1/(i*i));
}
cout<<sum;
return 0;
}
| 13.823529 | 29 | 0.476596 | narendrajethi220 |
746d470a3c2dcaad8d38bc0b1671d75daddc0e62 | 3,192 | cpp | C++ | platform_tools/android/launcher/skia_launcher.cpp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 111 | 2015-01-13T22:01:50.000Z | 2021-06-10T15:32:48.000Z | platform_tools/android/launcher/skia_launcher.cpp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 129 | 2015-01-14T16:07:02.000Z | 2020-03-11T19:44:42.000Z | platform_tools/android/launcher/skia_launcher.cpp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 64 | 2015-01-14T16:45:39.000Z | 2021-09-08T11:16:05.000Z | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <dlfcn.h>
#include <stdio.h>
void usage() {
printf("[USAGE] skia_launcher program_name [options]\n");
printf(" program_name: the skia program you want to launch (e.g. tests, bench)\n");
printf(" options: options specific to the program you are launching\n");
}
bool file_exists(const char* fileName) {
FILE* file = fopen(fileName, "r");
if (file) {
fclose(file);
return true;
}
return false;
}
int launch_app(int (*app_main)(int, const char**), int argc,
const char** argv) {
return (*app_main)(argc, argv);
}
void* load_library(const char* appLocation, const char* libraryName)
{
// attempt to lookup the location of the shared libraries
char libraryLocation[100];
sprintf(libraryLocation, "%s/lib%s.so", appLocation, libraryName);
if (!file_exists(libraryLocation)) {
printf("ERROR: Unable to find the '%s' library in the Skia App.\n", libraryName);
printf("ERROR: Did you provide the correct program_name?\n");
usage();
return NULL;
}
// load the appropriate library
void* appLibrary = dlopen(libraryLocation, RTLD_LOCAL | RTLD_LAZY);
if (!appLibrary) {
printf("ERROR: Unable to open the shared library.\n");
printf("ERROR: %s", dlerror());
return NULL;
}
return appLibrary;
}
int main(int argc, const char** argv) {
// check that the program name was specified
if (argc < 2) {
printf("ERROR: No program_name was specified\n");
usage();
return -1;
}
// attempt to lookup the location of the skia app
const char* appLocation = "/data/local/tmp";
if (!file_exists(appLocation)) {
printf("ERROR: Unable to find /data/local/tmp on the device.\n");
return -1;
}
void* skiaLibrary;
#if defined(SKIA_DLL)
// load the local skia shared library
skiaLibrary = load_library(appLocation, "skia_android");
if (NULL == skiaLibrary)
{
return -1;
}
#endif
// load the appropriate library
void* appLibrary = load_library(appLocation, argv[1]);
if (NULL == appLibrary) {
return -1;
}
#if !defined(SKIA_DLL)
skiaLibrary = appLibrary;
#endif
// find the address of the main function
int (*app_main)(int, const char**);
*(void **) (&app_main) = dlsym(appLibrary, "main");
if (!app_main) {
printf("ERROR: Unable to load the main function of the selected program.\n");
printf("ERROR: %s\n", dlerror());
return -1;
}
// find the address of the SkPrintToConsole function
void (*app_SkDebugToStdOut)(bool);
*(void **) (&app_SkDebugToStdOut) = dlsym(skiaLibrary, "AndroidSkDebugToStdOut");
if (app_SkDebugToStdOut) {
(*app_SkDebugToStdOut)(true);
} else {
printf("WARNING: Unable to redirect output to the console.\n");
printf("WARNING: %s\n", dlerror());
}
// pass all additional arguments to the main function
return launch_app(app_main, argc - 1, ++argv);
}
| 27.756522 | 89 | 0.62782 | quanganh2627 |
746ee98d246e1a64be2101c3a2c0923e28611ef3 | 1,361 | cpp | C++ | Sesion-1-Ambiente/Sesion-1-Ambiente/SH_BulletController.cpp | UPC-DESARROLLO-JUEGOS-1/2017-II-Shooter2D- | e8c17abe3023272f807cad38a11991d21b9242b8 | [
"MIT"
] | 1 | 2020-04-24T21:50:50.000Z | 2020-04-24T21:50:50.000Z | Sesion-1-Ambiente/Sesion-1-Ambiente/SH_BulletController.cpp | UPC-DESARROLLO-JUEGOS-1/2017-II-Shooter2D- | e8c17abe3023272f807cad38a11991d21b9242b8 | [
"MIT"
] | null | null | null | Sesion-1-Ambiente/Sesion-1-Ambiente/SH_BulletController.cpp | UPC-DESARROLLO-JUEGOS-1/2017-II-Shooter2D- | e8c17abe3023272f807cad38a11991d21b9242b8 | [
"MIT"
] | null | null | null | #include "SH_BulletController.h"
#include "SH_World.h"
#include "SH_BaseBullet.h"
#include "SH_PlayerBullet.h"
#include "SH_EnemyBullet.h"
#include "SH_EnumBullet.h"
SH_BulletController::SH_BulletController()
{
}
void SH_BulletController::Initialize(SH_World* world)
{
mWorld = world;
}
SH_BaseBullet* SH_BulletController::CreateBullet(SH_EnumBullet bulletType, float x, float y) {
SH_BaseBullet* result = nullptr;
std::string imagePath = "";
switch (bulletType)
{
case SH_EnumBullet::Player:
result = new SH_PlayerBullet();
imagePath = "Content/Sprites/spBullet.png";
break;
case SH_EnumBullet::Enemy:
result = new SH_EnemyBullet();
imagePath = "Content/Sprites/spBullet.png";
break;
}
if (result != nullptr) {
result->Initialize(mWorld, x, y, imagePath);
// agregar la bala al vector
mBullets.push_back(result);
}
return result;
}
void SH_BulletController::Update(float dt)
{
for (std::vector<SH_BaseBullet*>::iterator it = mBullets.begin(); it != mBullets.end();)
{
if (!(*it)->IsWaitingForDelete)
{
(*it)->Update(dt);
it++;
}
else
{
delete (*it);
it = mBullets.erase(it);
}
}
}
void SH_BulletController::Draw(float dt)
{
for (std::vector<SH_BaseBullet*>::iterator it = mBullets.begin(); it != mBullets.end();)
{
if (!(*it)->IsWaitingForDelete)
{
(*it)->Draw(dt);
}
it++;
}
}
| 18.902778 | 94 | 0.679647 | UPC-DESARROLLO-JUEGOS-1 |
746fca6bb3b63bd0d221a92b30a709046a15ba6f | 2,247 | cpp | C++ | src/test/cpp/skizzay/fsm/guarded_action_transition.t.cpp | skizzay/finite-state-machine | f7eef45c2a9a4508e035ed11f7ee75b69e3ad7ac | [
"MIT"
] | null | null | null | src/test/cpp/skizzay/fsm/guarded_action_transition.t.cpp | skizzay/finite-state-machine | f7eef45c2a9a4508e035ed11f7ee75b69e3ad7ac | [
"MIT"
] | null | null | null | src/test/cpp/skizzay/fsm/guarded_action_transition.t.cpp | skizzay/finite-state-machine | f7eef45c2a9a4508e035ed11f7ee75b69e3ad7ac | [
"MIT"
] | null | null | null | #include <catch.hpp>
#include <skizzay/fsm/ancestors.h>
#include <skizzay/fsm/guarded_action_transition.h>
using namespace skizzay::fsm;
namespace {
struct timer_expired {};
struct green {};
struct red {
bool should_transition_result = true;
bool should_transition(timer_expired const &) const noexcept {
return should_transition_result;
}
};
} // namespace
SCENARIO("actionable and guarded transition", "[unit][transition]") {
GIVEN("an actionable, guarded transition type from red to green") {
bool triggered = false;
auto action = [&triggered](timer_expired const &) noexcept {
triggered = true;
};
using target_type =
guarded_action_transition<red, green, timer_expired,
decltype(&red::should_transition),
decltype(action)>;
using fake_machine = details_::dummy_machine<states_list<red, green>,
events_list<timer_expired>,
std::tuple<target_type>>;
target_type target{&red::should_transition, action};
THEN("it models a transition") {
REQUIRE(is_transition<target_type>::value);
REQUIRE(concepts::transition<target_type>);
AND_THEN("it does also model an actionable transtion") {
REQUIRE(is_actionable_transition<target_type>::value);
REQUIRE(concepts::actionable_transition<target_type>);
}
}
WHEN("a timer expired event is queried for acceptance which is set to "
"pass") {
timer_expired const event;
bool const actual = target.accepts(red{true}, fake_machine{}, event);
THEN("the transition accepts the event") { REQUIRE(actual); }
AND_WHEN("triggered") {
target.on_triggered(timer_expired{});
THEN("the callback was fired") { REQUIRE(triggered); }
}
}
WHEN("a timer expired event is queried for acceptance which is set to "
"fail") {
bool const actual =
target.accepts(red{false}, fake_machine{}, timer_expired{});
THEN("the transition rejects the event") { REQUIRE_FALSE(actual); }
THEN("the callback was not fired") { REQUIRE_FALSE(triggered); }
}
}
} | 33.537313 | 76 | 0.635069 | skizzay |
7472b4b21fbdc5ea9a3368a16f08a2d36cfd01b1 | 5,181 | cpp | C++ | src/AMD/amd_dump.cpp | kikislater/micmac | 3009dbdad62b3ad906ec882b74b85a3db86ca755 | [
"CECILL-B"
] | 451 | 2016-11-25T09:40:28.000Z | 2022-03-30T04:20:42.000Z | src/AMD/amd_dump.cpp | kikislater/micmac | 3009dbdad62b3ad906ec882b74b85a3db86ca755 | [
"CECILL-B"
] | 143 | 2016-11-25T20:35:57.000Z | 2022-03-01T11:58:02.000Z | src/AMD/amd_dump.cpp | kikislater/micmac | 3009dbdad62b3ad906ec882b74b85a3db86ca755 | [
"CECILL-B"
] | 139 | 2016-12-02T10:26:21.000Z | 2022-03-10T19:40:29.000Z | /* ========================================================================= */
/* === AMD_dump ============================================================ */
/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/* AMD, Copyright (c) Timothy A. Davis, */
/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */
/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */
/* web: http://www.cise.ufl.edu/research/sparse/amd */
/* ------------------------------------------------------------------------- */
/* Debugging routines for AMD. Not used if NDEBUG_AMD is not defined at compile-
* time (the default). See comments in amd_internal.h on how to enable
* debugging. Not user-callable.
*/
#include "StdAfx.h"
#ifndef NDEBUG_AMD
/* This global variable is present only when debugging */
GLOBAL Int AMD_debug = -999 ; /* default is no debug printing */
/* ========================================================================= */
/* === AMD_debug_init ====================================================== */
/* ========================================================================= */
/* Sets the debug print level, by reading the file debug.amd (if it exists) */
GLOBAL void AMD_debug_init ( char *s )
{
FILE *f ;
f = ElFopen ("debug.amd", "r") ;
if (f == (FILE *) NULL)
{
AMD_debug = -999 ;
}
else
{
fscanf (f, ID, &AMD_debug) ;
ElFclose (f) ;
}
if (AMD_debug >= 0)
{
printf ("%s: AMD_debug_init, D= " ID"\n", s, AMD_debug) ;
}
}
/* ========================================================================= */
/* === AMD_dump ============================================================ */
/* ========================================================================= */
/* Dump AMD's data structure, except for the hash buckets. This routine
* cannot be called when the hash buckets are non-empty.
*/
GLOBAL void AMD_dump (
Int n, /* A is n-by-n */
Int Pe [ ], /* pe [0..n-1]: index in iw of start of row i */
Int Iw [ ], /* workspace of size iwlen, iwlen [0..pfree-1]
* holds the matrix on input */
Int Len [ ], /* len [0..n-1]: length for row i */
Int iwlen, /* length of iw */
Int pfree, /* iw [pfree ... iwlen-1] is empty on input */
Int Nv [ ], /* nv [0..n-1] */
Int Next [ ], /* next [0..n-1] */
Int Last [ ], /* last [0..n-1] */
Int Head [ ], /* head [0..n-1] */
Int Elen [ ], /* size n */
Int Degree [ ], /* size n */
Int W [ ], /* size n */
Int nel
)
{
Int i, pe, elen, nv, len, e, p, k, j, deg, w, cnt, ilast ;
if (AMD_debug < 0) return ;
ASSERT (pfree <= iwlen) ;
AMD_DEBUG3 (("\nAMD dump, pfree: " ID"\n", pfree)) ;
for (i = 0 ; i < n ; i++)
{
pe = Pe [i] ;
elen = Elen [i] ;
nv = Nv [i] ;
len = Len [i] ;
w = W [i] ;
if (elen >= EMPTY)
{
if (nv == 0)
{
AMD_DEBUG3 (("\nI " ID": nonprincipal: ", i)) ;
ASSERT (elen == EMPTY) ;
if (pe == EMPTY)
{
AMD_DEBUG3 ((" dense node\n")) ;
ASSERT (w == 1) ;
}
else
{
ASSERT (pe < EMPTY) ;
AMD_DEBUG3 ((" i " ID" -> parent " ID"\n", i, FLIP (Pe[i])));
}
}
else
{
AMD_DEBUG3 (("\nI " ID": active principal supervariable:\n",i));
AMD_DEBUG3 ((" nv(i): " ID" Flag: %d\n", nv, (nv < 0))) ;
ASSERT (elen >= 0) ;
ASSERT (nv > 0 && pe >= 0) ;
p = pe ;
AMD_DEBUG3 ((" e/s: ")) ;
if (elen == 0) AMD_DEBUG3 ((" : ")) ;
ASSERT (pe + len <= pfree) ;
for (k = 0 ; k < len ; k++)
{
j = Iw [p] ;
AMD_DEBUG3 ((" " ID"", j)) ;
ASSERT (j >= 0 && j < n) ;
if (k == elen-1) AMD_DEBUG3 ((" : ")) ;
p++ ;
}
AMD_DEBUG3 (("\n")) ;
}
}
else
{
e = i ;
if (w == 0)
{
AMD_DEBUG3 (("\nE " ID": absorbed element: w " ID"\n", e, w)) ;
ASSERT (nv > 0 && pe < 0) ;
AMD_DEBUG3 ((" e " ID" -> parent " ID"\n", e, FLIP (Pe [e]))) ;
}
else
{
AMD_DEBUG3 (("\nE " ID": unabsorbed element: w " ID"\n", e, w)) ;
ASSERT (nv > 0 && pe >= 0) ;
p = pe ;
AMD_DEBUG3 ((" : ")) ;
ASSERT (pe + len <= pfree) ;
for (k = 0 ; k < len ; k++)
{
j = Iw [p] ;
AMD_DEBUG3 ((" " ID"", j)) ;
ASSERT (j >= 0 && j < n) ;
p++ ;
}
AMD_DEBUG3 (("\n")) ;
}
}
}
/* this routine cannot be called when the hash buckets are non-empty */
AMD_DEBUG3 (("\nDegree lists:\n")) ;
if (nel >= 0)
{
cnt = 0 ;
for (deg = 0 ; deg < n ; deg++)
{
if (Head [deg] == EMPTY) continue ;
ilast = EMPTY ;
AMD_DEBUG3 ((ID": \n", deg)) ;
for (i = Head [deg] ; i != EMPTY ; i = Next [i])
{
AMD_DEBUG3 ((" " ID" : next " ID" last " ID" deg " ID"\n",
i, Next [i], Last [i], Degree [i])) ;
ASSERT (i >= 0 && i < n && ilast == Last [i] &&
deg == Degree [i]) ;
cnt += Nv [i] ;
ilast = i ;
}
AMD_DEBUG3 (("\n")) ;
}
ASSERT (cnt == n - nel) ;
}
}
#endif
| 28.467033 | 81 | 0.394132 | kikislater |
7478359e44d5f7d65fd52c8f994cc956a1720ee0 | 560 | cpp | C++ | Mutex/src/mutex1.cpp | tcandzq/CPPExperiment | db25532648d12fd5a2c86213d92f29f2cfe3f628 | [
"MIT"
] | null | null | null | Mutex/src/mutex1.cpp | tcandzq/CPPExperiment | db25532648d12fd5a2c86213d92f29f2cfe3f628 | [
"MIT"
] | null | null | null | Mutex/src/mutex1.cpp | tcandzq/CPPExperiment | db25532648d12fd5a2c86213d92f29f2cfe3f628 | [
"MIT"
] | null | null | null | #include<iostream>
#include<mutex>
#include<thread>
#include<vector>
using namespace std;
mutex g_mutex;
int g_count = 0;
void Counter()
{
g_mutex.lock();
int i = ++g_count;
cout << "cout: " << i << endl;
g_mutex.unlock();
}
int main()
{
const size_t SIZE = 4;
// Create a group of counter threads.
vector<thread> v;
v.reserve(SIZE);
for (size_t i = 0; i < SIZE; ++i)
{
v.emplace_back(&Counter);
}
//Wait for all the threads to finish.
for(thread& t:v)
t.join();
return 0;
} | 14.358974 | 41 | 0.564286 | tcandzq |
747d94b3ffd29bc75ade9032437c7a9cf291539d | 660 | cpp | C++ | codes/moderncpp/overload/overload02/main.cpp | eric2003/ModernCMake | 48fe5ed2f25481a7c93f86af38a692f4563afcaa | [
"MIT"
] | 3 | 2022-01-25T07:33:43.000Z | 2022-03-30T10:25:09.000Z | codes/moderncpp/overload/overload02/main.cpp | eric2003/ModernCMake | 48fe5ed2f25481a7c93f86af38a692f4563afcaa | [
"MIT"
] | null | null | null | codes/moderncpp/overload/overload02/main.cpp | eric2003/ModernCMake | 48fe5ed2f25481a7c93f86af38a692f4563afcaa | [
"MIT"
] | 2 | 2022-01-17T13:39:12.000Z | 2022-03-30T10:25:12.000Z | #include <iostream>
#include <variant>
template <class F1, class F2>
struct overload : F1, F2
{
overload(F1 const& f1, F2 const& f2) : F1{f1}, F2{f2}
{
std::cout << "overload::overload\n";
}
~overload()
{
std::cout << "overload::~overload\n";
}
using F1::operator();
using F2::operator();
};
int main( int argc, char **argv )
{
{
std::variant<std::string, int> var;
var = 1;
std::visit(
overload(
[](int){std::cout << "int!\n";},
[](std::string const&){std::cout << "string!\n";}
),
var
);
}
return 0;
}
| 18.333333 | 61 | 0.466667 | eric2003 |
747fbe79f4683c8648f39f794afa2085102ad952 | 793 | cpp | C++ | src/gfx/starfield_handler.cpp | janok15/TERE | aa73c7f13beff0c49914332f0b7fb585951c659b | [
"MIT"
] | null | null | null | src/gfx/starfield_handler.cpp | janok15/TERE | aa73c7f13beff0c49914332f0b7fb585951c659b | [
"MIT"
] | null | null | null | src/gfx/starfield_handler.cpp | janok15/TERE | aa73c7f13beff0c49914332f0b7fb585951c659b | [
"MIT"
] | null | null | null | #include <SFML/Graphics/RenderWindow.hpp>
#include "starfield_handler.h"
StarfieldHandler::StarfieldHandler(int xResolution, int yResolution)
{
srand(time(NULL));
nType = rand() % 6;
//nType = 0;
if(nType < 2)
starfield_a = new StarfieldA(xResolution, yResolution);
else
starfield_b = new StarfieldB(xResolution, yResolution, nType - 2);
}
void StarfieldHandler::update()
{
// Starfield is still updated even if drawing has been disabled
if(nType < 2)
starfield_a->update();
else
starfield_b->update();
}
void StarfieldHandler::draw(sf::RenderWindow &window, bool enabled)
{
if(enabled)
{
if(nType < 2)
starfield_a->draw(window);
else
starfield_b->draw(window);
}
}
| 18.880952 | 74 | 0.629256 | janok15 |
7486ebef9cbd8bbedbd028aeea3df44aee3ff04c | 6,267 | cpp | C++ | com/netfx/src/clr/tools/sos/get-table-info.cpp | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | com/netfx/src/clr/tools/sos/get-table-info.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | com/netfx/src/clr/tools/sos/get-table-info.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | // ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*
* Read from the class/offset table that resides within a debugged process.
*/
#include "strike.h"
#include "util.h"
#include "get-table-info.h"
#include <dump-tables.h>
#include "process-info.h"
#ifdef _DEBUG
#define DOUT OutputDebugStringW
#else
static void _ods (const wchar_t* s)
{
}
#define DOUT _ods
#endif
const ULONG_PTR InvalidOffset = static_cast<ULONG_PTR>(-1);
static HANDLE g_CurrentProcess = INVALID_HANDLE_VALUE;
static ClassDumpTable g_ClassTable;
static BOOL g_fClassTableInit = FALSE;
/**
* Initialize g_ClassTable to point to the class dump table in the debuggee
* process.
*/
bool InitializeOffsetTable ()
{
if (g_fClassTableInit)
return (true);
// We use the process handle to determine if we're debugging the same
// process. It's conceivable that the same debugger session will debug
// multiple programs, so the process may change, requiring everything to be
// re-loaded.
ULONG64 ProcHandle;
HANDLE hProcess;
HRESULT hr = E_FAIL;
if (SUCCEEDED(hr = g_ExtSystem->GetCurrentProcessHandle (&ProcHandle)))
{
// we cache the ClassDumpTable info, so we should only update it if the
// process changes.
hProcess = (HANDLE) ProcHandle;
if (g_CurrentProcess == hProcess)
return (true);
}
else
{
DOUT (L"Unable to get the current process.");
return (false);
}
// Module names don't include file name extensions.
ULONG64 BaseOfDll;
if (FAILED(hr = g_ExtSymbols->GetModuleByModuleName (
"mscorwks", 0, NULL, &BaseOfDll)))
{
DOUT (L"unable to get base of mscorwks.dll; trying mscorsvr.dll");
if (FAILED(hr = g_ExtSymbols->GetModuleByModuleName (
"mscorsvr", 0, NULL, &BaseOfDll)))
{
DOUT (L"unable to get base of mscorsvr.dll; stopping.");
return (false);
}
}
int tableName = 80;
ULONG_PTR TableAddress = NULL;
if (!GetExportByName ((ULONG_PTR) BaseOfDll,
reinterpret_cast<const char*>(tableName), &TableAddress))
{
DOUT (L"unable to find class dump table");
return (false);
}
ULONG bytesRead;
if (!SafeReadMemory (TableAddress, &g_ClassTable,
sizeof(g_ClassTable), &bytesRead))
{
DOUT (L"Lunable to read class dump table");
return (false);
}
// Is the version what we're expecting? If it isn't, we don't know what the
// correct indexes are.
if (g_ClassTable.version != 1)
return (false);
// At this point, everything has been initialized properly. Cache the
// process handle so we don't repeat all this.
g_CurrentProcess = hProcess;
g_fClassTableInit = TRUE;
return (true);
}
/**
* Return pointer to initialized class dump table.
*/
ClassDumpTable *GetClassDumpTable()
{
if (InitializeOffsetTable())
return &g_ClassTable;
return (NULL);
}
/**
* Return the memory location of the beginning of the ClassDumpInfo for the
* requested class.
*/
static ULONG_PTR GetClassInfo (size_t klass)
{
// is the requested class correct?
if (klass == (size_t)-1)
return (InvalidOffset);
// make sure our data is current.
if (!InitializeOffsetTable ())
return (InvalidOffset);
if (klass >= g_ClassTable.nentries)
return (InvalidOffset);
// g_ClassTable.classes is a continuous array of pointers to ClassDumpInfo
// objects. We need the address of the correct object.
ULONG BR; // bytes read
ULONG_PTR Class;
if (!SafeReadMemory (
reinterpret_cast<ULONG_PTR>(g_ClassTable.classes) + // base of array
(klass*sizeof(ClassDumpInfo*)), // memory offset into array
&Class,
sizeof(Class), &BR))
return (InvalidOffset);
return (Class);
}
ULONG_PTR GetMemberInformation (size_t klass, size_t member)
{
const ULONG_PTR error = InvalidOffset;
// get the location of the class in memory
ULONG_PTR pcdi;
if ((pcdi = GetClassInfo(klass)) == InvalidOffset)
return (error);
ULONG BR; // bytes read
ClassDumpInfo cdi;
if (!SafeReadMemory (pcdi, &cdi, sizeof(cdi), &BR))
return (error);
// get the member
if (member == (size_t)-1)
return (error);
if (member >= cdi.nmembers)
return (error);
ULONG_PTR size;
if (!SafeReadMemory (
reinterpret_cast<ULONG_PTR>(cdi.memberOffsets) + // base of offset array
(member*sizeof(ULONG_PTR)), // member index
&size,
sizeof(size),
&BR))
return (error);
return (size);
}
SIZE_T GetClassSize (size_t klass)
{
// reminder: in C++, all classes must be at least 1 byte in size
// (this is to prevent two variables from having the same memory address)
// Thus, 0 is an invalid class size value.
const SIZE_T error = 0;
// get the location of the class in memory
ULONG_PTR pcdi;
if ((pcdi = GetClassInfo(klass)) == InvalidOffset)
return (error);
// read in the class information.
ULONG BR; // bytes read
ClassDumpInfo cdi;
if (!SafeReadMemory (pcdi, &cdi, sizeof(cdi), &BR))
return (error);
return (cdi.classSize);
}
ULONG_PTR GetEEJitManager ()
{
if (InitializeOffsetTable())
return (g_ClassTable.pEEJitManagerVtable);
return (0);
}
ULONG_PTR GetEconoJitManager ()
{
if (InitializeOffsetTable())
return (g_ClassTable.pEconoJitManagerVtable);
return (0);
}
ULONG_PTR GetMNativeJitManager ()
{
if (InitializeOffsetTable())
return (g_ClassTable.pMNativeJitManagerVtable);
return (0);
}
| 28.103139 | 97 | 0.590394 | npocmaka |
7489844774ef8f830116f71d17e326f7529cea2f | 7,148 | cpp | C++ | test/unit/ut_action.cpp | MikeCharikov/vsm-cpp-sdk | 966dfe7cd3a436f8452e16c97328e720f882c484 | [
"BSD-3-Clause"
] | 1 | 2020-04-24T17:50:56.000Z | 2020-04-24T17:50:56.000Z | test/unit/ut_action.cpp | AlexandreBorowczyk/vsm-cpp-sdk | 234be1fc05697b79b88398b2c425a5b35d6e3ffb | [
"BSD-3-Clause"
] | null | null | null | test/unit/ut_action.cpp | AlexandreBorowczyk/vsm-cpp-sdk | 234be1fc05697b79b88398b2c425a5b35d6e3ffb | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2018, Smart Projects Holdings Ltd
// All rights reserved.
// See LICENSE file for license details.
#include <UnitTest++.h>
#include <ugcs/vsm/actions.h>
using namespace ugcs::vsm;
Geodetic_tuple geo_pos(1,2,3);
Wgs84_position position(geo_pos);
TEST(convertions_from_base_class_wait)
{
Action::Ptr action = Wait_action::Create(42);
CHECK(Action::Type::WAIT == action->Get_type());
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK_EQUAL(42, wa->wait_time);
Landing_action::Ptr la = action->Get_action<Action::Type::LANDING>();
CHECK(!la);
}
TEST(convertions_from_base_class_landing)
{
Action::Ptr action = Landing_action::Create(position, 10, 13.5, 0.42, 2);
CHECK(Action::Type::LANDING == action->Get_type());
Landing_action::Ptr la = action->Get_action<Action::Type::LANDING>();
CHECK_EQUAL(10, la->heading);
CHECK_EQUAL(13.5, la->elevation);
CHECK_EQUAL(0.42, la->descend_rate);
CHECK_EQUAL(2, la->acceptance_radius);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_move)
{
Action::Ptr action = Move_action::Create(position, 1, 2, 3, 4, 5);
CHECK(Action::Type::MOVE == action->Get_type());
Move_action::Ptr ma = action->Get_action<Action::Type::MOVE>();
CHECK_EQUAL(1, ma->wait_time);
CHECK_EQUAL(2, ma->acceptance_radius);
CHECK_EQUAL(3, ma->loiter_orbit);
CHECK_EQUAL(4, ma->heading);
CHECK_EQUAL(5, ma->elevation);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_payload_steering)
{
Action::Ptr action = Payload_steering_action::Create();
CHECK(Action::Type::PAYLOAD_STEERING == action->Get_type());
Payload_steering_action::Ptr pa = action->Get_action<Action::Type::PAYLOAD_STEERING>();
CHECK(pa);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_takeoff)
{
Action::Ptr action = Takeoff_action::Create(position, 42, 13.5, 0.12, 2);
CHECK(Action::Type::TAKEOFF == action->Get_type());
Takeoff_action::Ptr ta = action->Get_action<Action::Type::TAKEOFF>();
CHECK_EQUAL(42, ta->heading);
CHECK_EQUAL(13.5, ta->elevation);
CHECK_EQUAL(0.12, ta->climb_rate);
CHECK_EQUAL(2, ta->acceptance_radius);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_change_speed)
{
Action::Ptr action = Change_speed_action::Create(42, 0);
CHECK(Action::Type::CHANGE_SPEED == action->Get_type());
Change_speed_action::Ptr ca = action->Get_action<Action::Type::CHANGE_SPEED>();
CHECK_EQUAL(42, ca->speed);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_set_home)
{
Action::Ptr action = Set_home_action::Create(true, position, 13.5);
CHECK(Action::Type::SET_HOME == action->Get_type());
Set_home_action::Ptr sa = action->Get_action<Action::Type::SET_HOME>();
CHECK_EQUAL(true, sa->use_current_position);
CHECK_EQUAL(13.5, sa->elevation);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_poi)
{
Action::Ptr action = Poi_action::Create(position, true);
CHECK(Action::Type::POI == action->Get_type());
Poi_action::Ptr pa = action->Get_action<Action::Type::POI>();
CHECK(pa->active);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_heading)
{
Action::Ptr action = Heading_action::Create(M_PI);
CHECK(Action::Type::HEADING == action->Get_type());
Heading_action::Ptr ha = action->Get_action<Action::Type::HEADING>();
CHECK_EQUAL(M_PI, ha->heading);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_camera_control)
{
Action::Ptr action = Camera_control_action::Create(0, 0, 0, 42);
CHECK(Action::Type::CAMERA_CONTROL == action->Get_type());
Camera_control_action::Ptr cc = action->Get_action<Action::Type::CAMERA_CONTROL>();
CHECK_EQUAL(42, cc->zoom);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_camera_trigger)
{
Action::Ptr action = Camera_trigger_action::Create(
proto::CAMERA_MISSION_TRIGGER_STATE_OFF, std::chrono::seconds(1));
CHECK(Action::Type::CAMERA_TRIGGER == action->Get_type());
Camera_trigger_action::Ptr ct = action->Get_action<Action::Type::CAMERA_TRIGGER>();
CHECK_EQUAL(proto::CAMERA_MISSION_TRIGGER_STATE_OFF, ct->state);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_task_attributes)
{
using Emerg = Task_attributes_action::Emergency_action;
Action::Ptr action = Task_attributes_action::Create(
42, Emerg::GO_HOME, Emerg::LAND, Emerg::WAIT);
CHECK(Action::Type::TASK_ATTRIBUTES == action->Get_type());
Task_attributes_action::Ptr ta = action->Get_action<Action::Type::TASK_ATTRIBUTES>();
CHECK_EQUAL(42, ta->safe_altitude);
CHECK_EQUAL(Emerg::GO_HOME, ta->rc_loss);
CHECK_EQUAL(Emerg::LAND, ta->gnss_loss);
CHECK_EQUAL(Emerg::WAIT, ta->low_battery);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
TEST(convertions_from_base_class_panorama)
{
Action::Ptr action = Panorama_action::Create(
proto::PANORAMA_MODE_PHOTO,
M_PI,
M_PI / 10,
std::chrono::milliseconds(500),
M_PI / 10);
CHECK(Action::Type::PANORAMA == action->Get_type());
Panorama_action::Ptr pa = action->Get_action<Action::Type::PANORAMA>();
CHECK_EQUAL(proto::PANORAMA_MODE_PHOTO, pa->trigger_state);
CHECK(std::chrono::milliseconds(500) == pa->delay);
Wait_action::Ptr wa = action->Get_action<Action::Type::WAIT>();
CHECK(!wa);
}
const double tol = 0.000001;
template<class Pld_mission_item_ex>
void Fill_mavlink_position(Pld_mission_item_ex& item)
{
item->x = 89.999; /* lat grad */
item->y = 179.999; /* lon grad */
item->z = 42; /* alt m */
}
#define CHECK_GEO_POSITION(geo_pos) \
CHECK_CLOSE(1, geo_pos.latitude, tol); \
CHECK_CLOSE(2, geo_pos.longitude, tol); \
CHECK_EQUAL(3, geo_pos.altitude);
#define STRINGIFY_(x_) #x_
#define STRINGIFY(x_) STRINGIFY_(x_)
TEST(construct_move)
{
#define P(n,v) p.emplace(n, Property::Create(n, v, proto::FIELD_SEMANTIC_NUMERIC));
Property_list p;
P("latitude", 1)
P("longitude", 2)
P("altitude_amsl", 3)
P("acceptance_radius", 3)
P("heading", 1)
P("loiter_radius", 5)
P("wait_time", 1)
P("ground_elevation", 1.5)
P("turn_type", 1)
Move_action ma(p);
CHECK_GEO_POSITION(ma.position.Get_geodetic());
CHECK_CLOSE(1, ma.wait_time, tol);
CHECK_EQUAL(3, ma.acceptance_radius);
CHECK_EQUAL(5, ma.loiter_orbit);
CHECK_CLOSE(1, ma.heading, tol);
CHECK_CLOSE(1.5, ma.elevation, tol);
}
| 34.038095 | 91 | 0.686766 | MikeCharikov |
748dd6b440dfd6e72a455bf9becd9994ccd93198 | 19,961 | cpp | C++ | printscan/wia/common/jpeglib/jmemdos.cpp | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | printscan/wia/common/jpeglib/jmemdos.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | printscan/wia/common/jpeglib/jmemdos.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | /*
* jmemdos.c
*
* Copyright (C) 1992-1994, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file provides an MS-DOS-compatible implementation of the system-
* dependent portion of the JPEG memory manager. Temporary data can be
* stored in extended or expanded memory as well as in regular DOS files.
*
* If you use this file, you must be sure that NEED_FAR_POINTERS is defined
* if you compile in a small-data memory model; it should NOT be defined if
* you use a large-data memory model. This file is not recommended if you
* are using a flat-memory-space 386 environment such as DJGCC or Watcom C.
* Also, this code will NOT work if struct fields are aligned on greater than
* 2-byte boundaries.
*
* Based on code contributed by Ge' Weijers.
*/
/*
* If you have both extended and expanded memory, you may want to change the
* order in which they are tried in jopen_backing_store. On a 286 machine
* expanded memory is usually faster, since extended memory access involves
* an expensive protected-mode-and-back switch. On 386 and better, extended
* memory is usually faster. As distributed, the code tries extended memory
* first (what? not everyone has a 386? :-).
*
* You can disable use of extended/expanded memory entirely by altering these
* definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0).
*/
#ifndef XMS_SUPPORTED
#define XMS_SUPPORTED 1
#endif
#ifndef EMS_SUPPORTED
#define EMS_SUPPORTED 1
#endif
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jmemsys.h" /* import the system-dependent declarations */
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare these */
extern void * malloc JPP((size_t size));
extern void free JPP((void *ptr));
extern char * getenv JPP((const char * name));
#endif
#ifdef NEED_FAR_POINTERS
#ifdef __TURBOC__
/* These definitions work for Borland C (Turbo C) */
#include <alloc.h> /* need farmalloc(), farfree() */
#define far_malloc(x) farmalloc(x)
#define far_free(x) farfree(x)
#else
/* These definitions work for Microsoft C and compatible compilers */
#include <malloc.h> /* need _fmalloc(), _ffree() */
#define far_malloc(x) _fmalloc(x)
#define far_free(x) _ffree(x)
#endif
#else /* not NEED_FAR_POINTERS */
#define far_malloc(x) malloc(x)
#define far_free(x) free(x)
#endif /* NEED_FAR_POINTERS */
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
#define READ_BINARY "r"
#else
#define READ_BINARY "rb"
#endif
#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */
MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */
#endif
/*
* Declarations for assembly-language support routines (see jmemdosa.asm).
*
* The functions are declared "far" as are all pointer arguments;
* this ensures the assembly source code will work regardless of the
* compiler memory model. We assume "short" is 16 bits, "long" is 32.
*/
typedef void far * XMSDRIVER; /* actually a pointer to code */
typedef struct { /* registers for calling XMS driver */
unsigned short ax, dx, bx;
void far * ds_si;
} XMScontext;
typedef struct { /* registers for calling EMS driver */
unsigned short ax, dx, bx;
void far * ds_si;
} EMScontext;
EXTERN short far jdos_open JPP((short far * handle, char far * filename));
EXTERN short far jdos_close JPP((short handle));
EXTERN short far jdos_seek JPP((short handle, long offset));
EXTERN short far jdos_read JPP((short handle, void far * buffer,
unsigned short count));
EXTERN short far jdos_write JPP((short handle, void far * buffer,
unsigned short count));
EXTERN void far jxms_getdriver JPP((XMSDRIVER far *));
EXTERN void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *));
EXTERN short far jems_available JPP((void));
EXTERN void far jems_calldriver JPP((EMScontext far *));
/*
* Selection of a file name for a temporary file.
* This is highly system-dependent, and you may want to customize it.
*/
static int next_file_num; /* to distinguish among several temp files */
LOCAL void
select_file_name (char * fname)
{
const char * env;
char * ptr;
FILE * tfile;
/* Keep generating file names till we find one that's not in use */
for (;;) {
/* Get temp directory name from environment TMP or TEMP variable;
* if none, use "."
*/
if ((env = (const char *) getenv("TMP")) == NULL)
if ((env = (const char *) getenv("TEMP")) == NULL)
env = ".";
if (*env == '\0') /* null string means "." */
env = ".";
ptr = fname; /* copy name to fname */
while (*env != '\0')
*ptr++ = *env++;
if (ptr[-1] != '\\' && ptr[-1] != '/')
*ptr++ = '\\'; /* append backslash if not in env variable */
/* Append a suitable file name */
next_file_num++; /* advance counter */
wsprintf(ptr, "JPG%03d.TMP", next_file_num);
/* Probe to see if file name is already in use */
#ifdef DEAD_CODE
if ((tfile = fopen(fname, READ_BINARY)) == NULL)
break;
fclose(tfile); /* oops, it's there; close tfile & try again */
#endif
}
}
/*
* Near-memory allocation and freeing are controlled by the regular library
* routines malloc() and free().
*/
// Removed to eliminate Compiler Warnings. TML 6/8/98
/*
GLOBAL void *
jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
{
return (void *) malloc(sizeofobject);
}
GLOBAL void
jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
{
free(object);
}
//
// "Large" objects are allocated in far memory, if possible
//
GLOBAL void FAR *
jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
{
return (void FAR *) far_malloc(sizeofobject);
}
GLOBAL void
jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
{
far_free(object);
}
*/
//
// This routine computes the total memory space available for allocation.
// It's impossible to do this in a portable way; our current solution is
// to make the user tell us (with a default value set at compile time).
// if you can actually get the available space, it's a good idea to subtract
// slop factor of 5% or so.
//
#ifndef DEFAULT_MAX_MEM // so can override from makefile
#define DEFAULT_MAX_MEM 300000L // for total usage about 450K
#endif
// Removed to eliminate Compiler Warnings. TML 6/8/98
/*
GLOBAL long
jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
long max_bytes_needed, long already_allocated)
{
return cinfo->mem->max_memory_to_use - already_allocated;
}
*/
//
// Backing store (temporary file) management.
// Backing store objects are only used when the value returned by
// jpeg_mem_available is less than the total space needed. You can dispense
// with these routines if you have plenty of virtual memory; see jmemnobs.c.
//
//
// For MS-DOS we support three types of backing storage:
// 1. Conventional DOS files. We access these by direct DOS calls rather
// than via the stdio package. This provides a bit better performance,
// but the real reason is that the buffers to be read or written are FAR.
// The stdio library for small-data memory models can't cope with that.
// 2. Extended memory, accessed per the XMS V2.0 specification.
// 3. Expanded memory, accessed per the LIM/EMS 4.0 specification.
// You'll need copies of those specs to make sense of the related code.
// The specs are available by Internet FTP from the SIMTEL archives
// (oak.oakland.edu and its various mirror sites). See files
// pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip.
//
//
// Access methods for a DOS file.
//
METHODDEF void
read_file_store (j_common_ptr cinfo, backing_store_ptr info,
void FAR * buffer_address,
long file_offset, long byte_count)
{
if (jdos_seek(info->handle.file_handle, file_offset))
ERREXIT(cinfo, JERR_TFILE_SEEK);
/* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
if (byte_count > 65535L) /* safety check */
ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
if (jdos_read(info->handle.file_handle, buffer_address,
(unsigned short) byte_count))
ERREXIT(cinfo, JERR_TFILE_READ);
}
METHODDEF void
write_file_store (j_common_ptr cinfo, backing_store_ptr info,
void FAR * buffer_address,
long file_offset, long byte_count)
{
if (jdos_seek(info->handle.file_handle, file_offset))
ERREXIT(cinfo, JERR_TFILE_SEEK);
/* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
if (byte_count > 65535L) /* safety check */
ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
if (jdos_write(info->handle.file_handle, buffer_address,
(unsigned short) byte_count))
ERREXIT(cinfo, JERR_TFILE_WRITE);
}
METHODDEF void
close_file_store (j_common_ptr cinfo, backing_store_ptr info)
{
jdos_close(info->handle.file_handle); /* close the file */
remove(info->temp_name); /* delete the file */
/* If your system doesn't have remove(), try unlink() instead.
* remove() is the ANSI-standard name for this function, but
* unlink() was more common in pre-ANSI systems.
*/
TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
}
// Removed to eliminate Compiler Warnings. TML 6/8/98
/*
LOCAL boolean
open_file_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
short handle;
select_file_name(info->temp_name);
if (jdos_open((short far *) & handle, (char far *) info->temp_name)) {
// might as well exit since jpeg_open_backing_store will fail anyway
ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
return FALSE;
}
info->handle.file_handle = handle;
info->read_backing_store = read_file_store;
info->write_backing_store = write_file_store;
info->close_backing_store = close_file_store;
TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
return TRUE; // succeeded
}
*/
//
// Access methods for extended memory.
//
#if XMS_SUPPORTED
static XMSDRIVER xms_driver; /* saved address of XMS driver */
typedef union { /* either long offset or real-mode pointer */
long offset;
void far * ptr;
} XMSPTR;
typedef struct { /* XMS move specification structure */
long length;
XMSH src_handle;
XMSPTR src;
XMSH dst_handle;
XMSPTR dst;
} XMSspec;
#define ODD(X) (((X) & 1L) != 0)
METHODDEF void
read_xms_store (j_common_ptr cinfo, backing_store_ptr info,
void FAR * buffer_address,
long file_offset, long byte_count)
{
XMScontext ctx;
XMSspec spec;
char endbuffer[2];
/* The XMS driver can't cope with an odd length, so handle the last byte
* specially if byte_count is odd. We don't expect this to be common.
*/
spec.length = byte_count & (~ 1L);
spec.src_handle = info->handle.xms_handle;
spec.src.offset = file_offset;
spec.dst_handle = 0;
spec.dst.ptr = buffer_address;
ctx.ds_si = (void far *) & spec;
ctx.ax = 0x0b00; /* EMB move */
jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
if (ctx.ax != 1)
ERREXIT(cinfo, JERR_XMS_READ);
if (ODD(byte_count)) {
read_xms_store(cinfo, info, (void FAR *) endbuffer,
file_offset + byte_count - 1L, 2L);
((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0];
}
}
METHODDEF void
write_xms_store (j_common_ptr cinfo, backing_store_ptr info,
void FAR * buffer_address,
long file_offset, long byte_count)
{
XMScontext ctx;
XMSspec spec;
char endbuffer[2];
/* The XMS driver can't cope with an odd length, so handle the last byte
* specially if byte_count is odd. We don't expect this to be common.
*/
spec.length = byte_count & (~ 1L);
spec.src_handle = 0;
spec.src.ptr = buffer_address;
spec.dst_handle = info->handle.xms_handle;
spec.dst.offset = file_offset;
ctx.ds_si = (void far *) & spec;
ctx.ax = 0x0b00; /* EMB move */
jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
if (ctx.ax != 1)
ERREXIT(cinfo, JERR_XMS_WRITE);
if (ODD(byte_count)) {
read_xms_store(cinfo, info, (void FAR *) endbuffer,
file_offset + byte_count - 1L, 2L);
endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L];
write_xms_store(cinfo, info, (void FAR *) endbuffer,
file_offset + byte_count - 1L, 2L);
}
}
METHODDEF void
close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
{
XMScontext ctx;
ctx.dx = info->handle.xms_handle;
ctx.ax = 0x0a00;
jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle);
/* we ignore any error return from the driver */
}
LOCAL boolean
open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
XMScontext ctx;
/* Get address of XMS driver */
jxms_getdriver((XMSDRIVER far *) & xms_driver);
if (xms_driver == NULL)
return FALSE; /* no driver to be had */
/* Get version number, must be >= 2.00 */
ctx.ax = 0x0000;
jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
if (ctx.ax < (unsigned short) 0x0200)
return FALSE;
/* Try to get space (expressed in kilobytes) */
ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10);
ctx.ax = 0x0900;
jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
if (ctx.ax != 1)
return FALSE;
/* Succeeded, save the handle and away we go */
info->handle.xms_handle = ctx.dx;
info->read_backing_store = read_xms_store;
info->write_backing_store = write_xms_store;
info->close_backing_store = close_xms_store;
TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx);
return TRUE; // succeeded
}
#endif /* XMS_SUPPORTED */
/*
* Access methods for expanded memory.
*/
#if EMS_SUPPORTED
/* The EMS move specification structure requires word and long fields aligned
* at odd byte boundaries. Some compilers will align struct fields at even
* byte boundaries. While it's usually possible to force byte alignment,
* that causes an overall performance penalty and may pose problems in merging
* JPEG into a larger application. Instead we accept some rather dirty code
* here. Note this code would fail if the hardware did not allow odd-byte
* word & long accesses, but all 80x86 CPUs do.
*/
typedef void far * EMSPTR;
typedef union { /* EMS move specification structure */
long length; /* It's easy to access first 4 bytes */
char bytes[18]; /* Misaligned fields in here! */
} EMSspec;
/* Macros for accessing misaligned fields */
#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset])))
#define SRC_TYPE(spec) FIELD_AT(spec,4,char)
#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH)
#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short)
#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short)
#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR)
#define DST_TYPE(spec) FIELD_AT(spec,11,char)
#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH)
#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short)
#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short)
#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR)
#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */
#define HIBYTE(W) (((W) >> 8) & 0xFF)
#define LOBYTE(W) ((W) & 0xFF)
METHODDEF void
read_ems_store (j_common_ptr cinfo, backing_store_ptr info,
void FAR * buffer_address,
long file_offset, long byte_count)
{
EMScontext ctx;
EMSspec spec;
spec.length = byte_count;
SRC_TYPE(spec) = 1;
SRC_HANDLE(spec) = info->handle.ems_handle;
SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE);
SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
DST_TYPE(spec) = 0;
DST_HANDLE(spec) = 0;
DST_PTR(spec) = buffer_address;
ctx.ds_si = (void far *) & spec;
ctx.ax = 0x5700; /* move memory region */
jems_calldriver((EMScontext far *) & ctx);
if (HIBYTE(ctx.ax) != 0)
ERREXIT(cinfo, JERR_EMS_READ);
}
METHODDEF void
write_ems_store (j_common_ptr cinfo, backing_store_ptr info,
void FAR * buffer_address,
long file_offset, long byte_count)
{
EMScontext ctx;
EMSspec spec;
spec.length = byte_count;
SRC_TYPE(spec) = 0;
SRC_HANDLE(spec) = 0;
SRC_PTR(spec) = buffer_address;
DST_TYPE(spec) = 1;
DST_HANDLE(spec) = info->handle.ems_handle;
DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE);
DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
ctx.ds_si = (void far *) & spec;
ctx.ax = 0x5700; /* move memory region */
jems_calldriver((EMScontext far *) & ctx);
if (HIBYTE(ctx.ax) != 0)
ERREXIT(cinfo, JERR_EMS_WRITE);
}
METHODDEF void
close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
{
EMScontext ctx;
ctx.ax = 0x4500;
ctx.dx = info->handle.ems_handle;
jems_calldriver((EMScontext far *) & ctx);
TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle);
/* we ignore any error return from the driver */
}
LOCAL boolean
open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
EMScontext ctx;
/* Is EMS driver there? */
if (! jems_available())
return FALSE;
/* Get status, make sure EMS is OK */
ctx.ax = 0x4000;
jems_calldriver((EMScontext far *) & ctx);
if (HIBYTE(ctx.ax) != 0)
return FALSE;
/* Get version, must be >= 4.0 */
ctx.ax = 0x4600;
jems_calldriver((EMScontext far *) & ctx);
if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40)
return FALSE;
/* Try to allocate requested space */
ctx.ax = 0x4300;
ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE);
jems_calldriver((EMScontext far *) & ctx);
if (HIBYTE(ctx.ax) != 0)
return FALSE;
/* Succeeded, save the handle and away we go */
info->handle.ems_handle = ctx.dx;
info->read_backing_store = read_ems_store;
info->write_backing_store = write_ems_store;
info->close_backing_store = close_ems_store;
TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx);
return TRUE; /* succeeded */
}
#endif /* EMS_SUPPORTED */
//
// Initial opening of a backing-store object.
//
GLOBAL void
jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
long total_bytes_needed)
{
// Try extended memory, then expanded memory, then regular file.
#if XMS_SUPPORTED
if (open_xms_store(cinfo, info, total_bytes_needed))
return;
#endif
#if EMS_SUPPORTED
if (open_ems_store(cinfo, info, total_bytes_needed))
return;
#endif
if (open_file_store(cinfo, info, total_bytes_needed))
return;
ERREXITS(cinfo, JERR_TFILE_CREATE, "");
}
/*
* These routines take care of any system-dependent initialization and
* cleanup required.
*/
// Removed to eliminate Compiler Warnings. TML 6/8/98
/*
GLOBAL long
jpeg_mem_init (j_common_ptr cinfo)
{
next_file_num = 0; // initialize temp file name generator
return DEFAULT_MAX_MEM; // default for max_memory_to_use
}
GLOBAL void
jpeg_mem_term (j_common_ptr cinfo)
{
// Microsoft C, at least in v6.00A, will not successfully reclaim freed
// blocks of size > 32Kbytes unless we give it a kick in the rear, like so:
//
#ifdef NEED_FHEAPMIN
_fheapmin();
#endif
}
*/
| 30.899381 | 82 | 0.673764 | npocmaka |
7494a4b8764fa0efce8450cf37095c9de37fb60c | 388 | hpp | C++ | include/di/systems/vr/camera_frame_type.hpp | acdemiralp/nano_engine | 64069cf300af574efb0c979dbc97eb0a03cdc7a3 | [
"MIT"
] | 4 | 2021-02-24T14:13:47.000Z | 2022-02-06T12:02:24.000Z | include/di/systems/vr/camera_frame_type.hpp | acdemiralp/nano_engine | 64069cf300af574efb0c979dbc97eb0a03cdc7a3 | [
"MIT"
] | 1 | 2018-01-06T11:52:16.000Z | 2018-01-06T11:52:16.000Z | include/di/systems/vr/camera_frame_type.hpp | acdemiralp/nano_engine | 64069cf300af574efb0c979dbc97eb0a03cdc7a3 | [
"MIT"
] | 2 | 2018-02-11T14:51:17.000Z | 2021-02-24T14:13:49.000Z | #ifndef DI_SYSTEMS_VR_CAMERA_FRAME_TYPE_HPP_
#define DI_SYSTEMS_VR_CAMERA_FRAME_TYPE_HPP_
#include <openvr.h>
namespace di
{
enum class camera_frame_type
{
distorted = vr::VRTrackedCameraFrameType_Distorted ,
undistorted = vr::VRTrackedCameraFrameType_Undistorted ,
maximum_undistorted = vr::VRTrackedCameraFrameType_MaximumUndistorted
};
}
#endif | 24.25 | 72 | 0.768041 | acdemiralp |
749839e336e5cb55b4a3992005f5a9f39cc954a2 | 266,481 | cpp | C++ | src/main_4900.cpp | v0idp/virtuoso-codegen | 6f560f04822c67f092d438a3f484249072c1d21d | [
"Unlicense"
] | null | null | null | src/main_4900.cpp | v0idp/virtuoso-codegen | 6f560f04822c67f092d438a3f484249072c1d21d | [
"Unlicense"
] | null | null | null | src/main_4900.cpp | v0idp/virtuoso-codegen | 6f560f04822c67f092d438a3f484249072c1d21d | [
"Unlicense"
] | 1 | 2022-03-30T21:07:35.000Z | 2022-03-30T21:07:35.000Z | // Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._ResetSeatedZeroPose
#include "OVR/OpenVR/IVRSystem__ResetSeatedZeroPose.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ResetSeatedZeroPose.Invoke
void OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ResetSeatedZeroPose.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ResetSeatedZeroPose.EndInvoke
void OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ResetSeatedZeroPose*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSeatedZeroPoseToStandingAbsoluteTrackingPose
#include "OVR/OpenVR/IVRSystem__GetSeatedZeroPoseToStandingAbsoluteTrackingPose.hpp"
// Including type: OVR.OpenVR.HmdMatrix34_t
#include "OVR/OpenVR/HmdMatrix34_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSeatedZeroPoseToStandingAbsoluteTrackingPose.Invoke
::OVR::OpenVR::HmdMatrix34_t OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HmdMatrix34_t, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSeatedZeroPoseToStandingAbsoluteTrackingPose.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSeatedZeroPoseToStandingAbsoluteTrackingPose.EndInvoke
::OVR::OpenVR::HmdMatrix34_t OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetSeatedZeroPoseToStandingAbsoluteTrackingPose*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HmdMatrix34_t, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetRawZeroPoseToStandingAbsoluteTrackingPose
#include "OVR/OpenVR/IVRSystem__GetRawZeroPoseToStandingAbsoluteTrackingPose.hpp"
// Including type: OVR.OpenVR.HmdMatrix34_t
#include "OVR/OpenVR/HmdMatrix34_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetRawZeroPoseToStandingAbsoluteTrackingPose.Invoke
::OVR::OpenVR::HmdMatrix34_t OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HmdMatrix34_t, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetRawZeroPoseToStandingAbsoluteTrackingPose.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetRawZeroPoseToStandingAbsoluteTrackingPose.EndInvoke
::OVR::OpenVR::HmdMatrix34_t OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetRawZeroPoseToStandingAbsoluteTrackingPose*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HmdMatrix34_t, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSortedTrackedDeviceIndicesOfClass
#include "OVR/OpenVR/IVRSystem__GetSortedTrackedDeviceIndicesOfClass.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceClass
#include "OVR/OpenVR/ETrackedDeviceClass.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSortedTrackedDeviceIndicesOfClass.Invoke
uint OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass::Invoke(::OVR::OpenVR::ETrackedDeviceClass eTrackedDeviceClass, ByRef<::ArrayW<uint>> punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, eTrackedDeviceClass, byref(punTrackedDeviceIndexArray), unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSortedTrackedDeviceIndicesOfClass.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass::BeginInvoke(::OVR::OpenVR::ETrackedDeviceClass eTrackedDeviceClass, ByRef<::ArrayW<uint>> punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eTrackedDeviceClass, byref(punTrackedDeviceIndexArray), unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetSortedTrackedDeviceIndicesOfClass.EndInvoke
uint OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetSortedTrackedDeviceIndicesOfClass*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceActivityLevel
#include "OVR/OpenVR/IVRSystem__GetTrackedDeviceActivityLevel.hpp"
// Including type: OVR.OpenVR.EDeviceActivityLevel
#include "OVR/OpenVR/EDeviceActivityLevel.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceActivityLevel.Invoke
::OVR::OpenVR::EDeviceActivityLevel OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel::Invoke(uint unDeviceId) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EDeviceActivityLevel, false>(this, ___internal__method, unDeviceId);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceActivityLevel.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel::BeginInvoke(uint unDeviceId, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceId, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceActivityLevel.EndInvoke
::OVR::OpenVR::EDeviceActivityLevel OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceActivityLevel*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EDeviceActivityLevel, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._ApplyTransform
#include "OVR/OpenVR/IVRSystem__ApplyTransform.hpp"
// Including type: OVR.OpenVR.TrackedDevicePose_t
#include "OVR/OpenVR/TrackedDevicePose_t.hpp"
// Including type: OVR.OpenVR.HmdMatrix34_t
#include "OVR/OpenVR/HmdMatrix34_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ApplyTransform.Invoke
void OVR::OpenVR::IVRSystem::_ApplyTransform::Invoke(ByRef<::OVR::OpenVR::TrackedDevicePose_t> pOutputPose, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ByRef<::OVR::OpenVR::HmdMatrix34_t> pTransform) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ApplyTransform::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ApplyTransform*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pOutputPose), byref(pTrackedDevicePose), byref(pTransform));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ApplyTransform.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_ApplyTransform::BeginInvoke(ByRef<::OVR::OpenVR::TrackedDevicePose_t> pOutputPose, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ByRef<::OVR::OpenVR::HmdMatrix34_t> pTransform, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ApplyTransform::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ApplyTransform*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pOutputPose), byref(pTrackedDevicePose), byref(pTransform), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ApplyTransform.EndInvoke
void OVR::OpenVR::IVRSystem::_ApplyTransform::EndInvoke(ByRef<::OVR::OpenVR::TrackedDevicePose_t> pOutputPose, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ByRef<::OVR::OpenVR::HmdMatrix34_t> pTransform, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ApplyTransform::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ApplyTransform*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pOutputPose), byref(pTrackedDevicePose), byref(pTransform), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceIndexForControllerRole
#include "OVR/OpenVR/IVRSystem__GetTrackedDeviceIndexForControllerRole.hpp"
// Including type: OVR.OpenVR.ETrackedControllerRole
#include "OVR/OpenVR/ETrackedControllerRole.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceIndexForControllerRole.Invoke
uint OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole::Invoke(::OVR::OpenVR::ETrackedControllerRole unDeviceType) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, unDeviceType);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceIndexForControllerRole.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole::BeginInvoke(::OVR::OpenVR::ETrackedControllerRole unDeviceType, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceType, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceIndexForControllerRole.EndInvoke
uint OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceIndexForControllerRole*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerRoleForTrackedDeviceIndex
#include "OVR/OpenVR/IVRSystem__GetControllerRoleForTrackedDeviceIndex.hpp"
// Including type: OVR.OpenVR.ETrackedControllerRole
#include "OVR/OpenVR/ETrackedControllerRole.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerRoleForTrackedDeviceIndex.Invoke
::OVR::OpenVR::ETrackedControllerRole OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex::Invoke(uint unDeviceIndex) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::ETrackedControllerRole, false>(this, ___internal__method, unDeviceIndex);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerRoleForTrackedDeviceIndex.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex::BeginInvoke(uint unDeviceIndex, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerRoleForTrackedDeviceIndex.EndInvoke
::OVR::OpenVR::ETrackedControllerRole OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerRoleForTrackedDeviceIndex*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::ETrackedControllerRole, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceClass
#include "OVR/OpenVR/IVRSystem__GetTrackedDeviceClass.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceClass
#include "OVR/OpenVR/ETrackedDeviceClass.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceClass.Invoke
::OVR::OpenVR::ETrackedDeviceClass OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass::Invoke(uint unDeviceIndex) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::ETrackedDeviceClass, false>(this, ___internal__method, unDeviceIndex);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceClass.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass::BeginInvoke(uint unDeviceIndex, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetTrackedDeviceClass.EndInvoke
::OVR::OpenVR::ETrackedDeviceClass OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetTrackedDeviceClass*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::ETrackedDeviceClass, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsTrackedDeviceConnected
#include "OVR/OpenVR/IVRSystem__IsTrackedDeviceConnected.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsTrackedDeviceConnected.Invoke
bool OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected::Invoke(uint unDeviceIndex) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, unDeviceIndex);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsTrackedDeviceConnected.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected::BeginInvoke(uint unDeviceIndex, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsTrackedDeviceConnected.EndInvoke
bool OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsTrackedDeviceConnected*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetBoolTrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetBoolTrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetBoolTrackedDeviceProperty.Invoke
bool OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetBoolTrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetBoolTrackedDeviceProperty.EndInvoke
bool OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetBoolTrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetFloatTrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetFloatTrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetFloatTrackedDeviceProperty.Invoke
float OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetFloatTrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetFloatTrackedDeviceProperty.EndInvoke
float OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetFloatTrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<float, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetInt32TrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetInt32TrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetInt32TrackedDeviceProperty.Invoke
int OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetInt32TrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetInt32TrackedDeviceProperty.EndInvoke
int OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetInt32TrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<int, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetUint64TrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetUint64TrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetUint64TrackedDeviceProperty.Invoke
uint64_t OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint64_t, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetUint64TrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetUint64TrackedDeviceProperty.EndInvoke
uint64_t OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetUint64TrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint64_t, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetMatrix34TrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetMatrix34TrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.HmdMatrix34_t
#include "OVR/OpenVR/HmdMatrix34_t.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetMatrix34TrackedDeviceProperty.Invoke
::OVR::OpenVR::HmdMatrix34_t OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HmdMatrix34_t, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetMatrix34TrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetMatrix34TrackedDeviceProperty.EndInvoke
::OVR::OpenVR::HmdMatrix34_t OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetMatrix34TrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HmdMatrix34_t, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetArrayTrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetArrayTrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetArrayTrackedDeviceProperty.Invoke
uint OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, uint propType, ::System::IntPtr pBuffer, uint unBufferSize, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, unDeviceIndex, prop, propType, pBuffer, unBufferSize, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetArrayTrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, uint propType, ::System::IntPtr pBuffer, uint unBufferSize, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, propType, pBuffer, unBufferSize, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetArrayTrackedDeviceProperty.EndInvoke
uint OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetArrayTrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetStringTrackedDeviceProperty
#include "OVR/OpenVR/IVRSystem__GetStringTrackedDeviceProperty.hpp"
// Including type: OVR.OpenVR.ETrackedDeviceProperty
#include "OVR/OpenVR/ETrackedDeviceProperty.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetStringTrackedDeviceProperty.Invoke
uint OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty::Invoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ::System::Text::StringBuilder* pchValue, uint unBufferSize, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, unDeviceIndex, prop, pchValue, unBufferSize, byref(pError));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetStringTrackedDeviceProperty.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty::BeginInvoke(uint unDeviceIndex, ::OVR::OpenVR::ETrackedDeviceProperty prop, ::System::Text::StringBuilder* pchValue, uint unBufferSize, ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, prop, pchValue, unBufferSize, byref(pError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetStringTrackedDeviceProperty.EndInvoke
uint OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty::EndInvoke(ByRef<::OVR::OpenVR::ETrackedPropertyError> pError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetStringTrackedDeviceProperty*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, byref(pError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetPropErrorNameFromEnum
#include "OVR/OpenVR/IVRSystem__GetPropErrorNameFromEnum.hpp"
// Including type: OVR.OpenVR.ETrackedPropertyError
#include "OVR/OpenVR/ETrackedPropertyError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetPropErrorNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum::Invoke(::OVR::OpenVR::ETrackedPropertyError error) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, error);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetPropErrorNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum::BeginInvoke(::OVR::OpenVR::ETrackedPropertyError error, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, error, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetPropErrorNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetPropErrorNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEvent
#include "OVR/OpenVR/IVRSystem__PollNextEvent.hpp"
// Including type: OVR.OpenVR.VREvent_t
#include "OVR/OpenVR/VREvent_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEvent.Invoke
bool OVR::OpenVR::IVRSystem::_PollNextEvent::Invoke(ByRef<::OVR::OpenVR::VREvent_t> pEvent, uint uncbVREvent) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PollNextEvent::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PollNextEvent*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pEvent), uncbVREvent);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEvent.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_PollNextEvent::BeginInvoke(ByRef<::OVR::OpenVR::VREvent_t> pEvent, uint uncbVREvent, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PollNextEvent::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PollNextEvent*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pEvent), uncbVREvent, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEvent.EndInvoke
bool OVR::OpenVR::IVRSystem::_PollNextEvent::EndInvoke(ByRef<::OVR::OpenVR::VREvent_t> pEvent, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PollNextEvent::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PollNextEvent*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pEvent), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEventWithPose
#include "OVR/OpenVR/IVRSystem__PollNextEventWithPose.hpp"
// Including type: OVR.OpenVR.ETrackingUniverseOrigin
#include "OVR/OpenVR/ETrackingUniverseOrigin.hpp"
// Including type: OVR.OpenVR.VREvent_t
#include "OVR/OpenVR/VREvent_t.hpp"
// Including type: OVR.OpenVR.TrackedDevicePose_t
#include "OVR/OpenVR/TrackedDevicePose_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEventWithPose.Invoke
bool OVR::OpenVR::IVRSystem::_PollNextEventWithPose::Invoke(::OVR::OpenVR::ETrackingUniverseOrigin eOrigin, ByRef<::OVR::OpenVR::VREvent_t> pEvent, uint uncbVREvent, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PollNextEventWithPose::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PollNextEventWithPose*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, eOrigin, byref(pEvent), uncbVREvent, byref(pTrackedDevicePose));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEventWithPose.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_PollNextEventWithPose::BeginInvoke(::OVR::OpenVR::ETrackingUniverseOrigin eOrigin, ByRef<::OVR::OpenVR::VREvent_t> pEvent, uint uncbVREvent, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PollNextEventWithPose::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PollNextEventWithPose*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eOrigin, byref(pEvent), uncbVREvent, byref(pTrackedDevicePose), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PollNextEventWithPose.EndInvoke
bool OVR::OpenVR::IVRSystem::_PollNextEventWithPose::EndInvoke(ByRef<::OVR::OpenVR::VREvent_t> pEvent, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PollNextEventWithPose::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PollNextEventWithPose*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pEvent), byref(pTrackedDevicePose), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetEventTypeNameFromEnum
#include "OVR/OpenVR/IVRSystem__GetEventTypeNameFromEnum.hpp"
// Including type: OVR.OpenVR.EVREventType
#include "OVR/OpenVR/EVREventType.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetEventTypeNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum::Invoke(::OVR::OpenVR::EVREventType eType) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, eType);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetEventTypeNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum::BeginInvoke(::OVR::OpenVR::EVREventType eType, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eType, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetEventTypeNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetEventTypeNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetHiddenAreaMesh
#include "OVR/OpenVR/IVRSystem__GetHiddenAreaMesh.hpp"
// Including type: OVR.OpenVR.HiddenAreaMesh_t
#include "OVR/OpenVR/HiddenAreaMesh_t.hpp"
// Including type: OVR.OpenVR.EVREye
#include "OVR/OpenVR/EVREye.hpp"
// Including type: OVR.OpenVR.EHiddenAreaMeshType
#include "OVR/OpenVR/EHiddenAreaMeshType.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetHiddenAreaMesh.Invoke
::OVR::OpenVR::HiddenAreaMesh_t OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh::Invoke(::OVR::OpenVR::EVREye eEye, ::OVR::OpenVR::EHiddenAreaMeshType type) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HiddenAreaMesh_t, false>(this, ___internal__method, eEye, type);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetHiddenAreaMesh.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh::BeginInvoke(::OVR::OpenVR::EVREye eEye, ::OVR::OpenVR::EHiddenAreaMeshType type, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eEye, type, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetHiddenAreaMesh.EndInvoke
::OVR::OpenVR::HiddenAreaMesh_t OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetHiddenAreaMesh*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::HiddenAreaMesh_t, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerState
#include "OVR/OpenVR/IVRSystem__GetControllerState.hpp"
// Including type: OVR.OpenVR.VRControllerState_t
#include "OVR/OpenVR/VRControllerState_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerState.Invoke
bool OVR::OpenVR::IVRSystem::_GetControllerState::Invoke(uint unControllerDeviceIndex, ByRef<::OVR::OpenVR::VRControllerState_t> pControllerState, uint unControllerStateSize) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerState::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerState*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, unControllerDeviceIndex, byref(pControllerState), unControllerStateSize);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerState.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetControllerState::BeginInvoke(uint unControllerDeviceIndex, ByRef<::OVR::OpenVR::VRControllerState_t> pControllerState, uint unControllerStateSize, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerState::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerState*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unControllerDeviceIndex, byref(pControllerState), unControllerStateSize, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerState.EndInvoke
bool OVR::OpenVR::IVRSystem::_GetControllerState::EndInvoke(ByRef<::OVR::OpenVR::VRControllerState_t> pControllerState, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerState::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerState*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pControllerState), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerStateWithPose
#include "OVR/OpenVR/IVRSystem__GetControllerStateWithPose.hpp"
// Including type: OVR.OpenVR.ETrackingUniverseOrigin
#include "OVR/OpenVR/ETrackingUniverseOrigin.hpp"
// Including type: OVR.OpenVR.VRControllerState_t
#include "OVR/OpenVR/VRControllerState_t.hpp"
// Including type: OVR.OpenVR.TrackedDevicePose_t
#include "OVR/OpenVR/TrackedDevicePose_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerStateWithPose.Invoke
bool OVR::OpenVR::IVRSystem::_GetControllerStateWithPose::Invoke(::OVR::OpenVR::ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ByRef<::OVR::OpenVR::VRControllerState_t> pControllerState, uint unControllerStateSize, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerStateWithPose::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerStateWithPose*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, eOrigin, unControllerDeviceIndex, byref(pControllerState), unControllerStateSize, byref(pTrackedDevicePose));
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerStateWithPose.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetControllerStateWithPose::BeginInvoke(::OVR::OpenVR::ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ByRef<::OVR::OpenVR::VRControllerState_t> pControllerState, uint unControllerStateSize, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerStateWithPose::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerStateWithPose*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eOrigin, unControllerDeviceIndex, byref(pControllerState), unControllerStateSize, byref(pTrackedDevicePose), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerStateWithPose.EndInvoke
bool OVR::OpenVR::IVRSystem::_GetControllerStateWithPose::EndInvoke(ByRef<::OVR::OpenVR::VRControllerState_t> pControllerState, ByRef<::OVR::OpenVR::TrackedDevicePose_t> pTrackedDevicePose, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerStateWithPose::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerStateWithPose*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pControllerState), byref(pTrackedDevicePose), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._TriggerHapticPulse
#include "OVR/OpenVR/IVRSystem__TriggerHapticPulse.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._TriggerHapticPulse.Invoke
void OVR::OpenVR::IVRSystem::_TriggerHapticPulse::Invoke(uint unControllerDeviceIndex, uint unAxisId, uint16_t usDurationMicroSec) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_TriggerHapticPulse::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_TriggerHapticPulse*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, unControllerDeviceIndex, unAxisId, usDurationMicroSec);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._TriggerHapticPulse.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_TriggerHapticPulse::BeginInvoke(uint unControllerDeviceIndex, uint unAxisId, uint16_t usDurationMicroSec, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_TriggerHapticPulse::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_TriggerHapticPulse*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unControllerDeviceIndex, unAxisId, usDurationMicroSec, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._TriggerHapticPulse.EndInvoke
void OVR::OpenVR::IVRSystem::_TriggerHapticPulse::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_TriggerHapticPulse::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_TriggerHapticPulse*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetButtonIdNameFromEnum
#include "OVR/OpenVR/IVRSystem__GetButtonIdNameFromEnum.hpp"
// Including type: OVR.OpenVR.EVRButtonId
#include "OVR/OpenVR/EVRButtonId.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetButtonIdNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum::Invoke(::OVR::OpenVR::EVRButtonId eButtonId) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, eButtonId);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetButtonIdNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum::BeginInvoke(::OVR::OpenVR::EVRButtonId eButtonId, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eButtonId, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetButtonIdNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetButtonIdNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerAxisTypeNameFromEnum
#include "OVR/OpenVR/IVRSystem__GetControllerAxisTypeNameFromEnum.hpp"
// Including type: OVR.OpenVR.EVRControllerAxisType
#include "OVR/OpenVR/EVRControllerAxisType.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerAxisTypeNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum::Invoke(::OVR::OpenVR::EVRControllerAxisType eAxisType) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, eAxisType);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerAxisTypeNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum::BeginInvoke(::OVR::OpenVR::EVRControllerAxisType eAxisType, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eAxisType, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._GetControllerAxisTypeNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_GetControllerAxisTypeNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsInputAvailable
#include "OVR/OpenVR/IVRSystem__IsInputAvailable.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsInputAvailable.Invoke
bool OVR::OpenVR::IVRSystem::_IsInputAvailable::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsInputAvailable::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsInputAvailable*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsInputAvailable.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_IsInputAvailable::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsInputAvailable::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsInputAvailable*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsInputAvailable.EndInvoke
bool OVR::OpenVR::IVRSystem::_IsInputAvailable::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsInputAvailable::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsInputAvailable*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsSteamVRDrawingControllers
#include "OVR/OpenVR/IVRSystem__IsSteamVRDrawingControllers.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsSteamVRDrawingControllers.Invoke
bool OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsSteamVRDrawingControllers.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._IsSteamVRDrawingControllers.EndInvoke
bool OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_IsSteamVRDrawingControllers*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationPause
#include "OVR/OpenVR/IVRSystem__ShouldApplicationPause.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationPause.Invoke
bool OVR::OpenVR::IVRSystem::_ShouldApplicationPause::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ShouldApplicationPause::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ShouldApplicationPause*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationPause.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_ShouldApplicationPause::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ShouldApplicationPause::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ShouldApplicationPause*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationPause.EndInvoke
bool OVR::OpenVR::IVRSystem::_ShouldApplicationPause::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ShouldApplicationPause::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ShouldApplicationPause*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationReduceRenderingWork
#include "OVR/OpenVR/IVRSystem__ShouldApplicationReduceRenderingWork.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationReduceRenderingWork.Invoke
bool OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationReduceRenderingWork.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._ShouldApplicationReduceRenderingWork.EndInvoke
bool OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_ShouldApplicationReduceRenderingWork*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._DriverDebugRequest
#include "OVR/OpenVR/IVRSystem__DriverDebugRequest.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._DriverDebugRequest.Invoke
uint OVR::OpenVR::IVRSystem::_DriverDebugRequest::Invoke(uint unDeviceIndex, ::StringW pchRequest, ::System::Text::StringBuilder* pchResponseBuffer, uint unResponseBufferSize) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_DriverDebugRequest::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_DriverDebugRequest*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._DriverDebugRequest.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_DriverDebugRequest::BeginInvoke(uint unDeviceIndex, ::StringW pchRequest, ::System::Text::StringBuilder* pchResponseBuffer, uint unResponseBufferSize, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_DriverDebugRequest::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_DriverDebugRequest*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._DriverDebugRequest.EndInvoke
uint OVR::OpenVR::IVRSystem::_DriverDebugRequest::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_DriverDebugRequest::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_DriverDebugRequest*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._PerformFirmwareUpdate
#include "OVR/OpenVR/IVRSystem__PerformFirmwareUpdate.hpp"
// Including type: OVR.OpenVR.EVRFirmwareError
#include "OVR/OpenVR/EVRFirmwareError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PerformFirmwareUpdate.Invoke
::OVR::OpenVR::EVRFirmwareError OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate::Invoke(uint unDeviceIndex) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRFirmwareError, false>(this, ___internal__method, unDeviceIndex);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PerformFirmwareUpdate.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate::BeginInvoke(uint unDeviceIndex, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unDeviceIndex, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._PerformFirmwareUpdate.EndInvoke
::OVR::OpenVR::EVRFirmwareError OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_PerformFirmwareUpdate*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRFirmwareError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_Exiting
#include "OVR/OpenVR/IVRSystem__AcknowledgeQuit_Exiting.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_Exiting.Invoke
void OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_Exiting.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_Exiting.EndInvoke
void OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_Exiting*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_UserPrompt
#include "OVR/OpenVR/IVRSystem__AcknowledgeQuit_UserPrompt.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_UserPrompt.Invoke
void OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_UserPrompt.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRSystem/OVR.OpenVR._AcknowledgeQuit_UserPrompt.EndInvoke
void OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRSystem::_AcknowledgeQuit_UserPrompt*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetWindowBounds
#include "OVR/OpenVR/IVRExtendedDisplay__GetWindowBounds.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetWindowBounds.Invoke
void OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds::Invoke(ByRef<int> pnX, ByRef<int> pnY, ByRef<uint> pnWidth, ByRef<uint> pnHeight) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pnX), byref(pnY), byref(pnWidth), byref(pnHeight));
}
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetWindowBounds.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds::BeginInvoke(ByRef<int> pnX, ByRef<int> pnY, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pnX), byref(pnY), byref(pnWidth), byref(pnHeight), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetWindowBounds.EndInvoke
void OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds::EndInvoke(ByRef<int> pnX, ByRef<int> pnY, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetWindowBounds*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pnX), byref(pnY), byref(pnWidth), byref(pnHeight), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetEyeOutputViewport
#include "OVR/OpenVR/IVRExtendedDisplay__GetEyeOutputViewport.hpp"
// Including type: OVR.OpenVR.EVREye
#include "OVR/OpenVR/EVREye.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetEyeOutputViewport.Invoke
void OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport::Invoke(::OVR::OpenVR::EVREye eEye, ByRef<uint> pnX, ByRef<uint> pnY, ByRef<uint> pnWidth, ByRef<uint> pnHeight) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, eEye, byref(pnX), byref(pnY), byref(pnWidth), byref(pnHeight));
}
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetEyeOutputViewport.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport::BeginInvoke(::OVR::OpenVR::EVREye eEye, ByRef<uint> pnX, ByRef<uint> pnY, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eEye, byref(pnX), byref(pnY), byref(pnWidth), byref(pnHeight), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetEyeOutputViewport.EndInvoke
void OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport::EndInvoke(ByRef<uint> pnX, ByRef<uint> pnY, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetEyeOutputViewport*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pnX), byref(pnY), byref(pnWidth), byref(pnHeight), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetDXGIOutputInfo
#include "OVR/OpenVR/IVRExtendedDisplay__GetDXGIOutputInfo.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetDXGIOutputInfo.Invoke
void OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo::Invoke(ByRef<int> pnAdapterIndex, ByRef<int> pnAdapterOutputIndex) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pnAdapterIndex), byref(pnAdapterOutputIndex));
}
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetDXGIOutputInfo.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo::BeginInvoke(ByRef<int> pnAdapterIndex, ByRef<int> pnAdapterOutputIndex, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pnAdapterIndex), byref(pnAdapterOutputIndex), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRExtendedDisplay/OVR.OpenVR._GetDXGIOutputInfo.EndInvoke
void OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo::EndInvoke(ByRef<int> pnAdapterIndex, ByRef<int> pnAdapterOutputIndex, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRExtendedDisplay::_GetDXGIOutputInfo*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pnAdapterIndex), byref(pnAdapterOutputIndex), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraErrorNameFromEnum
#include "OVR/OpenVR/IVRTrackedCamera__GetCameraErrorNameFromEnum.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraErrorNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum::Invoke(::OVR::OpenVR::EVRTrackedCameraError eCameraError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, eCameraError);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraErrorNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum::BeginInvoke(::OVR::OpenVR::EVRTrackedCameraError eCameraError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, eCameraError, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraErrorNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraErrorNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._HasCamera
#include "OVR/OpenVR/IVRTrackedCamera__HasCamera.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._HasCamera.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_HasCamera::Invoke(uint nDeviceIndex, ByRef<bool> pHasCamera) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_HasCamera::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_HasCamera*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, nDeviceIndex, byref(pHasCamera));
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._HasCamera.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_HasCamera::BeginInvoke(uint nDeviceIndex, ByRef<bool> pHasCamera, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_HasCamera::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_HasCamera*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, nDeviceIndex, byref(pHasCamera), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._HasCamera.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_HasCamera::EndInvoke(ByRef<bool> pHasCamera, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_HasCamera::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_HasCamera*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pHasCamera), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraFrameSize
#include "OVR/OpenVR/IVRTrackedCamera__GetCameraFrameSize.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraFrameSize.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize::Invoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ByRef<uint> pnFrameBufferSize) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, nDeviceIndex, eFrameType, byref(pnWidth), byref(pnHeight), byref(pnFrameBufferSize));
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraFrameSize.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize::BeginInvoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ByRef<uint> pnFrameBufferSize, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, nDeviceIndex, eFrameType, byref(pnWidth), byref(pnHeight), byref(pnFrameBufferSize), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraFrameSize.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize::EndInvoke(ByRef<uint> pnWidth, ByRef<uint> pnHeight, ByRef<uint> pnFrameBufferSize, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraFrameSize*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pnWidth), byref(pnHeight), byref(pnFrameBufferSize), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraIntrinsics
#include "OVR/OpenVR/IVRTrackedCamera__GetCameraIntrinsics.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: OVR.OpenVR.HmdVector2_t
#include "OVR/OpenVR/HmdVector2_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraIntrinsics.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics::Invoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<::OVR::OpenVR::HmdVector2_t> pFocalLength, ByRef<::OVR::OpenVR::HmdVector2_t> pCenter) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, nDeviceIndex, eFrameType, byref(pFocalLength), byref(pCenter));
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraIntrinsics.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics::BeginInvoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<::OVR::OpenVR::HmdVector2_t> pFocalLength, ByRef<::OVR::OpenVR::HmdVector2_t> pCenter, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, nDeviceIndex, eFrameType, byref(pFocalLength), byref(pCenter), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraIntrinsics.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics::EndInvoke(ByRef<::OVR::OpenVR::HmdVector2_t> pFocalLength, ByRef<::OVR::OpenVR::HmdVector2_t> pCenter, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraIntrinsics*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pFocalLength), byref(pCenter), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraProjection
#include "OVR/OpenVR/IVRTrackedCamera__GetCameraProjection.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: OVR.OpenVR.HmdMatrix44_t
#include "OVR/OpenVR/HmdMatrix44_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraProjection.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection::Invoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ByRef<::OVR::OpenVR::HmdMatrix44_t> pProjection) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, nDeviceIndex, eFrameType, flZNear, flZFar, byref(pProjection));
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraProjection.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection::BeginInvoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ByRef<::OVR::OpenVR::HmdMatrix44_t> pProjection, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, nDeviceIndex, eFrameType, flZNear, flZFar, byref(pProjection), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetCameraProjection.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection::EndInvoke(ByRef<::OVR::OpenVR::HmdMatrix44_t> pProjection, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetCameraProjection*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pProjection), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._AcquireVideoStreamingService
#include "OVR/OpenVR/IVRTrackedCamera__AcquireVideoStreamingService.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._AcquireVideoStreamingService.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService::Invoke(uint nDeviceIndex, ByRef<uint64_t> pHandle) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, nDeviceIndex, byref(pHandle));
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._AcquireVideoStreamingService.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService::BeginInvoke(uint nDeviceIndex, ByRef<uint64_t> pHandle, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, nDeviceIndex, byref(pHandle), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._AcquireVideoStreamingService.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService::EndInvoke(ByRef<uint64_t> pHandle, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_AcquireVideoStreamingService*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pHandle), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamingService
#include "OVR/OpenVR/IVRTrackedCamera__ReleaseVideoStreamingService.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamingService.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService::Invoke(uint64_t hTrackedCamera) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, hTrackedCamera);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamingService.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService::BeginInvoke(uint64_t hTrackedCamera, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, hTrackedCamera, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamingService.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamingService*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamFrameBuffer
#include "OVR/OpenVR/IVRTrackedCamera__GetVideoStreamFrameBuffer.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: OVR.OpenVR.CameraVideoStreamFrameHeader_t
#include "OVR/OpenVR/CameraVideoStreamFrameHeader_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamFrameBuffer.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer::Invoke(uint64_t hTrackedCamera, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ::System::IntPtr pFrameBuffer, uint nFrameBufferSize, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, uint nFrameHeaderSize) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, byref(pFrameHeader), nFrameHeaderSize);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamFrameBuffer.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer::BeginInvoke(uint64_t hTrackedCamera, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ::System::IntPtr pFrameBuffer, uint nFrameBufferSize, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, uint nFrameHeaderSize, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, byref(pFrameHeader), nFrameHeaderSize, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamFrameBuffer.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer::EndInvoke(ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamFrameBuffer*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pFrameHeader), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureSize
#include "OVR/OpenVR/IVRTrackedCamera__GetVideoStreamTextureSize.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: OVR.OpenVR.VRTextureBounds_t
#include "OVR/OpenVR/VRTextureBounds_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureSize.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize::Invoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<::OVR::OpenVR::VRTextureBounds_t> pTextureBounds, ByRef<uint> pnWidth, ByRef<uint> pnHeight) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, nDeviceIndex, eFrameType, byref(pTextureBounds), byref(pnWidth), byref(pnHeight));
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureSize.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize::BeginInvoke(uint nDeviceIndex, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<::OVR::OpenVR::VRTextureBounds_t> pTextureBounds, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, nDeviceIndex, eFrameType, byref(pTextureBounds), byref(pnWidth), byref(pnHeight), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureSize.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize::EndInvoke(ByRef<::OVR::OpenVR::VRTextureBounds_t> pTextureBounds, ByRef<uint> pnWidth, ByRef<uint> pnHeight, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureSize*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pTextureBounds), byref(pnWidth), byref(pnHeight), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureD3D11
#include "OVR/OpenVR/IVRTrackedCamera__GetVideoStreamTextureD3D11.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: OVR.OpenVR.CameraVideoStreamFrameHeader_t
#include "OVR/OpenVR/CameraVideoStreamFrameHeader_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureD3D11.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11::Invoke(uint64_t hTrackedCamera, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ::System::IntPtr pD3D11DeviceOrResource, ByRef<::System::IntPtr> ppD3D11ShaderResourceView, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, uint nFrameHeaderSize) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, hTrackedCamera, eFrameType, pD3D11DeviceOrResource, byref(ppD3D11ShaderResourceView), byref(pFrameHeader), nFrameHeaderSize);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureD3D11.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11::BeginInvoke(uint64_t hTrackedCamera, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ::System::IntPtr pD3D11DeviceOrResource, ByRef<::System::IntPtr> ppD3D11ShaderResourceView, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, uint nFrameHeaderSize, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, hTrackedCamera, eFrameType, pD3D11DeviceOrResource, byref(ppD3D11ShaderResourceView), byref(pFrameHeader), nFrameHeaderSize, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureD3D11.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11::EndInvoke(ByRef<::System::IntPtr> ppD3D11ShaderResourceView, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureD3D11*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(ppD3D11ShaderResourceView), byref(pFrameHeader), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureGL
#include "OVR/OpenVR/IVRTrackedCamera__GetVideoStreamTextureGL.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraFrameType
#include "OVR/OpenVR/EVRTrackedCameraFrameType.hpp"
// Including type: OVR.OpenVR.CameraVideoStreamFrameHeader_t
#include "OVR/OpenVR/CameraVideoStreamFrameHeader_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureGL.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL::Invoke(uint64_t hTrackedCamera, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<uint> pglTextureId, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, uint nFrameHeaderSize) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, hTrackedCamera, eFrameType, byref(pglTextureId), byref(pFrameHeader), nFrameHeaderSize);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureGL.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL::BeginInvoke(uint64_t hTrackedCamera, ::OVR::OpenVR::EVRTrackedCameraFrameType eFrameType, ByRef<uint> pglTextureId, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, uint nFrameHeaderSize, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, hTrackedCamera, eFrameType, byref(pglTextureId), byref(pFrameHeader), nFrameHeaderSize, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._GetVideoStreamTextureGL.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL::EndInvoke(ByRef<uint> pglTextureId, ByRef<::OVR::OpenVR::CameraVideoStreamFrameHeader_t> pFrameHeader, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_GetVideoStreamTextureGL*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, byref(pglTextureId), byref(pFrameHeader), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamTextureGL
#include "OVR/OpenVR/IVRTrackedCamera__ReleaseVideoStreamTextureGL.hpp"
// Including type: OVR.OpenVR.EVRTrackedCameraError
#include "OVR/OpenVR/EVRTrackedCameraError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamTextureGL.Invoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL::Invoke(uint64_t hTrackedCamera, uint glTextureId) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, hTrackedCamera, glTextureId);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamTextureGL.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL::BeginInvoke(uint64_t hTrackedCamera, uint glTextureId, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, hTrackedCamera, glTextureId, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRTrackedCamera/OVR.OpenVR._ReleaseVideoStreamTextureGL.EndInvoke
::OVR::OpenVR::EVRTrackedCameraError OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRTrackedCamera::_ReleaseVideoStreamTextureGL*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRTrackedCameraError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._AddApplicationManifest
#include "OVR/OpenVR/IVRApplications__AddApplicationManifest.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._AddApplicationManifest.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_AddApplicationManifest::Invoke(::StringW pchApplicationManifestFullPath, bool bTemporary) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_AddApplicationManifest::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_AddApplicationManifest*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchApplicationManifestFullPath, bTemporary);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._AddApplicationManifest.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_AddApplicationManifest::BeginInvoke(::StringW pchApplicationManifestFullPath, bool bTemporary, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_AddApplicationManifest::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_AddApplicationManifest*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchApplicationManifestFullPath, bTemporary, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._AddApplicationManifest.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_AddApplicationManifest::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_AddApplicationManifest::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_AddApplicationManifest*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._RemoveApplicationManifest
#include "OVR/OpenVR/IVRApplications__RemoveApplicationManifest.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._RemoveApplicationManifest.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_RemoveApplicationManifest::Invoke(::StringW pchApplicationManifestFullPath) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_RemoveApplicationManifest::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_RemoveApplicationManifest*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchApplicationManifestFullPath);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._RemoveApplicationManifest.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_RemoveApplicationManifest::BeginInvoke(::StringW pchApplicationManifestFullPath, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_RemoveApplicationManifest::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_RemoveApplicationManifest*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchApplicationManifestFullPath, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._RemoveApplicationManifest.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_RemoveApplicationManifest::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_RemoveApplicationManifest::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_RemoveApplicationManifest*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsApplicationInstalled
#include "OVR/OpenVR/IVRApplications__IsApplicationInstalled.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsApplicationInstalled.Invoke
bool OVR::OpenVR::IVRApplications::_IsApplicationInstalled::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IsApplicationInstalled::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IsApplicationInstalled*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsApplicationInstalled.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_IsApplicationInstalled::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IsApplicationInstalled::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IsApplicationInstalled*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsApplicationInstalled.EndInvoke
bool OVR::OpenVR::IVRApplications::_IsApplicationInstalled::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IsApplicationInstalled::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IsApplicationInstalled*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationCount
#include "OVR/OpenVR/IVRApplications__GetApplicationCount.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationCount.Invoke
uint OVR::OpenVR::IVRApplications::_GetApplicationCount::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationCount::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationCount*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationCount.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationCount::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationCount::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationCount*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationCount.EndInvoke
uint OVR::OpenVR::IVRApplications::_GetApplicationCount::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationCount::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationCount*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByIndex
#include "OVR/OpenVR/IVRApplications__GetApplicationKeyByIndex.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByIndex.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex::Invoke(uint unApplicationIndex, ::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByIndex.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex::BeginInvoke(uint unApplicationIndex, ::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByIndex.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationKeyByIndex*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByProcessId
#include "OVR/OpenVR/IVRApplications__GetApplicationKeyByProcessId.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByProcessId.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId::Invoke(uint unProcessId, ::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByProcessId.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId::BeginInvoke(uint unProcessId, ::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationKeyByProcessId.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationKeyByProcessId*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplication
#include "OVR/OpenVR/IVRApplications__LaunchApplication.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplication.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchApplication::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchApplication::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchApplication*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplication.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_LaunchApplication::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchApplication::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchApplication*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplication.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchApplication::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchApplication::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchApplication*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchTemplateApplication
#include "OVR/OpenVR/IVRApplications__LaunchTemplateApplication.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchTemplateApplication.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchTemplateApplication::Invoke(::StringW pchTemplateAppKey, ::StringW pchNewAppKey, ByRef<::ArrayW<::OVR::OpenVR::AppOverrideKeys_t>> pKeys, uint unKeys) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchTemplateApplication::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchTemplateApplication*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchTemplateAppKey, pchNewAppKey, byref(pKeys), unKeys);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchTemplateApplication.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_LaunchTemplateApplication::BeginInvoke(::StringW pchTemplateAppKey, ::StringW pchNewAppKey, ByRef<::ArrayW<::OVR::OpenVR::AppOverrideKeys_t>> pKeys, uint unKeys, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchTemplateApplication::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchTemplateApplication*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchTemplateAppKey, pchNewAppKey, byref(pKeys), unKeys, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchTemplateApplication.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchTemplateApplication::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchTemplateApplication::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchTemplateApplication*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplicationFromMimeType
#include "OVR/OpenVR/IVRApplications__LaunchApplicationFromMimeType.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplicationFromMimeType.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType::Invoke(::StringW pchMimeType, ::StringW pchArgs) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchMimeType, pchArgs);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplicationFromMimeType.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType::BeginInvoke(::StringW pchMimeType, ::StringW pchArgs, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchMimeType, pchArgs, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchApplicationFromMimeType.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchApplicationFromMimeType*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchDashboardOverlay
#include "OVR/OpenVR/IVRApplications__LaunchDashboardOverlay.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchDashboardOverlay.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchDashboardOverlay.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchDashboardOverlay.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchDashboardOverlay*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._CancelApplicationLaunch
#include "OVR/OpenVR/IVRApplications__CancelApplicationLaunch.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._CancelApplicationLaunch.Invoke
bool OVR::OpenVR::IVRApplications::_CancelApplicationLaunch::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_CancelApplicationLaunch::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_CancelApplicationLaunch*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._CancelApplicationLaunch.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_CancelApplicationLaunch::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_CancelApplicationLaunch::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_CancelApplicationLaunch*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._CancelApplicationLaunch.EndInvoke
bool OVR::OpenVR::IVRApplications::_CancelApplicationLaunch::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_CancelApplicationLaunch::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_CancelApplicationLaunch*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._IdentifyApplication
#include "OVR/OpenVR/IVRApplications__IdentifyApplication.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IdentifyApplication.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_IdentifyApplication::Invoke(uint unProcessId, ::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IdentifyApplication::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IdentifyApplication*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, unProcessId, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IdentifyApplication.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_IdentifyApplication::BeginInvoke(uint unProcessId, ::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IdentifyApplication::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IdentifyApplication*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unProcessId, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IdentifyApplication.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_IdentifyApplication::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IdentifyApplication::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IdentifyApplication*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationProcessId
#include "OVR/OpenVR/IVRApplications__GetApplicationProcessId.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationProcessId.Invoke
uint OVR::OpenVR::IVRApplications::_GetApplicationProcessId::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationProcessId::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationProcessId*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationProcessId.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationProcessId::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationProcessId::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationProcessId*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationProcessId.EndInvoke
uint OVR::OpenVR::IVRApplications::_GetApplicationProcessId::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationProcessId::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationProcessId*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsErrorNameFromEnum
#include "OVR/OpenVR/IVRApplications__GetApplicationsErrorNameFromEnum.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsErrorNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum::Invoke(::OVR::OpenVR::EVRApplicationError error) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, error);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsErrorNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum::BeginInvoke(::OVR::OpenVR::EVRApplicationError error, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, error, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsErrorNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsErrorNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyString
#include "OVR/OpenVR/IVRApplications__GetApplicationPropertyString.hpp"
// Including type: OVR.OpenVR.EVRApplicationProperty
#include "OVR/OpenVR/EVRApplicationProperty.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyString.Invoke
uint OVR::OpenVR::IVRApplications::_GetApplicationPropertyString::Invoke(::StringW pchAppKey, ::OVR::OpenVR::EVRApplicationProperty eProperty, ::System::Text::StringBuilder* pchPropertyValueBuffer, uint unPropertyValueBufferLen, ByRef<::OVR::OpenVR::EVRApplicationError> peError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyString::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyString*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, byref(peError));
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyString.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationPropertyString::BeginInvoke(::StringW pchAppKey, ::OVR::OpenVR::EVRApplicationProperty eProperty, ::System::Text::StringBuilder* pchPropertyValueBuffer, uint unPropertyValueBufferLen, ByRef<::OVR::OpenVR::EVRApplicationError> peError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyString::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyString*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, byref(peError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyString.EndInvoke
uint OVR::OpenVR::IVRApplications::_GetApplicationPropertyString::EndInvoke(ByRef<::OVR::OpenVR::EVRApplicationError> peError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyString::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyString*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, byref(peError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyBool
#include "OVR/OpenVR/IVRApplications__GetApplicationPropertyBool.hpp"
// Including type: OVR.OpenVR.EVRApplicationProperty
#include "OVR/OpenVR/EVRApplicationProperty.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyBool.Invoke
bool OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool::Invoke(::StringW pchAppKey, ::OVR::OpenVR::EVRApplicationProperty eProperty, ByRef<::OVR::OpenVR::EVRApplicationError> peError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, pchAppKey, eProperty, byref(peError));
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyBool.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool::BeginInvoke(::StringW pchAppKey, ::OVR::OpenVR::EVRApplicationProperty eProperty, ByRef<::OVR::OpenVR::EVRApplicationError> peError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, eProperty, byref(peError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyBool.EndInvoke
bool OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool::EndInvoke(ByRef<::OVR::OpenVR::EVRApplicationError> peError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyBool*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(peError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyUint64
#include "OVR/OpenVR/IVRApplications__GetApplicationPropertyUint64.hpp"
// Including type: OVR.OpenVR.EVRApplicationProperty
#include "OVR/OpenVR/EVRApplicationProperty.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyUint64.Invoke
uint64_t OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64::Invoke(::StringW pchAppKey, ::OVR::OpenVR::EVRApplicationProperty eProperty, ByRef<::OVR::OpenVR::EVRApplicationError> peError) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint64_t, false>(this, ___internal__method, pchAppKey, eProperty, byref(peError));
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyUint64.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64::BeginInvoke(::StringW pchAppKey, ::OVR::OpenVR::EVRApplicationProperty eProperty, ByRef<::OVR::OpenVR::EVRApplicationError> peError, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, eProperty, byref(peError), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationPropertyUint64.EndInvoke
uint64_t OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64::EndInvoke(ByRef<::OVR::OpenVR::EVRApplicationError> peError, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationPropertyUint64*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint64_t, false>(this, ___internal__method, byref(peError), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetApplicationAutoLaunch
#include "OVR/OpenVR/IVRApplications__SetApplicationAutoLaunch.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetApplicationAutoLaunch.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch::Invoke(::StringW pchAppKey, bool bAutoLaunch) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchAppKey, bAutoLaunch);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetApplicationAutoLaunch.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch::BeginInvoke(::StringW pchAppKey, bool bAutoLaunch, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, bAutoLaunch, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetApplicationAutoLaunch.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_SetApplicationAutoLaunch*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationAutoLaunch
#include "OVR/OpenVR/IVRApplications__GetApplicationAutoLaunch.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationAutoLaunch.Invoke
bool OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationAutoLaunch.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationAutoLaunch.EndInvoke
bool OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationAutoLaunch*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetDefaultApplicationForMimeType
#include "OVR/OpenVR/IVRApplications__SetDefaultApplicationForMimeType.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetDefaultApplicationForMimeType.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType::Invoke(::StringW pchAppKey, ::StringW pchMimeType) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchAppKey, pchMimeType);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetDefaultApplicationForMimeType.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType::BeginInvoke(::StringW pchAppKey, ::StringW pchMimeType, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, pchMimeType, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._SetDefaultApplicationForMimeType.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_SetDefaultApplicationForMimeType*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetDefaultApplicationForMimeType
#include "OVR/OpenVR/IVRApplications__GetDefaultApplicationForMimeType.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetDefaultApplicationForMimeType.Invoke
bool OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType::Invoke(::StringW pchMimeType, ::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, pchMimeType, pchAppKeyBuffer, unAppKeyBufferLen);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetDefaultApplicationForMimeType.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType::BeginInvoke(::StringW pchMimeType, ::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchMimeType, pchAppKeyBuffer, unAppKeyBufferLen, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetDefaultApplicationForMimeType.EndInvoke
bool OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetDefaultApplicationForMimeType*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationSupportedMimeTypes
#include "OVR/OpenVR/IVRApplications__GetApplicationSupportedMimeTypes.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationSupportedMimeTypes.Invoke
bool OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes::Invoke(::StringW pchAppKey, ::System::Text::StringBuilder* pchMimeTypesBuffer, uint unMimeTypesBuffer) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, pchAppKey, pchMimeTypesBuffer, unMimeTypesBuffer);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationSupportedMimeTypes.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes::BeginInvoke(::StringW pchAppKey, ::System::Text::StringBuilder* pchMimeTypesBuffer, uint unMimeTypesBuffer, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, pchMimeTypesBuffer, unMimeTypesBuffer, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationSupportedMimeTypes.EndInvoke
bool OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationSupportedMimeTypes*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsThatSupportMimeType
#include "OVR/OpenVR/IVRApplications__GetApplicationsThatSupportMimeType.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsThatSupportMimeType.Invoke
uint OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType::Invoke(::StringW pchMimeType, ::System::Text::StringBuilder* pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, pchMimeType, pchAppKeysThatSupportBuffer, unAppKeysThatSupportBuffer);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsThatSupportMimeType.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType::BeginInvoke(::StringW pchMimeType, ::System::Text::StringBuilder* pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchMimeType, pchAppKeysThatSupportBuffer, unAppKeysThatSupportBuffer, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsThatSupportMimeType.EndInvoke
uint OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsThatSupportMimeType*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationLaunchArguments
#include "OVR/OpenVR/IVRApplications__GetApplicationLaunchArguments.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationLaunchArguments.Invoke
uint OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments::Invoke(uint unHandle, ::System::Text::StringBuilder* pchArgs, uint unArgs) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, unHandle, pchArgs, unArgs);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationLaunchArguments.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments::BeginInvoke(uint unHandle, ::System::Text::StringBuilder* pchArgs, uint unArgs, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, unHandle, pchArgs, unArgs, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationLaunchArguments.EndInvoke
uint OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationLaunchArguments*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetStartingApplication
#include "OVR/OpenVR/IVRApplications__GetStartingApplication.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.Text.StringBuilder
#include "System/Text/StringBuilder.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetStartingApplication.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_GetStartingApplication::Invoke(::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetStartingApplication::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetStartingApplication*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchAppKeyBuffer, unAppKeyBufferLen);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetStartingApplication.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetStartingApplication::BeginInvoke(::System::Text::StringBuilder* pchAppKeyBuffer, uint unAppKeyBufferLen, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetStartingApplication::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetStartingApplication*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKeyBuffer, unAppKeyBufferLen, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetStartingApplication.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_GetStartingApplication::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetStartingApplication::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetStartingApplication*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetTransitionState
#include "OVR/OpenVR/IVRApplications__GetTransitionState.hpp"
// Including type: OVR.OpenVR.EVRApplicationTransitionState
#include "OVR/OpenVR/EVRApplicationTransitionState.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetTransitionState.Invoke
::OVR::OpenVR::EVRApplicationTransitionState OVR::OpenVR::IVRApplications::_GetTransitionState::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetTransitionState::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetTransitionState*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationTransitionState, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetTransitionState.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetTransitionState::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetTransitionState::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetTransitionState*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetTransitionState.EndInvoke
::OVR::OpenVR::EVRApplicationTransitionState OVR::OpenVR::IVRApplications::_GetTransitionState::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetTransitionState::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetTransitionState*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationTransitionState, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._PerformApplicationPrelaunchCheck
#include "OVR/OpenVR/IVRApplications__PerformApplicationPrelaunchCheck.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._PerformApplicationPrelaunchCheck.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck::Invoke(::StringW pchAppKey) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchAppKey);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._PerformApplicationPrelaunchCheck.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck::BeginInvoke(::StringW pchAppKey, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchAppKey, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._PerformApplicationPrelaunchCheck.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_PerformApplicationPrelaunchCheck*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsTransitionStateNameFromEnum
#include "OVR/OpenVR/IVRApplications__GetApplicationsTransitionStateNameFromEnum.hpp"
// Including type: OVR.OpenVR.EVRApplicationTransitionState
#include "OVR/OpenVR/EVRApplicationTransitionState.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsTransitionStateNameFromEnum.Invoke
::System::IntPtr OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum::Invoke(::OVR::OpenVR::EVRApplicationTransitionState state) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum*), 12));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, state);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsTransitionStateNameFromEnum.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum::BeginInvoke(::OVR::OpenVR::EVRApplicationTransitionState state, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, state, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetApplicationsTransitionStateNameFromEnum.EndInvoke
::System::IntPtr OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetApplicationsTransitionStateNameFromEnum*), 14));
return ::il2cpp_utils::RunMethodRethrow<::System::IntPtr, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsQuitUserPromptRequested
#include "OVR/OpenVR/IVRApplications__IsQuitUserPromptRequested.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsQuitUserPromptRequested.Invoke
bool OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsQuitUserPromptRequested.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._IsQuitUserPromptRequested.EndInvoke
bool OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_IsQuitUserPromptRequested*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchInternalProcess
#include "OVR/OpenVR/IVRApplications__LaunchInternalProcess.hpp"
// Including type: OVR.OpenVR.EVRApplicationError
#include "OVR/OpenVR/EVRApplicationError.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchInternalProcess.Invoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchInternalProcess::Invoke(::StringW pchBinaryPath, ::StringW pchArguments, ::StringW pchWorkingDirectory) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchInternalProcess::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchInternalProcess*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, pchBinaryPath, pchArguments, pchWorkingDirectory);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchInternalProcess.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_LaunchInternalProcess::BeginInvoke(::StringW pchBinaryPath, ::StringW pchArguments, ::StringW pchWorkingDirectory, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchInternalProcess::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchInternalProcess*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, pchBinaryPath, pchArguments, pchWorkingDirectory, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._LaunchInternalProcess.EndInvoke
::OVR::OpenVR::EVRApplicationError OVR::OpenVR::IVRApplications::_LaunchInternalProcess::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_LaunchInternalProcess::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_LaunchInternalProcess*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::EVRApplicationError, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetCurrentSceneProcessId
#include "OVR/OpenVR/IVRApplications__GetCurrentSceneProcessId.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetCurrentSceneProcessId.Invoke
uint OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId*), 12));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetCurrentSceneProcessId.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRApplications/OVR.OpenVR._GetCurrentSceneProcessId.EndInvoke
uint OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRApplications::_GetCurrentSceneProcessId*), 14));
return ::il2cpp_utils::RunMethodRethrow<uint, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetCalibrationState
#include "OVR/OpenVR/IVRChaperone__GetCalibrationState.hpp"
// Including type: OVR.OpenVR.ChaperoneCalibrationState
#include "OVR/OpenVR/ChaperoneCalibrationState.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetCalibrationState.Invoke
::OVR::OpenVR::ChaperoneCalibrationState OVR::OpenVR::IVRChaperone::_GetCalibrationState::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetCalibrationState::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetCalibrationState*), 12));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::ChaperoneCalibrationState, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetCalibrationState.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_GetCalibrationState::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetCalibrationState::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetCalibrationState*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetCalibrationState.EndInvoke
::OVR::OpenVR::ChaperoneCalibrationState OVR::OpenVR::IVRChaperone::_GetCalibrationState::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetCalibrationState::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetCalibrationState*), 14));
return ::il2cpp_utils::RunMethodRethrow<::OVR::OpenVR::ChaperoneCalibrationState, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaSize
#include "OVR/OpenVR/IVRChaperone__GetPlayAreaSize.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaSize.Invoke
bool OVR::OpenVR::IVRChaperone::_GetPlayAreaSize::Invoke(ByRef<float> pSizeX, ByRef<float> pSizeZ) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetPlayAreaSize::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetPlayAreaSize*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pSizeX), byref(pSizeZ));
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaSize.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_GetPlayAreaSize::BeginInvoke(ByRef<float> pSizeX, ByRef<float> pSizeZ, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetPlayAreaSize::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetPlayAreaSize*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pSizeX), byref(pSizeZ), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaSize.EndInvoke
bool OVR::OpenVR::IVRChaperone::_GetPlayAreaSize::EndInvoke(ByRef<float> pSizeX, ByRef<float> pSizeZ, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetPlayAreaSize::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetPlayAreaSize*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pSizeX), byref(pSizeZ), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaRect
#include "OVR/OpenVR/IVRChaperone__GetPlayAreaRect.hpp"
// Including type: OVR.OpenVR.HmdQuad_t
#include "OVR/OpenVR/HmdQuad_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaRect.Invoke
bool OVR::OpenVR::IVRChaperone::_GetPlayAreaRect::Invoke(ByRef<::OVR::OpenVR::HmdQuad_t> rect) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetPlayAreaRect::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetPlayAreaRect*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(rect));
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaRect.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_GetPlayAreaRect::BeginInvoke(ByRef<::OVR::OpenVR::HmdQuad_t> rect, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetPlayAreaRect::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetPlayAreaRect*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(rect), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetPlayAreaRect.EndInvoke
bool OVR::OpenVR::IVRChaperone::_GetPlayAreaRect::EndInvoke(ByRef<::OVR::OpenVR::HmdQuad_t> rect, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetPlayAreaRect::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetPlayAreaRect*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(rect), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ReloadInfo
#include "OVR/OpenVR/IVRChaperone__ReloadInfo.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ReloadInfo.Invoke
void OVR::OpenVR::IVRChaperone::_ReloadInfo::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_ReloadInfo::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_ReloadInfo*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ReloadInfo.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_ReloadInfo::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_ReloadInfo::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_ReloadInfo*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ReloadInfo.EndInvoke
void OVR::OpenVR::IVRChaperone::_ReloadInfo::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_ReloadInfo::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_ReloadInfo*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._SetSceneColor
#include "OVR/OpenVR/IVRChaperone__SetSceneColor.hpp"
// Including type: OVR.OpenVR.HmdColor_t
#include "OVR/OpenVR/HmdColor_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._SetSceneColor.Invoke
void OVR::OpenVR::IVRChaperone::_SetSceneColor::Invoke(::OVR::OpenVR::HmdColor_t color) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_SetSceneColor::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_SetSceneColor*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, color);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._SetSceneColor.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_SetSceneColor::BeginInvoke(::OVR::OpenVR::HmdColor_t color, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_SetSceneColor::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_SetSceneColor*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, color, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._SetSceneColor.EndInvoke
void OVR::OpenVR::IVRChaperone::_SetSceneColor::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_SetSceneColor::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_SetSceneColor*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetBoundsColor
#include "OVR/OpenVR/IVRChaperone__GetBoundsColor.hpp"
// Including type: OVR.OpenVR.HmdColor_t
#include "OVR/OpenVR/HmdColor_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetBoundsColor.Invoke
void OVR::OpenVR::IVRChaperone::_GetBoundsColor::Invoke(ByRef<::OVR::OpenVR::HmdColor_t> pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ByRef<::OVR::OpenVR::HmdColor_t> pOutputCameraColor) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetBoundsColor::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetBoundsColor*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pOutputColorArray), nNumOutputColors, flCollisionBoundsFadeDistance, byref(pOutputCameraColor));
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetBoundsColor.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_GetBoundsColor::BeginInvoke(ByRef<::OVR::OpenVR::HmdColor_t> pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ByRef<::OVR::OpenVR::HmdColor_t> pOutputCameraColor, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetBoundsColor::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetBoundsColor*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pOutputColorArray), nNumOutputColors, flCollisionBoundsFadeDistance, byref(pOutputCameraColor), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._GetBoundsColor.EndInvoke
void OVR::OpenVR::IVRChaperone::_GetBoundsColor::EndInvoke(ByRef<::OVR::OpenVR::HmdColor_t> pOutputColorArray, ByRef<::OVR::OpenVR::HmdColor_t> pOutputCameraColor, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_GetBoundsColor::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_GetBoundsColor*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, byref(pOutputColorArray), byref(pOutputCameraColor), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._AreBoundsVisible
#include "OVR/OpenVR/IVRChaperone__AreBoundsVisible.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._AreBoundsVisible.Invoke
bool OVR::OpenVR::IVRChaperone::_AreBoundsVisible::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_AreBoundsVisible::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_AreBoundsVisible*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._AreBoundsVisible.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_AreBoundsVisible::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_AreBoundsVisible::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_AreBoundsVisible*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._AreBoundsVisible.EndInvoke
bool OVR::OpenVR::IVRChaperone::_AreBoundsVisible::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_AreBoundsVisible::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_AreBoundsVisible*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ForceBoundsVisible
#include "OVR/OpenVR/IVRChaperone__ForceBoundsVisible.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ForceBoundsVisible.Invoke
void OVR::OpenVR::IVRChaperone::_ForceBoundsVisible::Invoke(bool bForce) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_ForceBoundsVisible::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_ForceBoundsVisible*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, bForce);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ForceBoundsVisible.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperone::_ForceBoundsVisible::BeginInvoke(bool bForce, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_ForceBoundsVisible::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_ForceBoundsVisible*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, bForce, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperone/OVR.OpenVR._ForceBoundsVisible.EndInvoke
void OVR::OpenVR::IVRChaperone::_ForceBoundsVisible::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperone::_ForceBoundsVisible::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperone::_ForceBoundsVisible*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._CommitWorkingCopy
#include "OVR/OpenVR/IVRChaperoneSetup__CommitWorkingCopy.hpp"
// Including type: OVR.OpenVR.EChaperoneConfigFile
#include "OVR/OpenVR/EChaperoneConfigFile.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._CommitWorkingCopy.Invoke
bool OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy::Invoke(::OVR::OpenVR::EChaperoneConfigFile configFile) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, configFile);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._CommitWorkingCopy.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy::BeginInvoke(::OVR::OpenVR::EChaperoneConfigFile configFile, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, configFile, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._CommitWorkingCopy.EndInvoke
bool OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_CommitWorkingCopy*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._RevertWorkingCopy
#include "OVR/OpenVR/IVRChaperoneSetup__RevertWorkingCopy.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._RevertWorkingCopy.Invoke
void OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy::Invoke() {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy*), 12));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._RevertWorkingCopy.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy::BeginInvoke(::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._RevertWorkingCopy.EndInvoke
void OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy::EndInvoke(::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_RevertWorkingCopy*), 14));
::il2cpp_utils::RunMethodRethrow<void, false>(this, ___internal__method, result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaSize
#include "OVR/OpenVR/IVRChaperoneSetup__GetWorkingPlayAreaSize.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaSize.Invoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize::Invoke(ByRef<float> pSizeX, ByRef<float> pSizeZ) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pSizeX), byref(pSizeZ));
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaSize.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize::BeginInvoke(ByRef<float> pSizeX, ByRef<float> pSizeZ, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pSizeX), byref(pSizeZ), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaSize.EndInvoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize::EndInvoke(ByRef<float> pSizeX, ByRef<float> pSizeZ, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaSize*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pSizeX), byref(pSizeZ), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaRect
#include "OVR/OpenVR/IVRChaperoneSetup__GetWorkingPlayAreaRect.hpp"
// Including type: OVR.OpenVR.HmdQuad_t
#include "OVR/OpenVR/HmdQuad_t.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaRect.Invoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect::Invoke(ByRef<::OVR::OpenVR::HmdQuad_t> rect) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(rect));
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaRect.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect::BeginInvoke(ByRef<::OVR::OpenVR::HmdQuad_t> rect, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(rect), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingPlayAreaRect.EndInvoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect::EndInvoke(ByRef<::OVR::OpenVR::HmdQuad_t> rect, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingPlayAreaRect*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(rect), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingCollisionBoundsInfo
#include "OVR/OpenVR/IVRChaperoneSetup__GetWorkingCollisionBoundsInfo.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingCollisionBoundsInfo.Invoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo::Invoke(ByRef<::ArrayW<::OVR::OpenVR::HmdQuad_t>> pQuadsBuffer, ByRef<uint> punQuadsCount) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pQuadsBuffer), byref(punQuadsCount));
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingCollisionBoundsInfo.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo::BeginInvoke(ByRef<::ArrayW<::OVR::OpenVR::HmdQuad_t>> pQuadsBuffer, ByRef<uint> punQuadsCount, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pQuadsBuffer), byref(punQuadsCount), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetWorkingCollisionBoundsInfo.EndInvoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo::EndInvoke(ByRef<uint> punQuadsCount, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetWorkingCollisionBoundsInfo*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(punQuadsCount), result);
}
// Autogenerated from CppSourceCreator
// Created by Sc2ad
// =========================================================================
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
// Including type: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetLiveCollisionBoundsInfo
#include "OVR/OpenVR/IVRChaperoneSetup__GetLiveCollisionBoundsInfo.hpp"
// Including type: System.IAsyncResult
#include "System/IAsyncResult.hpp"
// Including type: System.AsyncCallback
#include "System/AsyncCallback.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetLiveCollisionBoundsInfo.Invoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo::Invoke(ByRef<::ArrayW<::OVR::OpenVR::HmdQuad_t>> pQuadsBuffer, ByRef<uint> punQuadsCount) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo::Invoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo*), 12));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(pQuadsBuffer), byref(punQuadsCount));
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetLiveCollisionBoundsInfo.BeginInvoke
::System::IAsyncResult* OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo::BeginInvoke(ByRef<::ArrayW<::OVR::OpenVR::HmdQuad_t>> pQuadsBuffer, ByRef<uint> punQuadsCount, ::System::AsyncCallback* callback, ::Il2CppObject* object) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo::BeginInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo*), 13));
return ::il2cpp_utils::RunMethodRethrow<::System::IAsyncResult*, false>(this, ___internal__method, byref(pQuadsBuffer), byref(punQuadsCount), callback, object);
}
// Autogenerated method: OVR.OpenVR.IVRChaperoneSetup/OVR.OpenVR._GetLiveCollisionBoundsInfo.EndInvoke
bool OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo::EndInvoke(ByRef<uint> punQuadsCount, ::System::IAsyncResult* result) {
static auto ___internal__logger = ::Logger::get().WithContext("::OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo::EndInvoke");
auto* ___internal__method = THROW_UNLESS(::il2cpp_utils::ResolveVtableSlot(this, classof(::OVR::OpenVR::IVRChaperoneSetup::_GetLiveCollisionBoundsInfo*), 14));
return ::il2cpp_utils::RunMethodRethrow<bool, false>(this, ___internal__method, byref(punQuadsCount), result);
}
| 81.968933 | 416 | 0.782799 | v0idp |
749bcf92b37ac0ba601e16971c55377063f38aba | 2,854 | cpp | C++ | exportNF/release/windows/obj/src/flixel/input/actions/ResetPolicy.cpp | theblobscp/NekoFreakMod-FridayNightFunkin | 232bcb08234cfe881fd6d52b13e6ae443e105fd1 | [
"BSD-3-Clause"
] | null | null | null | exportNF/release/windows/obj/src/flixel/input/actions/ResetPolicy.cpp | theblobscp/NekoFreakMod-FridayNightFunkin | 232bcb08234cfe881fd6d52b13e6ae443e105fd1 | [
"BSD-3-Clause"
] | null | null | null | exportNF/release/windows/obj/src/flixel/input/actions/ResetPolicy.cpp | theblobscp/NekoFreakMod-FridayNightFunkin | 232bcb08234cfe881fd6d52b13e6ae443e105fd1 | [
"BSD-3-Clause"
] | null | null | null | // Generated by Haxe 4.2.1+bf9ff69
#include <hxcpp.h>
#ifndef INCLUDED_flixel_input_actions_ResetPolicy
#include <flixel/input/actions/ResetPolicy.h>
#endif
namespace flixel{
namespace input{
namespace actions{
::flixel::input::actions::ResetPolicy ResetPolicy_obj::ALL_SETS;
::flixel::input::actions::ResetPolicy ResetPolicy_obj::DEFAULT_SET_ONLY;
::flixel::input::actions::ResetPolicy ResetPolicy_obj::NONE;
bool ResetPolicy_obj::__GetStatic(const ::String &inName, ::Dynamic &outValue, ::hx::PropertyAccess inCallProp)
{
if (inName==HX_("ALL_SETS",cf,1d,70,2b)) { outValue = ResetPolicy_obj::ALL_SETS; return true; }
if (inName==HX_("DEFAULT_SET_ONLY",27,e9,a0,b6)) { outValue = ResetPolicy_obj::DEFAULT_SET_ONLY; return true; }
if (inName==HX_("NONE",b8,da,ca,33)) { outValue = ResetPolicy_obj::NONE; return true; }
return super::__GetStatic(inName, outValue, inCallProp);
}
HX_DEFINE_CREATE_ENUM(ResetPolicy_obj)
int ResetPolicy_obj::__FindIndex(::String inName)
{
if (inName==HX_("ALL_SETS",cf,1d,70,2b)) return 1;
if (inName==HX_("DEFAULT_SET_ONLY",27,e9,a0,b6)) return 2;
if (inName==HX_("NONE",b8,da,ca,33)) return 0;
return super::__FindIndex(inName);
}
int ResetPolicy_obj::__FindArgCount(::String inName)
{
if (inName==HX_("ALL_SETS",cf,1d,70,2b)) return 0;
if (inName==HX_("DEFAULT_SET_ONLY",27,e9,a0,b6)) return 0;
if (inName==HX_("NONE",b8,da,ca,33)) return 0;
return super::__FindArgCount(inName);
}
::hx::Val ResetPolicy_obj::__Field(const ::String &inName,::hx::PropertyAccess inCallProp)
{
if (inName==HX_("ALL_SETS",cf,1d,70,2b)) return ALL_SETS;
if (inName==HX_("DEFAULT_SET_ONLY",27,e9,a0,b6)) return DEFAULT_SET_ONLY;
if (inName==HX_("NONE",b8,da,ca,33)) return NONE;
return super::__Field(inName,inCallProp);
}
static ::String ResetPolicy_obj_sStaticFields[] = {
HX_("NONE",b8,da,ca,33),
HX_("ALL_SETS",cf,1d,70,2b),
HX_("DEFAULT_SET_ONLY",27,e9,a0,b6),
::String(null())
};
::hx::Class ResetPolicy_obj::__mClass;
Dynamic __Create_ResetPolicy_obj() { return new ResetPolicy_obj; }
void ResetPolicy_obj::__register()
{
::hx::Static(__mClass) = ::hx::_hx_RegisterClass(HX_("flixel.input.actions.ResetPolicy",1a,a2,1d,33), ::hx::TCanCast< ResetPolicy_obj >,ResetPolicy_obj_sStaticFields,0,
&__Create_ResetPolicy_obj, &__Create,
&super::__SGetClass(), &CreateResetPolicy_obj, 0
#ifdef HXCPP_VISIT_ALLOCS
, 0
#endif
#ifdef HXCPP_SCRIPTABLE
, 0
#endif
);
__mClass->mGetStaticField = &ResetPolicy_obj::__GetStatic;
}
void ResetPolicy_obj::__boot()
{
ALL_SETS = ::hx::CreateConstEnum< ResetPolicy_obj >(HX_("ALL_SETS",cf,1d,70,2b),1);
DEFAULT_SET_ONLY = ::hx::CreateConstEnum< ResetPolicy_obj >(HX_("DEFAULT_SET_ONLY",27,e9,a0,b6),2);
NONE = ::hx::CreateConstEnum< ResetPolicy_obj >(HX_("NONE",b8,da,ca,33),0);
}
} // end namespace flixel
} // end namespace input
} // end namespace actions
| 32.067416 | 168 | 0.736861 | theblobscp |
749cc5378df5ed5d1784f0ce941407ced7d5e34d | 1,127 | cpp | C++ | C++/findSubstring.cpp | colorfulberry/LeetCode | a4103a63d2969e8819447685f42423cd22fed2ff | [
"MIT"
] | 2 | 2020-04-08T17:57:43.000Z | 2021-11-07T09:11:51.000Z | C++/findSubstring.cpp | colorfulberry/LeetCode | a4103a63d2969e8819447685f42423cd22fed2ff | [
"MIT"
] | null | null | null | C++/findSubstring.cpp | colorfulberry/LeetCode | a4103a63d2969e8819447685f42423cd22fed2ff | [
"MIT"
] | 8 | 2018-03-13T18:20:26.000Z | 2022-03-09T19:48:11.000Z | // Time Complexity: O((m - n * k) * n * k) ~ O(m * n * k), where m is string length, n is dict size, k is word length
// Space Complexity: O( n * k)
class Solution {
public:
vector<int> findSubstring(string s, vector<string> &dict) {
const size_t wordLength = dict.front().length();
const size_t catLength = wordLength * dict.size();
vector<int> result;
if(s.length() < catLength) return result;
unordered_map<string, int> wordCount;
for(auto const & word : dict) ++wordCount[word];
for(auto i = begin(s); i <= prev(end(s), catLength); ++i) {
unordered_map<string, int> unused(wordCount);
for(auto j = i; j != next(i, catLength); j += wordLength) {
auto pos = unused.find(string(j, next(j, wordLength)));
if(pos == unused.end()) break;
if(--pos->second == 0) unused.erase(pos);
}
if(unused.size() == 0) result.push_back(distance(begin(s), i));
}
return result;
}
};
| 34.151515 | 117 | 0.511979 | colorfulberry |
749e46b8f34a6252e282499cffa6a56a92e50d63 | 7,867 | cpp | C++ | CFD/src/mesh_generation/hexcore.cpp | CompilerLuke/NextEngine | aa1a8e9d9370bce004dba00854701597cab74989 | [
"MIT"
] | 1 | 2021-09-10T18:19:16.000Z | 2021-09-10T18:19:16.000Z | CFD/src/mesh_generation/hexcore.cpp | CompilerLuke/NextEngine | aa1a8e9d9370bce004dba00854701597cab74989 | [
"MIT"
] | null | null | null | CFD/src/mesh_generation/hexcore.cpp | CompilerLuke/NextEngine | aa1a8e9d9370bce004dba00854701597cab74989 | [
"MIT"
] | 2 | 2020-04-02T06:46:56.000Z | 2021-06-17T16:47:57.000Z | #include "mesh_generation/hexcore.h"
#include "core/math/aabb.h"
#include "core/container/tvector.h"
#include "mesh_generation/point_octotree.h"
#include <set>
struct HexcoreCell {
u64 morton;
uint depth; //todo could compute this implicitly, but probably more error prone
bool front;
union {
HexcoreCell* parent;
HexcoreCell* next_free;
};
HexcoreCell* children;
};
const uint CHUNK_SIZE = mb(50);
HexcoreCell* alloc_8_hexcore_cell(HexcoreCell** pool) {
if (!*pool) {
*pool = (HexcoreCell*)calloc(1,CHUNK_SIZE);
uint n = CHUNK_SIZE / (8 * sizeof(HexcoreCell));
for (uint i = 0; i < n - 1; i++) {
(*pool)[i * 8].next_free = *pool + (i + 1) * 8;
}
(*pool)[(n - 1) * 8].next_free = nullptr;
}
HexcoreCell* current = *pool;
*pool = current->next_free;
return current;
}
void hexcore_to_mesh(CFDVolume& volume, HexcoreCell* root, const AABB& aabb) {
struct Data {
AABB aabb;
HexcoreCell* cells;
};
tvector<Data> stack;
stack.append({ aabb, root->children });
while (stack.length > 0) {
Data data = stack.pop();
AABB child_aabbs[8];
subdivide_aabb(data.aabb, child_aabbs);
for (uint i = 0; i < 8; i++) {
if (!data.cells[i].children) {
if (!data.cells[i].front) continue;
uint subdivision = 1;
vec3 dx = child_aabbs[i].size() / subdivision;
for (uint x = 0; x < subdivision; x++) {
for (uint y = 0; y < subdivision; y++) {
for (uint z = 0; z < subdivision; z++) {
AABB aabb;
aabb.min = child_aabbs[i].min + vec3(x, y, z) * dx;
aabb.max = aabb.min + dx;
glm::vec3 points[8];
aabb.to_verts(points);
CFDCell cell{ CFDCell::HEXAHEDRON };
for (uint j = 0; j < 8; j++) {
cell.vertices[j] = { (int)volume.vertices.length };
volume.vertices.append({ points[j] });
}
volume.cells.append(cell);
}
}
}
}
else {
stack.append({ child_aabbs[i], data.cells[i].children });
}
}
}
}
#define MORTON_MASK(depth, i) ((u64)(i) << (depth-1)*3)
#define MORTON_AXIS(depth, k) ((u64)(1) << ((depth-1)*3+k))
// Assumes little endian
void printBits(size_t const size, void const* const ptr)
{
unsigned char* b = (unsigned char*)ptr;
unsigned char byte;
int i, j;
for (i = size - 1; i >= 0; i--) {
for (j = 7; j >= 0; j--) {
byte = (b[i] >> j) & 1;
printf("%u", byte);
}
}
puts("");
}
void build_hexcore(HexcoreCell** pool, HexcoreCell* root, PointOctotree& octo) {
struct Data {
HexcoreCell* parent;
HexcoreCell* cells;
PointOctotree::Payload* payload;
};
root->children = alloc_8_hexcore_cell(pool);
tvector<Data> stack;
stack.append({ root, root->children, octo.root.p });
while (stack.length > 0) {
Data data = stack.pop();
HexcoreCell* cells = data.cells;
u64 morton = data.parent->morton;
uint depth = data.parent->depth + 1;
for (uint i = 0; i < 8; i++) {
auto& subdivision = data.payload->children[i];
u64 child_morton = morton | MORTON_MASK(depth, i);
cells[i].morton = child_morton;
cells[i].parent = data.parent;
cells[i].depth = depth;
if (subdivision.count <= PointOctotree::MAX_PER_CELL) {
cells[i].children = nullptr;
cells[i].front = subdivision.count > 0;
}
else {
cells[i].children = alloc_8_hexcore_cell(pool);
stack.append({ cells + i, cells[i].children, subdivision.p });
}
}
}
}
struct HexRefinementQueue {
vector<HexcoreCell*> refine;
std::set<u64> morton_codes;
};
u64 neighbor_code(u64 morton, uint depth, uint k, uint* f) {
u64 mask = MORTON_AXIS(depth, k);
bool b = morton & mask;
u64 neighbor = morton ^ mask;
for (uint i = depth - 1; i > 0; i--) {
u64 mask = MORTON_AXIS(i, k);
neighbor ^= mask;
if (b != bool(morton & mask)) {
*f = i;
return neighbor;
}
}
return UINT64_MAX;
}
HexcoreCell* find_cell(HexcoreCell* start, u64 neighbor, uint max_depth, uint f) {
if (neighbor == UINT64_MAX) return nullptr;
HexcoreCell* current = start;
while (current && current->depth >= f) { //(current->morton & morton) != current->morton ) {
current = current->parent;
}
if (!current) return nullptr;
while (current->children && current->depth < max_depth) {
uint index = (neighbor >> 3 * current->depth) & (1 << 3) - 1;
current = current->children + index;
}
if (current->children) return nullptr;
return current;
}
void refine_children_if_needed(HexRefinementQueue& queue, HexcoreCell* children, uint n) {
for (uint i = 0; i < n; i++) {
HexcoreCell& cell = children[i];
if (!cell.front) continue;
uint depth = cell.depth;
u64 morton = cell.morton;
for (uint k = 0; k < 3; k++) {
uint f;
u64 neighbor = neighbor_code(morton, depth, k, &f);
HexcoreCell* neighbor_cell = find_cell(cell.parent, neighbor, depth, f);
if (!neighbor_cell) continue;
if (neighbor_cell->front) continue;
if (queue.morton_codes.find(neighbor_cell->morton) != queue.morton_codes.end()) continue;
//neighbor_cell->depth >= depth - 1 ||
queue.refine.append(neighbor_cell);
queue.morton_codes.insert(neighbor_cell->morton);
}
}
}
void balance_hexcore(HexcoreCell* root, HexcoreCell** pool) {
struct Data {
HexcoreCell* cells;
};
HexRefinementQueue queue;
tvector<Data> stack;
uint target_subdivision = 4;
uint count = 0;
while (count++ < 0) {
stack.append({ root->children });
while (stack.length > 0) {
Data data = stack.pop();
for (uint i = 0; i < 8; i++) {
HexcoreCell& cell = data.cells[i];
if (cell.children) {
stack.append({ cell.children });
continue;
}
refine_children_if_needed(queue, &cell, 1);
}
}
if (queue.refine.length == 0) break;
while (queue.refine.length > 0) {
HexcoreCell* cell = queue.refine.pop();
cell->children = alloc_8_hexcore_cell(pool);
uint depth = cell->depth + 1;
for (uint i = 0; i < 8; i++) {
cell->children[i].parent = cell;
cell->children[i].depth = depth;
cell->children[i].morton = cell->morton | MORTON_MASK(depth, i);
cell->children[i].children = 0;
cell->children[i].front = true;
if (depth < target_subdivision) {
//queue.refine.append(cell->children + i);
}
}
}
queue.refine.clear();
queue.morton_codes.clear();
}
}
void hexcore(PointOctotree& octo, CFDVolume& volume, CFDDebugRenderer& debug) {
HexcoreCell* pool = nullptr;
HexcoreCell root = {};
build_hexcore(&pool, &root, octo);
balance_hexcore(&root, &pool);
hexcore_to_mesh(volume, &root, octo.root.aabb);
} | 29.245353 | 101 | 0.519385 | CompilerLuke |
749f1ba4af152e8b7663affcef85ac7877b823e5 | 8,384 | cc | C++ | services/device/public/cpp/hid/fake_hid_manager.cc | iridium-browser/iridium-browser | 907e31cf5ce5ad14d832796e3a7c11e496828959 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 575 | 2015-06-18T23:58:20.000Z | 2022-03-23T09:32:39.000Z | services/device/public/cpp/hid/fake_hid_manager.cc | iridium-browser/iridium-browser | 907e31cf5ce5ad14d832796e3a7c11e496828959 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | services/device/public/cpp/hid/fake_hid_manager.cc | iridium-browser/iridium-browser | 907e31cf5ce5ad14d832796e3a7c11e496828959 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 52 | 2015-07-14T10:40:50.000Z | 2022-03-15T01:11:49.000Z | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/device/public/cpp/hid/fake_hid_manager.h"
#include <memory>
#include <utility>
#include "base/guid.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/device/public/cpp/hid/hid_blocklist.h"
namespace device {
FakeHidConnection::FakeHidConnection(
mojom::HidDeviceInfoPtr device,
mojo::PendingReceiver<mojom::HidConnection> receiver,
mojo::PendingRemote<mojom::HidConnectionClient> connection_client,
mojo::PendingRemote<mojom::HidConnectionWatcher> watcher)
: receiver_(this, std::move(receiver)),
device_(std::move(device)),
watcher_(std::move(watcher)) {
receiver_.set_disconnect_handler(base::BindOnce(
[](FakeHidConnection* self) { delete self; }, base::Unretained(this)));
if (watcher_) {
watcher_.set_disconnect_handler(base::BindOnce(
[](FakeHidConnection* self) { delete self; }, base::Unretained(this)));
}
if (connection_client)
client_.Bind(std::move(connection_client));
}
FakeHidConnection::~FakeHidConnection() = default;
// mojom::HidConnection implementation:
void FakeHidConnection::Read(ReadCallback callback) {
const char kResult[] = "This is a HID input report.";
uint8_t report_id = device_->has_report_id ? 1 : 0;
std::vector<uint8_t> buffer(kResult, kResult + sizeof(kResult) - 1);
std::move(callback).Run(true, report_id, buffer);
}
void FakeHidConnection::Write(uint8_t report_id,
const std::vector<uint8_t>& buffer,
WriteCallback callback) {
const char kExpected[] = "o-report"; // 8 bytes
if (buffer.size() != sizeof(kExpected) - 1) {
std::move(callback).Run(false);
return;
}
int expected_report_id = device_->has_report_id ? 1 : 0;
if (report_id != expected_report_id) {
std::move(callback).Run(false);
return;
}
if (memcmp(buffer.data(), kExpected, sizeof(kExpected) - 1) != 0) {
std::move(callback).Run(false);
return;
}
std::move(callback).Run(true);
}
void FakeHidConnection::GetFeatureReport(uint8_t report_id,
GetFeatureReportCallback callback) {
uint8_t expected_report_id = device_->has_report_id ? 1 : 0;
if (report_id != expected_report_id) {
std::move(callback).Run(false, base::nullopt);
return;
}
const char kResult[] = "This is a HID feature report.";
std::vector<uint8_t> buffer;
if (device_->has_report_id)
buffer.push_back(report_id);
buffer.insert(buffer.end(), kResult, kResult + sizeof(kResult) - 1);
std::move(callback).Run(true, buffer);
}
void FakeHidConnection::SendFeatureReport(uint8_t report_id,
const std::vector<uint8_t>& buffer,
SendFeatureReportCallback callback) {
const char kExpected[] = "The app is setting this HID feature report.";
if (buffer.size() != sizeof(kExpected) - 1) {
std::move(callback).Run(false);
return;
}
int expected_report_id = device_->has_report_id ? 1 : 0;
if (report_id != expected_report_id) {
std::move(callback).Run(false);
return;
}
if (memcmp(buffer.data(), kExpected, sizeof(kExpected) - 1) != 0) {
std::move(callback).Run(false);
return;
}
std::move(callback).Run(true);
}
// Implementation of FakeHidManager.
FakeHidManager::FakeHidManager() = default;
FakeHidManager::~FakeHidManager() = default;
void FakeHidManager::Bind(mojo::PendingReceiver<mojom::HidManager> receiver) {
receivers_.Add(this, std::move(receiver));
}
// mojom::HidManager implementation:
void FakeHidManager::AddReceiver(
mojo::PendingReceiver<mojom::HidManager> receiver) {
Bind(std::move(receiver));
}
void FakeHidManager::GetDevicesAndSetClient(
mojo::PendingAssociatedRemote<mojom::HidManagerClient> client,
GetDevicesCallback callback) {
GetDevices(std::move(callback));
if (!client.is_valid())
return;
clients_.Add(std::move(client));
}
void FakeHidManager::GetDevices(GetDevicesCallback callback) {
std::vector<mojom::HidDeviceInfoPtr> device_list;
for (auto& map_entry : devices_)
device_list.push_back(map_entry.second->Clone());
std::move(callback).Run(std::move(device_list));
}
void FakeHidManager::Connect(
const std::string& device_guid,
mojo::PendingRemote<mojom::HidConnectionClient> connection_client,
mojo::PendingRemote<mojom::HidConnectionWatcher> watcher,
bool allow_protected_reports,
ConnectCallback callback) {
if (!base::Contains(devices_, device_guid)) {
std::move(callback).Run(mojo::NullRemote());
return;
}
mojo::PendingRemote<mojom::HidConnection> connection;
// FakeHidConnection is self-owned.
new FakeHidConnection(devices_[device_guid]->Clone(),
connection.InitWithNewPipeAndPassReceiver(),
std::move(connection_client), std::move(watcher));
std::move(callback).Run(std::move(connection));
}
mojom::HidDeviceInfoPtr FakeHidManager::CreateAndAddDevice(
const std::string& physical_device_id,
uint16_t vendor_id,
uint16_t product_id,
const std::string& product_name,
const std::string& serial_number,
mojom::HidBusType bus_type) {
return CreateAndAddDeviceWithTopLevelUsage(
physical_device_id, vendor_id, product_id, product_name, serial_number,
bus_type, /*usage_page=*/0xff00,
/*usage=*/0x0001);
}
mojom::HidDeviceInfoPtr FakeHidManager::CreateAndAddDeviceWithTopLevelUsage(
const std::string& physical_device_id,
uint16_t vendor_id,
uint16_t product_id,
const std::string& product_name,
const std::string& serial_number,
mojom::HidBusType bus_type,
uint16_t usage_page,
uint16_t usage) {
auto collection = mojom::HidCollectionInfo::New();
collection->usage = mojom::HidUsageAndPage::New(usage, usage_page);
collection->collection_type = mojom::kHIDCollectionTypeApplication;
collection->input_reports.push_back(mojom::HidReportDescription::New());
auto device = mojom::HidDeviceInfo::New();
device->guid = base::GenerateGUID();
device->physical_device_id = physical_device_id;
device->vendor_id = vendor_id;
device->product_id = product_id;
device->product_name = product_name;
device->serial_number = serial_number;
device->bus_type = bus_type;
device->collections.push_back(std::move(collection));
device->protected_input_report_ids =
HidBlocklist::Get().GetProtectedReportIds(HidBlocklist::kReportTypeInput,
vendor_id, product_id,
device->collections);
device->protected_output_report_ids =
HidBlocklist::Get().GetProtectedReportIds(HidBlocklist::kReportTypeOutput,
vendor_id, product_id,
device->collections);
device->protected_feature_report_ids =
HidBlocklist::Get().GetProtectedReportIds(
HidBlocklist::kReportTypeFeature, vendor_id, product_id,
device->collections);
AddDevice(device.Clone());
return device;
}
void FakeHidManager::AddDevice(mojom::HidDeviceInfoPtr device) {
std::string guid = device->guid;
DCHECK(!base::Contains(devices_, guid));
devices_[guid] = std::move(device);
const mojom::HidDeviceInfoPtr& device_info = devices_[guid];
for (auto& client : clients_)
client->DeviceAdded(device_info->Clone());
}
void FakeHidManager::RemoveDevice(const std::string& guid) {
if (base::Contains(devices_, guid)) {
const mojom::HidDeviceInfoPtr& device_info = devices_[guid];
for (auto& client : clients_)
client->DeviceRemoved(device_info->Clone());
devices_.erase(guid);
}
}
void FakeHidManager::ChangeDevice(mojom::HidDeviceInfoPtr device) {
DCHECK(base::Contains(devices_, device->guid));
mojom::HidDeviceInfoPtr& device_info = devices_[device->guid];
device_info = std::move(device);
for (auto& client : clients_)
client->DeviceChanged(device_info->Clone());
}
void FakeHidManager::SimulateConnectionError() {
clients_.Clear();
receivers_.Clear();
}
} // namespace device
| 33.94332 | 80 | 0.69251 | iridium-browser |
749f389de3bac739587fcfed16103233f8ba35a2 | 1,413 | hpp | C++ | src/lib/interface/AffichageReseau.hpp | EXsky51/in608-tcp_ip_simulation | 98376c152a062ce2a23cfab775c89d31a156e2e6 | [
"MIT"
] | 2 | 2021-05-25T22:44:15.000Z | 2021-05-31T00:19:30.000Z | src/lib/interface/AffichageReseau.hpp | EXsky51/in608-tcp_ip_simulation | 98376c152a062ce2a23cfab775c89d31a156e2e6 | [
"MIT"
] | 3 | 2021-05-17T12:46:46.000Z | 2021-05-24T10:18:11.000Z | src/lib/interface/AffichageReseau.hpp | EXsky51/in608-tcp_ip_simulation | 98376c152a062ce2a23cfab775c89d31a156e2e6 | [
"MIT"
] | 32 | 2021-05-03T12:05:42.000Z | 2021-05-25T16:15:45.000Z | /**
* @file AffichageReseau.hpp
* @brief Déclaration de la classe AffichageReseau.
*
* @author Johann RAMANANDRAISIORY
* @date 2021
**/
#ifndef AFFICHAGERESEAU_H
#define AFFICHAGERESEAU_H
#include "Contexte.hpp"
#include <QApplication>
#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QHBoxLayout>
#include <QtCharts>
using namespace QtCharts;
class AffichageReseau : public QHBoxLayout
{
Q_OBJECT
private:
// Attributs
AffichageReseau();
QPushButton* m_Image;
QChartView* m_Vue;
QChart* m_Graphique;
std::vector<QLineSeries*> m_Lignes;
QHBoxLayout* m_Layout;
public:
// Singleton
static AffichageReseau& GetInstance() {
static AffichageReseau singleton;
return singleton;
}
// Méthodes de copie
AffichageReseau(AffichageReseau&) = delete;
void operator=(AffichageReseau&) = delete;
// Destructeur
~AffichageReseau();
// Methodes
void configSimple();
void configMaison();
void configPme();
void configEntreprise();
void initialiserGraphe();
void rafraichirGraphe();
void sauvegarderGraphe(const QString& nomFichier);
private slots :
// Méthode Slots
void informationsReseau();
};
#endif // AFFICHAGERESEAU_H
| 20.779412 | 58 | 0.624204 | EXsky51 |
74a0397c2de6a0ae2ee5f6e8e31197fa2c3c4469 | 56,085 | cc | C++ | chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-03-07T14:20:02.000Z | 2021-03-07T14:20:02.000Z | // Copyright 2015 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 <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <memory>
#include <string>
#include <vector>
#include "base/bind.h"
#include "base/callback.h"
#include "base/check.h"
#include "base/containers/span.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/hash/sha1.h"
#include "base/memory/scoped_refptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/ash/certificate_provider/certificate_provider.h"
#include "chrome/browser/ash/certificate_provider/certificate_provider_service.h"
#include "chrome/browser/ash/certificate_provider/certificate_provider_service_factory.h"
#include "chrome/browser/ash/certificate_provider/test_certificate_provider_extension.h"
#include "chrome/browser/chromeos/ui/request_pin_view.h"
#include "chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/policy/core/browser/browser_policy_connector.h"
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/policy_constants.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "crypto/rsa_private_key.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/common/extension.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/test_background_page_first_load_observer.h"
#include "net/cert/x509_certificate.h"
#include "net/http/http_status_code.h"
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_config.h"
#include "net/ssl/ssl_server_config.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/boringssl/src/include/openssl/base.h"
#include "third_party/boringssl/src/include/openssl/digest.h"
#include "third_party/boringssl/src/include/openssl/evp.h"
#include "third_party/boringssl/src/include/openssl/mem.h"
#include "third_party/boringssl/src/include/openssl/pool.h"
#include "third_party/boringssl/src/include/openssl/rsa.h"
#include "third_party/boringssl/src/include/openssl/ssl.h"
#include "ui/gfx/color_palette.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
using testing::Return;
using testing::_;
namespace {
void StoreDigest(std::vector<uint8_t>* digest,
base::OnceClosure callback,
base::Value value) {
ASSERT_TRUE(value.is_blob()) << "Unexpected value in StoreDigest";
digest->assign(value.GetBlob().begin(), value.GetBlob().end());
std::move(callback).Run();
}
bool RsaSignRawData(uint16_t openssl_signature_algorithm,
const std::vector<uint8_t>& input,
crypto::RSAPrivateKey* key,
std::vector<uint8_t>* signature) {
const EVP_MD* const digest_algorithm =
SSL_get_signature_algorithm_digest(openssl_signature_algorithm);
bssl::ScopedEVP_MD_CTX ctx;
EVP_PKEY_CTX* pkey_ctx = nullptr;
if (!EVP_DigestSignInit(ctx.get(), &pkey_ctx, digest_algorithm,
/*ENGINE* e=*/nullptr, key->key()))
return false;
if (SSL_is_signature_algorithm_rsa_pss(openssl_signature_algorithm)) {
// For RSA-PSS, configure the special padding and set the salt length to be
// equal to the hash size.
if (!EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING) ||
!EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, /*salt_len=*/-1)) {
return false;
}
}
size_t sig_len = 0;
// Determine the signature length for the buffer.
if (!EVP_DigestSign(ctx.get(), /*out_sig=*/nullptr, &sig_len, input.data(),
input.size()))
return false;
signature->resize(sig_len);
return EVP_DigestSign(ctx.get(), signature->data(), &sig_len, input.data(),
input.size()) != 0;
}
bool RsaSignPrehashed(uint16_t openssl_signature_algorithm,
const std::vector<uint8_t>& digest,
crypto::RSAPrivateKey* key,
std::vector<uint8_t>* signature) {
// RSA-PSS is not supported for prehashed data.
EXPECT_FALSE(SSL_is_signature_algorithm_rsa_pss(openssl_signature_algorithm));
RSA* rsa_key = EVP_PKEY_get0_RSA(key->key());
if (!rsa_key)
return false;
const int digest_algorithm_nid = EVP_MD_type(
SSL_get_signature_algorithm_digest(openssl_signature_algorithm));
unsigned len = 0;
signature->resize(RSA_size(rsa_key));
if (!RSA_sign(digest_algorithm_nid, digest.data(), digest.size(),
signature->data(), &len, rsa_key)) {
signature->clear();
return false;
}
signature->resize(len);
return true;
}
// Create a string that if evaluated in JavaScript returns a Uint8Array with
// |bytes| as content.
std::string JsUint8Array(const std::vector<uint8_t>& bytes) {
std::string res = "new Uint8Array([";
for (const uint8_t byte : bytes) {
res += base::NumberToString(byte);
res += ", ";
}
res += "])";
return res;
}
std::string GetPageTextContent(content::WebContents* web_contents) {
std::string text_content;
EXPECT_TRUE(content::ExecuteScriptAndExtractString(
web_contents->GetMainFrame(),
"domAutomationController.send(document.body.textContent);",
&text_content));
return text_content;
}
std::string GetCertFingerprint1(const net::X509Certificate& cert) {
unsigned char hash[base::kSHA1Length];
base::SHA1HashBytes(CRYPTO_BUFFER_data(cert.cert_buffer()),
CRYPTO_BUFFER_len(cert.cert_buffer()), hash);
return base::ToLowerASCII(base::HexEncode(hash, base::kSHA1Length));
}
class CertificateProviderApiTest : public extensions::ExtensionApiTest {
public:
CertificateProviderApiTest() {}
void SetUpInProcessBrowserTestFixture() override {
ON_CALL(provider_, IsInitializationComplete(_)).WillByDefault(Return(true));
ON_CALL(provider_, IsFirstPolicyLoadComplete(_))
.WillByDefault(Return(true));
policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
extensions::ExtensionApiTest::SetUpInProcessBrowserTestFixture();
}
void SetUpOnMainThread() override {
extensions::ExtensionApiTest::SetUpOnMainThread();
// Set up the AutoSelectCertificateForUrls policy to avoid the client
// certificate selection dialog.
const std::string autoselect_pattern = R"({"pattern": "*", "filter": {}})";
base::Value autoselect_policy(base::Value::Type::LIST);
autoselect_policy.Append(autoselect_pattern);
policy_map_.Set(policy::key::kAutoSelectCertificateForUrls,
policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER,
policy::POLICY_SOURCE_CLOUD, std::move(autoselect_policy),
nullptr);
provider_.UpdateChromePolicy(policy_map_);
content::RunAllPendingInMessageLoop();
cert_provider_service_ =
chromeos::CertificateProviderServiceFactory::GetForBrowserContext(
profile());
}
// Starts an HTTPS test server that requests a client certificate.
bool StartHttpsServer(uint16_t ssl_protocol_version) {
net::SSLServerConfig ssl_server_config;
ssl_server_config.client_cert_type =
net::SSLServerConfig::REQUIRE_CLIENT_CERT;
ssl_server_config.version_max = ssl_protocol_version;
https_server_ = std::make_unique<net::EmbeddedTestServer>(
net::EmbeddedTestServer::TYPE_HTTPS);
https_server_->SetSSLConfig(net::EmbeddedTestServer::CERT_OK,
ssl_server_config);
https_server_->RegisterRequestHandler(
base::BindRepeating(&CertificateProviderApiTest::OnHttpsServerRequested,
base::Unretained(this)));
return https_server_->Start();
}
void CheckCertificateProvidedByExtension(
const net::X509Certificate& certificate,
const extensions::Extension& extension) {
bool is_currently_provided = false;
std::string provider_extension_id;
cert_provider_service_->LookUpCertificate(
certificate, &is_currently_provided, &provider_extension_id);
EXPECT_TRUE(is_currently_provided);
EXPECT_EQ(provider_extension_id, extension.id());
}
void CheckCertificateAbsent(const net::X509Certificate& certificate) {
bool is_currently_provided = true;
std::string provider_extension_id;
cert_provider_service_->LookUpCertificate(
certificate, &is_currently_provided, &provider_extension_id);
EXPECT_FALSE(is_currently_provided);
}
std::vector<scoped_refptr<net::X509Certificate>>
GetAllProvidedCertificates() {
base::RunLoop run_loop;
std::unique_ptr<chromeos::CertificateProvider> cert_provider =
cert_provider_service_->CreateCertificateProvider();
std::vector<scoped_refptr<net::X509Certificate>> all_provided_certificates;
auto callback = base::BindLambdaForTesting(
[&](net::ClientCertIdentityList cert_identity_list) {
for (const auto& cert_identity : cert_identity_list)
all_provided_certificates.push_back(cert_identity->certificate());
});
cert_provider->GetCertificates(callback.Then(run_loop.QuitClosure()));
run_loop.Run();
return all_provided_certificates;
}
GURL GetHttpsClientCertUrl() const {
return https_server_->GetURL(kClientCertUrl);
}
protected:
testing::NiceMock<policy::MockConfigurationPolicyProvider> provider_;
chromeos::CertificateProviderService* cert_provider_service_ = nullptr;
policy::PolicyMap policy_map_;
private:
const char* const kClientCertUrl = "/client-cert";
std::unique_ptr<net::test_server::HttpResponse> OnHttpsServerRequested(
const net::test_server::HttpRequest& request) const {
if (request.relative_url != kClientCertUrl)
return nullptr;
auto response = std::make_unique<net::test_server::BasicHttpResponse>();
if (!request.ssl_info || !request.ssl_info->cert) {
response->set_code(net::HTTP_FORBIDDEN);
return response;
}
response->set_content("got client cert with fingerprint: " +
GetCertFingerprint1(*request.ssl_info->cert));
response->set_content_type("text/plain");
return response;
}
std::unique_ptr<net::EmbeddedTestServer> https_server_;
};
// Tests the API with a test extension in place. Tests can cause the extension
// to trigger API calls.
class CertificateProviderApiMockedExtensionTest
: public CertificateProviderApiTest {
public:
void SetUpOnMainThread() override {
CertificateProviderApiTest::SetUpOnMainThread();
extension_path_ = test_data_dir_.AppendASCII("certificate_provider");
extension_ = LoadExtension(extension_path_);
ui_test_utils::NavigateToURL(browser(),
extension_->GetResourceURL("basic.html"));
extension_contents_ = browser()->tab_strip_model()->GetActiveWebContents();
std::string raw_certificate = GetCertificateData();
std::vector<uint8_t> certificate_bytes(raw_certificate.begin(),
raw_certificate.end());
ExecuteJavascript("initialize(" + JsUint8Array(certificate_bytes) + ");");
}
content::RenderFrameHost* GetExtensionMainFrame() const {
return extension_contents_->GetMainFrame();
}
void ExecuteJavascript(const std::string& function) const {
ASSERT_TRUE(content::ExecuteScript(GetExtensionMainFrame(), function));
}
// Calls |function| in the extension. |function| needs to return a bool. If
// that happens at the end of a callback, this will wait for the callback to
// complete.
void ExecuteJavascriptAndWaitForCallback(const std::string& function) const {
bool success = false;
ASSERT_TRUE(content::ExecuteScriptAndExtractBool(GetExtensionMainFrame(),
function, &success));
ASSERT_TRUE(success);
}
const extensions::Extension* extension() const { return extension_; }
std::string GetKeyPk8() const {
std::string key_pk8;
base::ScopedAllowBlockingForTesting allow_io;
EXPECT_TRUE(base::ReadFileToString(
extension_path_.AppendASCII("l1_leaf.pk8"), &key_pk8));
return key_pk8;
}
// Returns the certificate stored in
// chrome/test/data/extensions/api_test/certificate_provider
scoped_refptr<net::X509Certificate> GetCertificate() const {
std::string raw_certificate = GetCertificateData();
return net::X509Certificate::CreateFromBytes(raw_certificate.data(),
raw_certificate.size());
}
// Tests the api by navigating to a webpage that requests to perform a
// signature operation with the available certificate.
// This signs the request using the algorithm specified by
// `openssl_signature_algorithm`, with additionally hashing it if
// `is_raw_data` is true, and replies to the page.
void TestNavigationToCertificateRequestingWebPage(
const std::string& expected_request_signature_algorithm,
uint16_t openssl_signature_algorithm,
bool is_raw_data) {
content::TestNavigationObserver navigation_observer(
nullptr /* no WebContents */);
navigation_observer.StartWatchingNewWebContents();
ExtensionTestMessageListener sign_digest_listener(
"signature request received", /*will_reply=*/false);
// Navigate to a page which triggers a sign request. Navigation is blocked
// by completion of this request, so we don't wait for navigation to finish.
ui_test_utils::NavigateToURLWithDisposition(
browser(), GetHttpsClientCertUrl(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_NONE);
content::WebContents* const https_contents =
browser()->tab_strip_model()->GetActiveWebContents();
// Wait for the extension to receive the sign request.
ASSERT_TRUE(sign_digest_listener.WaitUntilSatisfied());
// Check that the certificate is available.
scoped_refptr<net::X509Certificate> certificate = GetCertificate();
CheckCertificateProvidedByExtension(*certificate, *extension());
// Fetch the data from the sign request.
const std::string request_algorithm =
ExecuteScriptAndGetValue(GetExtensionMainFrame(),
"signatureRequestAlgorithm;")
.GetString();
EXPECT_EQ(expected_request_signature_algorithm, request_algorithm);
std::vector<uint8_t> request_data;
{
base::RunLoop run_loop;
GetExtensionMainFrame()->ExecuteJavaScriptForTests(
base::ASCIIToUTF16("signatureRequestData;"),
base::BindOnce(&StoreDigest, &request_data, run_loop.QuitClosure()));
run_loop.Run();
}
// Load the private key.
std::string key_pk8 = GetKeyPk8();
std::unique_ptr<crypto::RSAPrivateKey> key(
crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(
base::as_bytes(base::make_span(key_pk8))));
ASSERT_TRUE(key);
// Sign using the private key.
std::vector<uint8_t> signature;
if (is_raw_data) {
EXPECT_TRUE(RsaSignRawData(openssl_signature_algorithm, request_data,
key.get(), &signature));
} else {
EXPECT_TRUE(RsaSignPrehashed(openssl_signature_algorithm, request_data,
key.get(), &signature));
}
// Inject the signature back to the extension and let it reply.
ExecuteJavascript("replyWithSignature(" + JsUint8Array(signature) + ");");
// Wait for the https navigation to finish.
navigation_observer.Wait();
// Check whether the server acknowledged that a client certificate was
// presented.
const std::string client_cert_fingerprint =
GetCertFingerprint1(*certificate);
EXPECT_EQ(GetPageTextContent(https_contents),
"got client cert with fingerprint: " + client_cert_fingerprint);
}
private:
std::string GetCertificateData() const {
const base::FilePath certificate_path =
test_data_dir_.AppendASCII("certificate_provider")
.AppendASCII("l1_leaf.der");
std::string certificate_data;
base::ScopedAllowBlockingForTesting allow_io;
EXPECT_TRUE(base::ReadFileToString(certificate_path, &certificate_data));
return certificate_data;
}
content::WebContents* extension_contents_ = nullptr;
const extensions::Extension* extension_ = nullptr;
base::FilePath extension_path_;
};
class CertificateProviderRequestPinTest : public CertificateProviderApiTest {
protected:
static constexpr int kFakeSignRequestId = 123;
static constexpr int kWrongPinAttemptsLimit = 3;
static constexpr const char* kCorrectPin = "1234";
static constexpr const char* kWrongPin = "567";
void SetUpOnMainThread() override {
CertificateProviderApiTest::SetUpOnMainThread();
command_request_listener_ = std::make_unique<ExtensionTestMessageListener>(
"GetCommand", /*will_reply=*/true);
LoadRequestPinExtension();
}
void TearDownOnMainThread() override {
if (command_request_listener_->was_satisfied()) {
// Avoid destroying a non-replied extension function without.
command_request_listener_->Reply(/*message=*/std::string());
}
command_request_listener_.reset();
CertificateProviderApiTest::TearDownOnMainThread();
}
std::string pin_request_extension_id() const { return extension_->id(); }
void AddFakeSignRequest(int sign_request_id) {
cert_provider_service_->pin_dialog_manager()->AddSignRequestId(
extension_->id(), sign_request_id, {});
}
void NavigateTo(const std::string& test_page_file_name) {
ui_test_utils::NavigateToURL(
browser(), extension_->GetResourceURL(test_page_file_name));
}
chromeos::RequestPinView* GetActivePinDialogView() {
return cert_provider_service_->pin_dialog_manager()
->default_dialog_host_for_testing()
->active_view_for_testing();
}
views::Widget* GetActivePinDialogWindow() {
return cert_provider_service_->pin_dialog_manager()
->default_dialog_host_for_testing()
->active_window_for_testing();
}
// Enters the code in the ShowPinDialog window and pushes the OK event.
void EnterCode(const std::string& code) {
GetActivePinDialogView()->textfield_for_testing()->SetText(
base::ASCIIToUTF16(code));
GetActivePinDialogView()->Accept();
base::RunLoop().RunUntilIdle();
}
// Enters the valid code for extensions from local example folders, in the
// ShowPinDialog window and waits for the window to close. The extension code
// is expected to send "Success" message after the validation and request to
// stopPinRequest is done.
void EnterCorrectPinAndWaitForMessage() {
ExtensionTestMessageListener listener("Success", false);
EnterCode(kCorrectPin);
ASSERT_TRUE(listener.WaitUntilSatisfied());
}
// Enters an invalid code for extensions from local example folders, in the
// ShowPinDialog window and waits for the window to update with the error. The
// extension code is expected to send "Invalid PIN" message after the
// validation and the new requestPin (with the error) is done.
void EnterWrongPinAndWaitForMessage() {
ExtensionTestMessageListener listener("Invalid PIN", false);
EnterCode(kWrongPin);
ASSERT_TRUE(listener.WaitUntilSatisfied());
// Check that we have an error message displayed.
EXPECT_EQ(
gfx::kGoogleRed600,
GetActivePinDialogView()->error_label_for_testing()->GetEnabledColor());
}
bool SendCommand(const std::string& command) {
if (!command_request_listener_->WaitUntilSatisfied())
return false;
command_request_listener_->Reply(command);
command_request_listener_->Reset();
return true;
}
bool SendCommandAndWaitForMessage(const std::string& command,
const std::string& expected_message) {
ExtensionTestMessageListener listener(expected_message,
/*will_reply=*/false);
if (!SendCommand(command))
return false;
return listener.WaitUntilSatisfied();
}
private:
void LoadRequestPinExtension() {
const base::FilePath extension_path =
test_data_dir_.AppendASCII("certificate_provider/request_pin");
extension_ = LoadExtension(extension_path);
}
const extensions::Extension* extension_ = nullptr;
std::unique_ptr<ExtensionTestMessageListener> command_request_listener_;
};
} // namespace
// Tests an extension that only provides certificates in response to the
// onCertificatesUpdateRequested event.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
ResponsiveExtension) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerAsCertificateProvider();");
ExecuteJavascript("registerForSignatureRequests();");
TestNavigationToCertificateRequestingWebPage(
"RSASSA_PKCS1_v1_5_SHA1", SSL_SIGN_RSA_PKCS1_SHA1, /*is_raw_data=*/true);
}
// Tests an extension that only provides certificates in response to the
// legacy onCertificatesRequested event.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyResponsiveExtension) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
TestNavigationToCertificateRequestingWebPage("SHA1", SSL_SIGN_RSA_PKCS1_SHA1,
/*is_raw_data=*/false);
}
// Tests that signing a request twice in response to the legacy
// onSignDigestRequested event will fail.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyExtensionSigningTwice) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
// This causes a signature request that will be replied to.
TestNavigationToCertificateRequestingWebPage("SHA1", SSL_SIGN_RSA_PKCS1_SHA1,
/*is_raw_data=*/false);
// Replying to the signature request a second time must fail.
bool success = true;
ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
GetExtensionMainFrame(), "replyWithSignatureSecondTime();", &success));
ASSERT_FALSE(success);
}
// Tests an extension that provides certificates both proactively with
// setCertificates() and in response to onCertificatesUpdateRequested.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
ProactiveAndResponsiveExtension) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerAsCertificateProvider();");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
scoped_refptr<net::X509Certificate> certificate = GetCertificate();
CheckCertificateProvidedByExtension(*certificate, *extension());
TestNavigationToCertificateRequestingWebPage(
"RSASSA_PKCS1_v1_5_SHA1", SSL_SIGN_RSA_PKCS1_SHA1, /*is_raw_data=*/true);
// Remove the certificate.
ExecuteJavascriptAndWaitForCallback("unsetCertificates();");
CheckCertificateAbsent(*certificate);
}
// Tests an extension that provides certificates both proactively with
// setCertificates() and in response to the legacy onCertificatesRequested.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
ProactiveAndLegacyResponsiveExtension) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
scoped_refptr<net::X509Certificate> certificate = GetCertificate();
CheckCertificateProvidedByExtension(*certificate, *extension());
TestNavigationToCertificateRequestingWebPage("SHA1", SSL_SIGN_RSA_PKCS1_SHA1,
/*is_raw_data=*/false);
// Remove the certificate.
ExecuteJavascriptAndWaitForCallback("unsetCertificates();");
CheckCertificateAbsent(*certificate);
}
// Tests an extension that provides certificates both proactively with
// setCertificates() and in response to both events:
// onCertificatesUpdateRequested and legacy onCertificatesRequested. Verify that
// the non-legacy signature event is used.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
ProactiveAndRedundantLegacyResponsiveExtension) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerAsCertificateProvider();");
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascript("registerForLegacySignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
scoped_refptr<net::X509Certificate> certificate = GetCertificate();
CheckCertificateProvidedByExtension(*certificate, *extension());
TestNavigationToCertificateRequestingWebPage(
"RSASSA_PKCS1_v1_5_SHA1", SSL_SIGN_RSA_PKCS1_SHA1, /*is_raw_data=*/true);
// Remove the certificate.
ExecuteJavascriptAndWaitForCallback("unsetCertificates();");
CheckCertificateAbsent(*certificate);
}
// Tests an extension that only provides certificates proactively via
// setCertificates().
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
ProactiveExtension) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
scoped_refptr<net::X509Certificate> certificate = GetCertificate();
CheckCertificateProvidedByExtension(*certificate, *extension());
EXPECT_EQ(GetAllProvidedCertificates().size(), 1U);
TestNavigationToCertificateRequestingWebPage(
"RSASSA_PKCS1_v1_5_SHA1", SSL_SIGN_RSA_PKCS1_SHA1, /*is_raw_data=*/true);
// Remove the certificate.
ExecuteJavascriptAndWaitForCallback("unsetCertificates();");
CheckCertificateAbsent(*certificate);
EXPECT_TRUE(GetAllProvidedCertificates().empty());
}
// Tests that all of invalid certificates are rejected.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
OnlyInvalidCertificates) {
ExecuteJavascriptAndWaitForCallback("setInvalidCertificates();");
EXPECT_TRUE(GetAllProvidedCertificates().empty());
}
// Tests the RSA MD5/SHA-1 signature algorithm. Note that TLS 1.1 is used in
// order to make this algorithm employed.
// TODO(cthomp): The SSLVersionMin policy will be removed in M-91, making these
// algorithms unsupported.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest, RsaMd5Sha1) {
// This test requires the SSLVersionMin policy is set to allow TLS 1.0.
base::Value ssl_policy("tls1"); // TLS 1.0
policy_map_.Set(policy::key::kSSLVersionMin, policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_MACHINE, policy::POLICY_SOURCE_CLOUD,
std::move(ssl_policy), nullptr);
EXPECT_NO_FATAL_FAILURE(provider_.UpdateChromePolicy(policy_map_));
// Wait for the updated SSL configuration to be sent to the network service,
// to avoid a race.
g_browser_process->system_network_context_manager()
->FlushSSLConfigManagerForTesting();
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_1));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PKCS1_v1_5_MD5_SHA1'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_MD5_SHA1",
SSL_SIGN_RSA_PKCS1_MD5_SHA1,
/*is_raw_data=*/true);
}
// Tests the RSA MD5/SHA-1 signature algorithm using the legacy version of the
// API. Note that TLS 1.1 is used in order to make this algorithm employed.
// TODO(cthomp): The SSLVersionMin policy will be removed in M-91, making these
// algorithms unsupported.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyRsaMd5Sha1) {
// This test requires the SSLVersionMin policy is set to allow TLS 1.0.
base::Value ssl_policy("tls1"); // TLS 1.0
policy_map_.Set(policy::key::kSSLVersionMin, policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_MACHINE, policy::POLICY_SOURCE_CLOUD,
std::move(ssl_policy), nullptr);
EXPECT_NO_FATAL_FAILURE(provider_.UpdateChromePolicy(policy_map_));
// Wait for the updated SSL configuration to be sent to the network service,
// to avoid a race.
g_browser_process->system_network_context_manager()
->FlushSSLConfigManagerForTesting();
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_1));
ExecuteJavascript("supportedLegacyHashes = ['MD5_SHA1'];");
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
TestNavigationToCertificateRequestingWebPage("MD5_SHA1",
SSL_SIGN_RSA_PKCS1_MD5_SHA1,
/*is_raw_data=*/false);
}
// Tests the RSA SHA-1 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest, RsaSha1) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PKCS1_v1_5_SHA1'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_SHA1",
SSL_SIGN_RSA_PKCS1_SHA1,
/*is_raw_data=*/true);
}
// Tests the RSA SHA-1 signature algorithm using the legacy version of the API.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyRsaSha1) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedLegacyHashes = ['SHA1'];");
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
TestNavigationToCertificateRequestingWebPage("SHA1", SSL_SIGN_RSA_PKCS1_SHA1,
/*is_raw_data=*/false);
}
// Tests the RSA SHA-256 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest, RsaSha256) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PKCS1_v1_5_SHA256'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_SHA256",
SSL_SIGN_RSA_PKCS1_SHA256,
/*is_raw_data=*/true);
}
// Tests the RSA SHA-256 signature algorithm using the legacy version of the
// API.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyRsaSha256) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedLegacyHashes = ['SHA256'];");
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
TestNavigationToCertificateRequestingWebPage("SHA256",
SSL_SIGN_RSA_PKCS1_SHA256,
/*is_raw_data=*/false);
}
// Tests the RSA SHA-384 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest, RsaSha384) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PKCS1_v1_5_SHA384'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_SHA384",
SSL_SIGN_RSA_PKCS1_SHA384,
/*is_raw_data=*/true);
}
// Tests the RSA SHA-384 signature algorithm using the legacy version of the
// API.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyRsaSha384) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedLegacyHashes = ['SHA384'];");
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
TestNavigationToCertificateRequestingWebPage("SHA384",
SSL_SIGN_RSA_PKCS1_SHA384,
/*is_raw_data=*/false);
}
// Tests the RSA SHA-512 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest, RsaSha512) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PKCS1_v1_5_SHA512'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_SHA512",
SSL_SIGN_RSA_PKCS1_SHA512,
/*is_raw_data=*/true);
}
// Tests the RSA SHA-512 signature algorithm using the legacy version of the
// API.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
LegacyRsaSha512) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript("supportedLegacyHashes = ['SHA512'];");
ExecuteJavascript("registerAsLegacyCertificateProvider();");
ExecuteJavascript("registerForLegacySignatureRequests();");
TestNavigationToCertificateRequestingWebPage("SHA512",
SSL_SIGN_RSA_PKCS1_SHA512,
/*is_raw_data=*/false);
}
// Tests that the RSA SHA-512 signature algorithm is still used when there are
// other, less strong, algorithms specified after it.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
RsaSha512AndOthers) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
ExecuteJavascript(
"supportedAlgorithms = ['RSASSA_PKCS1_v1_5_SHA512', "
"'RSASSA_PKCS1_v1_5_SHA1', 'RSASSA_PKCS1_v1_5_MD5_SHA1'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_SHA512",
SSL_SIGN_RSA_PKCS1_SHA512,
/*is_raw_data=*/true);
}
// Tests that the RSA MD5/SHA-1 signature algorithm is used in case of TLS 1.1,
// even when there are other algorithms specified (which are stronger but aren't
// supported on TLS 1.1).
// TODO(cthomp): The SSLVersionMin policy will be removed in M-91, making these
// algorithms unsupported.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
RsaMd5Sha1AndOthers) {
// This test requires the SSLVersionMin policy is set to allow TLS 1.0.
base::Value ssl_policy("tls1"); // TLS 1.0
policy_map_.Set(policy::key::kSSLVersionMin, policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_MACHINE, policy::POLICY_SOURCE_CLOUD,
std::move(ssl_policy), nullptr);
EXPECT_NO_FATAL_FAILURE(provider_.UpdateChromePolicy(policy_map_));
// Wait for the updated SSL configuration to be sent to the network service,
// to avoid a race.
g_browser_process->system_network_context_manager()
->FlushSSLConfigManagerForTesting();
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_1));
ExecuteJavascript(
"supportedAlgorithms = ['RSASSA_PKCS1_v1_5_SHA512', "
"'RSASSA_PKCS1_v1_5_SHA1', 'RSASSA_PKCS1_v1_5_MD5_SHA1'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PKCS1_v1_5_MD5_SHA1",
SSL_SIGN_RSA_PKCS1_MD5_SHA1,
/*is_raw_data=*/true);
}
// Tests the RSA-PSS SHA-256 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
RsaPssSha256) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_3));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PSS_SHA256'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PSS_SHA256",
SSL_SIGN_RSA_PSS_RSAE_SHA256,
/*is_raw_data=*/true);
}
// Tests the RSA-PSS SHA-384 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
RsaPssSha384) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_3));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PSS_SHA384'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PSS_SHA384",
SSL_SIGN_RSA_PSS_RSAE_SHA384,
/*is_raw_data=*/true);
}
// Tests the RSA-PSS SHA-512 signature algorithm.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiMockedExtensionTest,
RsaPssSha512) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_3));
ExecuteJavascript("supportedAlgorithms = ['RSASSA_PSS_SHA512'];");
ExecuteJavascript("registerForSignatureRequests();");
ExecuteJavascriptAndWaitForCallback("setCertificates();");
TestNavigationToCertificateRequestingWebPage("RSASSA_PSS_SHA512",
SSL_SIGN_RSA_PSS_RSAE_SHA512,
/*is_raw_data=*/true);
}
// Test that the certificateProvider events are delivered correctly in the
// scenario when the event listener is in a lazy background page that gets idle.
IN_PROC_BROWSER_TEST_F(CertificateProviderApiTest, LazyBackgroundPage) {
ASSERT_TRUE(StartHttpsServer(net::SSL_PROTOCOL_VERSION_TLS1_2));
// Make extension background pages idle immediately.
extensions::ProcessManager::SetEventPageIdleTimeForTesting(1);
extensions::ProcessManager::SetEventPageSuspendingTimeForTesting(1);
// Load the test extension.
TestCertificateProviderExtension test_certificate_provider_extension(
profile());
extensions::TestBackgroundPageFirstLoadObserver
test_background_page_first_load_observer(
profile(), TestCertificateProviderExtension::extension_id());
const extensions::Extension* const extension =
LoadExtension(base::PathService::CheckedGet(chrome::DIR_TEST_DATA)
.AppendASCII("extensions")
.AppendASCII("test_certificate_provider")
.AppendASCII("extension"));
ASSERT_TRUE(extension);
EXPECT_EQ(extension->id(), TestCertificateProviderExtension::extension_id());
test_background_page_first_load_observer.Wait();
// Navigate to the page that requests the client authentication. Use the
// incognito profile in order to force re-authentication in the later request
// made by the test.
const std::string client_cert_fingerprint =
GetCertFingerprint1(*TestCertificateProviderExtension::GetCertificate());
Browser* const incognito_browser = CreateIncognitoBrowser(profile());
ASSERT_TRUE(incognito_browser);
ui_test_utils::NavigateToURLWithDisposition(
incognito_browser, GetHttpsClientCertUrl(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_LOAD_STOP);
EXPECT_EQ(test_certificate_provider_extension.certificate_request_count(), 1);
EXPECT_EQ(GetPageTextContent(
incognito_browser->tab_strip_model()->GetActiveWebContents()),
"got client cert with fingerprint: " + client_cert_fingerprint);
CheckCertificateProvidedByExtension(
*TestCertificateProviderExtension::GetCertificate(), *extension);
// Let the extension's background page become idle.
WaitForExtensionIdle(extension->id());
// Navigate again to the page with the client authentication. The extension
// gets awakened and handles the request.
ui_test_utils::NavigateToURLWithDisposition(
browser(), GetHttpsClientCertUrl(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_LOAD_STOP);
EXPECT_EQ(test_certificate_provider_extension.certificate_request_count(), 2);
EXPECT_EQ(
GetPageTextContent(browser()->tab_strip_model()->GetActiveWebContents()),
"got client cert with fingerprint: " + client_cert_fingerprint);
}
// User enters the correct PIN.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, ShowPinDialogAccept) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("basic.html");
// Enter the valid PIN.
EnterCorrectPinAndWaitForMessage();
// The view should be set to nullptr when the window is closed.
EXPECT_FALSE(GetActivePinDialogView());
}
// User closes the dialog kMaxClosedDialogsPerMinute times, and the extension
// should be blocked from showing it again.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, ShowPinDialogClose) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("basic.html");
for (int i = 0;
i < extensions::api::certificate_provider::kMaxClosedDialogsPerMinute;
i++) {
ExtensionTestMessageListener listener("User closed the dialog", false);
GetActivePinDialogWindow()->Close();
ASSERT_TRUE(listener.WaitUntilSatisfied());
}
ExtensionTestMessageListener close_listener("User closed the dialog", true);
GetActivePinDialogWindow()->Close();
ASSERT_TRUE(close_listener.WaitUntilSatisfied());
close_listener.Reply("GetLastError");
ExtensionTestMessageListener last_error_listener(
"This request exceeds the MAX_PIN_DIALOGS_CLOSED_PER_MINUTE quota.",
false);
ASSERT_TRUE(last_error_listener.WaitUntilSatisfied());
EXPECT_FALSE(GetActivePinDialogView());
}
// User enters a wrong PIN first and a correct PIN on the second try.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
ShowPinDialogWrongPin) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("basic.html");
EnterWrongPinAndWaitForMessage();
// The window should be active.
EXPECT_TRUE(GetActivePinDialogWindow()->IsVisible());
EXPECT_TRUE(GetActivePinDialogView());
// Enter the valid PIN.
EnterCorrectPinAndWaitForMessage();
// The view should be set to nullptr when the window is closed.
EXPECT_FALSE(GetActivePinDialogView());
}
// User enters wrong PIN three times.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
ShowPinDialogWrongPinThreeTimes) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("basic.html");
for (int i = 0; i < kWrongPinAttemptsLimit; i++)
EnterWrongPinAndWaitForMessage();
// The textfield has to be disabled, as extension does not allow input now.
EXPECT_FALSE(GetActivePinDialogView()->textfield_for_testing()->GetEnabled());
// Close the dialog.
ExtensionTestMessageListener listener("No attempt left", false);
GetActivePinDialogWindow()->Close();
ASSERT_TRUE(listener.WaitUntilSatisfied());
EXPECT_FALSE(GetActivePinDialogView());
}
// User closes the dialog while the extension is processing the request.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
ShowPinDialogCloseWhileProcessing) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage("Request", "request1:begun"));
ExtensionTestMessageListener listener(
base::StringPrintf("request1:success:%s", kWrongPin), false);
EnterCode(kWrongPin);
EXPECT_TRUE(listener.WaitUntilSatisfied());
GetActivePinDialogWindow()->Close();
base::RunLoop().RunUntilIdle();
// The view should be set to nullptr when the window is closed.
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension closes the dialog kMaxClosedDialogsPerMinute times after the user
// inputs some value, and it should be blocked from showing it again.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
RepeatedProgrammaticCloseAfterInput) {
NavigateTo("operated.html");
for (int i = 0;
i <
extensions::api::certificate_provider::kMaxClosedDialogsPerMinute + 1;
i++) {
AddFakeSignRequest(kFakeSignRequestId);
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Request", base::StringPrintf("request%d:begun", i + 1)));
EnterCode(kCorrectPin);
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Stop", base::StringPrintf("stop%d:success", i + 1)));
EXPECT_FALSE(GetActivePinDialogView());
}
AddFakeSignRequest(kFakeSignRequestId);
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Request",
base::StringPrintf(
"request%d:error:This request exceeds the "
"MAX_PIN_DIALOGS_CLOSED_PER_MINUTE quota.",
extensions::api::certificate_provider::kMaxClosedDialogsPerMinute +
2)));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension erroneously attempts to close the PIN dialog twice.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, DoubleClose) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommand("Request"));
EXPECT_TRUE(SendCommandAndWaitForMessage("Stop", "stop1:success"));
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Stop", "stop2:error:No active dialog from extension."));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension closes the dialog kMaxClosedDialogsPerMinute times before the user
// inputs anything, and it should be blocked from showing it again.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
RepeatedProgrammaticCloseBeforeInput) {
NavigateTo("operated.html");
for (int i = 0;
i <
extensions::api::certificate_provider::kMaxClosedDialogsPerMinute + 1;
i++) {
AddFakeSignRequest(kFakeSignRequestId);
EXPECT_TRUE(SendCommand("Request"));
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Stop", base::StringPrintf("stop%d:success", i + 1)));
EXPECT_FALSE(GetActivePinDialogView());
}
AddFakeSignRequest(kFakeSignRequestId);
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Request",
base::StringPrintf(
"request%d:error:This request exceeds the "
"MAX_PIN_DIALOGS_CLOSED_PER_MINUTE quota.",
extensions::api::certificate_provider::kMaxClosedDialogsPerMinute +
2)));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension erroneously attempts to stop the PIN request with an error before
// the user provided any input.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
StopWithErrorBeforeInput) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommand("Request"));
EXPECT_TRUE(SendCommandAndWaitForMessage(
"StopWithUnknownError", "stop1:error:No user input received"));
EXPECT_TRUE(GetActivePinDialogView()->textfield_for_testing()->GetEnabled());
}
// Extension erroneously uses an invalid sign request ID.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, InvalidRequestId) {
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Request", "request1:error:Invalid signRequestId"));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension specifies zero left attempts in the very first PIN request.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, ZeroAttemptsAtStart) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage("RequestWithZeroAttempts",
"request1:begun"));
// The textfield has to be disabled, as there are no attempts left.
EXPECT_FALSE(GetActivePinDialogView()->textfield_for_testing()->GetEnabled());
ExtensionTestMessageListener listener("request1:empty", false);
GetActivePinDialogWindow()->Close();
EXPECT_TRUE(listener.WaitUntilSatisfied());
}
// Extension erroneously passes a negative attempts left count.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, NegativeAttempts) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage(
"RequestWithNegativeAttempts", "request1:error:Invalid attemptsLeft"));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension erroneously attempts to close a non-existing dialog.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, CloseNonExisting) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Stop", "stop1:error:No active dialog from extension."));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension erroneously attempts to stop a non-existing dialog with an error.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, StopNonExisting) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage(
"StopWithUnknownError", "stop1:error:No active dialog from extension."));
EXPECT_FALSE(GetActivePinDialogView());
}
// Extension erroneously attempts to start or stop the PIN request before the
// user closed the previously stopped with an error PIN request.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
UpdateAlreadyStopped) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage("Request", "request1:begun"));
EnterCode(kWrongPin);
EXPECT_TRUE(SendCommand("StopWithUnknownError"));
EXPECT_TRUE(SendCommandAndWaitForMessage(
"StopWithUnknownError", "stop2:error:No user input received"));
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Request", "request2:error:Previous request not finished"));
EXPECT_FALSE(GetActivePinDialogView()->textfield_for_testing()->GetEnabled());
}
// Extension starts a new PIN request after it stopped the previous one with an
// error.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, StartAfterStop) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage("Request", "request1:begun"));
EnterCode(kWrongPin);
EXPECT_TRUE(SendCommandAndWaitForMessage("Stop", "stop1:success"));
EXPECT_FALSE(GetActivePinDialogView());
EXPECT_TRUE(SendCommandAndWaitForMessage("Request", "request2:begun"));
ExtensionTestMessageListener listener(
base::StringPrintf("request2:success:%s", kCorrectPin), false);
EnterCode(kCorrectPin);
EXPECT_TRUE(listener.WaitUntilSatisfied());
EXPECT_FALSE(GetActivePinDialogView()->textfield_for_testing()->GetEnabled());
}
// Test that no quota is applied to the first PIN requests for each requestId.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest,
RepeatedCloseWithDifferentIds) {
NavigateTo("operated.html");
for (int i = 0;
i <
extensions::api::certificate_provider::kMaxClosedDialogsPer10Minutes + 2;
i++) {
AddFakeSignRequest(kFakeSignRequestId + i);
EXPECT_TRUE(SendCommandAndWaitForMessage(
"Request", base::StringPrintf("request%d:begun", i + 1)));
ExtensionTestMessageListener listener(
base::StringPrintf("request%d:empty", i + 1), false);
ASSERT_TRUE(GetActivePinDialogView());
GetActivePinDialogView()->GetWidget()->CloseWithReason(
views::Widget::ClosedReason::kCloseButtonClicked);
EXPECT_TRUE(listener.WaitUntilSatisfied());
EXPECT_FALSE(GetActivePinDialogView());
EXPECT_TRUE(SendCommand("IncrementRequestId"));
}
}
// Test that disabling the extension closes its PIN dialog.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, ExtensionDisable) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage("Request", "request1:begun"));
EXPECT_TRUE(GetActivePinDialogView());
extensions::TestExtensionRegistryObserver registry_observer(
extensions::ExtensionRegistry::Get(profile()),
pin_request_extension_id());
extensions::ExtensionSystem::Get(profile())
->extension_service()
->DisableExtension(pin_request_extension_id(),
extensions::disable_reason::DISABLE_USER_ACTION);
registry_observer.WaitForExtensionUnloaded();
// Let the events from the extensions subsystem propagate to the code that
// manages the PIN dialog.
base::RunLoop().RunUntilIdle();
EXPECT_FALSE(GetActivePinDialogView());
}
// Test that reloading the extension closes its PIN dialog.
IN_PROC_BROWSER_TEST_F(CertificateProviderRequestPinTest, ExtensionReload) {
AddFakeSignRequest(kFakeSignRequestId);
NavigateTo("operated.html");
EXPECT_TRUE(SendCommandAndWaitForMessage("Request", "request1:begun"));
EXPECT_TRUE(GetActivePinDialogView());
// Create a second browser, in order to suppress Chrome shutdown logic when
// reloading the extension (as the tab with the extension's file gets closed).
CreateBrowser(profile());
// Trigger the chrome.runtime.reload() call from the extension.
extensions::TestExtensionRegistryObserver registry_observer(
extensions::ExtensionRegistry::Get(profile()),
pin_request_extension_id());
EXPECT_TRUE(SendCommand("Reload"));
registry_observer.WaitForExtensionUnloaded();
registry_observer.WaitForExtensionLoaded();
EXPECT_FALSE(GetActivePinDialogView());
}
| 42.845684 | 89 | 0.735919 | Ron423c |
74a0c9cb0b22f67aece7aeab5fb29da1cbec515b | 6,780 | cc | C++ | chrome/browser/ui/webui/settings/chromeos/search/settings_user_action_tracker_unittest.cc | mghgroup/Glide-Browser | 6a4c1eaa6632ec55014fee87781c6bbbb92a2af5 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/ui/webui/settings/chromeos/search/settings_user_action_tracker_unittest.cc | mghgroup/Glide-Browser | 6a4c1eaa6632ec55014fee87781c6bbbb92a2af5 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/browser/ui/webui/settings/chromeos/search/settings_user_action_tracker_unittest.cc | mghgroup/Glide-Browser | 6a4c1eaa6632ec55014fee87781c6bbbb92a2af5 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2021-01-05T23:43:46.000Z | 2021-01-07T23:36:34.000Z | // Copyright 2020 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/ui/webui/settings/chromeos/search/settings_user_action_tracker.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace settings {
class SettingsUserActionTrackerTest : public testing::Test {
protected:
SettingsUserActionTrackerTest() = default;
~SettingsUserActionTrackerTest() override = default;
base::test::TaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
base::HistogramTester histogram_tester_;
SettingsUserActionTracker tracker_;
};
TEST_F(SettingsUserActionTrackerTest, TestRecordMetrics) {
// Focus the page, perform some tasks, and change a setting.
tracker_.RecordPageFocus();
tracker_.RecordClick();
tracker_.RecordNavigation();
tracker_.RecordSearch();
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(10));
tracker_.RecordSettingChange();
// The "first change" metrics should have been logged.
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.FirstChange",
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumNavigationsUntilChange.FirstChange",
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumSearchesUntilChange.FirstChange",
/*count=*/1);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.FirstChange",
/*sample=*/base::TimeDelta::FromSeconds(10),
/*count=*/1);
// Without leaving the page, perform some more tasks, and change another
// setting.
tracker_.RecordClick();
tracker_.RecordNavigation();
tracker_.RecordSearch();
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(10));
tracker_.RecordSettingChange();
// The "subsequent change" metrics should have been logged.
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumNavigationsUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumSearchesUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.SubsequentChange",
/*sample=*/base::TimeDelta::FromSeconds(10),
/*count=*/1);
// Repeat this, but only after 100ms. This is lower than the minimum value
// required for this metric, so it should be ignored.
tracker_.RecordClick();
tracker_.RecordNavigation();
tracker_.RecordSearch();
task_environment_.FastForwardBy(base::TimeDelta::FromMilliseconds(100));
tracker_.RecordSettingChange();
// No additional logging should have occurred, so make the same verifications
// as above.
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumNavigationsUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumSearchesUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.SubsequentChange",
/*sample=*/base::TimeDelta::FromSeconds(10),
/*count=*/1);
// Repeat this once more, and verify that the counts increased.
tracker_.RecordClick();
tracker_.RecordNavigation();
tracker_.RecordSearch();
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(10));
tracker_.RecordSettingChange();
// The "subsequent change" metrics should have been logged.
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.SubsequentChange",
/*count=*/2);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumNavigationsUntilChange.SubsequentChange",
/*count=*/2);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumSearchesUntilChange.SubsequentChange",
/*count=*/2);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.SubsequentChange",
/*sample=*/base::TimeDelta::FromSeconds(10),
/*count=*/2);
}
TEST_F(SettingsUserActionTrackerTest, TestBlurAndFocus) {
// Focus the page, click, and change a setting.
tracker_.RecordPageFocus();
tracker_.RecordClick();
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(1));
tracker_.RecordSettingChange();
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.FirstChange",
/*count=*/1);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.FirstChange",
/*sample=*/base::TimeDelta::FromSeconds(1),
/*count=*/1);
// Blur for 59 seconds (not quite a minute), click, and change a setting.
// Since the blur was under a minute, this should count for the "subsequent
// change" metrics.
tracker_.RecordPageBlur();
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(59));
tracker_.RecordPageFocus();
tracker_.RecordClick();
tracker_.RecordSettingChange();
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.BlurredWindowDuration",
/*sample=*/base::TimeDelta::FromSeconds(59),
/*count=*/1);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.SubsequentChange",
/*count=*/1);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.SubsequentChange",
/*sample=*/base::TimeDelta::FromSeconds(59),
/*count=*/1);
// Now, blur for a full minute, click, and change a setting. Since the blur
// was a full minute, this should count for the "first change" metrics.
tracker_.RecordPageBlur();
task_environment_.FastForwardBy(base::TimeDelta::FromMinutes(1));
tracker_.RecordPageFocus();
task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(5));
tracker_.RecordClick();
tracker_.RecordSettingChange();
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.BlurredWindowDuration",
/*sample=*/base::TimeDelta::FromMinutes(1),
/*count=*/2);
histogram_tester_.ExpectTotalCount(
"ChromeOS.Settings.NumClicksUntilChange.FirstChange",
/*count=*/2);
histogram_tester_.ExpectTimeBucketCount(
"ChromeOS.Settings.TimeUntilChange.FirstChange",
/*sample=*/base::TimeDelta::FromSeconds(5),
/*count=*/1);
}
} // namespace settings.
} // namespace chromeos.
| 38.305085 | 90 | 0.743215 | mghgroup |
74a1f318626066b24f7134aa1ac433fdc0b2a719 | 441 | cpp | C++ | Advance Recursion/knapsack.cpp | Mythical-stack/C-Crash-Course | 323b7f5b1e0b270138e54a1a18fb1e81015a1763 | [
"Apache-2.0"
] | 1 | 2021-08-10T11:45:13.000Z | 2021-08-10T11:45:13.000Z | Advance Recursion/knapsack.cpp | jkbells/C-Crash-Course | 323b7f5b1e0b270138e54a1a18fb1e81015a1763 | [
"Apache-2.0"
] | null | null | null | Advance Recursion/knapsack.cpp | jkbells/C-Crash-Course | 323b7f5b1e0b270138e54a1a18fb1e81015a1763 | [
"Apache-2.0"
] | null | null | null | #include<iostream>
using namespace std;
int knapsack(int value[], int wt[], int n,int w){
if(n==0 || w == 0){
return 0;
}
if(wt[n-1] > w){
return knapsack(value,wt,n-1,w);
}
return max(knapsack(value,wt,n-1, w-wt[n-1])+value[n-1],knapsack(value,wt,n-1,w));
}
int main()
{
int wt[]= {10,20,30};
int value[]={100,50,150};
int w=50;
cout << knapsack(value,wt,3,w) << endl;
return 0;
} | 19.173913 | 86 | 0.535147 | Mythical-stack |
74a61de67f99b88a582eb9e12d85cf90891acbb9 | 663 | cpp | C++ | examples/ex_filesys_watcher.cpp | MarkOates/allegro_flare | b454cb85eb5e43d19c23c0c6fd2dc11b96666ce7 | [
"MIT"
] | 25 | 2015-03-30T02:02:43.000Z | 2019-03-04T22:29:12.000Z | examples/ex_filesys_watcher.cpp | MarkOates/allegro_flare | b454cb85eb5e43d19c23c0c6fd2dc11b96666ce7 | [
"MIT"
] | 122 | 2015-04-01T08:15:26.000Z | 2019-10-16T20:31:22.000Z | examples/ex_filesys_watcher.cpp | MarkOates/allegro_flare | b454cb85eb5e43d19c23c0c6fd2dc11b96666ce7 | [
"MIT"
] | 4 | 2016-09-02T12:14:09.000Z | 2018-11-23T20:38:49.000Z |
#include <allegro_flare/allegro_flare.h>
using namespace allegro_flare;
class MyProject : public Screen
{
public:
MyProject(Display *display)
: Screen(display)
{
// watch the executable directory
FileSysWatcher::watch_directory__in_thread(".");
}
void user_event_func() override
{
switch (Framework::current_event->type)
{
case ALLEGRO_EVENT_FILESYS_CHANGE:
std::cout << "DIRECTORY CHANGED!" << std::endl;
break;
default:
break;
}
}
};
int main(int argc, char *argv)
{
MyProject proj = MyProject(nullptr);
Framework::run_loop();
return 0;
}
| 13.26 | 56 | 0.616893 | MarkOates |
74a9429e1936eda614d132df517d810145c51996 | 1,616 | cc | C++ | clean_megablast.cc | CharlesTaylor/pamir | ebbe225561aa566e681b4fafe762b7ae4c40e783 | [
"BSD-3-Clause"
] | null | null | null | clean_megablast.cc | CharlesTaylor/pamir | ebbe225561aa566e681b4fafe762b7ae4c40e783 | [
"BSD-3-Clause"
] | null | null | null | clean_megablast.cc | CharlesTaylor/pamir | ebbe225561aa566e681b4fafe762b7ae4c40e783 | [
"BSD-3-Clause"
] | null | null | null | #include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <math.h>
using namespace std;
int main(int argc, char* argv[])
{
if(argc!=3)
{
printf("Usage: ./clean megablastFile cleanFile\n");
exit(0);
}
FILE *fin;
FILE *fout;
FILE *fout2;
FILE *fout3;
char *line =new char[1000000];
char *line1 =new char[1000000];
char *line2 =new char[1000000];
char *line3 =new char[1000000];
char *line4 =new char[1000000];
/*********DELETE NEW LINES***********/
fout2=fopen(argv[2],"w");
fin=fopen(argv[1],"r");
while(!feof(fin))
{
fgets (line, 1000000, fin);
if((line[0]==' ' && line[1]==' ' && line[2]=='D' && line[3]=='a' && line[4]=='t' && line[5]=='a' && line[6]=='b' && line[7]=='a'))
{
break;
}
while(!(line[0]=='Q' && line[1]=='u' && line[2]=='e' && line[3]=='r' && line[4]=='y' && line[5]=='='))
{
fgets (line, 1000000, fin);
}
fprintf(fout2,"%s",line);
fgets (line, 1000000, fin);
fgets (line, 1000000, fin);
fprintf(fout2,"%s",line);
fgets (line, 1000000, fin);
fgets (line, 1000000, fin);
if(line[0]=='S' && line[1]=='e' && line[2]=='q')
{
fgets(line, 1000000, fin);
int a=0;
while(line[0]!='>')
{
a++;
fgets(line, 1000000, fin);
if(a<=5 && strcmp(line,"\n")!=0 && line[0]!='>')
fprintf(fout2,"%s",line);
}
}
while(!(line[0]=='E' && line[1]=='f' && line[2]=='f' && line[3]=='e' && line[4]=='c' && line[5]=='t'))
{
fgets (line, 1000000, fin);
}
fgets (line, 1000000, fin);
fgets (line, 1000000, fin);
}
fclose(fin);
fclose(fout2);
return 0;
}
| 24.119403 | 132 | 0.519183 | CharlesTaylor |
74abe413be908a5a95d1a36757e8e6aecedd7c09 | 1,702 | cpp | C++ | codechef/PLUS/Partially Accepted.cpp | kzvd4729/Problem-Solving | 13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab | [
"MIT"
] | 1 | 2022-02-11T16:55:36.000Z | 2022-02-11T16:55:36.000Z | codechef/PLUS/Partially Accepted.cpp | kzvd4729/Problem-Solving | 13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab | [
"MIT"
] | null | null | null | codechef/PLUS/Partially Accepted.cpp | kzvd4729/Problem-Solving | 13b105e725a4c2f8db7fecc5d7a8f932b9fef4ab | [
"MIT"
] | null | null | null | /****************************************************************************************
* @author: kzvd4729 created: 26-05-2018 20:55:53
* solution_verdict: Partially Accepted language: C++14
* run_time: 0.00 sec memory_used: 22.5M
* problem: https://www.codechef.com/LTIME60A/problems/PLUS
****************************************************************************************/
#include<bits/stdc++.h>
#define long long long
using namespace std;
long t,ans,mat[1002][1002],n,m,here,lm;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>t;
while(t--)
{
cin>>n>>m;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
cin>>mat[i][j];
ans=-1e12;
for(long i=1;i<=n;i++)
{
for(long j=1;j<=m;j++)
{
long mx1=-1e12,mx2=-1e12,mx3=-1e12,mx4=-1e12;
here=0;
for(int k=1;k<=n;k++)
{
if(i+k>n)break;
here+=mat[i+k][j];
mx1=max(mx1,here);
}
here=0;
for(int k=1;k<=n;k++)
{
if(i-k<1)break;
here+=mat[i-k][j];
mx2=max(mx2,here);
}
here=0;
for(int k=1;k<=m;k++)
{
if(j+k>m)break;
here+=mat[i][j+k];
mx3=max(mx3,here);
}
here=0;
for(int k=1;k<=m;k++)
{
if(j-k<1)break;
here+=mat[i][j-k];
mx4=max(mx4,here);
}
ans=max(ans,mat[i][j]+mx1+mx2+mx3+mx4);
}
}
cout<<ans<<endl;
}
return 0;
} | 27.451613 | 111 | 0.363102 | kzvd4729 |
74af1ce4aa917359acc3c826d3982f183fcd498a | 17,617 | cpp | C++ | src/python/bindings/bindings_selection.cpp | mdimura/pteros | 1692394075482987638c40236312ebaac49d5780 | [
"BSL-1.0",
"BSD-3-Clause"
] | 1 | 2020-12-01T10:28:52.000Z | 2020-12-01T10:28:52.000Z | src/python/bindings/bindings_selection.cpp | mdimura/pteros | 1692394075482987638c40236312ebaac49d5780 | [
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | src/python/bindings/bindings_selection.cpp | mdimura/pteros | 1692394075482987638c40236312ebaac49d5780 | [
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | /*
* This file is a part of
*
* ============================================
* ### Pteros molecular modeling library ###
* ============================================
*
* https://github.com/yesint/pteros
*
* (C) 2009-2020, Semen Yesylevskyy
*
* All works, which use Pteros, should cite the following papers:
*
* 1. Semen O. Yesylevskyy, "Pteros 2.0: Evolution of the fast parallel
* molecular analysis library for C++ and python",
* Journal of Computational Chemistry, 2015, 36(19), 1480–1488.
* doi: 10.1002/jcc.23943.
*
* 2. Semen O. Yesylevskyy, "Pteros: Fast and easy to use open-source C++
* library for molecular analysis",
* Journal of Computational Chemistry, 2012, 33(19), 1632–1636.
* doi: 10.1002/jcc.22989.
*
* This is free software distributed under Artistic License:
* http://www.opensource.org/licenses/artistic-license-2.0.php
*
*/
#include "pteros/core/selection.h"
#include "pteros/core/pteros_error.h"
#include "bindings_util.h"
namespace py = pybind11;
using namespace pteros;
using namespace std;
using namespace Eigen;
using namespace pybind11::literals;
#define DEF_PROPERTY(_name,_dtype) \
.def_property(#_name, [](Atom_proxy* obj){return obj->_name();}, [](Atom_proxy* obj,const _dtype& val){obj->_name()=val;})
void make_bindings_Selection(py::module& m){
using RowMatrixXf = Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
py::class_<Atom_proxy>(m, "Atom_proxy")
DEF_PROPERTY(resid,int)
DEF_PROPERTY(resindex,int)
DEF_PROPERTY(resname,string)
DEF_PROPERTY(name,string)
DEF_PROPERTY(chain,char)
DEF_PROPERTY(tag,string)
DEF_PROPERTY(occupancy,float)
DEF_PROPERTY(beta,float)
DEF_PROPERTY(mass,float)
DEF_PROPERTY(charge,float)
DEF_PROPERTY(type,int)
DEF_PROPERTY(atomic_number,int)
DEF_PROPERTY(type_name,string)
DEF_PROPERTY(atom,Atom)
DEF_PROPERTY(x,float)
DEF_PROPERTY(y,float)
DEF_PROPERTY(z,float)
.def_property("xyz", [](Atom_proxy* obj){return obj->xyz();}, [](Atom_proxy* obj,Vector3f_const_ref val){obj->xyz()=val;})
.def_property("vel", [](Atom_proxy* obj){return obj->vel();}, [](Atom_proxy* obj,Vector3f_const_ref val){obj->vel()=val;})
.def_property("force", [](Atom_proxy* obj){return obj->force();}, [](Atom_proxy* obj,Vector3f_const_ref val){obj->force()=val;})
.def_property_readonly("element_name", [](Atom_proxy* obj){return obj->element_name();})
.def_property_readonly("vdw", [](Atom_proxy* obj){return obj->vdw();})
.def_property_readonly("index", [](Atom_proxy* obj){return obj->index();})
;
py::class_<Selection>(m, "Selection")
// Constructors
.def(py::init<>())
.def(py::init<const System&>())
.def(py::init<const System&,std::string,int>(),"sys"_a,"str"_a,"fr"_a=0)
.def(py::init<const System&,int,int>())
.def(py::init<const System&,const std::vector<int>&>())
.def(py::init<const System&,const std::function<void(const System&,int,std::vector<int>&)>&,int>(),"sys"_a,"callback"_a,"fr"_a=0)
.def(py::init<const Selection&>())
// Oparators
.def(py::self == py::self)
.def(py::self != py::self)
.def(py::self | py::self)
.def(py::self & py::self)
.def(py::self - py::self)
.def(~py::self)
// Modification
.def("append", py::overload_cast<const Selection&>(&Selection::append))
.def("append", py::overload_cast<int>(&Selection::append))
.def("remove", py::overload_cast<const Selection&>(&Selection::remove))
.def("remove", py::overload_cast<int>(&Selection::remove))
.def("invert",&Selection::invert)
.def("set_system",&Selection::set_system)
.def("modify", py::overload_cast<string,int>(&Selection::modify),"str"_a,"fr"_a=0)
.def("modify", py::overload_cast<int,int>(&Selection::modify))
.def("modify", py::overload_cast<const std::vector<int>&>(&Selection::modify))
.def("modify", py::overload_cast<const std::function<void(const System&,int,std::vector<int>&)>&,int>(&Selection::modify),"callback"_a,"fr"_a=0)
.def("modify", py::overload_cast<const System&,string,int>(&Selection::modify),"sys"_a,"str"_a,"fr"_a=0)
.def("modify", py::overload_cast<const System&,int,int>(&Selection::modify))
.def("modify", py::overload_cast<const System&,const std::vector<int>&>(&Selection::modify))
.def("modify", py::overload_cast<const System&,const std::function<void(const System&,int,std::vector<int>&)>&,int>(&Selection::modify),"sys"_a,"callback"_a,"fr"_a=0)
.def("apply",&Selection::apply)
.def("update",&Selection::update)
.def("clear",&Selection::clear)
// Subselection
.def("__call__", py::overload_cast<string>(&Selection::operator()), py::keep_alive<0,1>())
.def("__call__", py::overload_cast<int,int>(&Selection::operator()), py::keep_alive<0,1>())
.def("__call__", py::overload_cast<const std::vector<int>&>(&Selection::operator()), py::keep_alive<0,1>())
.def("select", py::overload_cast<string>(&Selection::operator()), py::keep_alive<0,1>())
.def("select", py::overload_cast<int,int>(&Selection::operator()), py::keep_alive<0,1>())
.def("select", py::overload_cast<const std::vector<int>&>(&Selection::operator()), py::keep_alive<0,1>())
// Get and set
.def("get_frame",&Selection::get_frame)
.def("set_frame",&Selection::set_frame)
.def("get_system",&Selection::get_system, py::return_value_policy::reference_internal)
.def("get_text",&Selection::get_text)
.def("get_index",&Selection::get_index)
.def("get_chain",&Selection::get_chain,"unique"_a=false)
.def("set_chain",py::overload_cast<char>(&Selection::set_chain))
.def("set_chain",py::overload_cast<const std::vector<char>&>(&Selection::set_chain))
.def("get_resid",&Selection::get_resid,"unique"_a=false)
.def("set_resid",py::overload_cast<int>(&Selection::set_resid))
.def("set_resid",py::overload_cast<const std::vector<int>&>(&Selection::set_resid))
.def("get_resindex",&Selection::get_resindex,"unique"_a=false)
.def("get_name",&Selection::get_name,"unique"_a=false)
.def("set_name",py::overload_cast<string>(&Selection::set_name))
.def("set_name",py::overload_cast<const std::vector<string>&>(&Selection::set_name))
.def("get_resname",&Selection::get_resname,"unique"_a=false)
.def("set_resname",py::overload_cast<string>(&Selection::set_resname))
.def("set_resname",py::overload_cast<const std::vector<string>&>(&Selection::set_resname))
.def("get_xyz", [](Selection* sel){ return sel->get_xyz(true); }) // pass true for row-major matrix
.def("set_xyz", &Selection::set_xyz) // detects raw-major matrix internally
.def("get_vel", [](Selection* sel){ return sel->get_vel(true); }) // pass true for row-major matrix
.def("set_vel", &Selection::set_vel) // detects raw-major matrix internally
.def("get_force", [](Selection* sel){ return sel->get_force(true); }) // pass true for row-major matrix
.def("set_force", &Selection::set_force) // detects raw-major matrix internally
.def("get_mass",&Selection::get_mass)
.def("set_mass",py::overload_cast<float>(&Selection::set_mass))
.def("set_mass",py::overload_cast<const std::vector<float>&>(&Selection::set_mass))
.def("get_beta",&Selection::get_beta)
.def("set_beta",py::overload_cast<float>(&Selection::set_beta))
.def("set_beta",py::overload_cast<const std::vector<float>&>(&Selection::set_beta))
.def("get_occupancy",&Selection::get_occupancy)
.def("set_occupancy",py::overload_cast<float>(&Selection::set_occupancy))
.def("set_occupancy",py::overload_cast<const std::vector<float>&>(&Selection::set_occupancy))
.def("get_charge",&Selection::get_charge)
.def("get_total_charge",&Selection::get_total_charge)
.def("set_charge",py::overload_cast<float>(&Selection::set_charge))
.def("set_charge",py::overload_cast<const std::vector<float>&>(&Selection::set_charge))
.def("get_tag",&Selection::get_tag,"unique"_a=false)
.def("set_tag",py::overload_cast<string>(&Selection::set_tag))
.def("set_tag",py::overload_cast<const std::vector<string>&>(&Selection::set_tag))
// Properties
.def("center",&Selection::center,"mass_weighted"_a=false,"pbc"_a=noPBC,"pbc_atom"_a=-1)
.def("minmax",[](Selection* sel){Vector3f min,max; sel->minmax(min,max); return py::make_tuple(min,max);})
.def("is_large",&Selection::is_large)
.def("powersasa", [](Selection* sel, float probe_r, bool do_area_per_atom, bool do_total_volume, bool do_vol_per_atom){
float vol;
std::vector<float> area_per_atom;
std::vector<float> volume_per_atom;
float* vol_ptr;
std::vector<float> *area_per_atom_ptr, *volume_per_atom_ptr;
vol_ptr = do_total_volume ? &vol : nullptr;
area_per_atom_ptr = do_area_per_atom ? &area_per_atom : nullptr;
volume_per_atom_ptr = do_vol_per_atom ? &volume_per_atom : nullptr;
float a = sel->powersasa(probe_r,area_per_atom_ptr,vol_ptr,volume_per_atom_ptr);
py::list ret;
ret.append(a);
if(do_area_per_atom) ret.append(area_per_atom);
if(do_total_volume) ret.append(vol);
if(do_vol_per_atom) ret.append(volume_per_atom);
return ret;
}, "probe_r"_a=0.14, "do_area_per_atom"_a=false, "do_total_volume"_a=false, "do_vol_per_atom"_a=false)
.def("sasa", [](Selection* sel, float probe_r, bool do_area_per_atom, int n_sphere_points){
std::vector<float> area_per_atom;
std::vector<float> *area_per_atom_ptr;
area_per_atom_ptr = do_area_per_atom ? &area_per_atom : nullptr;
float a = sel->sasa(probe_r,area_per_atom_ptr,n_sphere_points);
py::list ret;
ret.append(a);
if(do_area_per_atom) ret.append(area_per_atom);
return ret;
}, "probe_r"_a=0.14, "do_area_per_atom"_a=false, "n_sphere_points"_a=960)
.def("average_structure", [](Selection* sel, int b, int e){
return sel->average_structure(b,e,true); // pass true for row-major matrix
}, "b"_a=0, "e"_a=-1)
.def("atom_traj", [](Selection* sel, int i, int b, int e){
return sel->atom_traj(i,b,e,true); // pass true for row-major matrix
}, "i"_a, "b"_a=0, "e"_a=-1)
.def("inertia",[](Selection* sel, Array3i_const_ref pbc, bool pbc_atom){
Vector3f m;
Matrix3f ax;
sel->inertia(m,ax,pbc,pbc_atom);
return py::make_tuple(m,ax.transpose());
},"pbc"_a=noPBC,"pbc_atom"_a=-1)
.def("gyration",&Selection::gyration, "pbc"_a=noPBC,"pbc_atom"_a=-1)
.def("dipole",&Selection::dipole, "is_charged"_a=false,"pbc"_a=noPBC,"pbc_atom"_a=-1)
.def("distance", &Selection::distance, "i"_a, "j"_a, "pbc"_a=fullPBC)
.def("angle", &Selection::angle, "i"_a, "j"_a, "k"_a, "pbc"_a=fullPBC)
.def("dihedral", &Selection::dihedral, "i"_a, "j"_a, "k"_a, "l"_a, "pbc"_a=fullPBC)
.def("num_residues",&Selection::num_residues)
// Geometry transforms
.def("translate", &Selection::translate)
.def("translate_to", &Selection::translate_to, "vec"_a, "mass_weighted"_a=false, "pbc"_a=noPBC, "pbc_atom"_a=-1)
.def("rotate",&Selection::rotate)
.def("wrap", &Selection::wrap, "pbc"_a=fullPBC)
.def("unwrap", &Selection::unwrap, "pbc"_a=fullPBC, "pbc_atom"_a=-1)
.def("unwrap_bonds", &Selection::unwrap_bonds, "d"_a, "pbc"_a=fullPBC, "pbc_atom"_a=-1)
.def("principal_transform", [](Selection* sel, Array3i_const_ref pbc, bool pbc_atom){
Matrix4f m = sel->principal_transform(pbc,pbc_atom).matrix().transpose();
return m;
}, "pbc"_a=noPBC,"pbc_atom"_a=-1)
.def("principal_orient",&Selection::principal_orient,"pbc"_a=noPBC,"pbc_atom"_a=-1)
// Fitting and rmsd
.def("rmsd",py::overload_cast<int>(&Selection::rmsd,py::const_))
.def("rmsd",py::overload_cast<int,int>(&Selection::rmsd,py::const_))
.def("fit_trajectory",&Selection::fit_trajectory, "ref_frame"_a=0, "b"_a=0, "e"_a=-1)
.def("fit",&Selection::fit)
.def("fit_transform", [](Selection* sel, int fr1, int fr2){
Matrix4f m = sel->fit_transform(fr1,fr2).matrix().transpose();
return m;
})
.def("apply_transform", [](Selection* sel, const Eigen::Ref<const Eigen::Matrix4f>& m){
Affine3f t(m.transpose());
sel->apply_transform(t);
})
// Energy
.def("non_bond_energy", &Selection::non_bond_energy, "cutoff"_a=0.0, "pbc"_a=true)
// IO
.def("write", py::overload_cast<string,int,int>(&Selection::write), "fname"_a, "b"_a=0, "e"_a=-1)
// Util
.def("is_large",&Selection::is_large)
.def("size",&Selection::size)
.def("__len__", &Selection::size)
.def("text_based",&Selection::text_based)
.def("coord_dependent",&Selection::coord_dependent)
.def("flatten",&Selection::flatten)
.def("to_gromacs_ndx",&Selection::to_gromacs_ndx)
.def("find_index",&Selection::find_index)
// Indexing and iterating
.def("__iter__", [](Selection* s) {
return py::make_iterator(s->begin(), s->end());
}, py::keep_alive<0,1>() /* Essential: keep object alive while iterator exists */)
.def("__getitem__", [](Selection &s, size_t i) {
if(i >= s.size()) throw py::index_error();
return s[i]; // Returns atom proxy object
}, py::keep_alive<0,1>())
.def("__getitem__", [](Selection &s, py::tuple ind_fr) {
int i = ind_fr[0].cast<int>();
int fr = ind_fr[1].cast<int>();
if(i >= s.size() || fr<0 || fr>=s.get_system()->num_frames()) throw py::index_error();
return s[{i,fr}]; // Returns atom proxy object
}, py::keep_alive<0,1>())
// Splitting
.def("split_by_connectivity", [](Selection* sel,float d,bool periodic){
std::vector<Selection> res;
sel->split_by_connectivity(d,res,periodic);
return res;
})
.def("split_by_residue", [](Selection* sel){
std::vector<Selection> res;
sel->split_by_residue(res);
return res;
})
.def("split_by_chain", [](Selection* sel){
std::vector<Selection> res;
sel->split_by_chain(res);
return res;
})
.def("split_by_molecule", [](Selection* sel){
std::vector<Selection> res;
sel->split_by_molecule(res);
return res;
})
.def("split_by_contiguous_index", [](Selection* sel){
std::vector<Selection> res;
sel->split_by_contiguous_index(res);
return res;
})
.def("split_by_contiguous_residue", [](Selection* sel){
std::vector<Selection> res;
sel->split_by_contiguous_residue(res);
return res;
})
.def("each_residue", [](Selection* sel){
std::vector<Selection> res;
sel->each_residue(res);
return res;
})
// split based on callback have to be implemented on python side
// since no means to bind templated return value!
// dssp
.def("dssp", py::overload_cast<string>(&Selection::dssp, py::const_))
.def("dssp", py::overload_cast<>(&Selection::dssp, py::const_))
// Accessors
.def_property("box", [](Selection* obj){return obj->box();}, [](Selection* obj,const Periodic_box& val){obj->box()=val;})
.def_property("time", [](Selection* obj){return obj->time();}, [](Selection* obj, float val){obj->time()=val;})
// No other accessors are exposed in favor to [] operator
;
// Free functions
m.def("rmsd",[](const Selection& sel1, const Selection& sel2){ return rmsd(sel1,sel2); });
m.def("rmsd",[](const Selection& sel1, int fr1, const Selection& sel2, int fr2){ return rmsd(sel1,fr1,sel2,fr2); });
m.def("fit",[](Selection& sel1, const Selection& sel2){ fit(sel1,sel2); });
m.def("fit_transform",[](Selection& sel1, const Selection& sel2){
Matrix4f m = fit_transform(sel1,sel2).matrix().transpose();
return m;
});
m.def("non_bond_energy", [](const Selection& sel1, const Selection& sel2,float cutoff,int fr,bool pbc){
return non_bond_energy(sel1,sel2,cutoff,fr,pbc);
},"sel1"_a, "sel2"_a, "cutoff"_a=0.0, "fr"_a=-1, "pbc"_a=fullPBC);
m.def("copy_coord",[](const Selection& sel1, int fr1, Selection& sel2, int fr2){ return copy_coord(sel1,fr1,sel2,fr2); });
m.def("copy_coord",[](const Selection& sel1, Selection& sel2){ return copy_coord(sel1,sel2); });
}
| 47.485175 | 174 | 0.604586 | mdimura |
74b2e71be885b294e25bbe33cbb1b2c19c230b88 | 714 | cpp | C++ | Company: Adobe/1.Subarray_with_given_sum.cpp | vaibhavkrishanyadav/6Companies30Days | a6f72ffce08a67df8b2ebada6008d01a90291d49 | [
"MIT"
] | null | null | null | Company: Adobe/1.Subarray_with_given_sum.cpp | vaibhavkrishanyadav/6Companies30Days | a6f72ffce08a67df8b2ebada6008d01a90291d49 | [
"MIT"
] | null | null | null | Company: Adobe/1.Subarray_with_given_sum.cpp | vaibhavkrishanyadav/6Companies30Days | a6f72ffce08a67df8b2ebada6008d01a90291d49 | [
"MIT"
] | null | null | null | //1.Subarray with given sum
//https://practice.geeksforgeeks.org/problems/subarray-with-given-sum-1587115621/1
class Solution
{
public:
//Function to find a continuous sub-array which adds up to a given number.
vector<int> subarraySum(int arr[], int n, long long s)
{
// Your code here
int i=0, j=0;
vector<int> ans;
long long sum=0;
while(j<n) {
sum += arr[j++];
while(sum > s) {
sum -= arr[i++];
}
if(sum == s) {
ans.push_back(i+1);
ans.push_back(j);
return ans;
}
}
ans.push_back(-1);
return ans;
}
};
| 24.62069 | 82 | 0.478992 | vaibhavkrishanyadav |
74b6c11192bde72c50b56d9b4a681899a8b5e1da | 4,665 | cpp | C++ | Code/PluginCustomizer/EditorDoubleValue.cpp | cy15196/FastCAE | 0870752ec2e590f3ea6479e909ebf6c345ac2523 | [
"BSD-3-Clause"
] | 117 | 2020-03-07T12:07:05.000Z | 2022-03-27T07:35:22.000Z | Code/PluginCustomizer/EditorDoubleValue.cpp | cy15196/FastCAE | 0870752ec2e590f3ea6479e909ebf6c345ac2523 | [
"BSD-3-Clause"
] | 4 | 2020-03-12T15:36:57.000Z | 2022-02-08T02:19:17.000Z | Code/PluginCustomizer/EditorDoubleValue.cpp | cy15196/FastCAE | 0870752ec2e590f3ea6479e909ebf6c345ac2523 | [
"BSD-3-Clause"
] | 76 | 2020-03-16T01:47:46.000Z | 2022-03-21T16:37:07.000Z | #include "EditorDoubleValue.h"
#include "ui_EditorDoubleValue.h"
#include "DataProperty/ParameterDouble.h"
#include <QDoubleValidator>
#include <QTimer>
#include <QDebug>
#include "InputValidator.h"
namespace FastCAEDesigner
{
EditorDoubleValue::EditorDoubleValue(DataProperty::ParameterDouble* model, QWidget *parent) :
QDialog(parent),
ui(new Ui::EditorDoubleValue),
_model(model)
{
ui->setupUi(this);
Init();
}
EditorDoubleValue::~EditorDoubleValue()
{
delete ui;
_errorList.clear();
_usedNameList.clear();
delete _validator;
_validator = nullptr;
}
void EditorDoubleValue::SetEditModel(bool b)
{
if (b)
ui->txtName->setEnabled(false);
else
ui->txtName->setEnabled(true);
}
//初始化错误代码对应的错误信息列表
void EditorDoubleValue::InitErrorList()
{
_errorList.insert(NameIsEmpty, tr("Name is empty."));
_errorList.insert(UnitIsEmpty, tr("Unit is empty."));
_errorList.insert(ValueOutOfRange, tr("Value out of range."));
_errorList.insert(RangeSetupError, tr("Range setting error."));
_errorList.insert(TheNameInUse, tr("The name is already in use"));
}
//初始化函数
void EditorDoubleValue::Init()
{
UpdateDataToUi();
_decimals = _model->getAccuracy();
connect(ui->btnOk, SIGNAL(clicked()), this, SLOT(OnBtnOkClicked()));
connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(close()));
//connect(ui->spBox_precision, SIGNAL(valueChanged(int)), this, SLOT(SetInputValidator(int)));
connect(ui->spBox_precision, SIGNAL(valueChanged(int)), this, SLOT(precisionChanged()));
//connect(ui->spBox_precision, SIGNAL(valueChanged(QString)), this, SLOT(OnSetInputValidator(QString)));
SetInputValidator(_decimals);//控件数据限制设定
InitErrorList();
}
//void EditorDoubleValue::OnSetInputValidator(QString decimals)
void EditorDoubleValue::precisionChanged()
{
int deci = ui->spBox_precision->value();
// int deci = decimals.toInt();
SetInputValidator(deci);
}
// void EditorDoubleValue::SetInputValidator(QString decimals)
// {
// int deci = decimals.toInt();
// //SetInputValidator(deci);
// }
void EditorDoubleValue::SetInputValidator(int decimals)
{
//double min = -2147483647;DBL_MIN
//double max = 2147483647;
//double min = DBL_MIN;
//double max = DBL_MAX;
double min = -37777777777;
double max = 37777777777;
_validator = new QDoubleValidator(min, max, decimals, this);
_validator->setNotation(QDoubleValidator::StandardNotation);
ui->txtValue->setValidator(_validator);
ui->txtMin->setValidator(_validator);
ui->txtMax->setValidator(_validator);
}
//校验数据设定是否正确,根据错误的状况返回响应的错误代码
int EditorDoubleValue::IsDataOk()
{
UpdateUiToLocal();
if (_usedNameList.contains(_name))
return TheNameInUse;
if (_name.isEmpty())
return NameIsEmpty;
//if (_unit.isEmpty())
// return UnitIsEmpty;
if (_min > _max)
return RangeSetupError;
if (_val<_min || _val>_max)
return ValueOutOfRange;
return 0;
}
//刷新Ui数据到本地变量
void EditorDoubleValue::UpdateUiToLocal()
{
_name = ui->txtName->text().trimmed();
_unit = ui->txtUnit->text().trimmed();
_val = ui->txtValue->text().toDouble();
_min = ui->txtMin->text().toDouble();
_max = ui->txtMax->text().toDouble();
_range[0] = _min;
_range[1] = _max;
_decimals = ui->spBox_precision->text().toInt();
}
//刷新model数据到UI
void EditorDoubleValue::UpdateDataToUi()
{
ui->txtName->setText(_model->getDescribe());
ui->txtUnit->setText(_model->getUnit());
//ui->txtValue->setText(QString::number(_model->getValue()));
_model->getRange(_range);
ui->txtMin->setText(QString::number(_range[0]));
ui->txtMax->setText(QString::number(_range[1]));
int accuracy = (_model->getAccuracy() > 10) ? 10 : _model->getAccuracy();
ui->spBox_precision->setValue(accuracy);
double d = _model->getValue();
QString s = QString("%1").arg(d, 0, 'f', accuracy);
ui->txtValue->setText(s);
}
//刷新Ui数据到model
void EditorDoubleValue::UpdateUiToData()
{
UpdateUiToLocal();
_model->setDescribe(_name);
_model->setUnit(_unit);
_model->setValue(_val);
_model->setRange(_range);
_model->setAccuracy(_decimals);
}
//确认设定槽函数
void EditorDoubleValue::OnBtnOkClicked()
{
int errorCode = IsDataOk();
if (0 != errorCode)
{
QString errorMsg = _errorList[errorCode];
ui->lbl_info->setText(errorMsg);
ui->lbl_info->show();
QTimer::singleShot(3000, this, SLOT(OnTimeout()));
return;
}
UpdateUiToData();
this->accept();
close();
}
//定时器槽函数
void EditorDoubleValue::OnTimeout()
{
ui->lbl_info->setText("");
ui->lbl_info->hide();
}
//设置已经使用的变量名称列表
void EditorDoubleValue::SetUsedNameList(QList<QString> list)
{
_usedNameList = list;
}
}
| 24.68254 | 106 | 0.699893 | cy15196 |
74b8e2e40bd35a2f76965d519300372cb9de76ff | 1,142 | hpp | C++ | PolyEngine/RenderingDevice/OpenGL/Src/GLTextureDeviceProxy.hpp | MuniuDev/PolyEngine | 9389537e4f551fa5dd621ebd3704e55b04c98792 | [
"MIT"
] | 1 | 2017-04-30T13:55:54.000Z | 2017-04-30T13:55:54.000Z | PolyEngine/RenderingDevice/OpenGL/Src/GLTextureDeviceProxy.hpp | MuniuDev/PolyEngine | 9389537e4f551fa5dd621ebd3704e55b04c98792 | [
"MIT"
] | null | null | null | PolyEngine/RenderingDevice/OpenGL/Src/GLTextureDeviceProxy.hpp | MuniuDev/PolyEngine | 9389537e4f551fa5dd621ebd3704e55b04c98792 | [
"MIT"
] | 3 | 2017-11-22T16:37:26.000Z | 2019-04-24T17:47:58.000Z | #pragma once
#include <IRenderingDevice.hpp>
#include "GLUtils.hpp"
namespace Poly
{
struct ScreenSize;
enum class eInternalTextureUsageType
{
NONE,
COLOR_ATTACHEMENT,
DEPTH_ATTACHEMENT,
_COUNT
};
class GLTextureDeviceProxy : public ITextureDeviceProxy
{
public:
GLTextureDeviceProxy(size_t width, size_t height, eInternalTextureUsageType internalUsage, GLuint internalFormat);
GLTextureDeviceProxy(size_t width, size_t height, eTextureUsageType usage);
virtual ~GLTextureDeviceProxy();
void SetContent(eTextureDataFormat inputFormat, const unsigned char* data) override;
void SetSubContent(size_t width, size_t height, size_t offsetX, size_t offsetY, eTextureDataFormat format, const unsigned char* data) override;
GLuint GetTextureID() const { return TextureID; }
void Resize(const ScreenSize& size);
private:
void InitTextureParams();
size_t Width = 0;
size_t Height = 0;
GLuint TextureID = 0;
GLuint InternalFormat;
eInternalTextureUsageType InternalUsage = eInternalTextureUsageType::NONE;
eTextureUsageType Usage = eTextureUsageType::_COUNT;
friend class GLRenderingDevice;
};
} | 26.55814 | 145 | 0.784588 | MuniuDev |
74b9b9272efdb271a02fa3e4f6073d344b26b98f | 1,028 | cpp | C++ | benchmarks/halide/fusiongpu_ref.cpp | akmaru/tiramisu | 8ca4173547b6d12cff10575ef0dc48cf93f7f414 | [
"MIT"
] | 23 | 2017-05-03T13:06:34.000Z | 2018-06-07T07:12:43.000Z | benchmarks/halide/fusiongpu_ref.cpp | akmaru/tiramisu | 8ca4173547b6d12cff10575ef0dc48cf93f7f414 | [
"MIT"
] | 2 | 2017-04-25T08:59:09.000Z | 2017-05-11T16:41:55.000Z | benchmarks/halide/fusiongpu_ref.cpp | akmaru/tiramisu | 8ca4173547b6d12cff10575ef0dc48cf93f7f414 | [
"MIT"
] | 5 | 2017-02-16T14:26:40.000Z | 2018-05-30T16:49:27.000Z | #include "Halide.h"
using namespace Halide;
int main(int argc, char **argv) {
ImageParam in(UInt(8), 3, "input");
Var x("x"), y("y"), c("c"), x1, y1;
Func f("f"), g("g"), h("h"), k("k");
f(x, y, c) = cast<uint8_t>(255 - in(x, y, c));
g(x, y, c) = cast<uint8_t>(2*in(x, y, c));
h(x, y, c) = f(x, y, c) + g(x, y, c);
k(x, y, c) = f(x, y, c) - g(x, y, c);
f.reorder(c, x, y);
g.reorder(c, x, y);
h.reorder(c, x, y);
k.reorder(c, x, y);
//g.compute_with(f, y);
f.gpu_tile(x, y, x1, y1, 16, 16);
g.gpu_tile(x, y, x1, y1, 16, 16);
h.gpu_tile(x, y, x1, y1, 16, 16);
k.gpu_tile(x, y, x1, y1, 16, 16);
Halide::Target target = Halide::get_host_target();
target.set_feature(Halide::Target::CUDA, true);
Pipeline({f, g, h, k}).compile_to_object("build/generated_fct_fusiongpu_ref.o", {in}, "fusiongpu_ref", target);
Pipeline({f, g, h, k}).compile_to_lowered_stmt("build/generated_fct_fusiongpu_ref.txt", {in}, Halide::Text, target);
return 0;
}
| 27.783784 | 120 | 0.54572 | akmaru |
74bd1e36f103407b376a0a3ad380c153c8414258 | 6,286 | hh | C++ | src/laserdisc/LaserdiscPlayer.hh | D15C0DE/openMSX | 5119a9657de4b82115c745f670cdc55dc7363133 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 7 | 2019-10-11T21:47:05.000Z | 2021-10-05T19:58:18.000Z | src/laserdisc/LaserdiscPlayer.hh | D15C0DE/openMSX | 5119a9657de4b82115c745f670cdc55dc7363133 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-05-25T21:08:47.000Z | 2019-05-25T21:10:35.000Z | src/laserdisc/LaserdiscPlayer.hh | D15C0DE/openMSX | 5119a9657de4b82115c745f670cdc55dc7363133 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #ifndef LASERDISCPLAYER_HH
#define LASERDISCPLAYER_HH
#include "ResampledSoundDevice.hh"
#include "BooleanSetting.hh"
#include "RecordedCommand.hh"
#include "EmuTime.hh"
#include "Schedulable.hh"
#include "DynamicClock.hh"
#include "Filename.hh"
#include "VideoSystemChangeListener.hh"
#include "EventListener.hh"
#include "ThrottleManager.hh"
#include "outer.hh"
namespace openmsx {
class PioneerLDControl;
class HardwareConfig;
class MSXMotherBoard;
class OggReader;
class LDRenderer;
class RawFrame;
class LaserdiscPlayer final : public ResampledSoundDevice
, private EventListener
, private VideoSystemChangeListener
{
public:
LaserdiscPlayer(const HardwareConfig& hwConf,
PioneerLDControl& ldControl);
~LaserdiscPlayer();
// Called from CassettePort
[[nodiscard]] int16_t readSample(EmuTime::param time);
// Called from PioneerLDControl
void setMuting(bool left, bool right, EmuTime::param time);
[[nodiscard]] bool extAck(EmuTime::param /*time*/) const { return ack; }
void extControl(bool bit, EmuTime::param time);
[[nodiscard]] const RawFrame* getRawFrame() const;
template<typename Archive>
void serialize(Archive& ar, unsigned version);
// video interface
[[nodiscard]] MSXMotherBoard& getMotherBoard() { return motherBoard; }
enum RemoteState {
REMOTE_IDLE,
REMOTE_HEADER_PULSE,
NEC_HEADER_SPACE,
NEC_BITS_PULSE,
NEC_BITS_SPACE,
};
enum PlayerState {
PLAYER_STOPPED,
PLAYER_PLAYING,
PLAYER_MULTISPEED,
PLAYER_PAUSED,
PLAYER_STILL
};
enum SeekState {
SEEK_NONE,
SEEK_CHAPTER,
SEEK_FRAME,
SEEK_WAIT,
};
enum StereoMode {
LEFT,
RIGHT,
STEREO
};
enum RemoteProtocol {
IR_NONE,
IR_NEC,
};
private:
void setImageName(std::string newImage, EmuTime::param time);
[[nodiscard]] const Filename& getImageName() const { return oggImage; }
void autoRun();
/** Laserdisc player commands
*/
void play(EmuTime::param time);
void pause(EmuTime::param time);
void stop(EmuTime::param time);
void eject(EmuTime::param time);
void seekFrame(size_t frame, EmuTime::param time);
void stepFrame(bool forwards);
void seekChapter(int chapter, EmuTime::param time);
// Control from MSX
/** Is video output being generated?
*/
void scheduleDisplayStart(EmuTime::param time);
[[nodiscard]] bool isVideoOutputAvailable(EmuTime::param time);
void remoteButtonNEC(unsigned code, EmuTime::param time);
void submitRemote(RemoteProtocol protocol, unsigned code);
void setAck(EmuTime::param time, int wait);
[[nodiscard]] size_t getCurrentSample(EmuTime::param time);
void createRenderer();
// SoundDevice
void generateChannels(float** buffers, unsigned num) override;
bool updateBuffer(unsigned length, float* buffer,
EmuTime::param time) override;
[[nodiscard]] float getAmplificationFactorImpl() const override;
// Schedulable
struct SyncAck final : public Schedulable {
friend class LaserdiscPlayer;
explicit SyncAck(Scheduler& s) : Schedulable(s) {}
void executeUntil(EmuTime::param time) override {
auto& player = OUTER(LaserdiscPlayer, syncAck);
player.execSyncAck(time);
}
} syncAck;
struct SyncOdd final : public Schedulable {
friend class LaserdiscPlayer;
explicit SyncOdd(Scheduler& s) : Schedulable(s) {}
void executeUntil(EmuTime::param time) override {
auto& player = OUTER(LaserdiscPlayer, syncOdd);
player.execSyncFrame(time, true);
}
} syncOdd;
struct SyncEven final : public Schedulable {
friend class LaserdiscPlayer;
explicit SyncEven(Scheduler& s) : Schedulable(s) {}
void executeUntil(EmuTime::param time) override {
auto& player = OUTER(LaserdiscPlayer, syncEven);
player.execSyncFrame(time, false);
}
} syncEven;
void execSyncAck(EmuTime::param time);
void execSyncFrame(EmuTime::param time, bool odd);
[[nodiscard]] EmuTime::param getCurrentTime() const { return syncAck.getCurrentTime(); }
// EventListener
int signalEvent(const std::shared_ptr<const Event>& event) noexcept override;
// VideoSystemChangeListener interface:
void preVideoSystemChange() noexcept override;
void postVideoSystemChange() noexcept override;
MSXMotherBoard& motherBoard;
PioneerLDControl& ldControl;
struct Command final : RecordedCommand {
Command(CommandController& commandController,
StateChangeDistributor& stateChangeDistributor,
Scheduler& scheduler);
void execute(span<const TclObject> tokens, TclObject& result,
EmuTime::param time) override;
[[nodiscard]] std::string help(const std::vector<std::string>& tokens) const override;
void tabCompletion(std::vector<std::string>& tokens) const override;
} laserdiscCommand;
std::unique_ptr<OggReader> video;
Filename oggImage;
std::unique_ptr<LDRenderer> renderer;
void nextFrame(EmuTime::param time);
void setFrameStep();
size_t currentFrame;
int frameStep;
// Audio state
DynamicClock sampleClock;
EmuTime start;
size_t playingFromSample;
size_t lastPlayedSample;
bool muteLeft, muteRight;
StereoMode stereoMode;
// Ext Control
RemoteState remoteState;
EmuTime remoteLastEdge;
unsigned remoteBitNr;
unsigned remoteBits;
bool remoteLastBit;
RemoteProtocol remoteProtocol;
unsigned remoteCode;
bool remoteExecuteDelayed;
// Number of v-blank since code was sent
int remoteVblanksBack;
/* We need to maintain some state for seeking */
SeekState seekState;
/* frame the MSX has requested to wait for */
size_t waitFrame;
// pause playing back on reaching wait frame
bool stillOnWaitFrame;
/* The specific frame or chapter we are seeking to */
int seekNum;
// For ack
bool ack;
// State of the video itself
bool seeking;
PlayerState playerState;
enum PlayingSpeed {
SPEED_STEP3 = -5, // Each frame is repeated 90 times
SPEED_STEP1 = -4, // Each frame is repeated 30 times
SPEED_1IN16 = -3, // Each frame is repeated 16 times
SPEED_1IN8 = -2, // Each frame is repeated 8 times
SPEED_1IN4 = -1, // Each frame is repeated 4 times
SPEED_1IN2 = 0,
SPEED_X1 = 1,
SPEED_X2 = 2,
SPEED_X3 = 3
};
int playingSpeed;
// Loading indicator
BooleanSetting autoRunSetting;
LoadingIndicator loadingIndicator;
int sampleReads;
};
SERIALIZE_CLASS_VERSION(LaserdiscPlayer, 4);
} // namespace openmsx
#endif
| 26.411765 | 89 | 0.742921 | D15C0DE |
74bd36cecac3a9ad05697054786227de758aded2 | 1,683 | cpp | C++ | Concurrency/1116_PrintZeroEvenOdd/ZeroEvenOdd_lockfree.cpp | liweiyap/LeetCode_Solutions | a137ddbfb6baa6ddabbea809e89e003760b1f23f | [
"MIT"
] | 1 | 2020-03-08T23:23:38.000Z | 2020-03-08T23:23:38.000Z | Concurrency/1116_PrintZeroEvenOdd/ZeroEvenOdd_lockfree.cpp | liweiyap/LeetCode_Solutions | a137ddbfb6baa6ddabbea809e89e003760b1f23f | [
"MIT"
] | 1 | 2020-01-27T14:01:43.000Z | 2020-01-27T14:01:43.000Z | Concurrency/1116_PrintZeroEvenOdd/ZeroEvenOdd_lockfree.cpp | liweiyap/LeetCode_Solutions | a137ddbfb6baa6ddabbea809e89e003760b1f23f | [
"MIT"
] | null | null | null | // Runtime: 60 ms, faster than 35.63% of C++ online submissions for Print Zero Even Odd.
// Memory Usage: 9.2 MB, less than 100.00% of C++ online submissions for Print Zero Even Odd.
#include <atomic>
#include <thread>
class ZeroEvenOdd
{
private:
int n;
std::atomic<bool> isZero{true};
std::atomic<bool> isEven{false};
std::atomic<bool> isOdd{false};
public:
ZeroEvenOdd(int n)
{
this->n = n;
}
// printNumber(x) outputs "x", where x is an integer.
void zero(function<void(int)> printNumber)
{
for (int i = 1; i <= n; ++i)
{
while (!isZero.load())
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
printNumber(0);
isZero.store(false);
if (i % 2 == 0)
{
isEven.store(true);
}
else
{
isOdd.store(true);
}
}
}
void even(function<void(int)> printNumber)
{
for (int i = 2; i <= n; i += 2)
{
while (!isEven.load())
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
printNumber(i);
isEven.store(false);
isZero.store(true);
}
}
void odd(function<void(int)> printNumber)
{
for (int i = 1; i <= n; i += 2)
{
while (!isOdd.load())
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
printNumber(i);
isOdd.store(false);
isZero.store(true);
}
}
};
| 23.704225 | 93 | 0.465835 | liweiyap |
74bd78491bad1e8e46bd345f1d313f152484e7d8 | 11,775 | cpp | C++ | src/main.cpp | sei-kiu/Wio-Terminal-Grove-infrared-receiver | 5d68096826bcf9dbee7470a14bf94147af951200 | [
"MIT"
] | 2 | 2022-01-05T10:15:12.000Z | 2022-01-05T10:15:28.000Z | src/main.cpp | sei-kiu/Wio-Terminal-detecting-IR-remote-button-presses | 5d68096826bcf9dbee7470a14bf94147af951200 | [
"MIT"
] | null | null | null | src/main.cpp | sei-kiu/Wio-Terminal-detecting-IR-remote-button-presses | 5d68096826bcf9dbee7470a14bf94147af951200 | [
"MIT"
] | null | null | null | #include <Arduino.h>
#include "../include/Free_Fonts.h" //include free fonts library from https://github.com/Seeed-Studio/Seeed_Arduino_LCD/blob/master/examples/320x240/Free_Font_Demo/Free_Fonts.h
#include "TFT_eSPI.h"
#include "IRremote.h"
TFT_eSPI tft;
int IR_RECEIVE_PIN = 0;
IRrecv irrecv(IR_RECEIVE_PIN);
String buttonDetected(unsigned long resultsValue);
void dumpCode(decode_results *results);
void updateScreen(decode_results *results);
void setup()
{
// put your setup code here, to run once:
// set up screen
tft.begin();
tft.setRotation(2);
// Start serial
Serial.begin(9600);
// Start the receiver
irrecv.enableIRIn();
}
void loop()
{
// put your main code here, to run repeatedly:
decode_results results; // Somewhere to store the results
if (irrecv.decode(&results))
{ // Grab an IR code
dumpCode(&results); // Output the results as source code
irrecv.resume(); // Prepare for the next value
}
updateScreen(&results);
}
//+=============================================================================
// Dump out the decode_results structure.
//
void dumpCode(decode_results *results)
{
// Start declaration
Serial.print("results value: ");
Serial.print(results->value);
Serial.println(""); // Newline
Serial.print("unsigned int"); // variable type
Serial.print(" rawData["); // array name
Serial.print(results->rawlen - 1, DEC); // array size
Serial.print("] = {"); // Start declaration
// Dump data
for (unsigned int i = 1; i < results->rawlen; i++)
{
Serial.print(results->rawbuf[i] * MICROS_PER_TICK, DEC);
if (i < results->rawlen - 1)
Serial.print(","); // ',' not needed on last one
if (!(i & 1))
Serial.print(" ");
}
Serial.print("};"); //End declaration
Serial.println(""); // Newline
Serial.println("");
}
void updateScreen(decode_results *results)
{
//Initializing buffer
TFT_eSprite spr = TFT_eSprite(&tft);
// Create buffer (portrait)
spr.createSprite(TFT_WIDTH, TFT_HEIGHT);
// Fill background
spr.fillSprite(TFT_YELLOW);
// Header section
spr.fillRect(0, 0, 240, 30, TFT_WHITE);
spr.setFreeFont(FMB12);
spr.setTextColor(TFT_BLACK);
spr.drawString("Grove IR Receiver", 5, 6);
// Body section
spr.setFreeFont(FMB18);
spr.setTextDatum(MC_DATUM);
spr.drawString("Value", 120, 60);
spr.drawString("detected", 120, 90);
spr.drawString((String)results->value, 120, 120);
spr.setFreeFont(FMB18);
spr.setTextDatum(MC_DATUM);
spr.drawString("Button", 120, 180);
spr.drawString("detected", 120, 210);
spr.drawString(buttonDetected(results->value), 120, 240);
//Push to LCD
spr.pushSprite(0, 0);
// Delete buffer
spr.deleteSprite();
}
String buttonDetected(unsigned long resultsValue)
{
if (resultsValue == 16753245)
{ // unsigned int buttonPower[67] = {9200,4500, 600,550, 600,600, 600,550, 600,550, 650,550, 600,550, 600,600, 600,550, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,600, 600,1650, 600,550, 600,550, 600,600, 600,1650, 600,550, 600,550, 650,1600, 650,550, 600,1650, 600,1650, 600,1650, 600,550, 650,1600, 600};
return "Power";
}
else if (resultsValue == 16736925)
{ // unsigned int buttonMode[67] = {9200,4500, 600,550, 650,550, 600,550, 650,550, 600,550, 600,550, 650,550, 600,550, 600,1650, 650,1600, 600,1650, 650,1600, 650,1600, 650,1600, 650,1650, 600,1650, 600,550, 600,1650, 600,1650, 600,550, 650,550, 600,550, 600,1650, 600,600, 600,1650, 600,550, 600,550, 650,1600, 650,1600, 650,1600, 650,550, 600,1650, 600};
return "Mode";
}
else if (resultsValue == 16769565)
{ // unsigned int buttonMute[67] = {9200,4500, 600,600, 600,550, 600,550, 600,600, 600,550, 600,550, 650,550, 600,550, 650,1600, 600,1650, 650,1600, 650,1600, 650,1600, 650,1600, 650,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,550, 600,550, 650,550, 600,1650, 600,550, 600,600, 600,550, 600,550, 650,1600, 650,1600, 650,1600, 650,550, 600,1650, 600};
return "Mute";
}
else if (resultsValue == 16720605)
{ // unsigned int buttonPlayPause[67] = {9250,4450, 600,600, 600,550, 600,550, 650,550, 600,550, 600,600, 600,550, 600,550, 650,1600, 650,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,550, 600,550, 650,1600, 650,550, 600,550, 600,600, 600,1650, 600,550, 600,1650, 600,1650, 600,550, 650,1600, 650,1600, 650,1600, 650,550, 600,1650, 600};
return "PlayPause";
}
else if (resultsValue == 16712445)
{ // unsigned int buttonPrevious[67] = {9200,4450, 650,550, 600,550, 600,600, 600,550, 600,550, 600,600, 600,550, 600,550, 650,1600, 650,1600, 600,1650, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 600,550, 600,600, 600,550, 600,550, 650,550, 600,1650, 600,550, 600,1650, 600,1650, 600,1650, 650,1600, 650,1600, 650,1600, 600,600, 600,1650, 600};
return "Previous";
}
else if (resultsValue == 16761405)
{ // unsigned int buttonNext[67] = {9200,4450, 650,550, 650,500, 650,550, 600,550, 650,500, 650,550, 600,550, 650,500, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 600,550, 650,550, 600,550, 650,1600, 650,500, 650,550, 650,500, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 600,1650, 600};
return "Next";
}
else if (resultsValue == 16769055)
{ // unsigned int buttonEQ[67] = {9250,4450, 600,600, 600,550, 600,600, 600,550, 600,550, 650,550, 600,550, 600,550, 650,1600, 650,1600, 650,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,550, 600,550, 650,550, 600,550, 600,600, 600,550, 600,550, 600,600, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600};
return "EQ";
}
else if (resultsValue == 16754775)
{ // unsigned int buttonMinus[67] = {9250,4450, 650,500, 650,550, 650,500, 650,550, 600,550, 650,500, 650,550, 650,500, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 650,1600, 650,500, 650,1600, 650,550, 600,550, 650,500, 650,550, 650,1600, 650,500, 650,1600, 650,550, 600,1650, 650,1600, 600,1650, 650};
return "Minus";
}
else if (resultsValue == 16748655)
{ // unsigned int buttonPlus[67] = {9250,4450, 650,550, 650,500, 650,550, 600,550, 600,550, 650,550, 650,500, 650,550, 600,1650, 600,1650, 650,1600, 600,1650, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 600,550, 650,1600, 650,500, 650,550, 650,500, 650,550, 600,550, 650,1600, 650,1600, 650,550, 600,1650, 600,1650, 600,1650, 600,1650, 600};
return "Plus";
}
else if (resultsValue == 16738455)
{ // unsigned int button0[67] = {9200,4500, 600,550, 650,550, 600,550, 600,600, 600,550, 600,550, 650,550, 600,550, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 650,1600, 600,1650, 600,600, 600,1650, 600,1650, 600,550, 600,1650, 600,550, 650,550, 600,550, 600,1650, 650,550, 600,550, 600,1650, 600,550, 650,1600, 650,1600, 650,1600, 650};
return "0";
}
else if (resultsValue == 16750695)
{ // unsigned int buttonShuffle[67] = {9200,4500, 650,500, 650,550, 600,550, 650,500, 650,550, 650,500, 650,550, 600,550, 650,1600, 650,1600, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 650,1600, 650,550, 650,500, 650,1600, 650,1600, 650,550, 600,550, 650,500, 650,550, 650,1600, 650,1600, 650,500, 650,550, 600,1650, 600,1650, 600,1650, 600};
return "Shuffle";
}
else if (resultsValue == 16756815)
{ // unsigned int buttonUSD[67] = {9250,4450, 600,550, 650,550, 600,550, 650,500, 650,550, 600,550, 650,500, 650,550, 650,1600, 650,1600, 600,1650, 600,1650, 650,1600, 650,1600, 600,1650, 600,1650, 650,1600, 650,500, 650,1600, 650,1600, 650,550, 600,550, 650,500, 650,550, 600,550, 650,1600, 650,500, 650,550, 650,1600, 600,1650, 600,1650, 650,1600, 600};
return "USD";
}
else if (resultsValue == 16724175)
{ // unsigned int button1[67] = {9300,4400, 650,550, 600,550, 650,550, 600,550, 650,500, 650,550, 650,500, 650,500, 650,1600, 650,1600, 650,1600, 650,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,550, 650,500, 650,1600, 650,1600, 650,550, 600,550, 650,550, 600,550, 650,1600, 650,1600, 650,500, 650,550, 600,1650, 600,1650, 600,1650, 650,1600, 600};
return "1";
}
else if (resultsValue == 16718055)
{ // unsigned int button2[67] = {9300,4450, 650,500, 650,550, 600,550, 650,550, 600,550, 650,500, 650,550, 650,500, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 600,550, 650,550, 600,1650, 600,1650, 600,550, 650,500, 650,550, 600,1650, 650,1600, 650,1600, 600,550, 600,600, 650,1600, 600,1650, 600,1650, 650};
return "2";
}
else if (resultsValue == 16743045)
{ // unsigned int button3[67] = {9250,4450, 650,500, 650,550, 650,500, 650,500, 650,550, 650,500, 650,550, 650,500, 650,1600, 650,1600, 600,1650, 650,1600, 650,1600, 600,1650, 600,1650, 650,1600, 600,550, 650,1600, 700,1550, 650,1600, 650,1600, 650,550, 600,1650, 600,550, 650,1600, 650,500, 650,550, 650,500, 650,500, 650,1600, 650,550, 600,1650, 650};
return "3";
}
else if (resultsValue == 16716015)
{ // unsigned int button4[67] = {9250,4450, 650,500, 650,550, 650,500, 650,550, 600,550, 650,500, 650,550, 650,500, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,1600, 650,550, 600,550, 650,500, 650,1600, 650,550, 650,500, 650,550, 600,550, 650,1600, 650,1600, 650,1600, 650,500, 650,1600, 650,1600, 650,1600, 650,1600, 650};
return "4";
}
else if (resultsValue == 16726215)
{ // unsigned int button5[67] = {9300,4450, 650,500, 650,550, 650,500, 650,550, 600,550, 650,500, 650,550, 650,500, 650,1600, 650,1600, 650,1600, 650,1650, 650,1600, 600,1650, 650,1600, 650,1600, 650,500, 650,550, 650,1600, 650,1600, 650,1600, 650,550, 700,450, 700,500, 600,1650, 600,1650, 650,500, 650,550, 600,550, 650,1600, 650,1600, 650,1600, 650};
return "5";
}
else if (resultsValue == 16734885)
{ // unsigned int button6[67] = {9200,4500, 650,550, 650,500, 650,550, 600,550, 600,550, 650,550, 600,550, 650,550, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 650,550, 600,1650, 600,550, 600,1650, 650,1600, 650,550, 600,1650, 650,500, 650,1600, 650,550, 600,1650, 650,500, 650,550, 600,1650, 650,500, 650,1600, 650};
return "6";
}
else if (resultsValue == 16728765)
{ // unsigned int button7[67] = {9250,4450, 600,600, 600,550, 650,500, 650,550, 600,550, 650,550, 600,550, 600,550, 650,1600, 650,1650, 600,1650, 600,1650, 600,1650, 650,1600, 650,1600, 600,1650, 600,550, 650,1600, 650,550, 600,550, 650,550, 600,550, 650,1600, 650,550, 600,1650, 600,550, 600,1650, 650,1600, 600,1650, 650,1600, 650,550, 600,1650, 600};
return "7";
}
else if (resultsValue == 16730805)
{ // unsigned int button8[67] = {9250,4450, 600,550, 650,550, 600,550, 650,500, 650,550, 650,500, 650,550, 600,550, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,600, 600,1650, 600,550, 650,550, 600,1650, 600,550, 600,1650, 650,500, 650,1600, 650,550, 600,1650, 600,1650, 650,500, 650,1600, 650,550, 600,1650, 600};
return "8";
}
else if (resultsValue == 16732845)
{ // unsigned int button9[67] = {9250,4450, 650,550, 600,550, 650,500, 650,550, 650,500, 650,550, 600,550, 650,500, 650,1600, 650,1600, 650,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,1650, 600,550, 650,1600, 650,550, 600,1650, 600,550, 650,500, 650,1600, 650,550, 650,1600, 650,500, 650,1600, 650,550, 600,1650, 650,1600, 600,550, 650,1600, 650};
return "9";
}
else if (resultsValue == 4294967295)
{ // unsigned int buttonLongPress[3] = {9200,2200, 650};
return "Long Press";
}
else
{
return "UNKNOWN";
}
} | 56.610577 | 363 | 0.656985 | sei-kiu |
74bdb0c2510e82446d230bc839e34f0e10b9bec7 | 1,413 | cpp | C++ | CodeForces/1178 A.cpp | windcry1/My-ACM-ICPC | b85b1c83b72c6b51731dae946a0df57c31d3e7a1 | [
"MIT"
] | null | null | null | CodeForces/1178 A.cpp | windcry1/My-ACM-ICPC | b85b1c83b72c6b51731dae946a0df57c31d3e7a1 | [
"MIT"
] | null | null | null | CodeForces/1178 A.cpp | windcry1/My-ACM-ICPC | b85b1c83b72c6b51731dae946a0df57c31d3e7a1 | [
"MIT"
] | null | null | null | /*************************************************************************
>>> Author: WindCry1
>>> Mail: lanceyu120@gmail.com
>>> Website: https://windcry1.com
>>> Date: 7/20/2019 11:36:22 PM
*************************************************************************/
#include<cstring>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstdlib>
#include<ctime>
#include<vector>
#include<iostream>
#include<string>
#include<queue>
#include<set>
#include<map>
#include<algorithm>
#include<complex>
#include<stack>
#include<bitset>
#include<iomanip>
#include<list>
#if __cplusplus >= 201103L
#include<unordered_map>
#include<unordered_set>
#endif
#define ll long long
#define ull unsigned long long
using namespace std;
const double clf=1e-8;
const int MMAX=0x7fffffff;
const int INF=0xfffffff;
const int mod=1e9+7;
int a[110];
int dp[110];
bool vis[110][110];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
//freopen("C:\\Users\\LENOVO\\Desktop\\in.txt","r",stdin);
//freopen("C:\\Users\\LENOVO\\Desktop\\out.txt","w",stdout);
int n,sum=0;
cin>>n;
vector<int> v;
vector<int> temp;
for(int i=0;i<n;i++)
cin>>a[i],sum+=a[i];
int res=a[0];
v.push_back(0);
for(int i=1;i<n;i++)
if(a[i]<=a[0]/2)
{
v.push_back(i);
res+=a[i];
}
if(res>sum/2)
{
cout<<v.size()<<endl;
for(auto i:v)
cout<<i+1<<" ";
cout<<endl;
}
else cout<<"0"<<endl;
return 0;
}
| 19.901408 | 74 | 0.586695 | windcry1 |
74be1efb0c36c92b9ed0bddfd73d002c907871ab | 7,354 | cpp | C++ | ubc/Object.cpp | Brillist/libutl | e55c2af091ba1101a1d0608db2830e279ec95d16 | [
"MIT"
] | 1 | 2021-09-14T06:12:58.000Z | 2021-09-14T06:12:58.000Z | ubc/Object.cpp | Brillist/libutl | e55c2af091ba1101a1d0608db2830e279ec95d16 | [
"MIT"
] | null | null | null | ubc/Object.cpp | Brillist/libutl | e55c2af091ba1101a1d0608db2830e279ec95d16 | [
"MIT"
] | 2 | 2019-05-13T23:04:31.000Z | 2021-09-14T06:12:59.000Z | #include <libutl/libutl.h>
#include <libutl/AutoPtr.h>
#include <libutl/Bool.h>
#include <libutl/MaxObject.h>
#include <libutl/String.h>
#include <libutl/Uint.h>
////////////////////////////////////////////////////////////////////////////////////////////////////
UTL_CLASS_IMPL_ABC(utl::Object);
////////////////////////////////////////////////////////////////////////////////////////////////////
UTL_NS_BEGIN;
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::clear()
{
AutoPtr<utl::Object> newInstance = this->create();
copy(*newInstance);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
int
Object::compare(const Object& rhs) const
{
// default object comparison logic
// if lhs or rhs has a key, we can re-start the comparison process using the key(s)
const Object& thisKey = getKey();
const Object& rhsKey = rhs.getKey();
if ((&thisKey != this) || (&rhsKey != &rhs))
{
return thisKey.compare(rhsKey);
}
// as a last resort, compare addresses
const void* lhsAddr = this;
const void* rhsAddr = &rhs;
return utl::compare(lhsAddr, rhsAddr);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::copy(const Object& rhs)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::vclone(const Object& rhs)
{
copy(rhs);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::steal(Object& rhs)
{
vclone(rhs);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::dump(Stream& os, uint_t) const
{
// get a string representation
String s = toString();
// get the object's key (if any)
const Object& key = getKey();
// if "toString" hasn't been overloaded (which is indicated by toString() returning only the
// .. class name), also give the key's string representation.
if ((s == getClassName()) && (&key != this) && (key.toString() != key.getClassName()))
{
s += ": ";
s += key.toString();
}
os << s << endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::dumpWithClassName(Stream& os, uint_t indent, uint_t level) const
{
if (indent == 0)
{
os << "=== ";
}
os << getClassName() << endl;
os.indent(indent);
dump(os, level);
os.unindent(indent);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const Object&
Object::getKey() const
{
// no key by default
return self;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
const Object&
Object::getProxiedObject() const
{
// not proxying anything by default
return self;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Object&
Object::getProxiedObject()
{
// not proxying anything by default
return self;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t
Object::hash(size_t size) const
{
if (hasKey())
{
return getKey().hash(size);
}
else
{
size_t n = (size_t)this;
return (n % (size_t)size);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::serialize(Stream&, uint_t, uint_t)
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Object*
Object::serializeInNullable(Stream& is, uint_t mode)
{
bool objectExists;
utl::serialize(objectExists, is, io_rd, mode);
if (objectExists)
{
return serializeInBoxed(is, mode);
}
return nullptr;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::serializeOutNullable(const Object* object, Stream& os, uint_t mode)
{
// first serialize a boolean value indicating whether or not an object is actually present
bool objectExists = (object != nullptr);
utl::serialize(objectExists, os, io_wr, mode);
// if there is an object, serialize it (boxed)
if (objectExists)
{
object->serializeOutBoxed(os, mode);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::serializeNullable(Object*& object, Stream& stream, uint_t io, uint_t mode)
{
if (io == io_rd)
{
object = serializeInNullable(stream, mode);
}
else
{
serializeOutNullable(object, stream, mode);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Object*
Object::serializeInBoxed(Stream& is, uint_t mode)
{
// write the className
String className;
className.serialize(is, io_rd, mode);
// use it to find the associated RunTimeClass object
const RunTimeClass* rtc = RunTimeClass::find(className);
// no RunTimeClass object -> we're done
if (rtc == nullptr)
{
throw StreamSerializeEx(utl::clone(is.getNamePtr()));
}
// use the RunTimeClass object to create an instance of the class
Object* res = rtc->create();
AutoPtr<> resPtr = res;
// serialize into this newly created instance
res->serializeIn(is, mode);
// don't destroy the object if it was serialized successfully
resPtr.release();
return res;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Object::serializeOutBoxed(Stream& os, uint_t mode) const
{
String className(getClassName());
className.serialize(os, io_wr, mode);
serializeOut(os, mode);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
String
Object::toString() const
{
String res = getClassName();
const Object& key = getKey();
if (&key != this)
{
res += ": ";
res += key.toString();
}
return res;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Object::operator String() const
{
return toString();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t
Object::allocatedSize() const
{
return getClass()->size() + innerAllocatedSize();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
size_t
Object::innerAllocatedSize() const
{
return 0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef DEBUG
void
Object::addOwnedIt(const class FwdIt* it) const
{
ABORT();
}
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef DEBUG
void
Object::removeOwnedIt(const class FwdIt* it) const
{
ABORT();
}
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////
UTL_NS_END;
| 25.098976 | 100 | 0.406174 | Brillist |
74c06ac787da3e48daae5c552de04094979f7f4a | 2,298 | cpp | C++ | _cmake/sketch/lab_temperature_sensor_c.ino.cpp | SSG-DRD-IOT/lab-temperature-sensor-c | b40febff18f29659bfa9369a194384b62f277e79 | [
"MIT"
] | null | null | null | _cmake/sketch/lab_temperature_sensor_c.ino.cpp | SSG-DRD-IOT/lab-temperature-sensor-c | b40febff18f29659bfa9369a194384b62f277e79 | [
"MIT"
] | null | null | null | _cmake/sketch/lab_temperature_sensor_c.ino.cpp | SSG-DRD-IOT/lab-temperature-sensor-c | b40febff18f29659bfa9369a194384b62f277e79 | [
"MIT"
] | 2 | 2018-02-05T04:51:54.000Z | 2018-02-23T08:24:42.000Z | #include <Arduino.h>
#include "th02.hpp"
#include "upm_utilities.h"
#include "jhd1313m1.h"
int main();
int
main() {
// Set the subplatform for the shield
mraa_add_subplatform(MRAA_GROVEPI, "0");
// Create the temperature & humidity sensor object
upm::TH02 sensor;
// initialize the LCD and check for initialization
jhd1313m1_context lcd = jhd1313m1_init(0, 0x3e, 0x62);
if (!lcd) {
printf("jhd1313m1_i2c_init() failed\n");
return 1;
}
// set the LCD parameters
char string1[20];
char string2[20];
uint8_t rgb[7][3] = {
{0xd1, 0x00, 0x00},
{0xff, 0x66, 0x22},
{0xff, 0xda, 0x21},
{0x33, 0xdd, 0x00},
{0x11, 0x33, 0xcc},
{0x22, 0x00, 0x66},
{0x33, 0x00, 0x44}};
// Read the temperature and humidity printing both the Celsius and
// equivalent Fahrenheit temperature and Relative Humidity, waiting two seconds between readings
while (1) {
float celsius = sensor.getTemperature();
float fahrenheit = (celsius * 9.0 / 5.0 + 32.0);
float humidity = sensor.getHumidity();
printf("%2.3f Celsius, or %2.3f Fahrenheit\n", celsius, fahrenheit);
printf("%2.3f%% Relative Humidity\n", humidity);
snprintf(string1, sizeof(string1), "Temperature:");
snprintf(string2, sizeof(string2), "%2.1f%cF %2.1f%cC", fahrenheit, 223, celsius, 223);
// Alternate rows on the LCD
jhd1313m1_set_cursor(lcd, 0, 0);
jhd1313m1_write(lcd, string1, strlen(string1));
jhd1313m1_set_cursor(lcd, 1, 0);
jhd1313m1_write(lcd, string2, strlen(string2));
// Change the color
uint8_t r = rgb[(int)fahrenheit%7][0];
uint8_t g = rgb[(int)fahrenheit%7][1];
uint8_t b = rgb[(int)fahrenheit%7][2];
jhd1313m1_set_color(lcd, r, g, b);
upm_delay(2);
jhd1313m1_clear(lcd);
snprintf(string1, sizeof(string1), "Humidity:");
snprintf(string2, sizeof(string2), "%2.1f%%", humidity);
// Alternate rows on the LCD
jhd1313m1_set_cursor(lcd, 0, 0);
jhd1313m1_write(lcd, string1, strlen(string1));
jhd1313m1_set_cursor(lcd, 1, 0);
jhd1313m1_write(lcd, string2, strlen(string2));
upm_delay(2);
jhd1313m1_clear(lcd);
}
return 0;
}
| 31.479452 | 98 | 0.621845 | SSG-DRD-IOT |
74c0aa9678992c800d012a24bc809ab3e61160e6 | 4,454 | cpp | C++ | linux/device/src/NetworkInitializer.cpp | RedCarrottt/selective-connection | 6103a21ffc5deea45ae3f913cd2d732c5364cf5d | [
"Apache-2.0"
] | 11 | 2019-09-04T06:27:04.000Z | 2020-08-25T08:36:11.000Z | linux/device/src/NetworkInitializer.cpp | RedCarrottt/Virtual-Connection | 6103a21ffc5deea45ae3f913cd2d732c5364cf5d | [
"Apache-2.0"
] | 15 | 2019-09-04T10:29:28.000Z | 2019-12-24T13:05:46.000Z | linux/device/src/NetworkInitializer.cpp | RedCarrottt/Virtual-Connection | 6103a21ffc5deea45ae3f913cd2d732c5364cf5d | [
"Apache-2.0"
] | 6 | 2021-07-26T01:40:37.000Z | 2021-10-12T06:33:28.000Z |
/* Copyright 2017-2018 All Rights Reserved.
* Gyeonghwan Hong (redcarrottt@gmail.com)
*
* [Contact]
* Gyeonghwan Hong (redcarrottt@gmail.com)
*
* Licensed under the Apache License, Version 2.0(the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "../inc/NetworkInitializer.h"
#include "../inc/CommandRfkill.h"
#include "../../common/inc/ChildProcess.h"
#include "../../common/inc/DebugLog.h"
#include "../../configs/BtConfig.h"
#include "../../configs/ExpConfig.h"
#include "../../configs/PathConfig.h"
#include "../../configs/WfdConfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
using namespace sc;
void NetworkInitializer::initialize(void) {
char cmdLine[500] = {
0,
};
// Step 1. Bluetooth OFF
LOG_VERB("Init (1/3): BT OFF");
CommandRfkill::block_device(DEFAULT_BT_DEVICE_RFKILL_NAME);
snprintf(cmdLine, 500, "%s %s down", HCICONFIG_PATH,
DEFAULT_BT_INTERFACE_NAME);
system(cmdLine);
// Step 2. Bluetooth ON
LOG_VERB("Init (2/3): BT ON");
CommandRfkill::unblock_device(DEFAULT_BT_DEVICE_RFKILL_NAME);
snprintf(cmdLine, 500, "%s %s up piscan", HCICONFIG_PATH,
DEFAULT_BT_INTERFACE_NAME);
system(cmdLine);
// Step 3. Wi-fi Direct OFF
LOG_VERB("Init (3/3). Wi-fi Direct OFF");
snprintf(cmdLine, 500, "killall udhcpd -q", KILLALL_PATH);
system(cmdLine);
// snprintf(cmdLine, 500, "%s %s down", IFCONFIG_PATH,
// DEFAULT_WFD_INTERFACE_NAME);
// system(cmdLine);
#if CONFIG_REALTEK_MODE == 1
#else
// snprintf(cmdLine, 500, "%s %s", IFDOWN_PATH, DEFAULT_WFD_INTERFACE_NAME);
// system(cmdLine);
#endif
// Step 4. Wi-fi ON
LOG_VERB("Init (4/3). Wi-fi Direct ON");
#if CONFIG_REALTEK_MODE == 1
#else
// snprintf(cmdLine, 500, "%s %s", IFUP_PATH,
// DEFAULT_WFD_INTERFACE_NAME);
// system(cmdLine);
#endif
// snprintf(cmdLine, 500, "%s %s up", IFCONFIG_PATH,
// DEFAULT_WFD_INTERFACE_NAME); system(cmdLine);
#if CONFIG_REALTEK_MODE == 1
// Restart wpa_supplicant
snprintf(cmdLine, 500, "%s wpa_supplicant -q", KILLALL_PATH);
system(cmdLine);
sleep(3);
FILE *p2p_conf_file = NULL;
p2p_conf_file = fopen("p2p.conf", "w");
if (p2p_conf_file == NULL) {
LOG_ERR("Cannot write p2p.conf file");
return;
}
fprintf(p2p_conf_file, "ctrl_interface=/var/run/wpa_supplicant \
\nap_scan=1 \
\ndevice_name=SelCon \
\ndevice_type=1-0050F204-1 \
\ndriver_param=p2p_device=1 \
\n\nnetwork={ \
\n\tmode=3 \
\n\tdisabled=2 \
\n\tssid=\"DIRECT-SelCon\" \
\n\tkey_mgmt=WPA-PSK \
\n\tproto=RSN \
\n\tpairwise=CCMP \
\n\tpsk=\"12345670\" \
\n}");
fclose(p2p_conf_file);
snprintf(cmdLine, 500, "%s -Dnl80211 -iwlan1 -cp2p.conf -Bd",
WPA_SUPPLICANT_PATH);
system(cmdLine);
#endif
}
int NetworkInitializer::ping_wpa_cli(char ret[], size_t len) {
char const *const params[] = {"wpa_cli", "-i", DEFAULT_WFD_INTERFACE_NAME,
"ping", NULL};
return ChildProcess::run(WPA_CLI_PATH, params, ret, len, true);
}
void NetworkInitializer::retrieve_wpa_interface_name(std::string &wpaIntfName) {
char wpaIntfNameCstr[100];
char buf[1024];
// In the case of Wi-fi USB Dongle, it uses 'wlanX'.
snprintf(wpaIntfNameCstr, sizeof(wpaIntfNameCstr), DEFAULT_WFD_INTERFACE_NAME,
strlen(DEFAULT_WFD_INTERFACE_NAME));
// In the case of Raspberry Pi 3 Internal Wi-fi Module, it uses 'p2p-wlanX-Y'.
int ret = this->ping_wpa_cli(buf, 1024);
if (ret < 0) {
LOG_ERR("P2P ping call failed");
return;
} else {
char *ptrptr;
char *ptr = strtok_r(buf, "\t \n\'", &ptrptr);
while (ptr != NULL) {
if (strstr(ptr, "p2p-wlan")) {
snprintf(wpaIntfNameCstr, sizeof(wpaIntfNameCstr), "%s", ptr);
} else if (strstr(ptr, "FAIL")) {
LOG_ERR("P2P ping failed");
return;
}
ptr = strtok_r(NULL, "\t \n\'", &ptrptr);
}
}
wpaIntfName.assign(wpaIntfNameCstr, strlen(wpaIntfNameCstr));
} | 27.664596 | 80 | 0.665694 | RedCarrottt |
74c0e973c0c8c7624c39b0b80cf7a44c5b00baf9 | 5,727 | cpp | C++ | src/ir/types.cpp | joyliu37/coreir | d7e68a1f17b8925965180e08dd5ecf9397bc057e | [
"BSD-3-Clause"
] | null | null | null | src/ir/types.cpp | joyliu37/coreir | d7e68a1f17b8925965180e08dd5ecf9397bc057e | [
"BSD-3-Clause"
] | null | null | null | src/ir/types.cpp | joyliu37/coreir | d7e68a1f17b8925965180e08dd5ecf9397bc057e | [
"BSD-3-Clause"
] | null | null | null | #include "coreir/ir/types.h"
#include "coreir/ir/globalvalue.h"
#include "coreir/ir/casting/casting.h"
#include "coreir/ir/context.h"
#include "coreir/ir/namespace.h"
#include "coreir/ir/common.h"
#include "coreir/ir/error.h"
#include "coreir/ir/typegen.h"
#include "coreir/ir/value.h"
using namespace std;
namespace CoreIR {
void Type::print(void) const { cout << "Type: " << (*this) << endl; }
string Type::TypeKind2Str(TypeKind t) {
switch(t) {
case TK_Bit : return "Bit";
case TK_BitIn : return "BitIn";
case TK_Array : return "Array";
case TK_Record : return "Record";
case TK_Named : return "Named";
default : return "NYI";
}
}
Type* Type::Arr(uint i) {
return c->Array(i,this);
}
bool Type::isBaseType() {return isa<BitType>(this) || isa<BitInType>(this) || isa<BitInOutType>(this);}
Type* Type::sel(string selstr) {
if (auto rt = dyn_cast<RecordType>(this)) {
ASSERT(rt->getRecord().count(selstr),"Bad Select!");
//return *(rt->getRecord().find(selstr));
return rt->getRecord().at(selstr);
}
else if (auto at = dyn_cast<ArrayType>(this)) {
ASSERT(isNumber(selstr),selstr + " needs to be a number!");
uint i = std::stoi(selstr,nullptr,0);
ASSERT(i < at->getLen(),"Bad Select!");
return at->getElemType();
}
ASSERT(0,"Bad Select");
}
vector<std::string> Type::getSelects() {
if (auto rt = dyn_cast<RecordType>(this)) {
return rt->getFields();
}
else if (auto at = dyn_cast<ArrayType>(this)) {
vector<std::string> ret;
for (uint i=0; i<at->getLen(); ++i) {
ret.push_back(to_string(i));
}
return ret;
}
else {
return vector<std::string>();
}
}
bool Type::canSel(string selstr) {
if (auto rt = dyn_cast<RecordType>(this)) {
return rt->getRecord().count(selstr);
}
else if (auto at = dyn_cast<ArrayType>(this)) {
if (!isNumber(selstr)) return false;
uint i = std::stoi(selstr,nullptr,0);
return i < at->getLen();
}
return false;
}
bool Type::canSel(SelectPath path) {
if (path.size()==0) return true;
string sel = path.front();
if (!this->canSel(sel)) return false;
path.pop_front();
return this->sel(sel)->canSel(path);
}
bool Type::hasInput() const {
if (isInput() ) return true;
if (isMixed()) {
if (auto at = dyn_cast<ArrayType>(this)) {
return at->getElemType()->hasInput();
}
else if (auto nt = dyn_cast<NamedType>(this)) {
return nt->getRaw()->hasInput();
}
else if (auto rt = dyn_cast<RecordType>(this)) {
bool ret = false;
for (auto field : rt->getRecord()) {
ret |= field.second->hasInput();
}
return ret;
}
assert(0);
}
return false;
}
std::ostream& operator<<(ostream& os, const Type& t) {
os << t.toString();
return os;
}
string RecordType::toString(void) const {
string ret = "{";
uint len = record.size();
uint i=0;
for(auto sel : _order) {
ret += "'" + sel + "':" + record.at(sel)->toString();
ret += (i==len-1) ? "}" : ", ";
++i;
}
return ret;
}
NamedType::NamedType(Namespace* ns, std::string name, Type* raw) : Type(TK_Named,raw->getDir(),ns->getContext()), GlobalValue(GVK_NamedType,ns,name), raw(raw) {}
NamedType::NamedType(Namespace* ns, string name, TypeGen* typegen, Values genargs) : Type(TK_Named,DK_Mixed,ns->getContext()), GlobalValue(GVK_NamedType,ns,name), typegen(typegen), genargs(genargs) {
//Check args here.
checkValuesAreParams(genargs,typegen->getParams());
//Run the typegen
raw = typegen->getType(genargs);
dir = raw->getDir();
}
void NamedType::print() const {
cout << "NYI print on named type" << endl;
}
//Stupid hashing wrapper for enum
RecordType::RecordType(Context* c, RecordParams _record) : Type(TK_Record,DK_Null,c) {
set<uint> dirs; // Slight hack because it is not easy to hash enums
for(auto field : _record) {
checkStringSyntax(field.first);
record.emplace(field.first,field.second);
_order.push_back(field.first);
dirs.insert(field.second->getDir());
}
assert(dirs.count(DK_Null) == 0);
if (dirs.size()==0) {
dir = DK_Null;
}
else if (dirs.size() > 1) {
dir = DK_Mixed;
}
else {
dir = (DirKind) *(dirs.begin());
}
}
RecordType* RecordType::appendField(string label, Type* t) {
checkStringSyntax(label);
ASSERT(this->getRecord().count(label)==0,"Cannot append " + label + " to type: " + this->toString());
RecordParams newParams({{label,t}});
for (auto rparam : this->getRecord()) {
newParams.push_back({rparam.first,rparam.second});
}
return c->Record(newParams);
}
RecordType* RecordType::detachField(string label) {
ASSERT(this->getRecord().count(label)==1,"Cannot detach" + label + " from type: " + this->toString());
RecordParams newParams;
for (auto rparam : this->getRecord()) {
if (rparam.first == label) continue;
newParams.push_back({rparam.first,rparam.second});
}
return c->Record(newParams);
}
uint RecordType::getSize() const {
uint size = 0;
for (auto field : record) {
size += field.second->getSize();
}
return size;
}
bool isClockOrNestedClockType(Type* type, Type* clockType) {
if (type == clockType) {
return true;
} else if (auto arrayType = dyn_cast<ArrayType>(type)) {
return isClockOrNestedClockType(arrayType->getElemType(), clockType);
} else if (auto recordType = dyn_cast<RecordType>(type)) {
bool isNestedClockType = false;
for (auto field : recordType->getRecord()) {
isNestedClockType |= isClockOrNestedClockType(field.second,
clockType);
}
return isNestedClockType;
}
return false;
}
}//CoreIR namespace
| 27.401914 | 199 | 0.629824 | joyliu37 |
74c872dcd7df58bd9779db7ea531f87397df71b9 | 633 | cpp | C++ | generation/scraper/Partitions/MsTv/main.cpp | tannergooding/win32metadata | 08577b93c4fa5ed8514f4d7290432773dbc4750a | [
"MIT"
] | 1 | 2021-07-06T16:33:39.000Z | 2021-07-06T16:33:39.000Z | generation/scraper/Partitions/MsTv/main.cpp | SkyN9ne/win32metadata | 94b3481b575055dfba358d92bba60a26cf682e80 | [
"MIT"
] | null | null | null | generation/scraper/Partitions/MsTv/main.cpp | SkyN9ne/win32metadata | 94b3481b575055dfba358d92bba60a26cf682e80 | [
"MIT"
] | null | null | null | #define SECURITY_WIN32 // For sspi.h
#define QCC_OS_GROUP_WINDOWS
#include "intrinfix.h"
#include "windows.fixed.h"
#include <sdkddkver.h>
#include <ks.h>
#include <ksmedia.h>
#include <tuner.h>
#include <segment.h>
#include <msvidctl.h>
#include <regbag.h>
#include <bdatypes.h>
#include <sbe.h>
#include <encdec.h>
#include <tvratings.h>
#include <mpeg2data.h>
#include <atscpsipparser.h>
#include <dsattrib.h>
#include <bdaiface.h>
#include <bdatif.h>
#include <mpeg2psiparser.h>
#include <dvbsiparser.h>
#include <strmif.h>
#include <mpeg2structs.h>
#include <bdamedia.h>
//#include <bdaiface_enums.h>
#include <mpeg2bits.h>
| 19.78125 | 36 | 0.733017 | tannergooding |
74c89be99acd24eb28bc3a8516b7230e044c3a78 | 3,075 | cpp | C++ | roguelike/src/Grid.cpp | irishpatrick/sdl-game | 23ff8330fe2aaa765119df40d62e50570f606f07 | [
"MIT-0",
"MIT"
] | null | null | null | roguelike/src/Grid.cpp | irishpatrick/sdl-game | 23ff8330fe2aaa765119df40d62e50570f606f07 | [
"MIT-0",
"MIT"
] | null | null | null | roguelike/src/Grid.cpp | irishpatrick/sdl-game | 23ff8330fe2aaa765119df40d62e50570f606f07 | [
"MIT-0",
"MIT"
] | null | null | null | #include "Grid.hpp"
#include "Tile.hpp"
#include "GridSprite.hpp"
#include "Stuff.hpp"
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <nlohmann/json.hpp>
Grid::Grid() :
Sprite(),
atlas(nullptr)
{
}
Grid::~Grid()
{
}
void Grid::load(Context& ctx, const std::string& fn)
{
std::ifstream in(fn);
if (!in.is_open())
{
std::cout << "cannot open " << fn << "\n";
return;
}
json o;
in >> o;
in.close();
if (!json_has(o, "size"))
{
std::cout << "no size field\n";
return;
}
w = o["size"][0].get<int>();
h = o["size"][1].get<int>();
size = o["size"][2].get<int>();
padding = o["size"][3].get<int>();
border = o["size"][4].get<int>();
if (!json_has(o, "atlas"))
{
std::cout << "missing texture atlas field!\n";
return;
}
atlas = Assets::getTexture(o["atlas"]);
if (atlas == nullptr)
{
std::cout << "cannot find texture " << o["atlas"] << "\n";
return;
}
if (!json_has(o, "tiles"))
{
std::cout << "missing tiles field!\n";
return;
}
for (auto& e : o["tiles"])
{
Tile* tile = new Tile();
int x = e[0].get<int>();
int y = e[1].get<int>();
Texture* copy = atlas->subTextureP(
ctx,
border + (x * size) + (x * padding),
border + (y * size) + (y * padding),
e[2].get<int>(),
e[3].get<int>()
);
Texture* tex = new Texture(ctx, *copy);
delete copy;
Assets::registerTexture(ctx, tex, ""); // let Assets handle disposal
tile->setTexture(tex);
tile->solid = (bool)e[4].get<int>();
tiles.push_back(tile);
}
if (!json_has(o, "data"))
{
std::cout << "missing data field!\n";
return;
}
for (auto& e : o["data"])
{
grid.push_back(tiles[e.get<int>()]);
}
}
GridSprite* Grid::at(int x, int y)
{
GridSprite* g = nullptr;
for (auto& e : children)
{
g = dynamic_cast<GridSprite*>(e);
if (g)
{
if (g->getGridPos().equals(Point(x, y)))
{
break;
}
}
g = nullptr;
}
return g;
}
void Grid::draw(Context& ctx, float ex)
{
int r = 0;
int c = 0;
int i = 0;
for (auto& e : grid)
{
r = i / w;
c = i % w;
e->x = c * 32;
e->y = r * 32;
e->draw(ctx, ex);
++i;
}
}
int Grid::ctoi(int x, int y)
{
return y * h + x;
}
Point Grid::itoc(int i)
{
Point p;
p.x = i % w;
p.y = i / w;
return p;
}
bool Grid::checkMove(int x, int y)
{
int index = ctoi(x, y);
bool valid = !grid[index]->solid;
for (auto& e : children)
{
GridSprite* s = nullptr;
s = dynamic_cast<GridSprite*>(e);
if (s != nullptr)
{
valid = valid && !s->getGridPos().equals(Point(x, y));
}
}
return valid;
}
int Grid::getSize()
{
return size;
}
| 18.75 | 76 | 0.457561 | irishpatrick |
74caf89198d5b02f3d3cfc4ba0583460d4c94a2e | 1,418 | cpp | C++ | test/sequencer/SeqTest4.cpp | ClaudiaVisentin/eeros-framework | 63739a2e33b0c5e9e573748fef675131c35181a6 | [
"Apache-2.0"
] | 10 | 2015-02-17T15:27:50.000Z | 2021-12-10T08:34:13.000Z | test/sequencer/SeqTest4.cpp | ClaudiaVisentin/eeros-framework | 63739a2e33b0c5e9e573748fef675131c35181a6 | [
"Apache-2.0"
] | 6 | 2016-05-10T17:11:09.000Z | 2022-03-31T07:52:11.000Z | test/sequencer/SeqTest4.cpp | ClaudiaVisentin/eeros-framework | 63739a2e33b0c5e9e573748fef675131c35181a6 | [
"Apache-2.0"
] | 13 | 2016-05-01T09:56:51.000Z | 2022-03-28T09:27:49.000Z | #include <eeros/logger/StreamLogWriter.hpp>
#include <eeros/sequencer/Sequencer.hpp>
#include <eeros/sequencer/Sequence.hpp>
#include <eeros/sequencer/Wait.hpp>
#include <eeros/core/Fault.hpp>
#include <signal.h>
#include <chrono>
#include <gtest/gtest.h>
namespace seqTest4 {
using namespace eeros::sequencer;
int count = 0;
int eCount = 0;
int limit = 5;
class MyCondition : public Condition {
bool validate() {return count >= 13 && eCount < 1;} // just trigger once
};
class ExceptionSeq : public Sequence {
public:
ExceptionSeq(std::string name, Sequence* caller) : Sequence(name, caller, true) { }
int action() {
count += 100;
eCount++;
if (eCount == 3) limit = 2;
return 0;
}
};
class MainSequence : public Sequence {
public:
MainSequence(std::string name, Sequencer& seq) : Sequence(name, seq), e1("e1", this), m("mon", this, cond, SequenceProp::abort, &e1) {
addMonitor(&m);
}
int action() {
count = 10;
return count;
}
bool checkExitCondition() {return count++ >= 121;}
ExceptionSeq e1;
MyCondition cond;
Monitor m;
};
// Test condition
TEST(seqTest4, condition) {
auto& sequencer = Sequencer::instance();
sequencer.clearList();
MainSequence mainSeq("Main Sequence", sequencer);
count = 0;
eCount = 0;
mainSeq.m.setBehavior(SequenceProp::abort);
mainSeq();
sequencer.wait();
EXPECT_EQ(count, 114);
EXPECT_EQ(eCount, 1);
}
}
| 22.15625 | 136 | 0.673484 | ClaudiaVisentin |
74ccb968f62328c55d50c98104839a25b37eade1 | 3,689 | cpp | C++ | src/camera.cpp | astrellon/simple-space | 20e98d4f562a78b1efeaedb0a0012f3c9306ac7e | [
"MIT"
] | 1 | 2020-09-23T11:17:35.000Z | 2020-09-23T11:17:35.000Z | src/camera.cpp | astrellon/simple-space | 20e98d4f562a78b1efeaedb0a0012f3c9306ac7e | [
"MIT"
] | null | null | null | src/camera.cpp | astrellon/simple-space | 20e98d4f562a78b1efeaedb0a0012f3c9306ac7e | [
"MIT"
] | null | null | null | #include "camera.hpp"
#include "engine.hpp"
#include "game_session.hpp"
namespace space
{
CameraProps::CameraProps() : scale(1.0f), following(false), followingRotation(false)
{
}
Camera::Camera(Engine &engine, std::string debugName) : debugName(debugName), _engine(engine), _zoomScale(1.0f)
{
}
void Camera::update(sf::Time dt)
{
setZoomScaleFromEngine();
if (_props.following)
{
SpaceObject *followingObject;
if (_engine.currentSession()->tryGetSpaceObject(_props.followingId, followingObject))
{
auto trans = followingObject->worldTransform();
sf::Vector2f pos(trans.getMatrix()[12], trans.getMatrix()[13]);
_view.setCenter(pos);
//std::cout << "Camera [" << debugName << "]: " << pos.x << ", " << pos.y << std::endl;
}
else
{
std::cout << "Camera [" << debugName << "]: Not found!" << std::endl;
}
}
auto resetRotation = true;
if (_props.followingRotation)
{
SpaceObject *followingObject;
if (_engine.currentSession()->tryGetSpaceObject(_props.followingRotationId, followingObject))
{
resetRotation = false;
_view.setRotation(followingObject->transform().rotation);
}
}
if (resetRotation && _view.getRotation() != 0.0f)
{
_view.setRotation(0.0f);
}
}
void Camera::scale(float scale)
{
if (scale != _props.scale)
{
_props.scale = scale;
updateViewSize();
}
}
void Camera::zoomScale(float scale)
{
if (scale != _zoomScale)
{
_zoomScale = scale;
updateViewSize();
}
}
void Camera::setZoomScaleFromEngine()
{
zoomScale(_engine.cameraScale());
}
void Camera::size(sf::Vector2f size)
{
_size = size;
updateViewSize();
}
void Camera::center(sf::Vector2f center)
{
_view.setCenter(center);
}
void Camera::rotation(float rotation)
{
_view.setRotation(rotation);
}
void Camera::followingId(const ObjectId &id)
{
_props.followingId = id;
_props.following = true;
}
void Camera::following(bool following)
{
_props.following = following;
}
void Camera::followingRotationId(const ObjectId &id)
{
_props.followingRotationId = id;
_props.followingRotation = true;
}
void Camera::followingRotation(bool following)
{
_props.followingRotation = following;
}
const sf::View &Camera::view() const
{
return _view;
}
float Camera::getRotation() const
{
if (_props.followingRotation)
{
SpaceObject *followingObject;
if (_engine.currentSession()->tryGetSpaceObject(_props.followingRotationId, followingObject))
{
return followingObject->transform().rotation;
}
}
return _view.getRotation();
}
void Camera::cameraProps(const CameraProps &props)
{
_props = props;
updateViewSize();
}
void Camera::updateViewSize()
{
auto size = _size / (_props.scale * _zoomScale);
_view.setSize(size);
}
sf::FloatRect Camera::viewport() const
{
auto size = _view.getSize();
auto center = _view.getCenter();
return sf::FloatRect(center.x - size.x * 0.5f, center.y - size.y * 0.5f, size.x, size.y);
}
} | 24.111111 | 115 | 0.548116 | astrellon |