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 109 | 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 48.5k ⌀ | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d15b1074ba6c87946d8d14a2100e696fee3a6348 | 294 | cpp | C++ | test/test-Analyzer_LockedCandidates.cpp | jambolo/Sudoku | 786499bfd6a8c948e91a1cfff7d65d38330b9efb | [
"MIT"
] | 1 | 2021-12-24T07:29:41.000Z | 2021-12-24T07:29:41.000Z | test/test-Analyzer_LockedCandidates.cpp | jambolo/Sudoku | 786499bfd6a8c948e91a1cfff7d65d38330b9efb | [
"MIT"
] | 1 | 2021-12-24T07:45:37.000Z | 2021-12-24T08:40:57.000Z | test/test-Analyzer_LockedCandidates.cpp | jambolo/Sudoku | 786499bfd6a8c948e91a1cfff7d65d38330b9efb | [
"MIT"
] | null | null | null | #include "Analyzer/LockedCandidates.h"
#include <gtest/gtest.h>
TEST(LockedCandidates, DISABLED_LockedCandidates)
{
}
TEST(LockedCandidates, DISABLED_exists)
{
}
int main(int argc, char ** argv)
{
::testing::InitGoogleTest(&argc, argv);
int rv = RUN_ALL_TESTS();
return rv;
}
| 14 | 49 | 0.704082 | jambolo |
d16159ddf927a131b32b868753e0ed0698116d6e | 903 | cpp | C++ | 080_RemoveDuplicatesFromSortedArrayII.cpp | kun2012/Leetcode | fa6bbe3f559176911ebb12c9b911b969c6ec85fb | [
"MIT"
] | null | null | null | 080_RemoveDuplicatesFromSortedArrayII.cpp | kun2012/Leetcode | fa6bbe3f559176911ebb12c9b911b969c6ec85fb | [
"MIT"
] | null | null | null | 080_RemoveDuplicatesFromSortedArrayII.cpp | kun2012/Leetcode | fa6bbe3f559176911ebb12c9b911b969c6ec85fb | [
"MIT"
] | null | null | null | /****************************************************************
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array nums = [1,1,1,2,2,3],
Your function should return length = 5, with the first five elements of nums being 1, 1, 2, 2 and 3.
It doesn't matter what you leave beyond the new length.
****************************************************************/
class Solution {
public:
int removeDuplicates(vector<int>& nums) {
if (nums.size() <= 2) return nums.size();
int j = 0, c = 1;
for (int i = 1; i < nums.size(); i++) {
if (nums[i] == nums[j]) {
c++;
if (c <= 2) {
nums[++j] = nums[i];
}
} else {
nums[++j] = nums[i];
c = 1;
}
}
return j + 1;
}
}; | 33.444444 | 101 | 0.409745 | kun2012 |
d16300ef66e4364be4bbf24581079cd33a91b6a7 | 793 | cpp | C++ | source/ArchLab.cpp | xzrunner/cgaview | 559899f0f9bcb1186e41b4108388ee2c69008966 | [
"MIT"
] | null | null | null | source/ArchLab.cpp | xzrunner/cgaview | 559899f0f9bcb1186e41b4108388ee2c69008966 | [
"MIT"
] | null | null | null | source/ArchLab.cpp | xzrunner/cgaview | 559899f0f9bcb1186e41b4108388ee2c69008966 | [
"MIT"
] | null | null | null | #include "archlab/ArchLab.h"
#include "archlab/PinCallback.h"
#include "archlab/Node.h"
#include <blueprint/NodeBuilder.h>
#include <blueprint/node/Commentary.h>
#include <archgraph/ArchGraph.h>
namespace archlab
{
CU_SINGLETON_DEFINITION(ArchLab);
extern void regist_rttr();
ArchLab::ArchLab()
{
archgraph::ArchGraph::Instance();
regist_rttr();
InitNodes();
InitPinCallback();
}
void ArchLab::InitNodes()
{
const int bp_count = 1;
auto list = rttr::type::get<Node>().get_derived_classes();
m_nodes.reserve(bp_count + list.size());
m_nodes.push_back(std::make_shared<bp::node::Commentary>());
for (auto& t : list)
{
auto obj = t.create();
assert(obj.is_valid());
auto node = obj.get_value<bp::NodePtr>();
assert(node);
m_nodes.push_back(node);
}
}
} | 16.87234 | 64 | 0.69483 | xzrunner |
d16821bba6dda4b93696f1adcbfaf6ee8ea6b9d4 | 272 | cpp | C++ | engine/src/awesome/editor/window.cpp | vitodtagliente/AwesomeEngine | eff06dbad1c4a168437f69800629a7e20619051c | [
"MIT"
] | 3 | 2019-08-15T18:57:20.000Z | 2020-01-09T22:19:26.000Z | engine/src/awesome/editor/window.cpp | vitodtagliente/AwesomeEngine | eff06dbad1c4a168437f69800629a7e20619051c | [
"MIT"
] | null | null | null | engine/src/awesome/editor/window.cpp | vitodtagliente/AwesomeEngine | eff06dbad1c4a168437f69800629a7e20619051c | [
"MIT"
] | null | null | null | #include "window.h"
namespace editor
{
std::string Window::getTitle() const
{
return getTypeDescriptor().name;
}
void Window::setFocus(bool focus)
{
if (m_hasFocus != focus)
{
m_hasFocus = focus;
onFocusChange(m_hasFocus);
}
}
REFLECT_IMP(Window)
} | 13.6 | 37 | 0.672794 | vitodtagliente |
d16c86a8cf322fb3cd7c0b217cf19749928ea075 | 4,381 | hpp | C++ | src/file_raw.hpp | liquidum-network/chiapos | 899be669838fbe59307e37be52fdb94ecb1f121f | [
"Apache-2.0"
] | 2 | 2021-07-15T02:32:07.000Z | 2021-07-19T19:43:40.000Z | src/file_raw.hpp | liquidum-network/chiapos | 899be669838fbe59307e37be52fdb94ecb1f121f | [
"Apache-2.0"
] | null | null | null | src/file_raw.hpp | liquidum-network/chiapos | 899be669838fbe59307e37be52fdb94ecb1f121f | [
"Apache-2.0"
] | 1 | 2021-07-14T20:29:32.000Z | 2021-07-14T20:29:32.000Z | #ifndef SRC_CPP_FILE_RAW_HPP_
#define SRC_CPP_FILE_RAW_HPP_
#include <fcntl.h>
#include <fmt/core.h>
#include <sys/stat.h>
#include <unistd.h>
#include <filesystem>
#include "logging.hpp"
#include "logging_helpers.hpp"
#include "storage.hpp"
class FileRaw {
public:
static FileRaw Create(const std::filesystem::path &filename, bool delete_before_open)
{
return FileRaw(StorageContext{.local_filename = filename}, delete_before_open);
}
static FileRaw CreateWithK(
StorageContext storage_context,
uint8_t k_unused,
bool delete_before_open,
bool file_size_known = false,
size_t file_size = 0)
{
return FileRaw(std::move(storage_context), delete_before_open);
}
static FileRaw CreateForTesting(
const std::filesystem::path &filename,
size_t cache_size_unused = 0)
{
return FileRaw(StorageContext{.local_filename = filename}, true);
}
void Open()
{
// if the file is already open, don't do anything
if (fileno_ > 0)
return;
fileno_ = open(GetFileName().c_str(), O_RDWR | O_CREAT, 0600);
if (fileno_ < 0) {
std::string error_message =
"Could not open " + GetFileName() + ": " + ::strerror(errno) + ".";
throw std::runtime_error(error_message);
}
}
FileRaw(FileRaw &&other)
{
storage_context_ = std::move(other.storage_context_);
fileno_ = other.fileno_;
other.fileno_ = -1;
}
FileRaw(const FileRaw &) = delete;
FileRaw &operator=(const FileRaw &) = delete;
void Close()
{
if (fileno_ < 0)
return;
close(fileno_);
fileno_ = -1;
}
void CloseAndDelete()
{
Close();
std::filesystem::remove(GetFileName());
}
std::error_code CloseAndRename(const std::filesystem::path &to)
{
std::error_code ec;
Close();
std::filesystem::rename(GetFileName(), to, ec);
return ec;
}
~FileRaw() { Close(); }
void Read(uint64_t begin, uint8_t *memcache, uint64_t length)
{
Open();
logging::LogDiskAccess(GetFileName(), "read", begin, length);
const auto result = pread(fileno_, memcache, length, begin);
if (result < 0) {
throw std::runtime_error(std::string("bad read: ") + ::strerror(errno));
}
if (static_cast<uint64_t>(result) != length) {
throw std::runtime_error(fmt::format(
"read too few bytes: requested {}+{} from {} file {}",
begin,
length,
FileSize(),
GetFileName()));
}
}
void Write(uint64_t begin, const uint8_t *memcache, uint64_t length)
{
Open();
logging::LogDiskAccess(GetFileName(), "write", begin, length);
const auto result = pwrite(fileno_, memcache, length, begin);
if (result < 0) {
throw std::runtime_error(std::string("bad write: ") + ::strerror(errno));
}
if (static_cast<uint64_t>(result) != length) {
throw std::runtime_error("wrote too few bytes");
}
}
std::string GetFileName() const { return storage_context_.FullLocalPath(); }
const StorageContext &GetStorageContext() const { return storage_context_; }
void Truncate(uint64_t new_size)
{
Close();
logging::LogDiskAccess(GetFileName(), "truncate", 0, 0);
const auto result = truncate(GetFileName().c_str(), new_size);
if (result < 0) {
throw std::runtime_error("bad truncate");
}
}
private:
explicit FileRaw(StorageContext storage_context, bool delete_before_open)
: storage_context_(std::move(storage_context)), fileno_(-1)
{
if (delete_before_open) {
std::filesystem::remove(GetFileName());
}
Open();
}
size_t FileSize() const
{
struct stat st;
logging::LogDiskAccess(GetFileName(), "stat", 0, 0);
const auto result = fstat(fileno_, &st);
if (result < 0) {
throw std::runtime_error(std::string("couldn't get size: ") + ::strerror(errno));
}
return st.st_size;
}
StorageContext storage_context_;
int fileno_;
};
#endif // SRC_CPP_FILE_RAW_HPP_
| 27.904459 | 93 | 0.584341 | liquidum-network |
d16e2fefb99254082c332e8adb0de08f2fc4c416 | 5,066 | hpp | C++ | firmware/library/L2_Utilities/enum.hpp | Jeremy-Chau/SJSU-Dev2 | b3c0b008f9f19a12fe70d319760459b4b2111003 | [
"Apache-2.0"
] | 2 | 2020-07-04T18:19:57.000Z | 2020-07-04T18:20:44.000Z | firmware/library/L2_Utilities/enum.hpp | hangbogu/SJSU-Dev2 | 38c9e993aa869c4b29abed470d7fd8affae0e655 | [
"Apache-2.0"
] | null | null | null | firmware/library/L2_Utilities/enum.hpp | hangbogu/SJSU-Dev2 | 38c9e993aa869c4b29abed470d7fd8affae0e655 | [
"Apache-2.0"
] | 2 | 2018-07-27T20:48:40.000Z | 2018-08-02T21:32:05.000Z | // Enum.hpp includes enhancements to the "enum class" types.
#pragma once
#include <type_traits>
namespace util
{
// Returns the value of the enum class. This should be used in place of
// static_cast<some_numeric_type>(some_variable).
//
// @example
//
// enum class SomeType : uint32_t { kValue1 = 1, kValue2 = 2 };
// SomeType some_variable = SomeType::kValue1;
// uint32_t numeric_variable = util::Value(some_variable);
//
// @param enum_type_value variable you would like to get the value of.
// @return the value of the enum class type variable of with the underlying
// type of the enum class.
template <typename Enum, typename Type = typename std::underlying_type_t<Enum>>
constexpr Type Value(Enum enum_type_value)
{
return static_cast<Type>(enum_type_value);
}
} // namespace util
//
// Below is the set of bitwise operator overloads for enum class types
//
// This struct is used in the template evaluation to determine if bitwise
// operators are enabled.
// This generic instance will match with all enumeration types that do not have
// their own template specializations. This will disable bit mask operations for
// all types. See the comments for SJ2_ENABLE_BITMASK_OPERATIONS for more
// details for the template specialization.
template <typename Enum>
struct EnableBitMaskOperators_t
{
static constexpr bool kEnable = false;
};
// This macro, when used on an enum class type, will create a specialized
// version of the "EnableBitMaskOperators_t" that enables that enum class
// to use bitwise operators without the need of static_cast.
//
// Example from within a class:
//
// class SomeClass
// {
// enum class SomeEnum : int32_t { kValue1 = -1, kValue2 = 2 };
// };
// SJ2_ENABLE_BITMASK_OPERATORS(SomeClass::SomeEnum);
//
#define SJ2_ENABLE_BITMASK_OPERATORS(x) \
template <> \
struct EnableBitMaskOperators_t<x> \
{ \
static constexpr bool kEnable = true; \
}
// @tparam Enum is the type used in this operator overload
// @tparam class= is used as a select. The compiler will use this
// implementation of the | operator if that type has a
// EnableBitMaskOperators_t<> specialization of the Enum type
// or, in other words, the SJ2_ENABLE_BITMASK_OPERATORS was used
// on it.
// The following is the same for all operators beyond this point.
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum operator|(Enum lhs, Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
return static_cast<Enum>(static_cast<underlying>(lhs) |
static_cast<underlying>(rhs));
}
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum operator&(Enum lhs, Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
return static_cast<Enum>(static_cast<underlying>(lhs) &
static_cast<underlying>(rhs));
}
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum operator^(Enum lhs, Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
return static_cast<Enum>(static_cast<underlying>(lhs) ^
static_cast<underlying>(rhs));
}
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum operator~(Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
return static_cast<Enum>(~static_cast<underlying>(rhs));
}
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum & operator|=(Enum & lhs, Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
lhs = static_cast<Enum>(static_cast<underlying>(lhs) |
static_cast<underlying>(rhs));
return lhs;
}
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum & operator&=(Enum & lhs, Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
lhs = static_cast<Enum>(static_cast<underlying>(lhs) &
static_cast<underlying>(rhs));
return lhs;
}
template <typename Enum, class = typename std::enable_if_t<
EnableBitMaskOperators_t<Enum>::kEnable, Enum>>
constexpr Enum & operator^=(Enum & lhs, Enum rhs)
{
using underlying = typename std::underlying_type<Enum>::type;
lhs = static_cast<Enum>(static_cast<underlying>(lhs) ^
static_cast<underlying>(rhs));
return lhs;
}
| 38.378788 | 80 | 0.666601 | Jeremy-Chau |
d16eb6255da80f6b14890dccdf9c75c50c8e2430 | 3,427 | cpp | C++ | Code/WSTrainingTJM/FrmTXTRead/CopyPastMod.m/src/CopyPasteDlg.cpp | msdos41/CATIA_CAA_V5 | bf831f7ecc3c4937b227782ee8bebf7c6675792a | [
"MIT"
] | 5 | 2019-11-14T05:42:38.000Z | 2022-03-12T12:51:46.000Z | Code/WSTrainingTJM/FrmTXTRead/CopyPastMod.m/src/CopyPasteDlg.cpp | msdos41/CATIA_CAA_V5 | bf831f7ecc3c4937b227782ee8bebf7c6675792a | [
"MIT"
] | null | null | null | Code/WSTrainingTJM/FrmTXTRead/CopyPastMod.m/src/CopyPasteDlg.cpp | msdos41/CATIA_CAA_V5 | bf831f7ecc3c4937b227782ee8bebf7c6675792a | [
"MIT"
] | 4 | 2020-01-02T13:48:07.000Z | 2022-01-05T04:23:30.000Z | // COPYRIGHT Dassault Systemes 2018
//===================================================================
//
// CopyPasteDlg.cpp
// The dialog : CopyPasteDlg
//
//===================================================================
//
// Usage notes:
//
//===================================================================
//
// Nov 2018 Creation: Code generated by the CAA wizard Administrator
//===================================================================
#include "CopyPasteDlg.h"
#include "CATApplicationFrame.h"
#include "CATDlgGridConstraints.h"
#include "CATMsgCatalog.h"
#ifdef CopyPasteDlg_ParameterEditorInclude
#include "CATIParameterEditorFactory.h"
#include "CATIParameterEditor.h"
#include "CATICkeParm.h"
#endif
//-------------------------------------------------------------------------
// Constructor
//-------------------------------------------------------------------------
CopyPasteDlg::CopyPasteDlg() :
CATDlgDialog ((CATApplicationFrame::GetApplicationFrame())->GetMainWindow(),
//CAA2 WIZARD CONSTRUCTOR DECLARATION SECTION
"CopyPasteDlg",CATDlgWndBtnOKCancel|CATDlgWndTitleBarHelp|CATDlgGridLayout
//END CAA2 WIZARD CONSTRUCTOR DECLARATION SECTION
)
{
//CAA2 WIZARD CONSTRUCTOR INITIALIZATION SECTION
_LabelSource = NULL;
_SelectorListSource = NULL;
_LabelTarget = NULL;
_SelectorListTarget = NULL;
//END CAA2 WIZARD CONSTRUCTOR INITIALIZATION SECTION
}
//-------------------------------------------------------------------------
// Destructor
//-------------------------------------------------------------------------
CopyPasteDlg::~CopyPasteDlg()
{
// Do not delete the control elements of your dialog:
// this is done automatically
// --------------------------------------------------
//CAA2 WIZARD DESTRUCTOR DECLARATION SECTION
_LabelSource = NULL;
_SelectorListSource = NULL;
_LabelTarget = NULL;
_SelectorListTarget = NULL;
//END CAA2 WIZARD DESTRUCTOR DECLARATION SECTION
}
void CopyPasteDlg::Build()
{
// TODO: This call builds your dialog from the layout declaration file
// -------------------------------------------------------------------
//CAA2 WIZARD WIDGET CONSTRUCTION SECTION
_LabelSource = new CATDlgLabel(this, "LabelSource");
_LabelSource -> SetGridConstraints(0, 0, 1, 1, CATGRID_4SIDES);
_SelectorListSource = new CATDlgSelectorList(this, "SelectorListSource");
_SelectorListSource -> SetVisibleTextHeight(10);
_SelectorListSource -> SetVisibleTextWidth(30);
_SelectorListSource -> SetGridConstraints(0, 1, 1, 1, CATGRID_4SIDES);
_LabelTarget = new CATDlgLabel(this, "LabelTarget");
_LabelTarget -> SetGridConstraints(1, 0, 1, 1, CATGRID_4SIDES);
_SelectorListTarget = new CATDlgSelectorList(this, "SelectorListTarget");
_SelectorListTarget -> SetVisibleTextHeight(1);
_SelectorListTarget -> SetGridConstraints(1, 1, 1, 1, CATGRID_4SIDES);
//END CAA2 WIZARD WIDGET CONSTRUCTION SECTION
//CAA2 WIZARD CALLBACK DECLARATION SECTION
//END CAA2 WIZARD CALLBACK DECLARATION SECTION
CATUnicodeString iInitialShow = "No Selection";
_SelectorListSource->SetLine(iInitialShow,-1,CATDlgDataAdd);
_SelectorListTarget->SetLine(iInitialShow,-1,CATDlgDataAdd);
int iTabRow = 0;
_SelectorListSource->SetSelect(&iTabRow,1,1);
}
CATDlgSelectorList * CopyPasteDlg::GetSelectorListTarget()
{
return _SelectorListTarget;
}
CATDlgSelectorList * CopyPasteDlg::GetSelectorListSource()
{
return _SelectorListSource;
} | 33.271845 | 78 | 0.618909 | msdos41 |
d16efddb5721e6fe9a8b58c63e72550a1dead48e | 903 | hpp | C++ | include/mbgl/util/peer.hpp | RobertSasak/mapbox-gl-native | dabf5d0c3a76f9fbe8b866f64f51accf12d1a2a6 | [
"BSL-1.0",
"Apache-2.0"
] | 2 | 2019-04-18T21:25:22.000Z | 2019-04-18T21:25:24.000Z | include/mbgl/util/peer.hpp | RobertSasak/mapbox-gl-native | dabf5d0c3a76f9fbe8b866f64f51accf12d1a2a6 | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | include/mbgl/util/peer.hpp | RobertSasak/mapbox-gl-native | dabf5d0c3a76f9fbe8b866f64f51accf12d1a2a6 | [
"BSL-1.0",
"Apache-2.0"
] | null | null | null | #pragma once
#include <memory>
#include <type_traits>
#include <utility>
namespace mbgl {
namespace util {
class peer {
public:
peer() noexcept : storage(nullptr, noop_deleter) {}
template <class T>
peer(T&& value) noexcept : storage(new std::decay_t<T>(std::forward<T>(value)), cast_deleter<std::decay_t<T>>) {
static_assert(!std::is_same<peer, std::decay_t<T>>::value, "Peer must not wrap itself.");
}
bool has_value() const noexcept { return static_cast<bool>(storage); }
template <class T>
T& get() noexcept { return *reinterpret_cast<T*>(storage.get()); }
private:
template <typename T>
static void cast_deleter(void* ptr) noexcept { delete reinterpret_cast<T*>(ptr); }
static void noop_deleter(void*) noexcept {}
using storage_t = std::unique_ptr<void, void(*)(void*)>;
storage_t storage;
};
} // namespace util
} // namespace mbgl
| 25.8 | 116 | 0.669989 | RobertSasak |
d16f2e4a6b9b55257c7b2be372e66cbf58f8c2a1 | 352 | inl | C++ | src/Core/Mesh/DCEL/Face.inl | nmellado/Radium-Engine | 6e42e4be8d14bcd496371a5f58d483f7d03f9cf4 | [
"Apache-2.0"
] | null | null | null | src/Core/Mesh/DCEL/Face.inl | nmellado/Radium-Engine | 6e42e4be8d14bcd496371a5f58d483f7d03f9cf4 | [
"Apache-2.0"
] | null | null | null | src/Core/Mesh/DCEL/Face.inl | nmellado/Radium-Engine | 6e42e4be8d14bcd496371a5f58d483f7d03f9cf4 | [
"Apache-2.0"
] | null | null | null | #include <Core/Mesh/DCEL/Face.hpp>
#include <Core/Mesh/DCEL/HalfEdge.hpp>
namespace Ra {
namespace Core {
/// HALFEDGE
inline HalfEdge_ptr Face::HE() const {
return m_he;
}
inline HalfEdge_ptr& Face::HE() {
return m_he;
}
inline void Face::setHE( const HalfEdge_ptr& he ) {
m_he = he;
}
} // namespace Core
} // namespace Ra
| 11 | 51 | 0.650568 | nmellado |
d17295593fe5c854f7eaf8f3aeaf63a926d402b5 | 4,076 | inl | C++ | include/gum/vec/vec.inl | johannes-braun/gum | 7f0cd74f0e4f8b6d9ffaf3312d24d0c720f6340a | [
"MIT"
] | null | null | null | include/gum/vec/vec.inl | johannes-braun/gum | 7f0cd74f0e4f8b6d9ffaf3312d24d0c720f6340a | [
"MIT"
] | null | null | null | include/gum/vec/vec.inl | johannes-braun/gum | 7f0cd74f0e4f8b6d9ffaf3312d24d0c720f6340a | [
"MIT"
] | null | null | null | #pragma once
namespace gfx {
inline namespace v1 {
template<typename T, size_t S>
template<std::size_t... Is>
constexpr vec<T, S>::vec(std::index_sequence<Is...>, T&& value) noexcept : detail::vec_components<T, S>{(static_cast<void>(Is), value)...}
{}
template<typename T, size_t S>
template<typename X, size_t D, std::size_t... Is>
constexpr vec<T, S>::vec(std::index_sequence<Is...>, const vec<X, D>& other) noexcept
: detail::vec_components<T, S>{static_cast<T>(other[Is])...}
{}
template<typename T, size_t S>
template<typename X, std::size_t... Is>
constexpr vec<T, S>::vec(std::index_sequence<Is...>, const X* other) noexcept : detail::vec_components<T, S>{static_cast<T>(other[Is])...}
{}
template<typename T, size_t S>
constexpr vec<T, S>::vec() noexcept : vec(T{})
{}
template<typename T, size_t S>
template<typename X, size_t D, typename>
constexpr vec<T, S>::vec(const vec<X, D>& other) noexcept : vec(std::make_index_sequence<std::min(S, D)>(), other)
{}
template<typename T, size_t S>
template<typename X, typename>
constexpr vec<T, S>::vec(const X* ptr) : vec(std::make_index_sequence<S>(), ptr)
{}
template<typename T, size_t S>
template<typename X, typename>
constexpr vec<T, S>::vec(X* ptr) : vec(std::make_index_sequence<S>(), ptr)
{}
template<typename T, size_t S>
constexpr vec<T, S>::vec(T&& value) noexcept : vec(std::make_index_sequence<S>(), std::forward<T&&>(value))
{}
template<typename T, size_t S>
template<typename... Ts, typename>
constexpr vec<T, S>::vec(Ts&&... ts) noexcept : detail::vec_components<T, S>{static_cast<value_type>(ts)...}
{}
template<typename T, size_t S>
template<std::size_t ...Is, typename UnaryConvertFun>
inline constexpr auto vec<T, S>::apply(std::index_sequence<Is...>, UnaryConvertFun && fun) const noexcept
{
using type = decltype(fun(this->components[0]));
if constexpr (std::is_same_v< type, void>)
(fun(this->components[Is]), ...);
else
return vec<type, S>(fun(this->components[Is])...);
}
template<typename T, size_t S>
template<std::size_t ...Is, typename UnaryConvertFun>
inline constexpr auto vec<T, S>::apply(std::index_sequence<Is...>, const vec & other, UnaryConvertFun && fun) const noexcept
{
using type = decltype(fun(this->components[0], other.components[0]));
if constexpr (std::is_same_v<type, void>)
(fun(this->components[Is], other.components[Is]), ...);
else
return vec<type, S>(fun(this->components[Is], other.components[Is])...);
}
template<typename T, size_t S>
inline constexpr auto vec<T, S>::real() const noexcept
{
return apply(std::make_index_sequence<S>{}, [](const auto& x) { return std::real(x); });
}
template<typename T, size_t S>
inline constexpr auto vec<T, S>::imag() const noexcept
{
return apply(std::make_index_sequence<S>{}, [](const auto& x) { return std::real(x); });
}
template<typename T, size_t S>
constexpr typename vec<T, S>::reference vec<T, S>::at(size_type index)
{
return detail::vec_components<T, S>::components[index];
}
template<typename T, size_t S>
constexpr typename vec<T, S>::const_reference vec<T, S>::at(size_type index) const
{
return detail::vec_components<T, S>::components[index];
}
template<typename T, size_t S>
constexpr typename vec<T, S>::reference vec<T, S>::operator[](size_type index)
{
return detail::vec_components<T, S>::components[index];
}
template<typename T, size_t S>
constexpr typename vec<T, S>::const_reference vec<T, S>::operator[](size_type index) const
{
return detail::vec_components<T, S>::components[index];
}
template<typename T, size_t S>
constexpr typename vec<T, S>::pointer vec<T, S>::data() noexcept
{
return this->components;
}
template<typename T, size_t S>
constexpr typename vec<T, S>::const_pointer vec<T, S>::data() const noexcept
{
return this->components;
}
template<typename T, size_t S>
constexpr typename vec<T, S>::size_type vec<T, S>::size() const noexcept
{
return S;
}
template<typename T, size_t S>
constexpr void vec<T, S>::fill(const T& value)
{
std::fill_n(this->components, S, value);
}
} // namespace v1
} // namespace gfx | 31.114504 | 138 | 0.694553 | johannes-braun |
ab6e952cc54e52f391b08bc6f2354ffcaf3e25b3 | 1,147 | cpp | C++ | c++/NVIDIA/mutex.cpp | praveenpandit/programming | ee07b19d495f363297b5cc80d0b0a51b02cd964d | [
"MIT"
] | null | null | null | c++/NVIDIA/mutex.cpp | praveenpandit/programming | ee07b19d495f363297b5cc80d0b0a51b02cd964d | [
"MIT"
] | null | null | null | c++/NVIDIA/mutex.cpp | praveenpandit/programming | ee07b19d495f363297b5cc80d0b0a51b02cd964d | [
"MIT"
] | null | null | null | #include <iostream>
#include <thread>
#include <mutex>
#include <condition_variable>
using namespace std;
void func(mutex &mx)
{
{
lock_guard<mutex> lock(mx);
cout << "Inside Thread :: " << this_thread::get_id() << endl;
this_thread::sleep_for(chrono::seconds(4));
}
}
// bool run = true;
void conFunc(mutex &mx, condition_variable &cvar)
{
unique_lock<mutex> lock(mx);
cvar.wait(lock);
// while (run)
// {
// }
cout << "Inside conFunc Thread :: " << this_thread::get_id() << endl;
lock.unlock();
}
int main()
{
mutex mxt;
// thread t1(func, ref(mxt));
// this_thread::sleep_for(chrono::seconds(1));
// unique_lock<mutex> lock(mxt);
// cout << "Inside Main Thread :: " << this_thread::get_id() << endl;
// lock.unlock();
// t1.join();
condition_variable cvar;
thread t2(conFunc, ref(mxt), ref(cvar));
cout << "Inside Main Thread :: " << this_thread::get_id() << endl;
this_thread::sleep_for(chrono::seconds(10));
{
lock_guard<mutex> lock(mxt);
cvar.notify_all();
}
// run = false;
t2.join();
return 0;
} | 23.408163 | 73 | 0.580645 | praveenpandit |
ab6f7ff2353ce86689413975f0d1e2a1fea6f50a | 4,120 | cpp | C++ | src/example_all_pointers.cpp | vreverdy/type-utilities | 510b558d30962973b983fd1d67bd8412dabf2fd5 | [
"BSD-3-Clause"
] | 5 | 2018-05-17T01:56:44.000Z | 2021-03-13T11:53:24.000Z | src/example_all_pointers.cpp | vreverdy/type-utilities | 510b558d30962973b983fd1d67bd8412dabf2fd5 | [
"BSD-3-Clause"
] | 2 | 2018-06-02T03:07:36.000Z | 2018-08-03T21:36:53.000Z | src/example_all_pointers.cpp | vreverdy/type-utilities | 510b558d30962973b983fd1d67bd8412dabf2fd5 | [
"BSD-3-Clause"
] | null | null | null | // ========================== EXAMPLE ALL POINTERS ========================== //
// Project: Type Utilities
// Name: example_all_pointers.cpp
// Description: Use cases for [remove/copy/clone]_all_pointers
// Creator: Vincent Reverdy
// Contributor(s): Vincent Reverdy [2018]
// License: BSD 3-Clause License
// ========================================================================== //
// ================================ PREAMBLE ================================ //
// C++ standard library
#include <vector>
#include <iostream>
// Project sources
#include "../include/type_utilities.hpp"
// Third-party libraries
// Miscellaneous
using namespace type_utilities;
// ========================================================================== //
// ============================= IMPLEMENTATION ============================= //
// Enables if the type is a pointer to a tensor element
template <class T> using enable_if_element_pointer_t = std::enable_if_t<
std::is_pointer_v<T> && !std::is_pointer_v<std::remove_pointer_t<T>>
>;
// Gets an element: tail
template <class T, class = enable_if_element_pointer_t<T>>
constexpr remove_all_pointers_t<T> get_element(T& tensor) {
return tensor ? *tensor : remove_all_pointers_t<T>();
}
// Gets an element: recursive call
template <class T, class... Indices>
constexpr remove_all_pointers_t<T> get_element(
T& tensor, std::size_t idx, Indices&&... idxs
) {
return tensor && tensor[idx]
? get_element(tensor[idx], std::forward<Indices>(idxs)...)
: remove_all_pointers_t<T>();
}
// Sets an element: tail
template <std::size_t N, class T, class = enable_if_element_pointer_t<T>>
void set_element(const remove_all_pointers_t<T>& val, T& tensor) {
using raw_t = remove_all_pointers_t<T>;
tensor ? (*tensor = val, 0) : (tensor = new raw_t(val), 0);
}
// Sets an element: recursive call
template <std::size_t N, class T, class... I>
void set_element(
const remove_all_pointers_t<T>& val, T& tensor, std::size_t idx, I&&... idxs
) {
if (!tensor) {
tensor = new std::remove_pointer_t<T>[N];
for (std::size_t i = 0; i < N; ++i) tensor[i] = nullptr;
}
set_element<N>(val, tensor[idx], std::forward<I>(idxs)...);
}
// Deallocates the entire tensor
template <std::size_t N, class T>
void deallocate(T& tensor) {
if constexpr (!std::is_pointer_v<std::remove_pointer_t<T>>) {
delete tensor;
tensor = nullptr;
} else if constexpr (std::is_pointer_v<std::remove_pointer_t<T>>) {
if (tensor) {
for (std::size_t i = 0; i < N; ++i) deallocate<N>(tensor[i]);
delete[] tensor;
tensor = nullptr;
}
}
}
// ========================================================================== //
// ================================== MAIN ================================== //
// Main function
int main(int, char**)
{
// Initialization
constexpr std::size_t dimension = 4;
using type = unsigned long long int;
type***** tensor = nullptr;
std::size_t i = 0;
// Fill
for (std::size_t i0 = 0; i0 < dimension; ++i0) {
for (std::size_t i1 = 0; i1 < dimension; ++i1) {
for (std::size_t i2 = 0; i2 < dimension; ++i2) {
for (std::size_t i3 = 0; i3 < dimension; ++i3) {
set_element<dimension>(i++, tensor, i0, i1, i2, i3);
}
}
}
}
// Display
for (std::size_t i0 = 0; i0 < dimension; ++i0) {
for (std::size_t i1 = 0; i1 < dimension; ++i1) {
for (std::size_t i2 = 0; i2 < dimension; ++i2) {
for (std::size_t i3 = 0; i3 < dimension; ++i3) {
std::cout << "[" << i0 << ", " << i1 << ", ";
std::cout << i2 << ", " << i3 << "]: ";
std::cout << get_element(tensor, i0, i1, i2, i3) << "\n";
}
}
}
}
// Finalization
deallocate<dimension>(tensor);
return 0;
}
// ========================================================================== //
| 33.495935 | 80 | 0.499272 | vreverdy |
ab7237df493381f35ef1107825da479322bc5814 | 2,646 | hpp | C++ | src/reyes/AddSymbolHelper.hpp | cwbaker/reyes | 76bd5ed7fde8be2c771536a73234e3a12b3cd6f7 | [
"MIT"
] | 9 | 2019-01-10T21:37:24.000Z | 2021-05-26T23:59:05.000Z | src/reyes/AddSymbolHelper.hpp | cwbaker/reyes | 76bd5ed7fde8be2c771536a73234e3a12b3cd6f7 | [
"MIT"
] | null | null | null | src/reyes/AddSymbolHelper.hpp | cwbaker/reyes | 76bd5ed7fde8be2c771536a73234e3a12b3cd6f7 | [
"MIT"
] | 1 | 2018-09-05T01:40:09.000Z | 2018-09-05T01:40:09.000Z | #ifndef REYES_ADDSYMBOLHELPER_HPP_INCLUDED
#define REYES_ADDSYMBOLHELPER_HPP_INCLUDED
#include "ValueType.hpp"
#include "ValueStorage.hpp"
#include <vector>
#include <memory>
namespace reyes
{
class Grid;
class Symbol;
class Value;
class Renderer;
class SymbolTable;
/**
// Syntax helper to provide a convenient syntax for constructing hierarchical
// symbol tables.
*/
class AddSymbolHelper
{
SymbolTable* symbol_table_; ///< The SymbolTable to add Symbols to.
std::shared_ptr<Symbol> symbol_; ///< The most recently added Symbol.
public:
AddSymbolHelper( SymbolTable* symbol_table );
AddSymbolHelper& operator()( const char* identifier, ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&, std::shared_ptr<Value> a0), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&, std::shared_ptr<Value> a0, std::shared_ptr<Value> a1), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&, std::shared_ptr<Value> a0, std::shared_ptr<Value> a1, std::shared_ptr<Value> a2), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&, std::shared_ptr<Value> a0, std::shared_ptr<Value> a1, std::shared_ptr<Value> a2, std::shared_ptr<Value> a3), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&, std::shared_ptr<Value> a0, std::shared_ptr<Value> a1, std::shared_ptr<Value> a2, std::shared_ptr<Value> a3, std::shared_ptr<Value> a4), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, void (*function)(const Renderer&, const Grid&, std::shared_ptr<Value> a0, std::shared_ptr<Value> a1, std::shared_ptr<Value> a2, std::shared_ptr<Value> a3, std::shared_ptr<Value> a4, std::shared_ptr<Value> a5), ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( ValueType type, ValueStorage storage = STORAGE_VARYING );
AddSymbolHelper& operator()( const char* identifier, float value );
};
}
#endif
| 60.136364 | 325 | 0.741497 | cwbaker |
ab7962bec0dcc9793a9c4f0efce9e4fe650472ac | 780 | cpp | C++ | events/gamepad_button_up_event.cpp | MrTAB/aabGameEngine | dc51c6e443bf087ca10e14e6884e4dfa6caef4a8 | [
"MIT"
] | null | null | null | events/gamepad_button_up_event.cpp | MrTAB/aabGameEngine | dc51c6e443bf087ca10e14e6884e4dfa6caef4a8 | [
"MIT"
] | null | null | null | events/gamepad_button_up_event.cpp | MrTAB/aabGameEngine | dc51c6e443bf087ca10e14e6884e4dfa6caef4a8 | [
"MIT"
] | null | null | null |
/**
*
* gamepad_button_up_event.cpp
*
**/
#include"gamepad_button_up_event.hpp"
#include<sdl.h>
#include<cmath>
namespace aab {
namespace events{
GamepadButtonUpEvent::GamepadButtonUpEvent (InternalEvent internalEvent) : Event (getClassEventType ())
{
SDL_Event * event = static_cast <SDL_Event *> (internalEvent-> getReference ());
id = event-> jbutton.which;
button = event-> jbutton.button;
}
GamepadButtonUpEvent::~GamepadButtonUpEvent () throw ()
{
// nothing //
}
int GamepadButtonUpEvent::getGamePadId () const
{
return id;
}
int GamepadButtonUpEvent::getButton () const
{
return button;
}
EventType GamepadButtonUpEvent::getClassEventType ()
{
return gamepad_button_up_event;
}
} // events
} // aab
| 15.6 | 104 | 0.682051 | MrTAB |
ab79f13cc8f1473c2074e26fe6d2ff83e4c33844 | 3,777 | cpp | C++ | QHTML_Static/qhtm/HTMLImage.cpp | karolbe/DSS | 5a834561fbe7345d0be36f41ed8620ebbdb2f222 | [
"BSD-3-Clause"
] | null | null | null | QHTML_Static/qhtm/HTMLImage.cpp | karolbe/DSS | 5a834561fbe7345d0be36f41ed8620ebbdb2f222 | [
"BSD-3-Clause"
] | null | null | null | QHTML_Static/qhtm/HTMLImage.cpp | karolbe/DSS | 5a834561fbe7345d0be36f41ed8620ebbdb2f222 | [
"BSD-3-Clause"
] | 1 | 2020-06-28T19:21:22.000Z | 2020-06-28T19:21:22.000Z | /*----------------------------------------------------------------------
Copyright (c) 1998 Gipsysoft. All Rights Reserved.
Please see the file "licence.txt" for licencing details.
File: HTMLImage.cpp
Owner: [email protected]
Purpose: HTML Image object
----------------------------------------------------------------------*/
#include "stdafx.h"
#include "HTMLParse.h"
#include "defaults.h"
#include "HTMLSectionCreator.h"
#include "HTMLImageSection.h"
CHTMLImage::CHTMLImage( int nWidth, int nHeight, int nBorder, LPCTSTR pcszFilename, CStyle::Align alg, CQHTMImageABC *pImage, const CStaticString &strALTText )
: CHTMLParagraphObject( CHTMLParagraphObject::knNone )
, m_nWidth( nWidth )
, m_nHeight( nHeight )
, m_nBorder( nBorder )
, m_strFilename( pcszFilename )
, m_alg( alg )
, m_pImage( pImage )
, m_strALTText( strALTText.GetData(), strALTText.GetLength() )
{
}
CHTMLImage::~CHTMLImage()
{
// Since images are cached in the document, they are not owned here.
// This object just points to the image in the document.
// delete m_pImage;
}
#ifdef _DEBUG
void CHTMLImage::Dump() const
{
TRACENL( _T("Image\n") );
TRACENL( _T("\tName(%s)\n"), (LPCTSTR)m_strFilename );
TRACENL( _T("\t Width(%d)\n"), m_nWidth );
TRACENL( _T("\t Height(%d)\n"), m_nHeight );
TRACENL( _T("\tAlignment (%s)\n"), GetStringFromAlignment( m_alg ) );
}
#endif // _DEBUG
void CHTMLImage::AddDisplayElements( class CHTMLSectionCreator *psc )
{
#ifdef QHTM_BUILD_INTERNAL_IMAGING
ASSERT( m_pImage );
WinHelper::CSize size( m_pImage->GetSize() );
#else // QHTM_BUILD_INTERNAL_IMAGING
WinHelper::CSize size( 100, 100 );
if( m_pImage )
size = m_pImage->GetSize();
#endif // QHTM_BUILD_INTERNAL_IMAGING
if( psc->GetDC().IsPrinting() )
size = psc->GetDC().Scale( size );
int nWidth = m_nWidth;
int nHeight = m_nHeight;
const int nBorder = m_nBorder;
if( nWidth == 0 )
{
nWidth = size.cx;
}
else if( nWidth < 0 )
{
nWidth = psc->GetCurrentWidth();
}
else
{
nWidth = psc->GetDC().ScaleX( nWidth );
}
if( nHeight == 0 )
nHeight = size.cy;
else
nHeight = psc->GetDC().ScaleY( nHeight );
nWidth += psc->GetDC().ScaleX(nBorder * 2);
nHeight += psc->GetDC().ScaleY(nBorder * 2);
int nTop = psc->GetCurrentYPos();
int nBaseline = nHeight;
if( nWidth > psc->GetRightMargin() - psc->GetCurrentXPos() )
{
psc->CarriageReturn( true );
nTop = psc->GetCurrentYPos();
}
int nLeft = psc->GetCurrentXPos();
switch( m_alg )
{
case CStyle::algBottom:
break;
case CStyle::algCentre:
case CStyle::algMiddle:
nBaseline = nHeight / 2;
break;
case CStyle::algTop:
nBaseline = psc->GetDC().GetCurrentFontBaseline();
break;
case CStyle::algLeft:
{
nLeft = psc->GetLeftMargin();
psc->AddNewLeftMargin( nLeft + nWidth + g_defaults.m_nImageMargin, psc->GetCurrentYPos() + nHeight );
if( psc->GetCurrentXPos() == nLeft )
psc->SetCurrentXPos( psc->GetLeftMargin() );
}
break;
case CStyle::algRight:
{
nLeft = psc->GetRightMargin() - nWidth;
psc->AddNewRightMargin( nLeft - g_defaults.m_nImageMargin, psc->GetCurrentYPos() + nHeight );
}
break;
}
CHTMLImageSection *pImageSection = (CHTMLImageSection *)psc->GetHTMLSection()->GetKeeperItemByID( m_uID );
if( !pImageSection )
{
pImageSection = new CHTMLImageSection( psc->GetHTMLSection(), m_pImage, nBorder );
pImageSection->SetID( m_uID );
pImageSection->SetElementID( m_strElementID );
}
if( m_strALTText.GetLength() )
{
pImageSection->SetTipText( m_strALTText );
}
psc->AddSection( pImageSection );
pImageSection->Set( nLeft, nTop, nLeft + nWidth, nTop + nHeight );
if( m_alg != CStyle::algLeft && m_alg != CStyle::algRight )
{
psc->SetCurrentXPos( psc->GetCurrentXPos() + nWidth );
psc->AddBaseline( nBaseline );
}
} | 24.367742 | 159 | 0.664019 | karolbe |
ab87d68707660a170dc7ba065ec3dbc4c2f401e9 | 3,267 | cpp | C++ | src/Particle.cpp | jildertviet/ofxJVisuals | 878c5b0e7a7dda49ddb71b3f5d19c13987706a73 | [
"MIT"
] | null | null | null | src/Particle.cpp | jildertviet/ofxJVisuals | 878c5b0e7a7dda49ddb71b3f5d19c13987706a73 | [
"MIT"
] | 6 | 2021-10-16T07:10:04.000Z | 2021-12-26T13:23:54.000Z | src/Particle.cpp | jildertviet/ofxJVisuals | 878c5b0e7a7dda49ddb71b3f5d19c13987706a73 | [
"MIT"
] | null | null | null | //
// Particle.cpp
// Shapes
//
// Created by Jildert Viet on 18-02-15.
//
//
#include "Particle.h"
Particle::Particle(){
}
Particle::Particle(ofVec3f *destination, bool startAtDest){
this->destination = destination;
if(startAtDest){
loc = ofVec2f(ofRandom(ofGetWindowWidth()),ofRandom(ofGetWindowHeight()));
switch((int)ofRandom(4)){
case 0:
loc.x = 0;
break;
case 1:
loc.x = ofGetWindowWidth();
break;
case 2:
loc.y = 0;
break;
case 3:
loc.y = ofGetWindowHeight();
break;
}
} else{
loc = *destination;
}
}
Particle::Particle(ofVec2f destination){
loc = ofVec2f(ofRandom(ofGetWindowWidth()), ofRandom(ofGetWindowHeight()));
*(this->destination) = destination;
}
void Particle::display(){
ofSetColor(ofColor::white);
ofDrawRectangle(loc, 1, 1);
}
void Particle::update(){
if(!state){ // Free
direction.normalize();
acceleration = direction * 0.5;
velocity += acceleration;
velocity.limit(topspeed);
loc += velocity;
// checkBorders();
} else{ // In formation
ofVec2f dir2 = *destination - loc;
dir2.normalize();
dir2 *= 0.4;
acceleration = dir2;
velocity += acceleration;
if(addNoise){
loc += ofVec2f(ofRandom(-noise_max, noise_max), ofRandom(-noise_max, noise_max));
addNoise = false;
}
velocity.limit(topspeed);
loc += velocity;
// So it doesn't vibrate when in formation
float distance = loc.squareDistance(*destination);
if(distance < 100)
velocity *= 0.001;
}
// checkBorders();
// if(loc.x > ofGetViewportWidth()) {
//// cout << ofGetViewportWidth() << endl;
// velocity.x *= -1;
// direction.x *= -1;
// return;
// }
// if(loc.x < 0){
// velocity.x *= -1;
// direction.x *= -1;
// return;
// }
// if (loc.y > ofGetViewportHeight()) {
// direction.y *= -1;
// velocity.y *= -1;
// return;
// }
// if(loc.y < 0){
// direction.y *= -1;
// velocity.y *= -1;
// return;
// }
}
void Particle::changeMode(){
state = !state;
if(state)
direction = ofVec2f( ((int)ofRandom(-8,8)) *0.25, ((int)ofRandom(-8, 8))*0.25 );
}
void Particle::locationIsDestination(){
loc = *destination;
}
void Particle::connectParticle(Particle* p){
// if(checkIfConnected(p)){
connectedParticles.push_back(p);
p->connectedParticles.push_back(this);
// }
}
bool Particle::checkIfConnected(Particle* p){
for(int i=0; i<connectedParticles.size(); i++){
if(this==p){
return true;
}
}
return false;
}
void Particle::clearConnectedParticles(){
connectedParticles.clear();
}
| 24.380597 | 98 | 0.486073 | jildertviet |
ab8ef5dca49c8814be008bec053324bf327883c2 | 7,456 | hpp | C++ | src/vendor/cget/cget/pkg/pqrs-org__cpp-osx-iokit_types/install/include/pqrs/osx/iokit_types/iokit_hid_usage.hpp | fe7/Karabiner-Elements | fdbf3b47d845e5d225c1d33f9b3c696406d404ba | [
"Unlicense"
] | 1 | 2021-11-09T10:28:50.000Z | 2021-11-09T10:28:50.000Z | src/vendor/cget/cget/pkg/pqrs-org__cpp-osx-iokit_types/install/include/pqrs/osx/iokit_types/iokit_hid_usage.hpp | fe7/Karabiner-Elements | fdbf3b47d845e5d225c1d33f9b3c696406d404ba | [
"Unlicense"
] | null | null | null | src/vendor/cget/cget/pkg/pqrs-org__cpp-osx-iokit_types/install/include/pqrs/osx/iokit_types/iokit_hid_usage.hpp | fe7/Karabiner-Elements | fdbf3b47d845e5d225c1d33f9b3c696406d404ba | [
"Unlicense"
] | 2 | 2020-04-27T10:51:37.000Z | 2020-09-09T03:44:04.000Z | #pragma once
// (C) Copyright Takayama Fumihiko 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
#include <IOKit/hid/IOHIDUsageTables.h>
#include <functional>
#include <iostream>
#include <type_safe/strong_typedef.hpp>
namespace pqrs {
namespace osx {
struct iokit_hid_usage : type_safe::strong_typedef<iokit_hid_usage, int32_t>,
type_safe::strong_typedef_op::equality_comparison<iokit_hid_usage>,
type_safe::strong_typedef_op::relational_comparison<iokit_hid_usage> {
using strong_typedef::strong_typedef;
};
inline std::ostream& operator<<(std::ostream& stream, const iokit_hid_usage& value) {
return stream << type_safe::get(value);
}
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_pointer(kHIDUsage_GD_Pointer);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_mouse(kHIDUsage_GD_Mouse);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_keyboard(kHIDUsage_GD_Keyboard);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_keypad(kHIDUsage_GD_Keypad);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_x(kHIDUsage_GD_X);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_y(kHIDUsage_GD_Y);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_z(kHIDUsage_GD_Z);
constexpr iokit_hid_usage iokit_hid_usage_generic_desktop_wheel(kHIDUsage_GD_Wheel);
constexpr iokit_hid_usage iokit_hid_usage_led_caps_lock(kHIDUsage_LED_CapsLock);
constexpr iokit_hid_usage iokit_hid_usage_consumer_consumer_control(kHIDUsage_Csmr_ConsumerControl);
constexpr iokit_hid_usage iokit_hid_usage_consumer_power(kHIDUsage_Csmr_Power);
constexpr iokit_hid_usage iokit_hid_usage_consumer_display_brightness_increment(kHIDUsage_Csmr_DisplayBrightnessIncrement);
constexpr iokit_hid_usage iokit_hid_usage_consumer_display_brightness_decrement(kHIDUsage_Csmr_DisplayBrightnessDecrement);
constexpr iokit_hid_usage iokit_hid_usage_consumer_fast_forward(kHIDUsage_Csmr_FastForward);
constexpr iokit_hid_usage iokit_hid_usage_consumer_rewind(kHIDUsage_Csmr_Rewind);
constexpr iokit_hid_usage iokit_hid_usage_consumer_scan_next_track(kHIDUsage_Csmr_ScanNextTrack);
constexpr iokit_hid_usage iokit_hid_usage_consumer_scan_previous_track(kHIDUsage_Csmr_ScanPreviousTrack);
constexpr iokit_hid_usage iokit_hid_usage_consumer_eject(kHIDUsage_Csmr_Eject);
constexpr iokit_hid_usage iokit_hid_usage_consumer_play_or_pause(kHIDUsage_Csmr_PlayOrPause);
constexpr iokit_hid_usage iokit_hid_usage_consumer_mute(kHIDUsage_Csmr_Mute);
constexpr iokit_hid_usage iokit_hid_usage_consumer_volume_increment(kHIDUsage_Csmr_VolumeIncrement);
constexpr iokit_hid_usage iokit_hid_usage_consumer_volume_decrement(kHIDUsage_Csmr_VolumeDecrement);
constexpr iokit_hid_usage iokit_hid_usage_consumer_ac_pan(kHIDUsage_Csmr_ACPan);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case(0x0001);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_display(0x0002);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_accelerometer(0x0003);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_ambient_light_sensor(0x0004);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_temperature_sensor(0x0005);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard(0x0006);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_headset(0x0007);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_proximity_sensor(0x0008);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_gyro(0x0009);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_compass(0x000A);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_device_management(0x000B);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_trackpad(0x000C);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_reserved(0x000D);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_motion(0x000E);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_backlight(0x000F);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_device_motion_lite(0x0010);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_force(0x0011);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_bluetooth_radio(0x0012);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_orb(0x0013);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_accessory_battery(0x0014);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_humidity(0x0015);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_hid_event_relay(0x0016);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_nx_event(0x0017);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_nx_event_translated(0x0018);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_nx_event_diagnostic(0x0019);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_homer(0x0020);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_color(0x0021);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_accessibility(0x0022);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_spotlight(0x0001);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_dashboard(0x0002);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_function(0x0003);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_launchpad(0x0004);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_reserved(0x000a);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_caps_lock_delay_enable(0x000b);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_power_state(0x000c);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_expose_all(0x0010);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_expose_desktop(0x0011);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_brightness_up(0x0020);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_brightness_down(0x0021);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_keyboard_language(0x0030);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_multitouch_power_off(0x0001);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_multitouch_device_ready(0x0002);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_multitouch_external_message(0x0003);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_multitouch_will_power_on(0x0004);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_multitouch_touch_cancel(0x0005);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_keyboard_fn(0x0003);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_brightness_up(0x0004);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_brightness_down(0x0005);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_video_mirror(0x0006);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_illumination_toggle(0x0007);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_illumination_up(0x0008);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_illumination_down(0x0009);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_clamshell_latched(0x000a);
constexpr iokit_hid_usage iokit_hid_usage_apple_vendor_top_case_reserved_mouse_data(0x00c0);
} // namespace osx
} // namespace pqrs
namespace std {
template <>
struct hash<pqrs::osx::iokit_hid_usage> : type_safe::hashable<pqrs::osx::iokit_hid_usage> {
};
} // namespace std
| 64.834783 | 123 | 0.902495 | fe7 |
ab91d189e724481634a22a03835bc6da31021bc4 | 3,513 | hpp | C++ | src/libtego/source/context.hpp | blueprint-freespeech/r2-rebound | 65efe5bcea7c1222d0eef4ce447d3bebfee37779 | [
"BSD-3-Clause"
] | 1 | 2019-06-10T11:05:15.000Z | 2019-06-10T11:05:15.000Z | src/libtego/source/context.hpp | blueprint-freespeech/r2-rebound | 65efe5bcea7c1222d0eef4ce447d3bebfee37779 | [
"BSD-3-Clause"
] | null | null | null | src/libtego/source/context.hpp | blueprint-freespeech/r2-rebound | 65efe5bcea7c1222d0eef4ce447d3bebfee37779 | [
"BSD-3-Clause"
] | null | null | null | #pragma once
#include "signals.hpp"
#include "tor.hpp"
#include "user.hpp"
#include "tor/TorControl.h"
#include "tor/TorManager.h"
#include "core/IdentityManager.h"
//
// Tego Context
//
struct tego_context
{
public:
tego_context();
void start_tor(const tego_tor_launch_config_t* config);
bool get_tor_daemon_configured() const;
size_t get_tor_logs_size() const;
const std::vector<std::string>& get_tor_logs() const;
const char* get_tor_version_string() const;
tego_tor_control_status_t get_tor_control_status() const;
tego_tor_process_status_t get_tor_process_status() const;
tego_tor_network_status_t get_tor_network_status() const;
int32_t get_tor_bootstrap_progress() const;
tego_tor_bootstrap_tag_t get_tor_bootstrap_tag() const;
void start_service(
tego_ed25519_private_key_t const* hostPrivateKey,
tego_user_id_t const* const* userBuffer,
tego_user_type_t* const userTypeBuffer,
size_t userCount);
void start_service();
void update_tor_daemon_config(const tego_tor_daemon_config_t* config);
void update_disable_network_flag(bool disableNetwork);
void save_tor_daemon_config();
void set_host_onion_service_state(tego_host_onion_service_state_t state);
std::unique_ptr<tego_user_id_t> get_host_user_id() const;
tego_host_onion_service_state_t get_host_onion_service_state() const;
void send_chat_request(
const tego_user_id_t* user,
const char* message,
size_t messageLength);
void acknowledge_chat_request(
const tego_user_id_t* user,
tego_chat_acknowledge_t response);
tego_message_id_t send_message(
const tego_user_id_t* user,
const std::string& message);
tego_user_type_t get_user_type(tego_user_id_t const* user) const;
size_t get_user_count() const;
std::vector<tego_user_id_t*> get_users() const;
void forget_user(const tego_user_id_t* user);
std::tuple<tego_file_transfer_id_t, std::unique_ptr<tego_file_hash_t>, tego_file_size_t> send_file_transfer_request(
tego_user_id_t const* user,
std::string const& filePath);
void respond_file_transfer_request(
tego_user_id_t const* user,
tego_file_transfer_id_t fileTransfer,
tego_file_transfer_response_t response,
std::string const& destPath);
void cancel_file_transfer_transfer(
tego_user_id_t const* user,
tego_file_transfer_id_t);
tego::callback_registry callback_registry_;
tego::callback_queue callback_queue_;
// anything that touches internal state should do so through
// this 'global' (actually per tego_context) mutex
std::mutex mutex_;
// TODO: figure out ownership of these Qt types
Tor::TorManager* torManager = nullptr;
Tor::TorControl* torControl = nullptr;
IdentityManager* identityManager = nullptr;
// we store the thread id that this context is associated with
// calls which go into our qt internals must be called from the same
// thread as the context was created on
// (this is not entirely true, they must be called from the thread with the Qt
// event loop, which in our case is the thread the context is created on)
std::thread::id threadId;
private:
class ContactUser* getContactUser(const tego_user_id_t*) const;
mutable std::string torVersion;
mutable std::vector<std::string> torLogs;
tego_host_onion_service_state_t hostUserState = tego_host_onion_service_state_none;
}; | 38.604396 | 120 | 0.744663 | blueprint-freespeech |
ab91e8a62201f0561c9b0a2184a1d9ce92c13ba7 | 1,136 | hpp | C++ | src/marnav/seatalk/message_11.hpp | ShadowTeolog/marnav | 094dd06a2b9e52591bc9c3879ea4b5cf34a92192 | [
"BSD-4-Clause"
] | null | null | null | src/marnav/seatalk/message_11.hpp | ShadowTeolog/marnav | 094dd06a2b9e52591bc9c3879ea4b5cf34a92192 | [
"BSD-4-Clause"
] | null | null | null | src/marnav/seatalk/message_11.hpp | ShadowTeolog/marnav | 094dd06a2b9e52591bc9c3879ea4b5cf34a92192 | [
"BSD-4-Clause"
] | null | null | null | #ifndef MARNAV__SEATALK__MESSAGE_11__HPP
#define MARNAV__SEATALK__MESSAGE_11__HPP
#include "message.hpp"
namespace marnav
{
namespace seatalk
{
/// @brief Apparent Wind Speed
///
/// @code
/// 11 01 XX 0Y
///
/// Apparent Wind Speed: (XX & 0x7F) + Y/10 Knots
/// Units flag: XX&0x80=0 => Display value in Knots
/// XX&0x80=0x80 => Display value in Meter/Second
/// @endcode
///
/// Corresponding NMEA sentence: MWV
///
class message_11 : public message
{
public:
constexpr static const message_id ID = message_id::apparent_wind_speed;
constexpr static size_t SIZE = 4;
message_11();
message_11(const message_11 &) = default;
message_11 & operator=(const message_11 &) = default;
virtual raw get_data() const override;
static std::unique_ptr<message> parse(const raw & data);
private:
uint8_t unit_; // unit of value
uint16_t speed_; // wind speed in 1/10th of unit
public:
uint8_t get_unit() const noexcept { return unit_; }
uint16_t get_speed() const noexcept { return speed_; }
void set_unit(uint8_t t) noexcept { unit_ = t; }
void set_speed(uint16_t t) noexcept { speed_ = t; }
};
}
}
#endif
| 21.846154 | 72 | 0.704225 | ShadowTeolog |
ab93373ef1a46946f305da66c9395d39ae25cc12 | 381 | cpp | C++ | persona.cpp | equirosa/simulacion-conversacion | 8fc3d3b3612175d3cb5e846e1c05f4129a53c9f5 | [
"BSD-2-Clause"
] | null | null | null | persona.cpp | equirosa/simulacion-conversacion | 8fc3d3b3612175d3cb5e846e1c05f4129a53c9f5 | [
"BSD-2-Clause"
] | null | null | null | persona.cpp | equirosa/simulacion-conversacion | 8fc3d3b3612175d3cb5e846e1c05f4129a53c9f5 | [
"BSD-2-Clause"
] | null | null | null | #include "persona.h"
#include <string>
Persona::Persona(){} //Constructor por default.
Persona::Persona(std::string nombre, std::string nacionalidad, int edad)
{
this->nombre=nombre;
this->nacionalidad=nacionalidad;
this->edad=edad;
}
Persona::saludar(Persona persona)
{
persona.devolverSaludo(nombre);
return "Hola! Soy " << this->nombre << "\n ¿y tú?";
}
| 20.052632 | 72 | 0.677165 | equirosa |
ab960e26a1af8dc50e165151594063ddfd971b02 | 12,618 | cpp | C++ | storage/walletdb.cpp | ouyun/FnFnCoreWallet | 3aa61145bc3f524d1dc10ada22e164689a73d794 | [
"MIT"
] | 1 | 2019-12-23T11:56:55.000Z | 2019-12-23T11:56:55.000Z | storage/walletdb.cpp | ouyun/FnFnCoreWallet | 3aa61145bc3f524d1dc10ada22e164689a73d794 | [
"MIT"
] | null | null | null | storage/walletdb.cpp | ouyun/FnFnCoreWallet | 3aa61145bc3f524d1dc10ada22e164689a73d794 | [
"MIT"
] | null | null | null | // Copyright (c) 2017-2019 The Multiverse developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "walletdb.h"
#include "leveldbeng.h"
#include <boost/foreach.hpp>
#include <boost/bind.hpp>
using namespace std;
using namespace walleve;
using namespace multiverse::storage;
//////////////////////////////
// CWalletAddrDB
bool CWalletAddrDB::Initialize(const boost::filesystem::path& pathWallet)
{
CLevelDBArguments args;
args.path = (pathWallet / "addr").string();
args.syncwrite = true;
args.files = 8;
args.cache = 1 << 20;
CLevelDBEngine *engine = new CLevelDBEngine(args);
if (!Open(engine))
{
delete engine;
return false;
}
return true;
}
void CWalletAddrDB::Deinitialize()
{
Close();
}
bool CWalletAddrDB::UpdateKey(const crypto::CPubKey& pubkey,int version,const crypto::CCryptoCipher& cipher)
{
vector<unsigned char> vch;
vch.resize( 4 + 48 + 8);
memcpy(&vch[0],&version,4);
memcpy(&vch[4],cipher.encrypted,48);
memcpy(&vch[52],&cipher.nonce,8);
return Write(CDestination(pubkey),vch);
}
bool CWalletAddrDB::UpdateTemplate(const CTemplateId& tid,const vector<unsigned char>& vchData)
{
return Write(CDestination(tid),vchData);
}
bool CWalletAddrDB::EraseAddress(const CDestination& dest)
{
return Erase(dest);
}
bool CWalletAddrDB::WalkThroughAddress(CWalletDBAddrWalker& walker)
{
return WalkThrough(boost::bind(&CWalletAddrDB::AddressDBWalker,this,_1,_2,boost::ref(walker)));
}
bool CWalletAddrDB::AddressDBWalker(CWalleveBufStream& ssKey,CWalleveBufStream& ssValue,CWalletDBAddrWalker& walker)
{
CDestination dest;
vector<unsigned char> vch;
ssKey >> dest;
ssValue >> vch;
if (dest.IsTemplate())
{
return walker.WalkTemplate(dest.GetTemplateId(),vch);
}
crypto::CPubKey pubkey;
if (dest.GetPubKey(pubkey) && vch.size() == 4 + 48 + 8)
{
int version;
crypto::CCryptoCipher cipher;
memcpy(&version,&vch[0],4);
memcpy(cipher.encrypted,&vch[4],48);
memcpy(&cipher.nonce,&vch[52],8);
return walker.WalkPubkey(pubkey,version,cipher);
}
return false;
}
//////////////////////////////
// CWalletTxDB
bool CWalletTxDB::Initialize(const boost::filesystem::path& pathWallet)
{
CLevelDBArguments args;
args.path = (pathWallet / "wtx").string();
CLevelDBEngine *engine = new CLevelDBEngine(args);
if (!Open(engine))
{
delete engine;
return false;
}
if (!Read(string("txcount"),nTxCount) || !Read(string("sequence"),nSequence))
{
return Reset();
}
return true;
}
void CWalletTxDB::Deinitialize()
{
Close();
}
bool CWalletTxDB::Clear()
{
RemoveAll();
return Reset();
}
bool CWalletTxDB::AddNewTx(const CWalletTx& wtx)
{
pair<uint64,CWalletTx> pairWalletTx;
if (Read(make_pair(string("wtx"),wtx.txid),pairWalletTx))
{
pairWalletTx.second = wtx;
return Write(make_pair(string("wtx"),wtx.txid),pairWalletTx);
}
pairWalletTx.first = nSequence++;
pairWalletTx.second = wtx;
if (!TxnBegin())
{
return false;
}
if (!Write(make_pair(string("wtx"),wtx.txid),pairWalletTx)
|| !Write(make_pair(string("seq"),pairWalletTx.first),CWalletTxSeq(wtx))
|| !Write(string("txcount"),nTxCount + 1)
|| !Write(string("sequence"),nSequence))
{
TxnAbort();
return false;
}
if (!TxnCommit())
{
return false;
}
++nTxCount;
return true;
}
bool CWalletTxDB::UpdateTx(const vector<CWalletTx>& vWalletTx,const vector<uint256>& vRemove)
{
int nTxAddNew = 0;
vector<pair<uint64,CWalletTx> > vTxUpdate;
vTxUpdate.reserve(vWalletTx.size());
BOOST_FOREACH(const CWalletTx& wtx,vWalletTx)
{
pair<uint64,CWalletTx> pairWalletTx;
if (Read(make_pair(string("wtx"),wtx.txid),pairWalletTx))
{
vTxUpdate.push_back(make_pair(pairWalletTx.first,wtx));
}
else
{
vTxUpdate.push_back(make_pair(nSequence++,wtx));
++nTxAddNew;
}
}
vector<pair<uint64,uint256> > vTxRemove;
vTxRemove.reserve(vRemove.size());
BOOST_FOREACH(const uint256& txid,vRemove)
{
pair<uint64,CWalletTx> pairWalletTx;
if (Read(make_pair(string("wtx"),txid),pairWalletTx))
{
vTxRemove.push_back(make_pair(pairWalletTx.first,txid));
}
}
if (!TxnBegin())
{
return false;
}
for (int i = 0;i < vTxUpdate.size();i++)
{
pair<uint64,CWalletTx>& pairWalletTx = vTxUpdate[i];
if (!Write(make_pair(string("wtx"),pairWalletTx.second.txid),pairWalletTx)
|| !Write(make_pair(string("seq"),pairWalletTx.first),CWalletTxSeq(pairWalletTx.second)))
{
TxnAbort();
return false;
}
}
for (int i = 0;i < vTxRemove.size();i++)
{
if (!Erase(make_pair(string("wtx"),vTxRemove[i].second))
|| !Erase(make_pair(string("seq"),vTxRemove[i].first)))
{
TxnAbort();
return false;
}
}
if (!Write(string("txcount"),nTxCount + nTxAddNew - vTxRemove.size())
|| !Write(string("sequence"),nSequence))
{
TxnAbort();
return false;
}
if (!TxnCommit())
{
return false;
}
nTxCount += nTxAddNew - vTxRemove.size();
return true;
}
bool CWalletTxDB::RetrieveTx(const uint256& txid,CWalletTx& wtx)
{
pair<uint64,CWalletTx> pairWalletTx;
if (!Read(make_pair(string("wtx"),txid),pairWalletTx))
{
return false;
}
wtx = pairWalletTx.second;
return true;
}
bool CWalletTxDB::ExistsTx(const uint256& txid)
{
pair<uint64,CWalletTx> pairWalletTx;
return Read(make_pair(string("wtx"),txid),pairWalletTx);
}
size_t CWalletTxDB::GetTxCount()
{
return nTxCount;
}
bool CWalletTxDB::WalkThroughTxSeq(CWalletDBTxSeqWalker& walker)
{
return WalkThrough(boost::bind(&CWalletTxDB::TxSeqWalker,this,_1,_2,boost::ref(walker)),
make_pair(string("seq"),uint64(0)));
}
bool CWalletTxDB::WalkThroughTx(CWalletDBTxWalker& walker)
{
return WalkThrough(boost::bind(&CWalletTxDB::TxWalker,this,_1,_2,boost::ref(walker)),
make_pair(string("seq"),uint64(0)));
}
bool CWalletTxDB::TxSeqWalker(CWalleveBufStream& ssKey,CWalleveBufStream& ssValue,CWalletDBTxSeqWalker& walker)
{
string strPrefix;
uint64 nSeqNum;
CWalletTxSeq txSeq;
ssKey >> strPrefix;
if (strPrefix != "seq")
{
return false;
}
ssKey >> nSeqNum;
ssValue >> txSeq;
return walker.Walk(txSeq.txid,txSeq.hashFork,txSeq.nBlockHeight);
}
bool CWalletTxDB::TxWalker(CWalleveBufStream& ssKey,CWalleveBufStream& ssValue,CWalletDBTxWalker& walker)
{
string strPrefix;
uint64 nSeqNum;
CWalletTxSeq txSeq;
ssKey >> strPrefix;
if (strPrefix != "seq")
{
return false;
}
ssKey >> nSeqNum;
ssValue >> txSeq;
CWalletTx wtx;
if (!RetrieveTx(txSeq.txid,wtx))
{
return false;
}
return walker.Walk(wtx);
}
bool CWalletTxDB::Reset()
{
nSequence = 0;
nTxCount = 0;
if (!TxnBegin())
{
return false;
}
if (!Write(string("txcount"),size_t(0)))
{
TxnAbort();
return false;
}
if (!Write(string("sequence"),nSequence))
{
TxnAbort();
return false;
}
return TxnCommit();
}
//////////////////////////////
// CWalletDBListTxSeqWalker
class CWalletDBListTxSeqWalker : public CWalletDBTxSeqWalker
{
public:
CWalletDBListTxSeqWalker(int nOffsetIn,int nMaxCountIn)
: nOffset(nOffsetIn), nMaxCount(nMaxCountIn), nIndex(0)
{
}
bool Walk(const uint256& txid,const uint256& hashFork,const int nBlockHeight)
{
if (nIndex++ < nOffset)
{
return true;
}
vWalletTxid.push_back(txid);
return (vWalletTxid.size() < nMaxCount);
}
public:
int nOffset;
int nMaxCount;
int nIndex;
vector<uint256> vWalletTxid;
};
//////////////////////////////
// CWalletDBRollBackTxSeqWalker
class CWalletDBRollBackTxSeqWalker : public CWalletDBTxSeqWalker
{
public:
CWalletDBRollBackTxSeqWalker(const uint256& hashForkIn,int nMinHeightIn,vector<uint256>& vForkTxIn)
: hashFork(hashForkIn), nMinHeight(nMinHeightIn), vForkTx(vForkTxIn)
{
}
bool Walk(const uint256& txidIn,const uint256& hashForkIn,const int nBlockHeightIn)
{
if (hashForkIn == hashFork && (nBlockHeightIn < 0 || nBlockHeightIn >= nMinHeight))
{
vForkTx.push_back(txidIn);
}
return true;
}
public:
uint256 hashFork;
int nMinHeight;
vector<uint256>& vForkTx;
};
//////////////////////////////
// CWalletDB
CWalletDB::CWalletDB()
{
}
CWalletDB::~CWalletDB()
{
Deinitialize();
}
bool CWalletDB::Initialize(const boost::filesystem::path& pathWallet)
{
if (!boost::filesystem::exists(pathWallet))
{
boost::filesystem::create_directories(pathWallet);
}
if (!boost::filesystem::is_directory(pathWallet))
{
return false;
}
if (!dbAddr.Initialize(pathWallet))
{
return false;
}
if (!dbWtx.Initialize(pathWallet))
{
return false;
}
return true;
}
void CWalletDB::Deinitialize()
{
vector<CWalletTx> vWalletTx;
txCache.ListTx(0,-1,vWalletTx);
if (!vWalletTx.empty())
{
UpdateTx(vWalletTx);
}
txCache.Clear();
dbWtx.Deinitialize();
dbAddr.Deinitialize();
}
bool CWalletDB::UpdateKey(const crypto::CPubKey& pubkey,int version,const crypto::CCryptoCipher& cipher)
{
return dbAddr.UpdateKey(pubkey,version,cipher);
}
bool CWalletDB::UpdateTemplate(const CTemplateId& tid,const vector<unsigned char>& vchData)
{
return dbAddr.UpdateTemplate(tid,vchData);
}
bool CWalletDB::WalkThroughAddress(CWalletDBAddrWalker& walker)
{
return dbAddr.WalkThroughAddress(walker);
}
bool CWalletDB::AddNewTx(const CWalletTx& wtx)
{
if (wtx.nBlockHeight < 0)
{
txCache.AddNew(wtx);
return true;
}
return dbWtx.AddNewTx(wtx);
}
bool CWalletDB::UpdateTx(const vector<CWalletTx>& vWalletTx,const vector<uint256>& vRemove)
{
if (!dbWtx.UpdateTx(vWalletTx,vRemove))
{
return false;
}
BOOST_FOREACH(const CWalletTx& wtx,vWalletTx)
{
txCache.Remove(wtx.txid);
}
BOOST_FOREACH(const uint256& txid,vRemove)
{
txCache.Remove(txid);
}
return true;
}
bool CWalletDB::RetrieveTx(const uint256& txid,CWalletTx& wtx)
{
if (txCache.Get(txid,wtx))
{
return true;
}
return dbWtx.RetrieveTx(txid,wtx);
}
bool CWalletDB::ExistsTx(const uint256& txid)
{
if (txCache.Exists(txid))
{
return true;
}
return dbWtx.ExistsTx(txid);
}
size_t CWalletDB::GetTxCount()
{
return dbWtx.GetTxCount() + txCache.Count();
}
bool CWalletDB::ListTx(int nOffset,int nCount,vector<CWalletTx>& vWalletTx)
{
size_t nDBTx = dbWtx.GetTxCount();
if (nOffset < nDBTx)
{
if (!ListDBTx(nOffset, nCount, vWalletTx))
{
return false;
}
if (vWalletTx.size() < nCount)
{
txCache.ListTx(0, nCount - vWalletTx.size(), vWalletTx);
}
}
else
{
txCache.ListTx(nOffset - nDBTx, nCount, vWalletTx);
}
return true;
}
bool CWalletDB::ListDBTx(int nOffset,int nCount,vector<CWalletTx>& vWalletTx)
{
CWalletDBListTxSeqWalker walker(nOffset,nCount);
if (!dbWtx.WalkThroughTxSeq(walker))
{
return false;
}
BOOST_FOREACH(const uint256& txid,walker.vWalletTxid)
{
CWalletTx wtx;
if (!dbWtx.RetrieveTx(txid,wtx))
{
return false;
}
vWalletTx.push_back(wtx);
}
return true;
}
bool CWalletDB::ListRollBackTx(const uint256& hashFork,int nMinHeight,vector<uint256>& vForkTx)
{
CWalletDBRollBackTxSeqWalker walker(hashFork,nMinHeight,vForkTx);
if (!dbWtx.WalkThroughTxSeq(walker))
{
return false;
}
txCache.ListForkTx(hashFork,vForkTx);
return true;
}
bool CWalletDB::WalkThroughTx(CWalletDBTxWalker& walker)
{
return dbWtx.WalkThroughTx(walker);
}
bool CWalletDB::ClearTx()
{
txCache.Clear();
return dbWtx.Clear();
}
| 21.868284 | 116 | 0.624029 | ouyun |
ab967c96d59adb365b9e31659a8c6d6a18a571fb | 270 | hpp | C++ | src/widgets/settingspages/CommandPage.hpp | agenttud/chatterino7 | b40763c5f847c017106115f92b864b40b3a20501 | [
"MIT"
] | 1,145 | 2019-05-18T22:51:52.000Z | 2022-03-31T22:12:39.000Z | src/widgets/settingspages/CommandPage.hpp | agenttud/chatterino7 | b40763c5f847c017106115f92b864b40b3a20501 | [
"MIT"
] | 2,034 | 2019-05-18T22:28:54.000Z | 2022-03-31T22:24:21.000Z | src/widgets/settingspages/CommandPage.hpp | agenttud/chatterino7 | b40763c5f847c017106115f92b864b40b3a20501 | [
"MIT"
] | 397 | 2019-05-18T22:45:51.000Z | 2022-03-31T22:12:39.000Z | #pragma once
#include <QTextEdit>
#include <QTimer>
#include "widgets/settingspages/SettingsPage.hpp"
namespace chatterino {
class CommandPage : public SettingsPage
{
public:
CommandPage();
private:
QTimer commandsEditTimer_;
};
} // namespace chatterino
| 13.5 | 49 | 0.744444 | agenttud |
ab96996c768e015fb5aa467b3007b691dde42bbd | 2,565 | hpp | C++ | include/Move_strategy.hpp | mjcaisse/CDT-plusplus | fa11dd19c806a96afbb48e406234e82cae62029a | [
"BSD-3-Clause"
] | null | null | null | include/Move_strategy.hpp | mjcaisse/CDT-plusplus | fa11dd19c806a96afbb48e406234e82cae62029a | [
"BSD-3-Clause"
] | null | null | null | include/Move_strategy.hpp | mjcaisse/CDT-plusplus | fa11dd19c806a96afbb48e406234e82cae62029a | [
"BSD-3-Clause"
] | null | null | null | /// Causal Dynamical Triangulations in C++ using CGAL
///
/// Copyright © 2017-2020 Adam Getchell
///
/// Template class for all move algorithms, e.g. Metropolis, MoveAlways
///
/// @file Move_strategy.hpp
/// @brief Base class for move algorithms on Delaunay Triangulations
/// @author Adam Getchell
#ifndef INCLUDE_MOVE_ALGORITHM_HPP_
#define INCLUDE_MOVE_ALGORITHM_HPP_
#include "Move_command.hpp"
#include <memory>
static Int_precision constexpr NUMBER_OF_3D_MOVES = 5;
static Int_precision constexpr NUMBER_OF_4D_MOVES = 7;
/// @brief Determine ergodic moves for a given dimension at compile-time
/// @param dim Dimensionality of the triangulation
/// @return The number of ergodic moves for that dimensionality
constexpr auto moves_per_dimension(Int_precision dim) -> std::size_t
{
if (dim == 3) { return NUMBER_OF_3D_MOVES; }
if (dim == 4) { return NUMBER_OF_4D_MOVES; }
return 0; // Error condition
}
/// @brief The data and methods to track ergodic moves
/// @tparam dimension The dimensionality of the ergodic moves
template <size_t dimension>
class Move_tracker
{
std::array<Int_precision, moves_per_dimension(dimension)> moves = {0};
public:
auto operator[](std::size_t index)
{
Ensures(moves.size() == 5 || moves.size() == 7);
return moves[index];
}
// 3D Ergodic moves
template <std::size_t dim, std::enable_if_t<dim == 3, int> = 0>
auto two_three_moves()
{
return moves[0];
}
template <std::size_t dim, std::enable_if_t<dim == 3, int> = 0>
auto three_two_moves()
{
return moves[1];
}
template <std::size_t dim, std::enable_if_t<dim == 3, int> = 0>
auto two_six_moves()
{
return moves[2];
}
template <std::size_t dim, std::enable_if_t<dim == 3, int> = 0>
auto six_two_moves()
{
return moves[3];
}
template <std::size_t dim, std::enable_if_t<dim == 3, int> = 0>
auto four_four_moves()
{
return moves[4];
}
// 4D Ergodic moves
template <std::size_t dim, std::enable_if_t<dim == 4, int> = 0>
auto two_four_moves()
{
return moves[0];
}
};
using Move_tracker_3 = Move_tracker<3>;
using Move_tracker_4 = Move_tracker<4>;
/// @brief The algorithms available to make ergodic moves
enum Strategies
{
MOVE_ALWAYS,
METROPOLIS
};
/// @brief Select an algorithm to make ergodic moves upon triangulations
/// @tparam strategies The algorithm that chooses ergodic moves
/// @tparam dimension The dimensionality of the triangulation
template <Strategies strategies, size_t dimension>
class MoveStrategy
{
};
#endif // INCLUDE_MOVE_ALGORITHM_HPP_
| 25.147059 | 72 | 0.707212 | mjcaisse |
ab9d0df4b91d7eed887be585aa4dde53d50eb971 | 2,133 | hpp | C++ | GLFramework/stdafx.hpp | Illation/GLFramework | 2b9d3d67d4e951e2ff5ace0241750a438d6e743f | [
"MIT"
] | 39 | 2016-03-23T00:39:46.000Z | 2022-02-07T21:26:05.000Z | GLFramework/stdafx.hpp | Illation/GLFramework | 2b9d3d67d4e951e2ff5ace0241750a438d6e743f | [
"MIT"
] | 1 | 2016-03-24T14:39:45.000Z | 2016-03-24T17:34:39.000Z | GLFramework/stdafx.hpp | Illation/GLFramework | 2b9d3d67d4e951e2ff5ace0241750a438d6e743f | [
"MIT"
] | 3 | 2016-08-15T01:27:13.000Z | 2021-12-29T01:37:51.000Z | #pragma once
#pragma region
//C RunTime Header Files
#include <wchar.h>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <memory>
using namespace std;
#pragma endregion stl
#pragma region
//SDL and opengl Header files
#include "staticDependancies/glad/glad.h"
#include <SDL.h>
#include <SDL_opengl.h>
#pragma endregion sdl-opengl
#pragma region
#ifndef GLM_FORCE_LEFT_HANDED
#define GLM_FORCE_LEFT_HANDED
#endif
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
using namespace glm;
#pragma endregion glm
#pragma region
//*****************************************************************************
//Declare templates for releasing interfaces and deleting objects
//*****************************************************************************
template<class Interface>
inline void SafeRelease(Interface &pInterfaceToRelease)
{
if (pInterfaceToRelease != 0)
{
pInterfaceToRelease->Release();
pInterfaceToRelease = 0;
}
}
template<class T>
inline void SafeDelete(T &pObjectToDelete)
{
if (pObjectToDelete != 0)
{
delete(pObjectToDelete);
pObjectToDelete = 0;
}
}
template<typename T>
inline void Clamp(T& value, T hi, T lo)
{
if (value > hi)
value = hi;
if (value < lo)
value = lo;
}
#pragma endregion Templates
#pragma region
#include "Components/TransformComponent.hpp"
#include "Content/ContentManager.hpp"
#include "Base\Context.hpp"
#include "Base\Settings.hpp"
#include "Base\InputManager.hpp"
#include "Helper/Logger.hpp"
#include "Helper/MathHelper.hpp"
#include "Helper/PerformanceInfo.hpp"
//Working singleton Set
#define TIME Context::GetInstance()->pTime
#define CAMERA Context::GetInstance()->pCamera
#define SCENE Context::GetInstance()->pScene
#define SETTINGS Settings::GetInstance()
#define INPUT InputManager::GetInstance()
#define LOGGER Logger
#define CONTENT ContentManager
#define TRANSFORM GetTransform()
#define WINDOW Settings::GetInstance()->Window
#define GRAPHICS Settings::GetInstance()->Graphics
#define PERFORMANCE PerformanceInfo::GetInstance()
#pragma endregion Macros | 23.7 | 79 | 0.711205 | Illation |
ab9e78b628e2acadb080ef547e1f368d591a8f03 | 2,700 | cpp | C++ | src/ohm.cpp | rohanl/ESP8266_WiFi_v2.x | 6ce604a64effa9c6a56ff078529f616de8f82835 | [
"Unlicense"
] | 72 | 2017-03-08T22:31:33.000Z | 2022-01-28T05:41:39.000Z | src/ohm.cpp | rohanl/ESP8266_WiFi_v2.x | 6ce604a64effa9c6a56ff078529f616de8f82835 | [
"Unlicense"
] | 228 | 2017-03-05T13:21:16.000Z | 2021-10-09T23:06:26.000Z | src/ohm.cpp | rohanl/ESP8266_WiFi_v2.x | 6ce604a64effa9c6a56ff078529f616de8f82835 | [
"Unlicense"
] | 53 | 2017-03-06T10:59:13.000Z | 2022-02-06T23:08:25.000Z | #include "emonesp.h"
#include "input.h"
#include "wifi.h"
#include "app_config.h"
#include "RapiSender.h"
#include <WiFiClientSecure.h>
#include <ESP8266HTTPClient.h>
#include <Arduino.h>
#define ACTIVE_TAG_START "<active>"
#define ACTIVE_TAG_END "</active>"
//Server strings for Ohm Connect
const char *ohm_host = "login.ohmconnect.com";
const char *ohm_url = "/verify-ohm-hour/";
const int ohm_httpsPort = 443;
const char *ohm_fingerprint =
"0C 53 16 B1 DE 52 CD 3E 57 C5 6C A9 45 A2 DD 0A 04 1A AD C6";
String ohm_hour = "NotConnected";
int evse_sleep = 0;
extern RapiSender rapiSender;
// -------------------------------------------------------------------
// Ohm Connect "Ohm Hour"
//
// Call every once every 60 seconds if connected to the WiFi and
// Ohm Key is set
// -------------------------------------------------------------------
void ohm_loop()
{
Profile_Start(ohm_loop);
if (ohm != 0)
{
WiFiClientSecure client;
if (!client.connect(ohm_host, ohm_httpsPort)) {
DBUGLN(F("ERROR Ohm Connect - connection failed"));
return;
}
if (client.verify(ohm_fingerprint, ohm_host))
{
client.print(String("GET ") + ohm_url + ohm + " HTTP/1.1\r\n" +
"Host: " + ohm_host + "\r\n" +
"User-Agent: OpenEVSE\r\n" + "Connection: close\r\n\r\n");
String line = client.readString();
DBUGVAR(line);
int active_start = line.indexOf(ACTIVE_TAG_START);
int active_end = line.indexOf(ACTIVE_TAG_END);
if(active_start > 0 && active_end > 0)
{
active_start += sizeof(ACTIVE_TAG_START) - 1;
String new_ohm_hour = line.substring(active_start, active_end);
DBUGVAR(new_ohm_hour);
if(new_ohm_hour != ohm_hour)
{
ohm_hour = new_ohm_hour;
if(ohm_hour == "True")
{
DBUGLN(F("Ohm Hour"));
if (evse_sleep == 0)
{
evse_sleep = 1;
rapiSender.sendCmd(F("$FS"), [](int ret)
{
if(RAPI_RESPONSE_OK == ret) {
DBUGLN(F("Charge Stopped"));
}
});
}
}
else
{
DBUGLN(F("It is not an Ohm Hour"));
if (evse_sleep == 1)
{
evse_sleep = 0;
rapiSender.sendCmd(F("$FE"), [](int ret)
{
if(RAPI_RESPONSE_OK == ret) {
DBUGLN(F("Charging enabled"));
}
});
}
}
}
}
} else {
DBUGLN(F("ERROR Ohm Connect - Certificate Invalid"));
}
}
Profile_End(ohm_loop, 5);
}
| 26.213592 | 77 | 0.510741 | rohanl |
aba579bd8df72707a495c46c1914a111dc0a4013 | 2,480 | cpp | C++ | dbms/src/Core/FieldVisitors.cpp | rudneff/ClickHouse | 3cb59b92bccbeb888d136f7c6e14b622382c0434 | [
"Apache-2.0"
] | 3 | 2016-12-30T14:19:47.000Z | 2021-11-13T06:58:32.000Z | dbms/src/Core/FieldVisitors.cpp | rudneff/ClickHouse | 3cb59b92bccbeb888d136f7c6e14b622382c0434 | [
"Apache-2.0"
] | null | null | null | dbms/src/Core/FieldVisitors.cpp | rudneff/ClickHouse | 3cb59b92bccbeb888d136f7c6e14b622382c0434 | [
"Apache-2.0"
] | 1 | 2021-02-07T16:00:54.000Z | 2021-02-07T16:00:54.000Z | #include <DB/Core/FieldVisitors.h>
namespace DB
{
String FieldVisitorDump::operator() (const String & x) const
{
String res;
WriteBufferFromString wb(res);
writeQuoted(x, wb);
return res;
}
String FieldVisitorDump::operator() (const Array & x) const
{
String res;
WriteBufferFromString wb(res);
FieldVisitorDump visitor;
wb.write("Array_[", 7);
for (Array::const_iterator it = x.begin(); it != x.end(); ++it)
{
if (it != x.begin())
wb.write(", ", 2);
writeString(apply_visitor(visitor, *it), wb);
}
writeChar(']', wb);
return res;
}
String FieldVisitorDump::operator() (const Tuple & x_def) const
{
auto & x = x_def.t;
String res;
WriteBufferFromString wb(res);
FieldVisitorDump visitor;
wb.write("Tuple_[", 7);
for (auto it = x.begin(); it != x.end(); ++it)
{
if (it != x.begin())
wb.write(", ", 2);
writeString(apply_visitor(visitor, *it), wb);
}
writeChar(']', wb);
return res;
}
String FieldVisitorToString::formatFloat(const Float64 x)
{
DoubleConverter<true>::BufferType buffer;
double_conversion::StringBuilder builder{buffer, sizeof(buffer)};
const auto result = DoubleConverter<true>::instance().ToShortest(x, &builder);
if (!result)
throw Exception("Cannot print float or double number", ErrorCodes::CANNOT_PRINT_FLOAT_OR_DOUBLE_NUMBER);
return { buffer, buffer + builder.position() };
}
String FieldVisitorToString::operator() (const Array & x) const
{
String res;
WriteBufferFromString wb(res);
FieldVisitorToString visitor;
writeChar('[', wb);
for (Array::const_iterator it = x.begin(); it != x.end(); ++it)
{
if (it != x.begin())
wb.write(", ", 2);
writeString(apply_visitor(visitor, *it), wb);
}
writeChar(']', wb);
return res;
}
String FieldVisitorToString::operator() (const Tuple & x_def) const
{
auto & x = x_def.t;
String res;
WriteBufferFromString wb(res);
FieldVisitorToString visitor;
writeChar('(', wb);
for (auto it = x.begin(); it != x.end(); ++it)
{
if (it != x.begin())
wb.write(", ", 2);
writeString(apply_visitor(visitor, *it), wb);
}
writeChar(')', wb);
return res;
}
UInt64 stringToDateOrDateTime(const String & s)
{
ReadBufferFromString in(s);
if (s.size() == strlen("YYYY-MM-DD"))
{
DayNum_t date{};
readDateText(date, in);
return UInt64(date);
}
else
{
time_t date_time{};
readDateTimeText(date_time, in);
if (!in.eof())
throw Exception("String is too long for DateTime: " + s);
return UInt64(date_time);
}
}
}
| 19.527559 | 106 | 0.662903 | rudneff |
aba597a776c11ed7cc96e272a450ffeaa32db935 | 1,113 | cpp | C++ | src/common/file_utils.cpp | subject721/flow-orchestrator | cadc646db5eece510c1dc1edf7bacf5060a7915c | [
"BSD-3-Clause"
] | 3 | 2021-10-05T08:13:56.000Z | 2022-02-07T22:41:03.000Z | src/common/file_utils.cpp | subject721/flow-orchestrator | cadc646db5eece510c1dc1edf7bacf5060a7915c | [
"BSD-3-Clause"
] | null | null | null | src/common/file_utils.cpp | subject721/flow-orchestrator | cadc646db5eece510c1dc1edf7bacf5060a7915c | [
"BSD-3-Clause"
] | 1 | 2022-02-07T22:41:05.000Z | 2022-02-07T22:41:05.000Z | /*
* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2021, Stefan Seitz
*
*/
#include <common/file_utils.hpp>
#include <fstream>
std::string load_file_as_string(const std::filesystem::path& file_path) {
if ( exists(file_path) ) {
std::ifstream file_stream(file_path.c_str());
if ( !file_stream.is_open() ) {
throw std::runtime_error("could not open file for reading");
}
size_t file_size;
file_stream.seekg(0, std::ios::end);
file_size = file_stream.tellg();
file_stream.seekg(0);
std::string out;
out.resize(file_size);
file_stream.read(&out.front(), file_size);
return out;
} else {
throw std::runtime_error("file does not exist");
}
}
struct filesystem_watcher::private_data
{
};
filesystem_watcher::filesystem_watcher() {
}
filesystem_watcher::~filesystem_watcher() {
}
fdescriptor::fdtype filesystem_watcher::get_fd() const {
return fdescriptor::INVALID_FD;
}
bool filesystem_watcher::wait(uint32_t fd_op_flags, uint32_t timeout_ms) {
return false;
}
| 19.526316 | 74 | 0.651393 | subject721 |
abb2e1af112da0d2e340cf43e24338c277ab56b5 | 4,006 | cpp | C++ | src/pair_wise_intersect.cpp | fanhualta/dint | d5b4b9ef1998119b2f06b9143153f7e82f12cb56 | [
"Apache-2.0"
] | 16 | 2019-01-27T20:41:07.000Z | 2021-05-03T05:21:50.000Z | src/pair_wise_intersect.cpp | fanhualta/dint | d5b4b9ef1998119b2f06b9143153f7e82f12cb56 | [
"Apache-2.0"
] | 3 | 2020-06-25T03:28:28.000Z | 2021-04-26T07:15:24.000Z | src/pair_wise_intersect.cpp | fanhualta/dint | d5b4b9ef1998119b2f06b9143153f7e82f12cb56 | [
"Apache-2.0"
] | 6 | 2019-08-20T02:34:16.000Z | 2022-02-22T00:01:11.000Z | #include <iostream>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <succinct/mapper.hpp>
#include "index_types.hpp"
#include "util.hpp"
typedef uint32_t term_id_type;
typedef std::vector<term_id_type> term_id_vec;
bool read_query(term_id_vec& ret, std::istream& is = std::cin) {
ret.clear();
std::string line;
if (!std::getline(is, line))
return false;
std::istringstream iline(line);
term_id_type term_id;
while (iline >> term_id) {
ret.push_back(term_id);
}
return true;
}
template <typename Enum>
static uint64_t intersect(uint64_t num_docs, std::vector<Enum>& enums,
std::vector<uint32_t>& out) {
// increasing frequency
if (enums[0].size() > enums[1].size()) {
std::swap(enums[0], enums[1]);
}
uint64_t results = 0;
uint64_t candidate = enums[0].docid();
size_t i = 1;
while (candidate < num_docs) {
for (; i < 2; ++i) {
enums[i].next_geq(candidate);
if (enums[i].docid() != candidate) {
candidate = enums[i].docid();
i = 0;
break;
}
}
if (i == 2) {
out[results] = candidate;
++results;
enums[0].next();
candidate = enums[0].docid();
i = 1;
}
}
return results;
}
template <typename Index>
void perftest(const char* index_filename) {
using namespace ds2i;
Index index;
logger() << "Loading index from " << index_filename << std::endl;
boost::iostreams::mapped_file_source m(index_filename);
succinct::mapper::map(index, m);
std::vector<term_id_vec> queries;
term_id_vec q;
while (read_query(q)) {
assert(q.size() == 2);
queries.push_back(q);
}
uint32_t num_queries = queries.size();
logger() << "Executing " << num_queries << " pair-wise intersections..."
<< std::endl;
uint64_t num_docs = index.num_docs();
std::vector<uint32_t> out(num_docs);
double total_usecs = 0.0;
// first run if for warming up
static const int runs = 10 + 1;
size_t total = 0;
typedef typename Index::document_enumerator enum_type;
std::vector<enum_type> qq;
qq.reserve(2);
for (int run = 0; run != runs; ++run) {
double start = get_time_usecs();
for (uint32_t i = 0; i != num_queries; ++i) {
qq.clear();
for (auto term : queries[i]) {
qq.push_back(index[term]);
}
uint64_t size = intersect(num_docs, qq, out);
total += size;
}
double end = get_time_usecs();
double elapsed = end - start;
if (run) {
total_usecs += elapsed;
}
}
// for debug
std::cout << total << std::endl;
printf(
"\t %d intersections took %lf [musecs] (avg. among %d "
"runs)\n",
num_queries, total_usecs / (runs - 1), runs - 1);
printf(
"\t %lf [musecs] per intersection (avg. among %d "
"queries)\n",
total_usecs / (runs - 1) / num_queries, num_queries);
}
int main(int argc, const char** argv) {
using namespace ds2i;
int mandatory = 3;
if (argc < mandatory) {
std::cerr << argv[0] << " <index_type> <index_filename> < query_log"
<< std::endl;
return 1;
}
std::string index_type = argv[1];
const char* index_filename = argv[2];
if (false) {
#define LOOP_BODY(R, DATA, T) \
} \
else if (index_type == BOOST_PP_STRINGIZE(T)) { \
perftest<BOOST_PP_CAT(T, _index)>(index_filename); \
/**/
BOOST_PP_SEQ_FOR_EACH(LOOP_BODY, _, DS2I_INDEX_TYPES);
#undef LOOP_BODY
} else {
logger() << "ERROR: Unknown index type " << index_type << std::endl;
}
return 0;
}
| 26.706667 | 76 | 0.545432 | fanhualta |
abb4af9ca0f37e64e893acb3d381b4a8ece93033 | 887 | hpp | C++ | libs/core/include/fcppt/math/clamp.hpp | freundlich/fcppt | 17df1b1ad08bf2435f6902d5465e3bc3fe5e3022 | [
"BSL-1.0"
] | 13 | 2015-02-21T18:35:14.000Z | 2019-12-29T14:08:29.000Z | libs/core/include/fcppt/math/clamp.hpp | cpreh/fcppt | 17df1b1ad08bf2435f6902d5465e3bc3fe5e3022 | [
"BSL-1.0"
] | 5 | 2016-08-27T07:35:47.000Z | 2019-04-21T10:55:34.000Z | libs/core/include/fcppt/math/clamp.hpp | freundlich/fcppt | 17df1b1ad08bf2435f6902d5465e3bc3fe5e3022 | [
"BSL-1.0"
] | 8 | 2015-01-10T09:22:37.000Z | 2019-12-01T08:31:12.000Z | // Copyright Carl Philipp Reh 2009 - 2017.
// Copyright Philipp Middendorf 2009 - 2017.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef FCPPT_MATH_CLAMP_HPP_INCLUDED
#define FCPPT_MATH_CLAMP_HPP_INCLUDED
#include <fcppt/optional/make_if.hpp>
#include <fcppt/optional/object_impl.hpp>
#include <fcppt/config/external_begin.hpp>
#include <algorithm>
#include <fcppt/config/external_end.hpp>
namespace fcppt::math
{
/**
\brief Clamps a value into a range.
\ingroup fcpptmath
*/
template <typename T>
fcppt::optional::object<T> clamp(T const &_value, T const &_vmin, T const &_vmax)
{
return fcppt::optional::make_if(
_vmin <= _vmax,
[&_value, &_vmin, &_vmax] { return std::max(std::min(_value, _vmax), _vmin); });
}
}
#endif
| 26.878788 | 86 | 0.709132 | freundlich |
abb665fee6e513631c6c6b5cd487fd41b08d95a2 | 1,343 | cpp | C++ | building_teams.cpp | ShinAKS/cses_solutions | e4ebcf80c010785f1b73df7aa8052da07ad549e0 | [
"MIT"
] | null | null | null | building_teams.cpp | ShinAKS/cses_solutions | e4ebcf80c010785f1b73df7aa8052da07ad549e0 | [
"MIT"
] | null | null | null | building_teams.cpp | ShinAKS/cses_solutions | e4ebcf80c010785f1b73df7aa8052da07ad549e0 | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
#define ll long long
#define int long long
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int,int>
#define mii map<pii,int>
#define all(a) (a).begin(),(a).end()
#define ff first
#define ss second
#define sz(x) (int)x.size()
#define endl '\n'
#define hell 1000000007
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std;
bool dfs(int s,vector<vi>&adj,vector<bool>&vis,vi &color,int par){
if (par == -1)color[s] = 0;
else color[s] = 1 - color[par];
vis[s] = true;
rep(i,0,sz(adj[s])){
if (adj[s][i] == par)continue;
if (vis[adj[s][i]]){
if (color[adj[s][i]] == color[s])return false;
else continue;
}
else{
if (!dfs(adj[s][i],adj,vis,color,s))return false;
}
}
//write here
return true;
}
int32_t main(){
cin.tie(NULL);
ios::sync_with_stdio(false);
//insert code
int n,m;
cin>>n>>m;
vector<vector<int>>adj(n);
vector<bool>vis(n,false);
vector<int>color(n,-1);
int u,v;
rep(i,0,m){
cin>>u>>v;
u--;v--;
adj[u].pb(v);
adj[v].pb(u);
}
rep(i,0,n){
if (!vis[i]){
if (!dfs(i,adj,vis,color,-1)){
cout<<"IMPOSSIBLE"<<endl;
return 0;
}
}
}
rep(i,0,n)cout<<color[i]+1<<" ";
return 0;
} | 21.31746 | 66 | 0.553239 | ShinAKS |
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 |
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 |
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 |
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 |
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 <[email protected]>
*
* 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 |
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 |
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 |
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 = "[email protected]";
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 = "[email protected]";
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
74d77cd5445f3d1ecc810e8ecd96103fbe94940e | 5,872 | cpp | C++ | ChainIDE/contractwidget/ContractWidget.cpp | AnyChainIDE/AnyChainIDE | b4f2775a968b5aaa1114f58590f736f356fcf3b3 | [
"MIT"
] | null | null | null | ChainIDE/contractwidget/ContractWidget.cpp | AnyChainIDE/AnyChainIDE | b4f2775a968b5aaa1114f58590f736f356fcf3b3 | [
"MIT"
] | null | null | null | ChainIDE/contractwidget/ContractWidget.cpp | AnyChainIDE/AnyChainIDE | b4f2775a968b5aaa1114f58590f736f356fcf3b3 | [
"MIT"
] | null | null | null | #include "ContractWidget.h"
#include "ui_ContractWidget.h"
#include <QCoreApplication>
#include <QGuiApplication>
#include <QClipboard>
#include <QDir>
#include <QMenu>
#include "ChainIDE.h"
#include "datamanager/DataManagerHX.h"
#include "datamanager/DataManagerUB.h"
#include "datamanager/DataManagerCTC.h"
#include "ConvenientOp.h"
class ContractWidget::DataPrivate
{
public:
DataPrivate()
:contextMenu(new QMenu())
{
}
public:
QMenu *contextMenu;//右键菜单
};
Q_DECLARE_METATYPE(DataManagerStruct::ContractInfoPtr)
Q_DECLARE_METATYPE(DataManagerStruct::AddressContractPtr)
ContractWidget::ContractWidget(QWidget *parent) :
QWidget(parent),
_p(new DataPrivate()),
ui(new Ui::ContractWidget)
{
ui->setupUi(this);
InitWidget();
}
ContractWidget::~ContractWidget()
{
delete _p;
_p = nullptr;
delete ui;
}
void ContractWidget::RefreshTree()
{
ui->functionWidget->Clear();
if(ChainIDE::getInstance()->getChainClass() == DataDefine::HX)
{
DataManagerHX::getInstance()->queryAccount();
}
else if(ChainIDE::getInstance()->getChainClass() == DataDefine::UB)
{
DataManagerUB::getInstance()->queryContract();
}
else if(ChainIDE::getInstance()->getChainClass() == DataDefine::CTC)
{
DataManagerCTC::getInstance()->queryAccount();
}
}
void ContractWidget::ContractClicked(QTreeWidgetItem *current, QTreeWidgetItem *previous)
{
if(current && current->parent())
{
ui->functionWidget->RefreshContractAddr(current->text(0));
}
}
void ContractWidget::CopyAddr()
{
if(QTreeWidgetItem *item = ui->treeWidget->currentItem())
{
QApplication::clipboard()->setText(item->data(0,Qt::UserRole).value<DataManagerStruct::ContractInfoPtr>()->GetContractAddr());
}
}
void ContractWidget::InitWidget()
{
//初始化右键菜单
ui->treeWidget->installEventFilter(this);
InitContextMenu();
ui->treeWidget->header()->setVisible(false);
ui->treeWidget->header()->setStretchLastSection(true);
ui->treeWidget->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
ui->splitter->setSizes(QList<int>()<<0.66*this->height()<<0.34*this->height());
connect(ui->treeWidget,&QTreeWidget::currentItemChanged,this,&ContractWidget::ContractClicked);
if(ChainIDE::getInstance()->getChainClass() == DataDefine::HX && (ChainIDE::getInstance()->getStartChainTypes() | DataDefine::NONE))
{
connect(DataManagerHX::getInstance(),&DataManagerHX::queryAccountFinish,DataManagerHX::getInstance(),&DataManagerHX::queryContract);
connect(DataManagerHX::getInstance(),&DataManagerHX::queryContractFinish,this,&ContractWidget::InitTree);
}
else if(ChainIDE::getInstance()->getChainClass() == DataDefine::UB && (ChainIDE::getInstance()->getStartChainTypes() | DataDefine::NONE))
{
connect(DataManagerUB::getInstance(),&DataManagerUB::queryContractFinish,this,&ContractWidget::InitTree);
}
else if(ChainIDE::getInstance()->getChainClass() == DataDefine::CTC && (ChainIDE::getInstance()->getStartChainTypes() | DataDefine::NONE))
{
connect(DataManagerCTC::getInstance(),&DataManagerCTC::queryAccountFinish,DataManagerCTC::getInstance(),&DataManagerCTC::queryContract);
connect(DataManagerCTC::getInstance(),&DataManagerCTC::queryContractFinish,this,&ContractWidget::InitTree);
}
}
void ContractWidget::InitTree()
{
ui->treeWidget->clear();
DataManagerStruct::AddressContractDataPtr data = nullptr;
if(ChainIDE::getInstance()->getChainClass() == DataDefine::HX)
{
data = DataManagerHX::getInstance()->getContract();
}
else if(ChainIDE::getInstance()->getChainClass() == DataDefine::UB)
{
data = DataManagerUB::getInstance()->getContract();
}
else if(ChainIDE::getInstance()->getChainClass() == DataDefine::CTC)
{
data = DataManagerCTC::getInstance()->getContract();
}
if(!data) return ;
for(auto it = data->getAllData().begin();it != data->getAllData().end();++it)
{
QTreeWidgetItem *item = new QTreeWidgetItem(QStringList()<<(*it)->GetOwnerAddr()<<tr("合约描述"));
item->setFlags(Qt::ItemIsEnabled);
item->setData(0,Qt::UserRole,QVariant::fromValue<DataManagerStruct::AddressContractPtr>(*it));
item->setTextAlignment(0,Qt::AlignCenter);
ui->treeWidget->addTopLevelItem(item);
for(auto cont = (*it)->GetContracts().begin();cont != (*it)->GetContracts().end();++cont)
{
QTreeWidgetItem *childitem = new QTreeWidgetItem(QStringList()<<((*cont)->GetContractName().isEmpty()?(*cont)->GetContractAddr():(*cont)->GetContractName())<<(*cont)->GetContractDes());
childitem->setData(0,Qt::UserRole,QVariant::fromValue<DataManagerStruct::ContractInfoPtr>(*cont));
childitem->setToolTip(0,(*cont)->GetContractAddr());
childitem->setTextAlignment(0,Qt::AlignCenter);
item->addChild(childitem);
}
}
ui->treeWidget->expandAll();
}
void ContractWidget::InitContextMenu()
{
QAction *copyAction = new QAction(tr("复制地址"),this);
connect(copyAction,&QAction::triggered,this,&ContractWidget::CopyAddr);
_p->contextMenu->addAction(copyAction);
}
bool ContractWidget::eventFilter(QObject *watched, QEvent *event)
{
if(watched == ui->treeWidget && event->type() == QEvent::ContextMenu)
{
if(QTreeWidgetItem *item = ui->treeWidget->currentItem())
{
if(item->parent() && ui->treeWidget->itemAt(ui->treeWidget->viewport()->mapFromGlobal(QCursor::pos())) == item)
{
_p->contextMenu->exec(QCursor::pos());
}
}
}
return QWidget::eventFilter(watched,event);
}
void ContractWidget::retranslator()
{
ui->retranslateUi(this);
ui->functionWidget->retranslator();
}
| 33.747126 | 197 | 0.676771 | AnyChainIDE |
74e135f01c967a7b4d283e4fac56d360ed812608 | 7,254 | cpp | C++ | bin/sept/ZoomWindow.cpp | vdods/sept | 08ee1faf1af4feb0dc440a3002eb8cc52681f946 | [
"Apache-2.0"
] | null | null | null | bin/sept/ZoomWindow.cpp | vdods/sept | 08ee1faf1af4feb0dc440a3002eb8cc52681f946 | [
"Apache-2.0"
] | null | null | null | bin/sept/ZoomWindow.cpp | vdods/sept | 08ee1faf1af4feb0dc440a3002eb8cc52681f946 | [
"Apache-2.0"
] | null | null | null | // 2020.03.16 - Victor Dods
#include "MainWindow.hpp"
#include <iostream>
#include <QtWidgets>
bool WheelFilter::eventFilter (QObject *obj, QEvent *event)
{
if (event->type() == QEvent::Wheel) {
auto wheel_event = static_cast<QWheelEvent*>(event);
if (wheel_event->modifiers() == Qt::ControlModifier || wheel_event->modifiers() == Qt::ShiftModifier) {
// Returning true filters the event. The idea is to filter it on the QGraphicsView's
// viewport and then let the main window handle the event.
return true;
}
}
return false; // Returning false does not filter the event.
}
MainWindow::MainWindow () {
create_actions();
create_status_bar();
read_settings();
#ifndef QT_NO_SESSIONMANAGER
QGuiApplication::setFallbackSessionManagementEnabled(false);
connect(qApp, &QGuiApplication::commitDataRequest, this, &MainWindow::commit_data);
#endif
setUnifiedTitleAndToolBarOnMac(true);
// Create and populate the scene.
m_scene = new QGraphicsScene(this);
{
auto grid_layout = new QGridLayout();
{
auto label = new QLabel("HIPPO");
label->setTextInteractionFlags(Qt::TextSelectableByMouse);
grid_layout->addWidget(label, 0, 0);
}
grid_layout->addWidget(new QPushButton("THINGY"), 0, 1);
grid_layout->addWidget(new QTextEdit("OSTRICH"), 1, 0);
{
auto subscene = new QGraphicsScene();
{
auto label = new QLabel("TINY HIPPO\nTINY OSTRICH\nTINY DONKEY");
label->setTextInteractionFlags(Qt::TextSelectableByMouse);
subscene->addWidget(label);
}
auto subview = new QGraphicsView();
subview->scale(0.5, 0.5);
subview->setScene(subscene);
grid_layout->addWidget(subview);
}
auto w = new QWidget();
w->setLayout(grid_layout);
m_scene->addWidget(w);
}
// {
// // QWidget *w = new QLabel("HIPPO");
// // QWidget *w = new QPushButton("THINGY");
// QWidget *w = new QTextEdit("OSTRICH");
// m_scene->addWidget(w);
// }
m_view = new QGraphicsView(this);
// NOTE: Rendering of QTextEdit and QPushButton happen incorrectly if the default
// ViewportUpdateMode (which is QGraphicsView::MinimalViewportUpdate) is used.
// Same with SmartViewportUpdate and BoundingRectViewportUpdate. The NoViewportUpdate
// doesn't work because it doesn't update automatically (though perhaps it could work
// if the widgets were manually triggered to re-render).
m_view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); // This works, though there are drop shadows which look weird.
m_view->setScene(m_scene);
// Set the drag mode to hand. Note that the text selection and text entry of QLabel and
// QTextEdit interfere with this, so it's not necessarily easy to do this.
// m_view->setDragMode(QGraphicsView::ScrollHandDrag);
// Install an event filter on the QGraphicsView to override certain behaviors.
auto wheel_filter = new WheelFilter();
m_view->viewport()->installEventFilter(wheel_filter);
this->setCentralWidget(m_view);
}
void MainWindow::closeEvent (QCloseEvent *event) {
// Do stuff, then call event->accept() or event->ignore(). There are probably other
// ways you could respond to the event (see QCloseEvent).
event->accept();
}
// void MainWindow::keyPressEvent (QKeyEvent *event) {
// switch (event->key()) {
// case Qt::Key_Minus:
// m_view->scale(1.0/1.1, 1.0/1.1);
// break;
//
// case Qt::Key_Plus:
// m_view->scale(1.1, 1.1);
// break;
//
// case Qt::Key_BracketLeft:
// m_view->rotate(-15.0);
// break;
//
// case Qt::Key_BracketRight:
// m_view->rotate(15.0);
// break;
// }
// }
void MainWindow::wheelEvent (QWheelEvent *event) {
double constexpr ANGLE_DELTA = 15.0;
double constexpr SCALE_FACTOR = 1.1;
// If only Ctrl button is pressed, zoom.
// If only Shift button is pressed, rotate.
// NOTE: If the modifier is Qt::AltModifier, then the x and y coordinates of angleDelta
// are switched, ostensibly to facilitate horizontal scrolling.
switch (event->modifiers()) {
case Qt::ControlModifier: {
bool wheel_went_up = event->angleDelta().y() >= 0;
if (wheel_went_up)
m_view->scale(SCALE_FACTOR, SCALE_FACTOR);
else
m_view->scale(1.0/SCALE_FACTOR, 1.0/SCALE_FACTOR);
event->accept();
break;
}
case Qt::ShiftModifier: {
bool wheel_went_up = event->angleDelta().y() >= 0;
m_view->rotate((wheel_went_up ? -1.0 : 1.0) * ANGLE_DELTA);
event->accept();
break;
}
}
}
void MainWindow::about () {
QMessageBox::about(
this,
tr("About SEPT Viewer"),
tr("Created 2020.03.16 by Victor Dods")
);
}
void MainWindow::create_actions() {
QMenu *file_menu = menuBar()->addMenu(tr("&File"));
// QToolBar *file_tool_bar = addToolBar(tr("File"));
file_menu->addSeparator();
QAction *exit_action = file_menu->addAction(tr("E&xit"), this, &QWidget::close);
exit_action->setShortcuts(QKeySequence::Quit);
exit_action->setStatusTip(tr("Exit the application"));
QMenu *help_menu = menuBar()->addMenu(tr("&Help"));
QAction *about_action = help_menu->addAction(tr("&About"), this, &MainWindow::about);
about_action->setStatusTip(tr("Show the application's About box"));
QAction *about_qt_action = help_menu->addAction(tr("About &Qt"), qApp, &QApplication::aboutQt);
about_qt_action->setStatusTip(tr("Show the Qt library's About box"));
}
void MainWindow::create_status_bar() {
statusBar()->showMessage(tr("Ready"));
}
void MainWindow::read_settings() {
QSettings settings(QCoreApplication::organizationName(), QCoreApplication::applicationName());
QByteArray geometry = settings.value("geometry", QByteArray()).toByteArray();
if (geometry.isEmpty()) {
QRect availableGeometry = QApplication::desktop()->availableGeometry(this);
resize(availableGeometry.width(), availableGeometry.height());
move(0, 0);
// resize(availableGeometry.width() / 3, availableGeometry.height() / 2);
// move((availableGeometry.width() - width()) / 2, (availableGeometry.height() - height()) / 2);
} else {
restoreGeometry(geometry);
}
}
void MainWindow::write_settings() {
QSettings settings(QCoreApplication::organizationName(), QCoreApplication::applicationName());
settings.setValue("geometry", saveGeometry());
}
#ifndef QT_NO_SESSIONMANAGER
void MainWindow::commit_data(QSessionManager &manager) {
if (manager.allowsInteraction()) {
// Do stuff, like maybe bring up "are you sure you want to exit?" dialog. If that returns
// with "cancel", then call manager.cancel().
} else {
// Do involuntary backup of state. Could be to an "emergency backup state".
}
}
#endif
| 35.558824 | 132 | 0.633995 | vdods |
74e205cb10d4ec90ec9ffc2ba3b208d12e7fbb4a | 1,249 | cpp | C++ | lambda.cpp | as-xjc/learn_cpp | 238c5fca03956393694436d43833598abb435963 | [
"MIT"
] | null | null | null | lambda.cpp | as-xjc/learn_cpp | 238c5fca03956393694436d43833598abb435963 | [
"MIT"
] | null | null | null | lambda.cpp | as-xjc/learn_cpp | 238c5fca03956393694436d43833598abb435963 | [
"MIT"
] | null | null | null | #include <iostream>
#include <cstdio>
#include <set>
#include <thread>
#include <vector>
void static_or_local_lambda() {
static auto generator = []() {
return 1;
};
auto generator2 = []() {
return 1;
};
std::printf("generator 1:%p\n", &generator);
std::printf("generator 2:%p\n", &generator2);
}
void print_lambda_point() {
static_or_local_lambda();
static_or_local_lambda();
std::thread test([]() {
static_or_local_lambda();
static_or_local_lambda();
});
test.join();
}
void find_if() {
std::vector<int> vector{1,2,3,4,5,6,7,8,9,10};
std::printf("\nvector:\n\t");
for (auto& i : vector) {
std::printf("%d ", i);
}
std::printf("\n");
/**
* param auto in lambda support start in C++14
* in C++11:
* @code
* auto it = std::find_if(std::begin(vector), vector.end(), [](const int& value) {
* return value == 5;
* });
* @endcode
*/
auto it = std::find_if(std::begin(vector), vector.end(), [](const auto& value) {
return value == 5;
});
if (it == vector.end()) {
std::cout << "find_if not found" << std::endl;
} else {
std::cout << "find_if :" << *it << std::endl;
}
}
int main() {
print_lambda_point();
find_if();
return 0;
} | 18.924242 | 86 | 0.567654 | as-xjc |
74e6ab1cb3afd798480ad9862f87c14473e2e6fd | 5,313 | hpp | C++ | include/as/multithread_task/parallel_for.hpp | asmith-git/multithread-task | 4b09b854aff2cf24651fd75bbed8d3019f8be379 | [
"Apache-2.0"
] | null | null | null | include/as/multithread_task/parallel_for.hpp | asmith-git/multithread-task | 4b09b854aff2cf24651fd75bbed8d3019f8be379 | [
"Apache-2.0"
] | null | null | null | include/as/multithread_task/parallel_for.hpp | asmith-git/multithread-task | 4b09b854aff2cf24651fd75bbed8d3019f8be379 | [
"Apache-2.0"
] | null | null | null | #ifndef ASMITH_PARALLEL_FOR_TASK_HPP
#define ASMITH_PARALLEL_FOR_TASK_HPP
// Copyright 2017 Adam Smith
//
// 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 "task_dispatcher.hpp"
#include "task.hpp"
namespace as {
template<class T, class F, class L1, class L2>
class parallel_for_task : public task<void> {
private:
const L1 mCondition;
const L2 mIncrement;
const F mFunction;
const T mBegin;
const T mEnd;
T mIndex;
public:
parallel_for_task(const T aBegin, const T aEnd, const F aFunction, const L1 aCondition, const L2 aIncrement) :
mCondition(aCondition),
mIncrement(aIncrement),
mFunction(aFunction),
mBegin(aBegin),
mEnd(aEnd),
mIndex(aBegin)
{}
void on_execute(as::task_controller& aController) override {
mIndex = mBegin;
on_resume(aController, 0);
}
void on_resume(as::task_controller& aController, uint8_t aLocation) override {
while(mCondition(mIndex, mEnd)) {
#ifndef ASMITH_DISABLE_PARALLEL_FOR_PAUSE
if(is_pause_requested()) pause(aController, aLocation);
#endif
mFunction(mIndex);
mIncrement(mIndex);
}
set_return();
}
};
namespace implementation {
template<class V, class F, class I, class I2, class L1, class L2>
void parallel_for(task_dispatcher& aDispatcher, V aMin, V aMax, F aFunction, size_t aBlocks, task_dispatcher::priority aPriority, I aMinFn, I2 aMaxFn, L1 aCondition, L2 aIncrement) {
std::future<void>* const futures = new std::future<void>[aBlocks];
try{
for(size_t i = 0; i < aBlocks; ++i) {
task_dispatcher::task_ptr task(new parallel_for_task<V,F,L1,L2>(aMinFn(i), aMaxFn(i), aFunction, aCondition, aIncrement));
futures[i] = aDispatcher.schedule<void>(task, aPriority);
}
for(size_t i = 0; i < aBlocks; ++i) futures[i].get();
}catch (std::exception& e) {
delete[] futures;
throw e;
}
delete[] futures;
}
}
template<class I, class F>
void parallel_for_less_than(task_dispatcher& aDispatcher, I aMin, I aMax, F aFunction, uint8_t aBlocks = 4, task_dispatcher::priority aPriority = task_dispatcher::priority::PRIORITY_MEDIUM) {
implementation::parallel_for<I, F>(
aDispatcher,
aMin,
aMax,
aFunction,
aBlocks,
aPriority,
[=](I i)->I {
const I range = aMax - aMin;
const I sub_range = range / aBlocks;
return aMin + (sub_range * i);
},
[=](I i)->I {
const I range = aMax - aMin;
const I sub_range = range / aBlocks;
return i + 1 == aBlocks ? aMax : sub_range * (i + 1);
},
[](const I a, const I b)->bool{ return a < b; },
[](I& i)->void { ++i; }
);
}
template<class I, class F>
void parallel_for_less_than_equals(task_dispatcher& aDispatcher, I aMin, I aMax, F aFunction, uint8_t aBlocks = 4, task_dispatcher::priority aPriority = task_dispatcher::priority::PRIORITY_MEDIUM) {
implementation::parallel_for<I, F>(
aDispatcher,
aMin,
aMax,
aFunction,
aBlocks,
aPriority,
[=](I i)->I {
const I range = aMax - aMin;
const I sub_range = range / aBlocks;
return i == 0 ? aMin : aMin + (sub_range * i) + 1;
},
[=](int i)->I {
const I range = aMax - aMin;
const I sub_range = range / aBlocks;
return i + 1 == aBlocks ? aMax : sub_range * (i + 1);
},
[](const I a, const I b)->bool{ return a <= b; },
[](I& i)->void { ++i; }
);
}
template<class I, class F>
void parallel_for_greater_than(task_dispatcher& aDispatcher, I aMin, I aMax, F aFunction, uint8_t aBlocks = 4, task_dispatcher::priority aPriority = task_dispatcher::priority::PRIORITY_MEDIUM) {
implementation::parallel_for<I, F>(
aDispatcher,
aMin,
aMax,
aFunction,
aBlocks,
aPriority,
[=](I i)->I {
const I range = aMin - aMax;
const I sub_range = range / aBlocks;
return aMin -(sub_range * i);
},
[=](I i)->I {
const I range = aMin - aMax;
const I sub_range = range / aBlocks;
return i + 1 == aBlocks ? aMax : aMin - (sub_range * (i + 1));
},
[](const I a, const I b)->bool{ return a > b; },
[](I& i)->void { --i; }
);
}
template<class I, class F>
void parallel_for_greater_than_equals(task_dispatcher& aDispatcher, I aMin, I aMax, F aFunction, uint8_t aBlocks = 4, task_dispatcher::priority aPriority = task_dispatcher::priority::PRIORITY_MEDIUM) {
implementation::parallel_for<I, F>(
aDispatcher,
aMin,
aMax,
aFunction,
aBlocks,
aPriority,
[=](I i)->I {
const I range = aMin - aMax;
const I sub_range = range / aBlocks;
return i == 0 ? aMin : aMin - (sub_range * i) - 1;
},
[=](I i)->I {
const I range = aMin - aMax;
const I sub_range = range / aBlocks;
return i + 1 == aBlocks ? aMax : aMin - (sub_range * (i + 1));
},
[](const I a, const I b)->bool{ return a >= b; },
[](I& i)->void { --i; }
);
}
}
#endif | 30.36 | 202 | 0.654056 | asmith-git |
d55f8de827a5b2a68185b3d9d9d3c2bb3658bf6a | 17,143 | cpp | C++ | wpn.cpp | commandus/wpn | 7064b4effd1d1e502daf6bddcdf126165706ca32 | [
"MIT"
] | 2 | 2020-11-22T23:45:19.000Z | 2020-12-14T06:54:31.000Z | wpn.cpp | commandus/wpn | 7064b4effd1d1e502daf6bddcdf126165706ca32 | [
"MIT"
] | null | null | null | wpn.cpp | commandus/wpn | 7064b4effd1d1e502daf6bddcdf126165706ca32 | [
"MIT"
] | 1 | 2021-05-13T12:23:19.000Z | 2021-05-13T12:23:19.000Z | /**
* Copyright (c) 2018 Andrei Ivanov <[email protected]>
*
* 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.
*
* @file wpn.cpp
*
*/
#include <string>
#include <cstring>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <signal.h>
#include <argtable3/argtable3.h>
#include <curl/curl.h>
#include "platform.h"
#include "wpn.h"
#include "wp-storage-file.h"
#include "wp-subscribe.h"
#include "wp-push.h"
#include "sslfactory.h"
#include "mcs/mcsclient.h"
#include "utilqr.h"
#include "utilstring.h"
#include "utilvapid.h"
#include "utilrecv.h"
#include "sslfactory.h"
#include "errlist.h"
#define PROMPT_STARTED "Enter q or press Ctrl+C to quit, p to ping"
#define LINK_SUREPHONE_D "https://surephone.commandus.com/?d="
#define LINK_SUREPHONE_QR "https://surephone.commandus.com/qr/?id="
#define DEF_EMAIL_TEMPLATE "<html><body>$subject<br/>Hi, $name<br/>Click the link below on the phone, tablet or other device on which surephone is installed.\
If the program is not already installed, \
<a href=\"https://play.google.com/store/apps/details?id=com.commandus.surephone\">install it</a>.\
<br/>$body</body></html>"
static int quitFlag = 0;
void signalHandler(int signal)
{
switch(signal)
{
case SIGHUP:
std::cerr << MSG_RELOAD_CONFIG_REQUEST << std::endl;
quitFlag = 2;
fclose(0);
break;
case SIGINT:
std::cerr << MSG_INTERRUPTED << std::endl;
quitFlag = 1;
break;
default:
break;
}
}
#ifdef _MSC_VER
// TODO
void setSignalHandler()
{
}
#else
void setSignalHandler()
{
struct sigaction action;
memset(&action, 0, sizeof(struct sigaction));
action.sa_handler = &signalHandler;
sigaction(SIGINT, &action, NULL);
sigaction(SIGHUP, &action, NULL);
}
#endif
#ifdef _MSC_VER
void initWindows()
{
// Initialize Winsock
WSADATA wsaData;
int r = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (r)
{
std::cerr << "WSAStartup error %d" << r << std::endl;
exit(ERR_WSA);
}
}
#endif
void onLog
(
void *env,
int severity,
const char *message
)
{
WpnConfig *c = (WpnConfig *) env;
if (c && c->config && c->config->clientOptions->getVerbosity() >= severity)
{
std::cerr << message;
}
}
/**
* Call dynamically loaded functions to notify user
*/
void onNotify(
void *env,
const char *persistent_id,
const char *from,
const char *appName,
const char *appId,
int64_t sent,
const NotifyMessageC *notification
)
{
WpnConfig *c = (WpnConfig *) env;
if (c && c->config && c->config->clientOptions->getVerbosity() > 2)
{
if (notification)
{
std::cerr << "Body:" << notification->body << std::endl;
}
}
for (std::vector <OnNotifyC>::const_iterator it(((WpnConfig*) env)->onNotifyList.begin()); it != ((WpnConfig*)env)->onNotifyList.end(); ++it)
{
(*it) (env, persistent_id, from, appName, appId, sent, notification);
}
}
void readCommand(
int *quitFlag,
std::istream &strm,
MCSClient *client
)
{
std::string s;
while ((*quitFlag == 0) && (!strm.eof()))
{
strm >> s;
if (s.find_first_of("qQ") == 0)
{
*quitFlag = 1;
break;
}
if (s.find_first_of("pP") == 0)
{
client->ping();
}
}
}
int main(int argc, char** argv)
{
// Signal handler
setSignalHandler();
#ifdef _MSC_VER
initWindows();
#endif
// In windows, this will init the winsock stuff
curl_global_init(CURL_GLOBAL_ALL);
initSSL();
WpnConfig config(argc, argv);
if (config.error())
exit(config.error());
switch (config.cmd)
{
case CMD_LIST:
{
if ((config.outputFormat == 0) && (config.config->clientOptions->getVerbosity() > 0))
std::cout << "subscribeUrl\tsubscribe mode\tendpoint\tauthorized entity\tFCM token\tpushSet" << std::endl;
config.config->subscriptions->write(std::cout, "\t", config.outputFormat);
}
break;
case CMD_LIST_QRCODE:
{
if ((config.outputFormat == 0) && (config.config->clientOptions->getVerbosity() > 0))
std::cout << "FCM QRCodes:" << std::endl;
std::stringstream ss;
std::string foreground = u8"\u2588\u2588";
std::string background = " ";
std::string v = config.config->wpnKeys->getPublicKey();
if (config.invert_qrcode)
v = qr2string(v, foreground, background);
else
v = qr2string(v, background, foreground);
std::cout
<< config.config->wpnKeys->id << "\t"
<< config.config->clientOptions->name << std::endl
<< v << std::endl;
long r = 0;
if (config.config->clientOptions->getVerbosity() > 0) {
for (std::vector<Subscription>::const_iterator it(config.config->subscriptions->list.begin()); it != config.config->subscriptions->list.end(); ++it)
{
std::string v = it->getWpnKeys().getPublicKey();
if (config.invert_qrcode)
v = qr2string(v, foreground, background);
else
v = qr2string(v, background, foreground);
std::cout
<< it->getWpnKeys().id << "\t"
<< it->getName() << std::endl
<< v << std::endl;
}
}
}
break;
case CMD_LIST_LINK:
{
std::stringstream ssBody;
for (std::vector<Subscription>::const_iterator it(config.config->subscriptions->list.begin()); it != config.config->subscriptions->list.end(); ++it)
{
std::stringstream ss;
ss
<< it->getName() << ","
<< it->getAuthorizedEntity() << ","
<< it->getServerKey() << ","
<< it->getToken();
ssBody << LINK_SUREPHONE_D << escapeURLString(ss.str()) << std::endl;
}
std::cout << ssBody.str();
}
break;
case CMD_LIST_EMAIL:
{
if (config.subject.empty()) {
config.subject = "Connect device to wpn";
}
if (config.email_template.empty()) {
config.email_template = DEF_EMAIL_TEMPLATE;
}
std::string m = config.email_template;
size_t p = m.find("$name");
if (p != std::string::npos)
{
m.replace(p, 5, config.cn);
}
p = m.find("$subject");
if (p != std::string::npos)
{
m.replace(p, 8, config.subject);
}
std::stringstream ssBody;
for (std::vector<Subscription>::const_iterator it(config.config->subscriptions->list.begin()); it != config.config->subscriptions->list.end(); ++it)
{
std::stringstream ss;
ss
<< it->getName() << ","
<< it->getAuthorizedEntity() << ","
<< it->getServerKey() << ","
<< it->getToken();
std::string u = escapeURLString(ss.str());
ssBody
<< "<p>"
<< "<a href=\"" << LINK_SUREPHONE_D << u << "\">Connect to "
<< it->getName()
<< "</a>"
<< "</p>"
<< std::endl;
}
p = m.find("$body");
if (p != std::string::npos)
{
m.replace(p, 5, ssBody.str());
}
std::cout << m << std::endl;
}
break;
case CMD_CREDENTIALS:
{
if ((config.outputFormat == 0) && (config.config->clientOptions->getVerbosity() > 0))
std::cout << "application\tandroid\ttoken\tGCM" << std::endl;
config.config->androidCredentials->write(std::cout, "\t", config.outputFormat);
std::cout << std::endl;
}
break;
case CMD_KEYS:
{
if ((config.outputFormat == 0) && (config.config->clientOptions->getVerbosity() > 0))
std::cout << "private\tpublic\tsecret" << std::endl;
config.config->wpnKeys->write(std::cout, "\t", config.outputFormat);
std::cout << std::endl;
}
break;
case CMD_SUBSCRIBE_FCM:
{
std::string d;
std::string headers;
std::string token;
std::string pushset;
int r = subscribeFCM(&d, &headers, token, pushset,
config.config->wpnKeys->getPublicKey(),
config.config->wpnKeys->getAuthSecret(),
config.subscribeUrl, config.getDefaultFCMEndPoint(), config.authorizedEntity,
config.config->clientOptions->getVerbosity());
if ((r < 200) || (r >= 300))
{
std::cerr << "Error " << r << ": " << d << std::endl;
}
else
{
Subscription subscription;
subscription.setToken(token);
subscription.setPushSet(pushset);
subscription.setServerKey(config.serverKey);
subscription.setSubscribeUrl(config.subscribeUrl);
subscription.setSubscribeMode(SUBSCRIBE_FORCE_FIREBASE);
subscription.setEndpoint(config.getDefaultFCMEndPoint());
subscription.setAuthorizedEntity(config.authorizedEntity);
config.config->subscriptions->list.push_back(subscription);
if (config.config->clientOptions->getVerbosity() > 0)
{
subscription.write(std::cout, "\t", config.outputFormat);
}
}
}
break;
case CMD_SUBSCRIBE_VAPID:
{
// TODO
Subscription subscription;
config.config->subscriptions->list.push_back(subscription);
if (config.config->clientOptions->getVerbosity() > 0)
{
subscription.write(std::cout, "\t", config.outputFormat);
}
}
break;
case CMD_UNSUBSCRIBE:
{
if (config.authorizedEntity.empty())
{
// delete all
Subscription f(config.fcm_endpoint, config.authorizedEntity);
for (std::vector<Subscription>::iterator it(config.config->subscriptions->list.begin()); it != config.config->subscriptions->list.end(); ++it)
{
// TODO
}
config.config->subscriptions->list.clear();
}
else
{
Subscription f(config.fcm_endpoint, config.authorizedEntity);
std::vector<Subscription>::iterator it = std::find(config.config->subscriptions->list.begin(),
config.config->subscriptions->list.end(), f);
if (it != config.config->subscriptions->list.end())
config.config->subscriptions->list.erase(it);
}
}
break;
case CMD_PUSH:
{
std::string retval;
std::string token = "";
std::string serverKey;
WpnKeys wpnKeys;
if (!config.private_key.empty()) {
// override Wpn keys
wpnKeys.init(0, 0, config.private_key, config.public_key, config.auth_secret);
}
switch (config.subscriptionMode) {
case SUBSCRIBE_FORCE_FIREBASE:
serverKey = config.serverKey;
break;
case SUBSCRIBE_FORCE_VAPID:
break;
default:
// Load server key from the subscription, by the name
const Subscription *subscription = config.getSubscription(config.name);
if (subscription) {
switch (subscription->getSubscribeMode()) {
case SUBSCRIBE_FORCE_FIREBASE:
config.subscriptionMode = SUBSCRIBE_FORCE_FIREBASE;
serverKey = subscription->getServerKey();
token = subscription->getToken();
break;
case SUBSCRIBE_FORCE_VAPID:
{
config.subscriptionMode = SUBSCRIBE_FORCE_VAPID;
// subscription MUST keep wpn keys
WpnKeys wpnkeys = subscription->getWpnKeys();
wpnKeys.init(subscription->getWpnKeys());
}
break;
default:
break;
}
}
break;
}
std::string body = jsClientNotification("", config.subject, config.body, config.icon, config.link, config.data);
// for VAPID only one endpoint not many
for (std::vector<std::string>::const_iterator it(config.recipientTokens.begin()); it != config.recipientTokens.end(); ++it)
{
int r;
if (config.command.empty())
{
if (config.config->clientOptions->getVerbosity() > 1)
std::cout << "Sending notification to " << *it << std::endl;
switch (config.subscriptionMode) {
case SUBSCRIBE_FORCE_FIREBASE:
r = push2ClientNotificationFCM(&retval, serverKey, *it,
config.subject, config.body, config.icon, config.link, config.data, config.config->clientOptions->getVerbosity());
break;
case SUBSCRIBE_FORCE_VAPID:
if (config.config->clientOptions->getVerbosity() > 3) {
std::cerr << "sender public key: " << wpnKeys.getPublicKey() << std::endl
<< "sender private key: " << wpnKeys.getPrivateKey() << std::endl
<< "endpoint: " << *it << std::endl
<< "public key: " << config.vapid_recipient_p256dh << std::endl
<< "auth secret: " << config.auth_secret << std::endl
<< "body: " << body << std::endl
<< "sub: " << config.sub << std::endl;
}
r = webpushVapid(NULL, retval, wpnKeys.getPublicKey(), wpnKeys.getPrivateKey(), *it, config.vapid_recipient_p256dh, config.auth_secret,
body, config.sub, config.aesgcm ? AESGCM : AES128GCM);
if (config.config->clientOptions->getVerbosity() > 3) {
std::string filename = "aesgcm.bin";
retval = webpushVapidCmd(wpnKeys.getPublicKey(), wpnKeys.getPrivateKey(), filename, *it, config.vapid_recipient_p256dh, config.auth_secret,
body, config.sub, config.aesgcm ? AESGCM : AES128GCM);
}
break;
}
}
else
{
if (config.config->clientOptions->getVerbosity() > 1)
std::cout << "Execute command " << config.command << " on " << *it << std::endl;
switch (config.subscriptionMode) {
case SUBSCRIBE_FORCE_FIREBASE:
r = push2ClientDataFCM(&retval, serverKey, token, *it, "", config.command, 0, "", config.config->clientOptions->getVerbosity());
break;
case SUBSCRIBE_FORCE_VAPID:
r = webpushVapid(NULL, retval, wpnKeys.getPublicKey(), wpnKeys.getPrivateKey(), *it, config.vapid_recipient_p256dh, config.vapid_recipient_auth,
body, config.sub, config.aesgcm ? AESGCM : AES128GCM);
break;
}
}
if (r >= 200 && r < 300)
std::cout << retval << std::endl;
else
std::cerr << "Error " << r << ": " << retval << std::endl;
}
}
break;
case CMD_PRINT_VERSION:
{
std::cout << config.versionString() << std::endl;
break;
}
case CMD_GENERATE_VAPID_KEYS:
{
Subscription subscription;
std::string d;
std::string headers;
config.config->wpnKeys->generate();
/*
int r = subscribe(subscription, SUBSCRIBE_VAPID, *config.wpnKeys,
config.subscribeUrl, config.getDefaultEndPoint(), config.authorizedEntity,
config.serverKey, &d, &headers, config.verbosity);
if ((r < 200) || (r >= 300))
{
std::cerr << "Error " << r << ": " << d << std::endl;
}
else
{
config.subscriptions->list.push_back(subscription);
}
if (config.verbosity > 0)
{
subscription.write(std::cout, "\t", config.outputFormat);
}
*/
std::cout << config.config->wpnKeys->toJsonString() << std::endl;
}
break;
default:
{
do {
quitFlag = 0;
config.loadNotifyFuncs();
MCSClient client(
config.config->subscriptions,
config.config->wpnKeys->getPrivateKey(),
config.config->wpnKeys->getAuthSecret(),
config.config->androidCredentials->getAndroidId(),
config.config->androidCredentials->getSecurityToken(),
onNotify, &config, onLog, &config,
config.config->clientOptions->getVerbosity()
);
// check in
if (config.config->androidCredentials->getAndroidId() == 0)
{
uint64_t androidId = config.config->androidCredentials->getAndroidId();
uint64_t securityToken = config.config->androidCredentials->getSecurityToken();
int r = checkIn(&androidId, &securityToken, config.config->clientOptions->getVerbosity());
if (r < 200 || r >= 300)
{
return ERR_NO_ANDROID_ID_N_TOKEN;
}
config.config->androidCredentials->setAndroidId(androidId);
config.config->androidCredentials->setSecurityToken(securityToken);
}
// register
if (config.config->androidCredentials->getGCMToken().empty())
{
int r;
for (int i = 0; i < 5; i++)
{
std::string gcmToken;
r = registerDevice(&gcmToken,
config.config->androidCredentials->getAndroidId(),
config.config->androidCredentials->getSecurityToken(),
config.config->androidCredentials->getAppId(),
config.config->clientOptions->getVerbosity()
);
if (r >= 200 && r < 300)
{
config.config->androidCredentials->setGCMToken(gcmToken);
break;
}
sleep(1);
}
if (r < 200 || r >= 300)
{
return ERR_NO_FCM_TOKEN;
}
}
client.connect();
std::cerr << PROMPT_STARTED << std::endl;
readCommand(&quitFlag, std::cin, &client);
client.disconnect();
config.unloadNotifyFuncs();
} while (quitFlag == 2);
}
}
config.config->save();
return 0;
}
| 29.97028 | 158 | 0.635186 | commandus |
d563068ad87208151ba4618b1b8ed063349fe979 | 2,640 | cpp | C++ | Engine/source/sfx/sfxResource.cpp | vbillet/Torque3D | ece8823599424ea675e5f79d9bcb44e42cba8cae | [
"MIT"
] | 2,113 | 2015-01-01T11:23:01.000Z | 2022-03-28T04:51:46.000Z | Engine/source/sfx/sfxResource.cpp | Ashry00/Torque3D | 33e3e41c8b7eb41c743a589558bc21302207ef97 | [
"MIT"
] | 948 | 2015-01-02T01:50:00.000Z | 2022-02-27T05:56:40.000Z | Engine/source/sfx/sfxResource.cpp | Ashry00/Torque3D | 33e3e41c8b7eb41c743a589558bc21302207ef97 | [
"MIT"
] | 944 | 2015-01-01T09:33:53.000Z | 2022-03-15T22:23:03.000Z | //-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 "sfx/sfxResource.h"
#include "sfx/sfxFileStream.h"
#include "core/util/fourcc.h"
#include "core/resourceManager.h"
// Ugly workaround to keep the constructor protected.
struct SFXResource::_NewHelper
{
static SFXResource* New( String fileName, const ThreadSafeRef< SFXStream >& stream )
{
return new SFXResource( fileName, stream );
}
};
template<>
void* Resource< SFXResource >::create( const Torque::Path& path )
{
String fullPath = path.getFullPath();
// Try to open the stream.
ThreadSafeRef< SFXStream > stream = SFXFileStream::create( fullPath );
if( !stream )
return NULL;
// We have a valid stream... create the resource.
SFXResource* res = SFXResource::_NewHelper::New( fullPath, stream );
return res;
}
template<>
ResourceBase::Signature Resource< SFXResource >::signature()
{
return MakeFourCC( 's', 'f', 'x', 'r' );
}
Resource< SFXResource > SFXResource::load( String filename )
{
return ResourceManager::get().load( filename );
}
SFXResource::SFXResource( String fileName, SFXStream *stream )
: mFileName( fileName ),
mFormat( stream->getFormat() ),
mDuration( stream->getDuration() )
{
}
bool SFXResource::exists( String filename )
{
return SFXFileStream::exists( filename );
}
SFXStream* SFXResource::openStream()
{
return SFXFileStream::create( mFileName );
}
| 31.807229 | 87 | 0.682197 | vbillet |
d56d520ca31a1a0d4e01db3fd7025bab7c717764 | 3,133 | cpp | C++ | lib/spdk/SpdkIoBuf.cpp | janlt/daqdb | 04ff602fe0a6c199a782b877203b8b8b9d3fec66 | [
"Apache-2.0"
] | 22 | 2019-02-08T17:23:12.000Z | 2021-10-12T06:35:37.000Z | lib/spdk/SpdkIoBuf.cpp | janlt/daqdb | 04ff602fe0a6c199a782b877203b8b8b9d3fec66 | [
"Apache-2.0"
] | 8 | 2019-02-11T06:30:47.000Z | 2020-04-22T09:49:44.000Z | lib/spdk/SpdkIoBuf.cpp | daq-db/daqdb | e30afe8a9a4727e60d0c1122d28679a4ce326844 | [
"Apache-2.0"
] | 10 | 2019-02-11T10:26:52.000Z | 2019-09-16T20:49:25.000Z | /**
* Copyright (c) 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.
*/
#include "spdk/env.h"
#include "SpdkIoBuf.h"
namespace DaqDB {
SpdkIoBufMgr::~SpdkIoBufMgr() {}
SpdkIoBuf *SpdkIoBufMgr::getIoWriteBuf(uint32_t ioSize, uint32_t align) {
SpdkIoBuf *buf = 0;
uint32_t bufIdx = ioSize / 4096;
if (bufIdx < 8) {
buf = block[bufIdx]->getWriteBuf();
if (!buf->getSpdkDmaBuf())
buf->setSpdkDmaBuf(
spdk_dma_zmalloc(static_cast<size_t>(ioSize), align, NULL));
} else {
buf = new SpdkIoSizedBuf<1 << 16>(1 << 16, -1);
buf->setSpdkDmaBuf(
spdk_dma_zmalloc(static_cast<size_t>(ioSize), align, NULL));
}
return buf;
}
void SpdkIoBufMgr::putIoWriteBuf(SpdkIoBuf *ioBuf) {
if (ioBuf->getIdx() != -1)
ioBuf->putWriteBuf(ioBuf);
else {
delete ioBuf;
}
}
SpdkIoBuf *SpdkIoBufMgr::getIoReadBuf(uint32_t ioSize, uint32_t align) {
SpdkIoBuf *buf = 0;
uint32_t bufIdx = ioSize / 4096;
if (bufIdx < 8) {
buf = block[bufIdx]->getReadBuf();
buf->setIdx(bufIdx);
if (!buf->getSpdkDmaBuf())
buf->setSpdkDmaBuf(
spdk_dma_zmalloc(static_cast<size_t>(ioSize), align, NULL));
} else {
buf = new SpdkIoSizedBuf<1 << 16>(1 << 16, -1);
buf->setSpdkDmaBuf(
spdk_dma_zmalloc(static_cast<size_t>(ioSize), align, NULL));
}
return buf;
}
void SpdkIoBufMgr::putIoReadBuf(SpdkIoBuf *ioBuf) {
if (ioBuf->getIdx() != -1)
ioBuf->putReadBuf(ioBuf);
else
delete ioBuf;
}
Lock SpdkIoBufMgr::instanceMutex;
SpdkIoBufMgr *SpdkIoBufMgr::instance = 0;
SpdkIoBufMgr *SpdkIoBufMgr::getSpdkIoBufMgr() {
if (!SpdkIoBufMgr::instance) {
WriteLock r_lock(instanceMutex);
SpdkIoBufMgr::instance = new SpdkIoBufMgr();
}
return SpdkIoBufMgr::instance;
}
void SpdkIoBufMgr::putSpdkIoBufMgr() {
if (SpdkIoBufMgr::instance) {
WriteLock r_lock(instanceMutex);
delete SpdkIoBufMgr::instance;
SpdkIoBufMgr::instance = 0;
}
}
SpdkIoBufMgr::SpdkIoBufMgr() {
block[0] = new SpdkIoSizedBuf<4096>(4096, 0);
block[1] = new SpdkIoSizedBuf<2 * 4096>(2 * 4096, 1);
block[2] = new SpdkIoSizedBuf<3 * 4096>(3 * 4096, 2);
block[3] = new SpdkIoSizedBuf<4 * 4096>(4 * 4096, 3);
block[4] = new SpdkIoSizedBuf<5 * 4096>(5 * 4096, 4);
block[5] = new SpdkIoSizedBuf<6 * 4096>(6 * 4096, 5);
block[6] = new SpdkIoSizedBuf<7 * 4096>(7 * 4096, 6);
block[7] = new SpdkIoSizedBuf<8 * 4096>(8 * 4096, 7);
}
} // namespace DaqDB
| 30.125 | 76 | 0.637408 | janlt |
d570b489b19f2331a163a6fb31ebaebd8e1f7d88 | 803 | cpp | C++ | chp5-while-guess/chp5-while-guess/chp5-while-guess.cpp | cmacdougald/2020SPRING-ITSE1307 | c7d941deace980fd99dfadcd55518f75b3d20684 | [
"MIT"
] | null | null | null | chp5-while-guess/chp5-while-guess/chp5-while-guess.cpp | cmacdougald/2020SPRING-ITSE1307 | c7d941deace980fd99dfadcd55518f75b3d20684 | [
"MIT"
] | null | null | null | chp5-while-guess/chp5-while-guess/chp5-while-guess.cpp | cmacdougald/2020SPRING-ITSE1307 | c7d941deace980fd99dfadcd55518f75b3d20684 | [
"MIT"
] | null | null | null | // chp5-while-guess.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <time.h>
#include <cstdlib>
int main()
{
srand(time(0));
int intMAXNUMBER = 100;
int intRandomNumber = rand() % intMAXNUMBER + 1;
int intGuess = 0;
do {
std::cerr << "N: " << intRandomNumber << std::endl;
std::cout << "Please enter a number between 1 and " << intMAXNUMBER << ": ";
std::cin >> intGuess;
if (intGuess > intRandomNumber) {
std::cout << "You guessed too high..." << std::endl;
}
else if (intGuess < intRandomNumber) {
std::cout << "You guessed too low..." << std::endl;
}
else {
std::cout << "Congrats!" << std::endl;
}
} while (intGuess != intRandomNumber);
return 0;
}
| 20.589744 | 79 | 0.582814 | cmacdougald |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.