hexsha stringlengths 40 40 | size int64 22 2.4M | ext stringclasses 5
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 260 | max_stars_repo_name stringlengths 5 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 9 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 260 | max_issues_repo_name stringlengths 5 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 9 | max_issues_count float64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 260 | max_forks_repo_name stringlengths 5 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 9 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 22 2.4M | avg_line_length float64 5 169k | max_line_length int64 5 786k | alphanum_fraction float64 0.06 0.95 | matches listlengths 1 11 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65a33def3e8d14c61e4a3ac71762505db46bd436 | 10,847 | h | C | Modules/IO/IOGDAL/include/otbGDALImageIO.h | yyxgiser/OTB | 2782a5838a55890769cdc6bc3bd900b2e9f6c5cb | [
"Apache-2.0"
] | null | null | null | Modules/IO/IOGDAL/include/otbGDALImageIO.h | yyxgiser/OTB | 2782a5838a55890769cdc6bc3bd900b2e9f6c5cb | [
"Apache-2.0"
] | null | null | null | Modules/IO/IOGDAL/include/otbGDALImageIO.h | yyxgiser/OTB | 2782a5838a55890769cdc6bc3bd900b2e9f6c5cb | [
"Apache-2.0"
] | 1 | 2020-10-15T09:37:30.000Z | 2020-10-15T09:37:30.000Z | /*
* Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
* Copyright (C) 2018-2020 CS Systemes d'Information (CS SI)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbGDALImageIO_h
#define otbGDALImageIO_h
/* C++ Libraries */
#include <string>
/* ITK Libraries */
#include "otbImageIOBase.h"
#include "otbMetadataSupplierInterface.h"
#include "otbMetadataStorageInterface.h"
#include "OTBIOGDALExport.h"
#include "otbSpatialReference.h"
namespace otb
{
class GDALDatasetWrapper;
class GDALDataTypeWrapper;
/** \class GDALImageIO
*
* \brief ImageIO object for reading and writing images with GDAL
*
* This ImageIO uses GDAL interface to read/write images. The
* origin and spacing are translated from/to GDAL geotransform
* matrix (even in the case of a sensor image). It means that
* extracts from sensor images are well supported. Typical
* sensor images in OTB have a spacing of [1,1] and an origin
* at [0.5,0.5] (when there is no GDAL geotransform, GDAL
* physical space is identical to GDAL index space).
*
* Note that the geotransform matrix supports any rotated physical
* space whereas OTB doesn't.
*
* \em Warning : the index coordinate system used in GDAL is attached
* to the corner of the top left pixel, whereas in OTB, the index
* coordinate system is attached to the centre of the top-left
* pixel. It means that the origin coefficients read from the
* GDAL geotransform are the location of the top-left pixel
* corner. This is why this location has to be shifted by
* half a pixel to be used as an OTB origin. In a nutshell,
* OTB images read/written by this ImageIO have the \em same
* physical space as GDAL physical space : a given point of
* image has the same physical location in OTB and in GDAL.
*
* The streaming read is implemented.
*
* \ingroup IOFilters
*
*
* \ingroup OTBIOGDAL
*/
class OTBIOGDAL_EXPORT GDALImageIO
: public otb::ImageIOBase
, public otb::MetadataSupplierInterface
, public otb::MetadataStorageInterface
{
public:
typedef unsigned char InputPixelType;
/** Standard class typedefs. */
typedef GDALImageIO Self;
typedef otb::ImageIOBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef std::vector<std::string> GDALCreationOptionsType;
typedef std::vector<std::pair<int, double>> NoDataListType;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(GDALImageIO, otb::ImageIOBase);
/** Set/Get the level of compression for the output images.
* 0-9; 0 = none, 9 = maximum. */
itkSetMacro(CompressionLevel, int);
itkGetMacro(CompressionLevel, int);
/** Set/Get whether the pixel type (otb side) is complex */
itkSetMacro(IsComplex, bool);
itkGetMacro(IsComplex, bool);
/** Set/Get whether the pixel type (otb side) is Vector or Scalar */
itkSetMacro(IsVectorImage, bool);
itkGetMacro(IsVectorImage, bool);
/** Set/get whether the driver will write RPC tags to TIFF */
itkSetMacro(WriteRPCTags, bool);
itkGetMacro(WriteRPCTags, bool);
/** Set/Get the options */
void SetOptions(const GDALCreationOptionsType& opts)
{
m_CreationOptions = opts;
}
GDALCreationOptionsType GetOptions(void)
{
return m_CreationOptions;
}
/** Set NoDataList */
void SetNoDataList(const NoDataListType& noDataList)
{
m_NoDataList = noDataList;
}
/** Provide hist about the output container to deal with complex pixel
* type */
void SetOutputImagePixelType(bool isComplexInternalPixelType, bool isVectorImage) override
{
this->SetIsComplex(isComplexInternalPixelType);
this->SetIsVectorImage(isVectorImage);
}
/*-------- This part of the interface deals with reading data. ------ */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
bool CanReadFile(const char*) override;
/** Determine the file type. Returns true if the ImageIO can stream read the specified file */
bool CanStreamRead() override
{
return true;
}
/** Set the spacing and dimension information for the set filename. */
void ReadImageInformation() override;
/** Reads the data from disk into the memory buffer provided. */
void Read(void* buffer) override;
/** Reads 3D data from multiple files assuming one slice per file. */
virtual void ReadVolume(void* buffer);
/** Get Info about all subDataset in hdf file */
bool GetSubDatasetInfo(std::vector<std::string>& names, std::vector<std::string>& desc);
/** Get if the pixel type in the file is complex or not (GDAL side)*/
bool GDALPixelTypeIsComplex();
/*-------- This part of the interfaces deals with writing data. ----- */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
bool CanWriteFile(const char*) override;
/** Determine the file type. Returns true if the ImageIO can stream write the specified file */
bool CanStreamWrite() override;
/** Writes the spacing and dimensions of the image.
* Assumes SetFileName has been called with a valid file name. */
void WriteImageInformation() override;
/** Writes the data to disk from the memory buffer provided. Make sure
* that the IORegion has been set properly. */
void Write(const void* buffer) override;
/** Get all resolutions possible from the file dimensions */
bool GetAvailableResolutions(std::vector<unsigned int>& res);
/** Get Info about all resolution possible from the file dimensions */
bool GetResolutionInfo(std::vector<unsigned int>& res, std::vector<std::string>& desc);
/** Get number of available overviews in the file
* Return 0 if no overviews available
* Currently this overview count is only based on the first band
* If no pre-computed overviews are available we provide the overview
* count based on size division by 2*/
unsigned int GetOverviewsCount() override;
/** Get description about overviews available into the file specified */
std::vector<std::string> GetOverviewsInfo() override;
/** Returns gdal pixel type as string */
std::string GetGdalPixelTypeAsString() const;
int GetNbBands() const override;
// MetadataSupplierInterface overrides
/** Get main image file */
std::string GetResourceFile(std::string="") const override;
std::vector<std::string> GetResourceFiles() const override;
/** Get metadata item in GDALDataset, domain can specified as "domain/key" */
std::string GetMetadataValue(const std::string path, bool& hasValue, int band = -1) const override;
/** Set metadata item in GDALDataset, domain can specified as prefix of the
* path, like "domain/key"*/
void SetMetadataValue(const char * path, const char * value, int band=-1) override;
/** Set the projection system from EPSG code */
void SetEpsgCode(const unsigned int wellKnownCRS);
protected:
/**
* Constructor.
* Spacing is set to [1,1] and origin to [0.5,0.5] as it would correspond
* to an image without geotransform
*/
GDALImageIO();
/** Destructor.*/
~GDALImageIO() override;
/** Set the metadata from a Keywordlist*/
void KeywordlistToMetadata(ImageMetadataBase::Keywordlist, int band=-1);
/** Parses a GDAL Metadata string list to fill a Keywordlist*/
void GDALMetadataToKeywordlist(const char* const* , ImageMetadataBase::Keywordlist &);
void PrintSelf(std::ostream& os, itk::Indent indent) const override;
/** Read all information on the image*/
void InternalReadImageInformation();
/** Write all information on the image*/
void InternalWriteImageInformation(const void* buffer);
/** Number of bands of the image*/
int m_NbBands;
/** Buffer*/
// float **pafimas;
/** Determines the level of compression for written files.
* Range 0-9; 0 = none, 9 = maximum , default = 4 */
int m_CompressionLevel;
bool m_IsIndexed;
/** Dataset index to extract (starting at 0)*/
unsigned int m_DatasetNumber;
private:
GDALImageIO(const Self&) = delete;
void operator=(const Self&) = delete;
/** Determine real file name to write the image */
std::string GetGdalWriteImageFileName(const std::string& gdalDriverShortName, const std::string& filename) const;
std::string FilenameToGdalDriverShortName(const std::string& name) const;
/** Parse a GML box from a Jpeg2000 file and get the origin */
bool GetOriginFromGMLBox(std::vector<double>& origin);
/** Test whether m_CreationOptions has an option
* \param partialOption The beginning of a creation option (for example "QUALITY=")
*/
bool CreationOptionContains(std::string partialOption) const;
/** Dump the ImageMetadata content into GDAL metadata */
void ExportMetadata();
/** Import the ImageMetadata content from GDAL metadata */
void ImportMetadata();
/** GDAL parameters. */
typedef itk::SmartPointer<GDALDatasetWrapper> GDALDatasetWrapperPointer;
GDALDatasetWrapperPointer m_Dataset;
unsigned int m_epsgCode;
GDALDataTypeWrapper* m_PxType;
/** Number of bytes per pixel */
int m_BytePerPixel;
bool GDALInfoReportCorner(const char* corner_name, double x, double y, double& dfGeoX, double& dfGeoY) const;
bool m_FlagWriteImageInformation;
bool m_CanStreamWrite;
/** Whether the pixel type (otb side, not gdal side) is complex
* this information has to be provided by the reader */
bool m_IsComplex;
/** Whether the pixel type (otb side, not gdal side) is Vector
* this information has to be provided by the reader */
bool m_IsVectorImage;
/**
* Creation Options */
GDALCreationOptionsType m_CreationOptions;
/**
* Number of Overviews in the file */
unsigned int m_NumberOfOverviews;
/**
* Size of the different overviews of the file */
std::vector<std::pair<unsigned int, unsigned int>> m_OverviewsSize;
/** Resolution factor
*/
unsigned int m_ResolutionFactor;
/**
* Original dimension of the input image
*/
std::vector<unsigned int> m_OriginalDimensions;
/**
* True if RPC tags should be exported
*/
bool m_WriteRPCTags;
NoDataListType m_NoDataList;
};
} // end namespace otb
#endif // otbGDALImageIO_h
| 32.476048 | 115 | 0.718816 | [
"object",
"vector",
"3d"
] |
65a39fd91be8a08b2b3ac5a348236a1825bfc4a6 | 2,443 | h | C | common/src/cert/cvc/cvc_ado.h | ane-community/botan-crypto-ane | 71056f5f0d5fd706e6d42e2f7ec0f7f55d86fb74 | [
"MIT"
] | 1 | 2018-03-09T20:21:47.000Z | 2018-03-09T20:21:47.000Z | common/src/cert/cvc/cvc_ado.h | ane-community/botan-crypto-ane | 71056f5f0d5fd706e6d42e2f7ec0f7f55d86fb74 | [
"MIT"
] | null | null | null | common/src/cert/cvc/cvc_ado.h | ane-community/botan-crypto-ane | 71056f5f0d5fd706e6d42e2f7ec0f7f55d86fb74 | [
"MIT"
] | 1 | 2020-03-05T23:42:00.000Z | 2020-03-05T23:42:00.000Z | /*
* EAC1_1 CVC ADO
* (C) 2008 Falko Strenzke
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_EAC_CVC_ADO_H__
#define BOTAN_EAC_CVC_ADO_H__
#include <botan/eac_obj.h>
#include <botan/eac_asn_obj.h>
#include <botan/cvc_req.h>
#include <string>
namespace Botan {
/**
* This class represents a TR03110 (EAC) v1.1 CVC ADO request
*/
// CRTP continuation from EAC1_1_obj
class BOTAN_DLL EAC1_1_ADO : public EAC1_1_obj<EAC1_1_ADO>
{
public:
friend class EAC1_1_obj<EAC1_1_ADO>;
/**
* Construct a CVC ADO request from a DER encoded CVC ADO request file.
* @param str the path to the DER encoded file
*/
EAC1_1_ADO(const std::string& str);
/**
* Construct a CVC ADO request from a data source
* @param source the data source
*/
EAC1_1_ADO(DataSource& source);
/**
* Create a signed CVC ADO request from to be signed (TBS) data
* @param signer the signer used to sign the CVC ADO request
* @param tbs_bits the TBS data to sign
* @param rng a random number generator
*/
static MemoryVector<byte> make_signed(
PK_Signer& signer,
const MemoryRegion<byte>& tbs_bits,
RandomNumberGenerator& rng);
/**
* Get the CAR of this CVC ADO request
* @result the CAR of this CVC ADO request
*/
ASN1_Car get_car() const;
/**
* Get the CVC request contained in this object.
* @result the CVC request inside this CVC ADO request
*/
EAC1_1_Req get_request() const;
/**
* Encode this object into a pipe. Only DER is supported.
* @param out the pipe to encode this object into
* @param encoding the encoding type to use, must be DER
*/
void encode(Pipe& out, X509_Encoding encoding) const;
bool operator==(EAC1_1_ADO const& rhs) const;
/**
* Get the TBS data of this CVC ADO request.
* @result the TBS data
*/
SecureVector<byte> tbs_data() const;
virtual ~EAC1_1_ADO() {}
private:
ASN1_Car m_car;
EAC1_1_Req m_req;
void force_decode();
static void decode_info(DataSource& source,
SecureVector<byte> & res_tbs_bits,
ECDSA_Signature & res_sig);
};
inline bool operator!=(EAC1_1_ADO const& lhs, EAC1_1_ADO const& rhs)
{
return (!(lhs == rhs));
}
}
#endif
| 24.676768 | 76 | 0.623414 | [
"object"
] |
65a739849f4d68ebf95097c6e85f6b2571812240 | 1,269 | h | C | DriveFusion/ErrorInfo.h | JadeTheFlame/google-drive-shell-extension | 917ada8e1a173e43e637db980ac4b9976a34acf9 | [
"Apache-2.0"
] | 155 | 2015-03-25T22:09:37.000Z | 2022-03-07T14:51:31.000Z | DriveFusion/ErrorInfo.h | Jason-Cooke/google-drive-shell-extension | 917ada8e1a173e43e637db980ac4b9976a34acf9 | [
"Apache-2.0"
] | 13 | 2015-04-01T17:51:45.000Z | 2021-08-21T13:36:39.000Z | DriveFusion/ErrorInfo.h | Jason-Cooke/google-drive-shell-extension | 917ada8e1a173e43e637db980ac4b9976a34acf9 | [
"Apache-2.0"
] | 73 | 2015-03-26T02:21:54.000Z | 2022-03-26T10:22:46.000Z | /*
Copyright 2014 Google Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include "stdafx.h"
#include <string>
#include "XmlReader.h"
namespace Fusion
{
namespace GoogleDrive
{
struct ErrorInfoType
{
enum eType
{
None = 0,
Authentication = 1,
};
};
class ErrorInfo
{
public:
ErrorInfo(void);
ErrorInfo(const std::wstring& xml);
ErrorInfo(XmlReader* xmlReader);
~ErrorInfo(void);
static ErrorInfo* FromMessage(const std::wstring& message);
ErrorInfoType::eType Type;
std::wstring Message;
std::vector<std::wstring> Details;
protected:
void Init(void);
void Init(const std::wstring& xml);
void Init(XmlReader* xmlReader);
};
}
}
| 22.263158 | 72 | 0.678487 | [
"vector"
] |
65aac3250851f2ac0fd168ef0858a7a8363654ef | 2,838 | h | C | src/xamp/widget/actionmap.h | billlin0904/xamp2 | c11ada6138a5c8427523543bb7035f2ac2cff8d5 | [
"MIT"
] | 2 | 2020-02-09T04:55:36.000Z | 2022-01-08T08:50:50.000Z | src/xamp/widget/actionmap.h | billlin0904/xamp2 | c11ada6138a5c8427523543bb7035f2ac2cff8d5 | [
"MIT"
] | 1 | 2022-02-16T10:14:05.000Z | 2022-02-16T10:14:05.000Z | src/xamp/widget/actionmap.h | billlin0904/xamp2 | c11ada6138a5c8427523543bb7035f2ac2cff8d5 | [
"MIT"
] | 2 | 2019-09-23T15:21:27.000Z | 2021-04-12T09:00:37.000Z | //=====================================================================================================================
// Copyright (c) 2018-2021 xamp project. All rights reserved.
// More license information, please see LICENSE file in module root folder.
//=====================================================================================================================
#pragma once
#include <map>
#include "thememanager.h"
#include <QScopedPointer>
#include <QMenu>
template <typename Type, typename F>
class ActionMap {
public:
using MapType = std::map<QAction*, F>;
class SubMenu {
public:
SubMenu(const QString& menu_name, QMenu* menu, MapType& action_map)
: action_group_(new QActionGroup(submenu_.get()))
, action_map_(action_map) {
submenu_.reset(menu->addMenu(menu_name));
}
template <typename Callable>
QAction* addAction(const QString& menu_name,
Callable&& callback,
bool checked = false,
bool add_eparator = false) {
const auto action = new QAction(menu_name, nullptr);
action->setCheckable(true);
action->setChecked(checked);
action_map_[action] = callback;
submenu_->addAction(action);
if (add_eparator)
submenu_->addSeparator();
submenu_->addAction(action);
action_group_->addAction(action);
return action;
}
private:
QScopedPointer<QMenu> submenu_;
QScopedPointer<QActionGroup> action_group_;
MapType& action_map_;
};
explicit ActionMap(Type* object)
: object_(object)
, menu_(object) {
ThemeManager::instance().setMenuStlye(&menu_);
}
QAction* addAction(const QString& menu_name) {
auto action = addAction(menu_name, []() {});
action->setEnabled(false);
return action;
}
template <typename Callable>
void setCallback(QAction* action, Callable&& callback) {
map_[action] = callback;
action->setEnabled(true);
}
template <typename Callable>
QAction* addAction(const QString& menu_name,
Callable&& callback,
bool add_eparator = false,
bool checked = false) {
auto* action = new QAction(menu_name, nullptr);
map_[action] = callback;
menu_.addAction(action);
if (add_eparator) {
menu_.addSeparator();
}
if (checked) {
action->setCheckable(true);
action->setChecked(checked);
} else {
action->setCheckable(false);
}
return action;
}
SubMenu* addSubMenu(const QString& menu_name) {
return new SubMenu(menu_name, &menu_, map_);
}
void addSeparator() {
menu_.addSeparator();
}
template <typename... Args>
void exec(const QPoint& point, Args... args) {
auto globalpos = object_->mapToGlobal(point);
auto itr = map_.find(menu_.exec(globalpos));
if (itr != map_.end()) {
(*itr).second(std::forward<Args>(args)...);
}
}
private:
Type* object_;
QMenu menu_;
MapType map_;
};
| 24.050847 | 119 | 0.621212 | [
"object"
] |
65ac79e31e288403f77659d91b033835fc1c4f3b | 1,596 | h | C | Rendering/SceneGraph/vtkVolumeMapperNode.h | forestGzh/VTK | bc98327275bd5cfa95c5825f80a2755a458b6da8 | [
"BSD-3-Clause"
] | 3 | 2015-07-28T18:07:50.000Z | 2018-02-28T20:59:58.000Z | Rendering/SceneGraph/vtkVolumeMapperNode.h | forestGzh/VTK | bc98327275bd5cfa95c5825f80a2755a458b6da8 | [
"BSD-3-Clause"
] | 4 | 2018-10-25T09:46:11.000Z | 2019-01-17T16:49:17.000Z | Rendering/SceneGraph/vtkVolumeMapperNode.h | forestGzh/VTK | bc98327275bd5cfa95c5825f80a2755a458b6da8 | [
"BSD-3-Clause"
] | 4 | 2016-09-08T02:11:00.000Z | 2019-08-15T02:38:39.000Z | /*=========================================================================
Program: Visualization Toolkit
Module: vtkVolumeMapperNode.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkVolumeMapperNode
* @brief vtkViewNode specialized for vtkVolumeMappers
*
* State storage and graph traversal for vtkVolumeMapper/PolyDataMapper and Property
* Made a choice to merge PolyDataMapper, PolyDataMapper and property together. If there
* is a compelling reason to separate them we can.
*/
#ifndef vtkVolumeMapperNode_h
#define vtkVolumeMapperNode_h
#include "vtkRenderingSceneGraphModule.h" // For export macro
#include "vtkMapperNode.h"
#include <vector> //for results
class vtkActor;
class vtkVolumeMapper;
class vtkPolyData;
class VTKRENDERINGSCENEGRAPH_EXPORT vtkVolumeMapperNode :
public vtkMapperNode
{
public:
static vtkVolumeMapperNode* New();
vtkTypeMacro(vtkVolumeMapperNode, vtkMapperNode);
void PrintSelf(ostream& os, vtkIndent indent) override;
protected:
vtkVolumeMapperNode();
~vtkVolumeMapperNode();
private:
vtkVolumeMapperNode(const vtkVolumeMapperNode&) = delete;
void operator=(const vtkVolumeMapperNode&) = delete;
};
#endif
| 29.555556 | 88 | 0.70614 | [
"vector"
] |
65ad4704f7a552c5d4d2304a2a619fb3583c3828 | 4,131 | h | C | dlls/singleplay_gamerules.h | phoenixprojectsoftware/shootertourneys-sdk | f12a0eaa72f948d1a6c2393255de3e747c411823 | [
"Unlicense"
] | 9 | 2020-06-23T03:21:39.000Z | 2021-12-11T18:48:43.000Z | dlls/singleplay_gamerules.h | 7Noghost7/agmod-server-updated | 671da7262406f5d732d11b6a984672991b30ecda | [
"Unlicense"
] | 11 | 2021-05-01T16:21:25.000Z | 2022-03-20T02:22:10.000Z | dlls/singleplay_gamerules.h | 7Noghost7/agmod-server-updated | 671da7262406f5d732d11b6a984672991b30ecda | [
"Unlicense"
] | 6 | 2021-05-03T09:47:53.000Z | 2021-11-25T15:58:25.000Z | /***
*
* Copyright (c) 1999, 2000 Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
//
// multi_gamerules.h
//
//=========================================================
// CHalfLifeMultiplay - rules for the basic half life multiplayer
// competition
//=========================================================
//++ BulliT
#if !defined(_SINGLEPLAY_H_)
#define _SINGLEPLAY_H_
#include "aggamerules.h"
//-- Martin Webrant
//=========================================================
// CHalfLifeRules - rules for the single player Half-Life
// game.
//=========================================================
class CHalfLifeRules : public AgGameRules
{
public:
CHalfLifeRules(void);
// GR_Think
virtual void Think(void);
virtual BOOL IsAllowedToSpawn(CBaseEntity* pEntity);
virtual BOOL FAllowFlashlight(void) { return TRUE; };
virtual BOOL FShouldSwitchWeapon(CBasePlayer* pPlayer, CBasePlayerItem* pWeapon);
virtual BOOL GetNextBestWeapon(CBasePlayer* pPlayer, CBasePlayerItem* pCurrentWeapon);
// Functions to verify the single/multiplayer status of a game
virtual BOOL IsMultiplayer(void);
virtual BOOL IsDeathmatch(void);
virtual BOOL IsCoOp(void);
// Client connection/disconnection
virtual BOOL ClientConnected(edict_t* pEntity, const char* pszName, const char* pszAddress, char szRejectReason[128]);
virtual void InitHUD(CBasePlayer* pl); // the client dll is ready for updating
virtual void ClientDisconnected(edict_t* pClient);
// Client damage rules
virtual float FlPlayerFallDamage(CBasePlayer* pPlayer);
// Client spawn/respawn control
virtual void PlayerSpawn(CBasePlayer* pPlayer);
virtual void PlayerThink(CBasePlayer* pPlayer);
virtual BOOL FPlayerCanRespawn(CBasePlayer* pPlayer);
virtual float FlPlayerSpawnTime(CBasePlayer* pPlayer);
virtual BOOL AllowAutoTargetCrosshair(void);
// Client kills/scoring
virtual int IPointsForKill(CBasePlayer* pAttacker, CBasePlayer* pKilled);
virtual void PlayerKilled(CBasePlayer* pVictim, entvars_t* pKiller, entvars_t* pInflictor);
virtual void DeathNotice(CBasePlayer* pVictim, entvars_t* pKiller, entvars_t* pInflictor);
// Weapon retrieval
virtual void PlayerGotWeapon(CBasePlayer* pPlayer, CBasePlayerItem* pWeapon);
// Weapon spawn/respawn control
virtual int WeaponShouldRespawn(CBasePlayerItem* pWeapon);
virtual float FlWeaponRespawnTime(CBasePlayerItem* pWeapon);
virtual float FlWeaponTryRespawn(CBasePlayerItem* pWeapon);
virtual Vector VecWeaponRespawnSpot(CBasePlayerItem* pWeapon);
// Item retrieval
virtual BOOL CanHaveItem(CBasePlayer* pPlayer, CItem* pItem);
virtual void PlayerGotItem(CBasePlayer* pPlayer, CItem* pItem);
// Item spawn/respawn control
virtual int ItemShouldRespawn(CItem* pItem);
virtual float FlItemRespawnTime(CItem* pItem);
virtual Vector VecItemRespawnSpot(CItem* pItem);
// Ammo retrieval
virtual void PlayerGotAmmo(CBasePlayer* pPlayer, char* szName, int iCount);
// Ammo spawn/respawn control
virtual int AmmoShouldRespawn(CBasePlayerAmmo* pAmmo);
virtual float FlAmmoRespawnTime(CBasePlayerAmmo* pAmmo);
virtual Vector VecAmmoRespawnSpot(CBasePlayerAmmo* pAmmo);
// Healthcharger respawn control
virtual float FlHealthChargerRechargeTime(void);
virtual float FlHEVChargerRechargeTime(void);
// What happens to a dead player's weapons
virtual int DeadPlayerWeapons(CBasePlayer* pPlayer);
// What happens to a dead player's ammo
virtual int DeadPlayerAmmo(CBasePlayer* pPlayer);
// Monsters
virtual BOOL FAllowMonsters(void);
// Teamplay stuff
virtual const char* GetTeamID(CBaseEntity* pEntity) { return ""; };
virtual int PlayerRelationship(CBaseEntity* pPlayer, CBaseEntity* pTarget);
};
#endif //_SINGLEPLAY_H_
| 35.008475 | 119 | 0.739046 | [
"object",
"vector"
] |
65b3b3d217ce77405f565d7abf10dabd1e9e5050 | 2,490 | h | C | data/ROSMAV/brown-ros-pkg-read-only/experimental/meshnet/ar_map_navigate_bumpers_explore/include/ar_map_navigate_bumpers_explore.h | khairulislam/phys | fc702520fcd3b23022b9253e7d94f878978b4500 | [
"MIT"
] | null | null | null | data/ROSMAV/brown-ros-pkg-read-only/experimental/meshnet/ar_map_navigate_bumpers_explore/include/ar_map_navigate_bumpers_explore.h | khairulislam/phys | fc702520fcd3b23022b9253e7d94f878978b4500 | [
"MIT"
] | null | null | null | data/ROSMAV/brown-ros-pkg-read-only/experimental/meshnet/ar_map_navigate_bumpers_explore/include/ar_map_navigate_bumpers_explore.h | khairulislam/phys | fc702520fcd3b23022b9253e7d94f878978b4500 | [
"MIT"
] | null | null | null | #include "ros/ros.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <list>
#include <vector>
#include <iostream>
#include <sstream>
#include "ros/ros.h"
#include <std_msgs/String.h>
#include <geometry_msgs/Twist.h>
#include <position_tracker/Position.h>
#include <position_tracker/SetPosition.h>
//#include "/home/obot/ros-1.0.0/pkg/position_tracker/srv/cpp/position_tracker/SetPosition.h"
#include <irobot_create_2_1/SensorPacket.h>
#include <ar_alpha/Tag.h>
#include <ar_alpha/Tags.h>
#include <math.h>
#include <limits.h>
#define PI 3.14159265
using namespace std;
//------------- Dijkstra related code ----------
class Node;
class Edge;
vector<Node*> nodes;
vector<Edge*> edges;
void Dijkstras();
vector<Node*>* AdjacentRemainingNodes(Node* node);
Node* ExtractSmallest(vector<Node*>& nodes);
int Distance(Node* node1, Node* node2);
bool Contains(vector<Node*>& nodes, Node* node);
void PrintLoadShortestRouteTo(Node* destination);
extern void DijkstrasTest();
// these two not needed
vector<Edge*>* AdjacentEdges(vector<Edge*>& Edges, Node* node);
void RemoveEdge(vector<Edge*>& Edges, Edge* edge);
//-------- ar_map_navigate_bumpers code --------
class Line;
ros::Publisher vel_pub;
ros::Publisher pospub;
ros::Subscriber pos_sub;
ros::Subscriber bump_sub;
ros::Subscriber tag_sub;
ros::Rate loop_rate(1);
position_tracker::Position cur_pos;
position_tracker::Position prev_pos;
irobot_create_2_1::SensorPacket cur_sensors;
list<Line *> map4;
double Tdist = 0.1;
double goal_pos_x = -1;
double goal_pos_y = -1; // = 1.5;
double goal_ind = -1;
list<Node *> waypoints; //this should come from the path planner ROS node
int prevBump = 0;
position_tracker::Position latestBumpPos;
int ok_to_drive = 1;
int goal_tagid = 10;
int goal_tag_observed = 0;
void loadMap();
void loadWaypoints();
void positionCallback(const position_tracker::PositionConstPtr& msg);
void bumperCallback(const irobot_create_2_1::SensorPacketConstPtr& msg);
void tagsCallback(const ar_alpha::TagsConstPtr& msg);
position_tracker::Position getClosestLeftLineProjection();
position_tracker::Position getClosestRightLineProjection();
void getRandomWalkNextPos(position_tracker::Position *p);
void error(char *msg);
void substring(const char* text, int start, int stop, char *new_string);
string char_to_string(char *input_p);
double det(double A[2][2]);
void inv(double A[2][2], double IA[2][2]);
void solve(double A[2][2], double C[2], double S[2]);
| 29.294118 | 93 | 0.746586 | [
"vector"
] |
65b3bb92b8ec1093d9386f9bc6706cd23be0c517 | 14,084 | h | C | src/Core/Datatypes/Legacy/Field/GenericField.h | Haydelj/SCIRun | f7ee04d85349b946224dbff183438663e54b9413 | [
"MIT"
] | null | null | null | src/Core/Datatypes/Legacy/Field/GenericField.h | Haydelj/SCIRun | f7ee04d85349b946224dbff183438663e54b9413 | [
"MIT"
] | null | null | null | src/Core/Datatypes/Legacy/Field/GenericField.h | Haydelj/SCIRun | f7ee04d85349b946224dbff183438663e54b9413 | [
"MIT"
] | null | null | null | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2020 Scientific Computing and Imaging Institute,
University of Utah.
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.
*/
#ifndef CORE_DATATYPES_GENERICFIELD_H
#define CORE_DATATYPES_GENERICFIELD_H 1
#include <Core/Utils/Legacy/Debug.h>
#include <Core/Basis/Locate.h>
#include <Core/Containers/StackVector.h>
#include <Core/GeometryPrimitives/Vector.h>
#include <Core/GeometryPrimitives/Tensor.h>
#include <Core/Datatypes/Legacy/Field/Mesh.h>
#include <Core/Datatypes/Legacy/Field/Field.h>
#include <Core/Datatypes/Legacy/Field/VField.h>
#include <Core/Datatypes/Legacy/Field/VFData.h>
#include <Core/Datatypes/Legacy/Base/TypeName.h>
#include <Core/Datatypes/Legacy/Field/MeshTypes.h>
#include <Core/Persistent/PersistentSTL.h>
#include <Core/Containers/FData.h>
#include <Core/Datatypes/Legacy/Field/CastFData.h>
#include <Core/Containers/StackVector.h>
#include <Core/Datatypes/Legacy/Field/share.h>
namespace SCIRun {
template <class Mesh, class Basis, class FData>
class GenericField: public Field
{
public:
/// Typedefs to support the Field concept.
typedef GenericField<Mesh, Basis, FData> field_type;
typedef typename FData::value_type value_type;
typedef Mesh mesh_type;
typedef boost::shared_ptr<mesh_type> mesh_handle_type;
typedef Basis basis_type;
typedef FData fdata_type;
typedef boost::shared_ptr<GenericField<Mesh, Basis, FData> > handle_type;
typedef SCIRun::index_type index_type;
typedef SCIRun::size_type size_type;
/// only Pio should use this constructor
GenericField();
/// Use this constructor to actually have a field with a mesh
GenericField(mesh_handle_type mesh);
GenericField(const GenericField ©);
virtual ~GenericField();
/// Clone the field data, but not the mesh.
/// Use mesh_detach() first to clone the complete field
virtual GenericField<Mesh, Basis, FData> *clone() const;
/// Clone everything, field data and mesh.
virtual GenericField<Mesh, Basis, FData> *deep_clone() const;
/// Obtain a Handle to the Mesh
virtual MeshHandle mesh() const;
virtual VMesh* vmesh() const;
virtual VField* vfield() const;
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
/// Clone the mesh
virtual void mesh_detach();
#endif
/// Get the order of the field data
/// -1 = no data
/// 0 = constant data per element
/// 1 = linear data per element
/// >1 = non linear data per element
virtual int basis_order() const { return basis_.polynomial_order(); }
/// Get the classes on which this function relies:
/// Get the basis describing interpolation within an element
Basis& get_basis() { return basis_; }
/// Get the mesh describing how the elements fit together
// const mesh_handle_type &get_typed_mesh() const;
/// Persistent I/O.
virtual void io(Piostream &stream);
/// Tag the constructor of this class and put it in the Pio DataBase
static PersistentTypeID type_id;
/// Tag the constructor of this class and put it in the Field DataBase
static FieldTypeID field_id;
/// Function to retrieve the name of this field class
static const std::string type_name(int n = -1);
virtual std::string dynamic_type_name() const { return type_id.type; }
/// A different way of tagging a class. Currently two systems are used next
/// to each other: type_name and get_type_description. Neither is perfect
virtual
const TypeDescription* get_type_description(td_info_e td = FULL_TD_E) const;
/// Static functions to instantiate the field from Pio or using CreateField()
static Persistent *maker();
static FieldHandle field_maker();
static FieldHandle field_maker_mesh(MeshHandle mesh);
protected:
/// A (generic) mesh.
mesh_handle_type mesh_;
/// Data container.
fdata_type fdata_;
Basis basis_;
VField* vfield_;
int basis_order_;
int mesh_dimensionality_;
};
template<class FIELD>
class VGenericField : public VField {
public:
VGenericField(FIELD* field, VFData* vfdata)
{
DEBUG_CONSTRUCTOR("VGenericField")
field_ = field;
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
pm_ = field;
#endif
vfdata_ = vfdata;
mesh_ = field_->mesh().get();
vmesh_ = mesh_->vmesh();
basis_order_ = field->basis_order();
number_of_nodes_ = field->get_basis().number_of_mesh_vertices();
number_of_enodes_ = field->get_basis().number_of_vertices() - number_of_nodes_;
element_dim_ = field->get_basis().domain_dimension();
element_dofs_ = field->get_basis().dofs();
data_type_ = find_type_name(static_cast<typename FIELD::value_type*>(0));
for (size_t j=0; j<data_type_.size(); j++)
if(data_type_[j] == '_') data_type_[j] = ' ';
/// Create a fast way of checking scalar/pair/vector/tensor
is_scalar_ = false;
is_vector_ = false;
is_tensor_ = false;
is_pair_ = false;
if (data_type_.substr(0,6) == "Vector") is_vector_ = true;
else if (data_type_.substr(0,6) == "Tensor") is_tensor_ = true;
else if (data_type_.substr(0,4) == "Pair") is_pair_ = true;
else if (field->basis_order() > -1) is_scalar_ = true;
}
virtual ~VGenericField()
{
DEBUG_DESTRUCTOR("VGenericField")
if (vfdata_) delete vfdata_;
}
};
// PIO
const int GENERICFIELD_VERSION = 3;
template <class Mesh, class Basis, class FData>
Persistent *
GenericField<Mesh, Basis, FData>::maker()
{
return new GenericField<Mesh, Basis, FData>;
}
template <class Mesh, class Basis, class FData>
FieldHandle
GenericField<Mesh, Basis, FData>::field_maker()
{
return boost::make_shared<GenericField<Mesh, Basis, FData>>();
}
template <class Mesh, class Basis, class FData>
FieldHandle
GenericField<Mesh, Basis, FData>::field_maker_mesh(MeshHandle mesh)
{
mesh_handle_type mesh_handle = boost::dynamic_pointer_cast<mesh_type>(mesh);
if (mesh_handle)
return boost::make_shared<GenericField<Mesh, Basis, FData>>(mesh_handle);
else
return FieldHandle();
}
template <class Mesh, class Basis, class FData>
PersistentTypeID
GenericField<Mesh, Basis, FData>::type_id(type_name(-1), "Field", maker);
template <class Mesh, class Basis, class FData>
FieldTypeID
GenericField<Mesh, Basis, FData>::field_id(type_name(-1),field_maker,field_maker_mesh);
template <class Mesh, class Basis, class FData>
void GenericField<Mesh, Basis, FData>::io(Piostream& stream)
{
int version = stream.begin_class(type_name(), GENERICFIELD_VERSION);
if (stream.backwards_compat_id())
{
version = stream.begin_class(type_name(), GENERICFIELD_VERSION);
}
Field::io(stream);
if (stream.error()) return;
if (version < 2)
mesh_->io(stream);
else
Pio(stream, mesh_);
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
mesh_->freeze();
#endif
if (version >= 3)
{
basis_.io(stream);
}
Pio(stream, fdata_);
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
freeze();
#endif
if (stream.backwards_compat_id())
{
stream.end_class();
}
stream.end_class();
// A new mesh is associated with it
if (stream.reading())
{
vfield_->update_mesh_pointer(mesh_.get());
}
}
template <class Mesh, class Basis, class FData>
GenericField<Mesh, Basis, FData>::GenericField() :
Field(),
mesh_(mesh_handle_type(new mesh_type())),
fdata_(0),
vfield_(0),
basis_order_(0),
mesh_dimensionality_(-1)
{
DEBUG_CONSTRUCTOR("GenericField")
basis_order_ = basis_order();
if (mesh_) mesh_dimensionality_ = mesh_->dimensionality();
VFData* vfdata = CreateVFData(fdata_,get_basis().get_nodes(),get_basis().get_derivs());
vfield_ = new VGenericField<GenericField<Mesh,Basis,FData> >(this, vfdata);
vfield_->resize_values();
}
template <class Mesh, class Basis, class FData>
GenericField<Mesh, Basis, FData>::GenericField(const GenericField& copy) :
Field(copy),
mesh_(copy.mesh_),
fdata_(copy.fdata_),
basis_(copy.basis_),
vfield_(0),
basis_order_(copy.basis_order_),
mesh_dimensionality_(copy.mesh_dimensionality_)
{
DEBUG_CONSTRUCTOR("GenericField")
VFData* vfdata = CreateVFData(fdata_,get_basis().get_nodes(),get_basis().get_derivs());
if (vfdata)
{
vfield_ = new VGenericField<GenericField<Mesh,Basis,FData> >(this, vfdata);
}
}
template <class Mesh, class Basis, class FData>
GenericField<Mesh, Basis, FData>::GenericField(mesh_handle_type mesh) :
Field(),
mesh_(mesh),
fdata_(0),
vfield_(0),
basis_order_(0),
mesh_dimensionality_(-1)
{
DEBUG_CONSTRUCTOR("GenericField")
basis_order_ = basis_order();
if (mesh_) mesh_dimensionality_ = mesh_->dimensionality();
VFData* vfdata = CreateVFData(fdata_,get_basis().get_nodes(),get_basis().get_derivs());
vfield_ = new VGenericField<GenericField<Mesh,Basis,FData> >(this, vfdata);
vfield_->resize_values();
}
template <class Mesh, class Basis, class FData>
GenericField<Mesh, Basis, FData>::~GenericField()
{
DEBUG_DESTRUCTOR("GenericField")
if (vfield_) delete vfield_;
}
template <class Mesh, class Basis, class FData>
GenericField<Mesh, Basis, FData> *
GenericField<Mesh, Basis, FData>::clone() const
{
return new GenericField<Mesh, Basis, FData>(*this);
}
template <class Mesh, class Basis, class FData>
GenericField<Mesh, Basis, FData> *
GenericField<Mesh, Basis, FData>::deep_clone() const
{
auto copy = new GenericField<Mesh, Basis, FData>(*this);
copy->mesh_.reset(mesh_->clone());
copy->vfield_->update_mesh_pointer(copy->mesh_.get());
return copy;
}
template <class Mesh, class Basis, class FData>
MeshHandle
GenericField<Mesh, Basis, FData>::mesh() const
{
return MeshHandle(mesh_);
}
template <class Mesh, class Basis, class FData>
VMesh*
GenericField<Mesh, Basis, FData>::vmesh() const
{
if (mesh_) return mesh_->vmesh();
return (0);
}
template <class Mesh, class Basis, class FData>
VField*
GenericField<Mesh, Basis, FData>::vfield() const
{
return (vfield_);
}
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
template <class Mesh, class Basis, class FData>
void
GenericField<Mesh, Basis, FData>::mesh_detach()
{
thaw();
mesh_.detach();
mesh_->thaw();
vfield_->update_mesh_pointer(mesh_.get_rep());
}
#endif
template <class Mesh, class Basis, class FData>
const std::string GenericField<Mesh, Basis, FData>::type_name(int n)
{
ASSERT((n >= -1) && n <= 3);
if (n == -1)
{
static const std::string name = TypeNameGenerator::make_template_id(type_name(0), type_name(1), type_name(2), type_name(3));
return name;
}
else if (n == 0)
{
static const std::string nm("GenericField");
return nm;
}
else if (n == 1)
{
return find_type_name(static_cast<Mesh *>(0));
}
else if (n == 2)
{
return find_type_name(static_cast<Basis *>(0));
}
else
{
return find_type_name(static_cast<FData *>(0));
}
}
template <class Mesh, class Basis, class FData>
const TypeDescription *
GenericField<Mesh, Basis, FData>::get_type_description(td_info_e td) const
{
static std::string name(type_name(0));
static std::string namesp("SCIRun");
static std::string path(__FILE__);
const TypeDescription *sub1 = SCIRun::get_type_description(static_cast<Mesh*>(0));
const TypeDescription *sub2 = SCIRun::get_type_description(static_cast<Basis*>(0));
const TypeDescription *sub3 = SCIRun::get_type_description(static_cast<FData*>(0));
switch (td) {
default:
case FULL_TD_E:
{
static TypeDescription* tdn1 = 0;
if (tdn1 == 0) {
TypeDescription::td_vec *subs = new TypeDescription::td_vec(3);
(*subs)[0] = sub1;
(*subs)[1] = sub2;
(*subs)[2] = sub3;
tdn1 = new TypeDescription(name, subs, path, namesp,
TypeDescription::FIELD_E);
}
return tdn1;
}
case FIELD_NAME_ONLY_E:
{
static TypeDescription* tdn0 = 0;
if (tdn0 == 0) {
tdn0 = new TypeDescription(name, 0, path, namesp,
TypeDescription::FIELD_E);
}
return tdn0;
}
case MESH_TD_E:
{
return sub1;
}
case BASIS_TD_E:
{
return sub2;
}
case FDATA_TD_E:
{
return sub3;
}
};
}
/// These ended up here, due to the problem with the include order in get_typedescription.
/// Once we have dismanteled that system this can go back to VFData
template<class T, class MESH>
inline VFData* CreateVFData(FData2d<T,MESH>& fdata, std::vector<T>& lfdata, std::vector<std::vector<T> >& hfdata)
{
return (CreateVFData(static_cast<Array2<T>& >(fdata),lfdata,hfdata));
}
template<class T, class MESH>
inline VFData* CreateVFData(FData3d<T,MESH>& fdata, std::vector<T>& lfdata, std::vector<std::vector<T> >& hfdata)
{
return (CreateVFData(static_cast<Array3<T>& >(fdata),lfdata,hfdata));
}
} // end namespace SCIRun
#endif // Datatypes_GenericField_h
| 28.684318 | 128 | 0.695612 | [
"mesh",
"vector"
] |
65b65895b14325a19331b7a150e1784a645350c2 | 170,212 | c | C | 2D/cell/branches/nspu_checkpointing/chem/saprc99_Jacobian.c | jlinford/fixedgrid | 90147defe10a0d3c03a7c97207caea66928f4fbb | [
"BSD-3-Clause"
] | 1 | 2019-07-26T19:59:01.000Z | 2019-07-26T19:59:01.000Z | 2D/serial/branches/transport_only/chem/saprc99_Jacobian.c | jlinford/fixedgrid | 90147defe10a0d3c03a7c97207caea66928f4fbb | [
"BSD-3-Clause"
] | null | null | null | 2D/serial/branches/transport_only/chem/saprc99_Jacobian.c | jlinford/fixedgrid | 90147defe10a0d3c03a7c97207caea66928f4fbb | [
"BSD-3-Clause"
] | null | null | null | /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* */
/* The ODE Jacobian of Chemical Model File */
/* */
/* Generated by KPP-2.2 symbolic chemistry Kinetics PreProcessor */
/* (http://www.cs.vt.edu/~asandu/Software/KPP) */
/* KPP is distributed under GPL, the general public licence */
/* (http://www.gnu.org/copyleft/gpl.html) */
/* (C) 1995-1997, V. Damian & A. Sandu, CGRER, Univ. Iowa */
/* (C) 1997-2005, A. Sandu, Michigan Tech, Virginia Tech */
/* With important contributions from: */
/* M. Damian, Villanova University, USA */
/* R. Sander, Max-Planck Institute for Chemistry, Mainz, Germany */
/* */
/* File : saprc99_Jacobian.c */
/* Time : Wed Jan 2 14:34:04 2008 */
/* Working directory : /home/jlinford/workspace/fixedgrid/serial/chem */
/* Equation file : saprc99.kpp */
/* Output root filename : saprc99 */
/* */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "saprc99_Parameters.h"
#include "saprc99_Global.h"
#include "saprc99_Sparse.h"
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* */
/* Jac_SP - the Jacobian of Variables in sparse matrix representation */
/* Arguments : */
/* V - Concentrations of variable species (local) */
/* F - Concentrations of fixed species (local) */
/* RCT - Rate constants (local) */
/* JVS - sparse Jacobian of variables */
/* */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
void Jac_SP(
double V[], /* Concentrations of variable species (local) */
double F[], /* Concentrations of fixed species (local) */
double RCT[], /* Rate constants (local) */
double JVS[] /* sparse Jacobian of variables */
)
{
/* Local variables */
double B[373]; /* Temporary array */
/* B(0) = dA(0)/dV(69) */
B[0] = RCT[0];
/* B(1) = dA(1)/dV(57) */
B[1] = RCT[1]*F[0]*F[1];
/* B(4) = dA(2)/dV(57) */
B[4] = RCT[2]*V[61];
/* B(5) = dA(2)/dV(61) */
B[5] = RCT[2]*V[57];
/* B(6) = dA(3)/dV(57) */
B[6] = RCT[3]*V[68]*F[0];
/* B(7) = dA(3)/dV(68) */
B[7] = RCT[3]*V[57]*F[0];
/* B(9) = dA(4)/dV(57) */
B[9] = RCT[4]*V[69];
/* B(10) = dA(4)/dV(69) */
B[10] = RCT[4]*V[57];
/* B(11) = dA(5)/dV(57) */
B[11] = RCT[5]*V[69];
/* B(12) = dA(5)/dV(69) */
B[12] = RCT[5]*V[57];
/* B(13) = dA(6)/dV(61) */
B[13] = RCT[6]*V[68];
/* B(14) = dA(6)/dV(68) */
B[14] = RCT[6]*V[61];
/* B(15) = dA(7)/dV(61) */
B[15] = RCT[7]*V[69];
/* B(16) = dA(7)/dV(69) */
B[16] = RCT[7]*V[61];
/* B(17) = dA(8)/dV(68) */
B[17] = RCT[8]*V[70];
/* B(18) = dA(8)/dV(70) */
B[18] = RCT[8]*V[68];
/* B(19) = dA(9)/dV(68) */
B[19] = RCT[9]*2*V[68]*F[1];
/* B(21) = dA(10)/dV(69) */
B[21] = RCT[10]*V[70];
/* B(22) = dA(10)/dV(70) */
B[22] = RCT[10]*V[69];
/* B(23) = dA(11)/dV(17) */
B[23] = RCT[11];
/* B(24) = dA(12)/dV(17) */
B[24] = RCT[12]*F[2];
/* B(26) = dA(13)/dV(69) */
B[26] = RCT[13]*V[70];
/* B(27) = dA(13)/dV(70) */
B[27] = RCT[13]*V[69];
/* B(28) = dA(14)/dV(70) */
B[28] = RCT[14];
/* B(29) = dA(15)/dV(70) */
B[29] = RCT[15];
/* B(30) = dA(16)/dV(61) */
B[30] = RCT[16];
/* B(31) = dA(17)/dV(61) */
B[31] = RCT[17];
/* B(32) = dA(18)/dV(9) */
B[32] = RCT[18]*F[2];
/* B(34) = dA(19)/dV(9) */
B[34] = RCT[19]*F[0];
/* B(36) = dA(20)/dV(68) */
B[36] = RCT[20]*V[73];
/* B(37) = dA(20)/dV(73) */
B[37] = RCT[20]*V[68];
/* B(38) = dA(21)/dV(18) */
B[38] = RCT[21];
/* B(39) = dA(22)/dV(18) */
B[39] = RCT[22];
/* B(40) = dA(23)/dV(18) */
B[40] = RCT[23]*V[73];
/* B(41) = dA(23)/dV(73) */
B[41] = RCT[23]*V[18];
/* B(42) = dA(24)/dV(69) */
B[42] = RCT[24]*V[73];
/* B(43) = dA(24)/dV(73) */
B[43] = RCT[24]*V[69];
/* B(44) = dA(25)/dV(70) */
B[44] = RCT[25]*V[73];
/* B(45) = dA(25)/dV(73) */
B[45] = RCT[25]*V[70];
/* B(46) = dA(26)/dV(42) */
B[46] = RCT[26]*V[73];
/* B(47) = dA(26)/dV(73) */
B[47] = RCT[26]*V[42];
/* B(48) = dA(27)/dV(42) */
B[48] = RCT[27];
/* B(49) = dA(28)/dV(39) */
B[49] = RCT[28]*V[73];
/* B(50) = dA(28)/dV(73) */
B[50] = RCT[28]*V[39];
/* B(51) = dA(29)/dV(61) */
B[51] = RCT[29]*V[73];
/* B(52) = dA(29)/dV(73) */
B[52] = RCT[29]*V[61];
/* B(53) = dA(30)/dV(62) */
B[53] = RCT[30]*V[68];
/* B(54) = dA(30)/dV(68) */
B[54] = RCT[30]*V[62];
/* B(55) = dA(31)/dV(62) */
B[55] = RCT[31]*V[69];
/* B(56) = dA(31)/dV(69) */
B[56] = RCT[31]*V[62];
/* B(57) = dA(32)/dV(24) */
B[57] = RCT[32];
/* B(58) = dA(33)/dV(24) */
B[58] = RCT[33];
/* B(59) = dA(34)/dV(24) */
B[59] = RCT[34]*V[73];
/* B(60) = dA(34)/dV(73) */
B[60] = RCT[34]*V[24];
/* B(61) = dA(35)/dV(61) */
B[61] = RCT[35]*V[62];
/* B(62) = dA(35)/dV(62) */
B[62] = RCT[35]*V[61];
/* B(63) = dA(36)/dV(62) */
B[63] = RCT[36]*2*V[62];
/* B(64) = dA(37)/dV(62) */
B[64] = RCT[37]*2*V[62]*F[2];
/* B(66) = dA(38)/dV(62) */
B[66] = RCT[38]*V[70];
/* B(67) = dA(38)/dV(70) */
B[67] = RCT[38]*V[62];
/* B(68) = dA(39)/dV(70) */
B[68] = RCT[39]*2*V[70];
/* B(69) = dA(40)/dV(16) */
B[69] = RCT[40];
/* B(70) = dA(41)/dV(16) */
B[70] = RCT[41]*V[73];
/* B(71) = dA(41)/dV(73) */
B[71] = RCT[41]*V[16];
/* B(72) = dA(42)/dV(62) */
B[72] = RCT[42]*V[73];
/* B(73) = dA(42)/dV(73) */
B[73] = RCT[42]*V[62];
/* B(74) = dA(43)/dV(8) */
B[74] = RCT[43]*V[73];
/* B(75) = dA(43)/dV(73) */
B[75] = RCT[43]*V[8];
/* B(76) = dA(44)/dV(73) */
B[76] = RCT[44]*F[3];
/* B(78) = dA(45)/dV(65) */
B[78] = RCT[45]*V[68];
/* B(79) = dA(45)/dV(68) */
B[79] = RCT[45]*V[65];
/* B(80) = dA(46)/dV(62) */
B[80] = RCT[46]*V[65];
/* B(81) = dA(46)/dV(65) */
B[81] = RCT[46]*V[62];
/* B(82) = dA(47)/dV(65) */
B[82] = RCT[47]*V[70];
/* B(83) = dA(47)/dV(70) */
B[83] = RCT[47]*V[65];
/* B(84) = dA(48)/dV(65) */
B[84] = RCT[48]*2*V[65];
/* B(85) = dA(49)/dV(65) */
B[85] = RCT[49]*2*V[65];
/* B(86) = dA(50)/dV(67) */
B[86] = RCT[50]*V[68];
/* B(87) = dA(50)/dV(68) */
B[87] = RCT[50]*V[67];
/* B(88) = dA(51)/dV(62) */
B[88] = RCT[51]*V[67];
/* B(89) = dA(51)/dV(67) */
B[89] = RCT[51]*V[62];
/* B(90) = dA(52)/dV(67) */
B[90] = RCT[52]*V[70];
/* B(91) = dA(52)/dV(70) */
B[91] = RCT[52]*V[67];
/* B(92) = dA(53)/dV(65) */
B[92] = RCT[53]*V[67];
/* B(93) = dA(53)/dV(67) */
B[93] = RCT[53]*V[65];
/* B(94) = dA(54)/dV(67) */
B[94] = RCT[54]*2*V[67];
/* B(95) = dA(55)/dV(47) */
B[95] = RCT[55]*V[68];
/* B(96) = dA(55)/dV(68) */
B[96] = RCT[55]*V[47];
/* B(97) = dA(56)/dV(47) */
B[97] = RCT[56]*V[62];
/* B(98) = dA(56)/dV(62) */
B[98] = RCT[56]*V[47];
/* B(99) = dA(57)/dV(47) */
B[99] = RCT[57]*V[70];
/* B(100) = dA(57)/dV(70) */
B[100] = RCT[57]*V[47];
/* B(101) = dA(58)/dV(47) */
B[101] = RCT[58]*V[65];
/* B(102) = dA(58)/dV(65) */
B[102] = RCT[58]*V[47];
/* B(103) = dA(59)/dV(47) */
B[103] = RCT[59]*V[67];
/* B(104) = dA(59)/dV(67) */
B[104] = RCT[59]*V[47];
/* B(105) = dA(60)/dV(47) */
B[105] = RCT[60]*2*V[47];
/* B(106) = dA(61)/dV(63) */
B[106] = RCT[61]*V[68];
/* B(107) = dA(61)/dV(68) */
B[107] = RCT[61]*V[63];
/* B(108) = dA(62)/dV(62) */
B[108] = RCT[62]*V[63];
/* B(109) = dA(62)/dV(63) */
B[109] = RCT[62]*V[62];
/* B(110) = dA(63)/dV(63) */
B[110] = RCT[63]*V[65];
/* B(111) = dA(63)/dV(65) */
B[111] = RCT[63]*V[63];
/* B(112) = dA(64)/dV(63) */
B[112] = RCT[64]*V[70];
/* B(113) = dA(64)/dV(70) */
B[113] = RCT[64]*V[63];
/* B(114) = dA(65)/dV(63) */
B[114] = RCT[65]*V[67];
/* B(115) = dA(65)/dV(67) */
B[115] = RCT[65]*V[63];
/* B(116) = dA(66)/dV(47) */
B[116] = RCT[66]*V[63];
/* B(117) = dA(66)/dV(63) */
B[117] = RCT[66]*V[47];
/* B(118) = dA(67)/dV(63) */
B[118] = RCT[67]*2*V[63];
/* B(119) = dA(68)/dV(69) */
B[119] = RCT[68]*V[71];
/* B(120) = dA(68)/dV(71) */
B[120] = RCT[68]*V[69];
/* B(121) = dA(69)/dV(12) */
B[121] = RCT[69];
/* B(122) = dA(70)/dV(68) */
B[122] = RCT[70]*V[71];
/* B(123) = dA(70)/dV(71) */
B[123] = RCT[70]*V[68];
/* B(124) = dA(71)/dV(62) */
B[124] = RCT[71]*V[71];
/* B(125) = dA(71)/dV(71) */
B[125] = RCT[71]*V[62];
/* B(126) = dA(72)/dV(70) */
B[126] = RCT[72]*V[71];
/* B(127) = dA(72)/dV(71) */
B[127] = RCT[72]*V[70];
/* B(128) = dA(73)/dV(65) */
B[128] = RCT[73]*V[71];
/* B(129) = dA(73)/dV(71) */
B[129] = RCT[73]*V[65];
/* B(130) = dA(74)/dV(67) */
B[130] = RCT[74]*V[71];
/* B(131) = dA(74)/dV(71) */
B[131] = RCT[74]*V[67];
/* B(132) = dA(75)/dV(47) */
B[132] = RCT[75]*V[71];
/* B(133) = dA(75)/dV(71) */
B[133] = RCT[75]*V[47];
/* B(134) = dA(76)/dV(63) */
B[134] = RCT[76]*V[71];
/* B(135) = dA(76)/dV(71) */
B[135] = RCT[76]*V[63];
/* B(136) = dA(77)/dV(71) */
B[136] = RCT[77]*2*V[71];
/* B(137) = dA(78)/dV(69) */
B[137] = RCT[78]*V[72];
/* B(138) = dA(78)/dV(72) */
B[138] = RCT[78]*V[69];
/* B(139) = dA(79)/dV(13) */
B[139] = RCT[79];
/* B(140) = dA(80)/dV(68) */
B[140] = RCT[80]*V[72];
/* B(141) = dA(80)/dV(72) */
B[141] = RCT[80]*V[68];
/* B(142) = dA(81)/dV(62) */
B[142] = RCT[81]*V[72];
/* B(143) = dA(81)/dV(72) */
B[143] = RCT[81]*V[62];
/* B(144) = dA(82)/dV(70) */
B[144] = RCT[82]*V[72];
/* B(145) = dA(82)/dV(72) */
B[145] = RCT[82]*V[70];
/* B(146) = dA(83)/dV(65) */
B[146] = RCT[83]*V[72];
/* B(147) = dA(83)/dV(72) */
B[147] = RCT[83]*V[65];
/* B(148) = dA(84)/dV(67) */
B[148] = RCT[84]*V[72];
/* B(149) = dA(84)/dV(72) */
B[149] = RCT[84]*V[67];
/* B(150) = dA(85)/dV(47) */
B[150] = RCT[85]*V[72];
/* B(151) = dA(85)/dV(72) */
B[151] = RCT[85]*V[47];
/* B(152) = dA(86)/dV(63) */
B[152] = RCT[86]*V[72];
/* B(153) = dA(86)/dV(72) */
B[153] = RCT[86]*V[63];
/* B(154) = dA(87)/dV(71) */
B[154] = RCT[87]*V[72];
/* B(155) = dA(87)/dV(72) */
B[155] = RCT[87]*V[71];
/* B(156) = dA(88)/dV(72) */
B[156] = RCT[88]*2*V[72];
/* B(157) = dA(89)/dV(66) */
B[157] = RCT[89]*V[69];
/* B(158) = dA(89)/dV(69) */
B[158] = RCT[89]*V[66];
/* B(159) = dA(90)/dV(14) */
B[159] = RCT[90];
/* B(160) = dA(91)/dV(66) */
B[160] = RCT[91]*V[68];
/* B(161) = dA(91)/dV(68) */
B[161] = RCT[91]*V[66];
/* B(162) = dA(92)/dV(62) */
B[162] = RCT[92]*V[66];
/* B(163) = dA(92)/dV(66) */
B[163] = RCT[92]*V[62];
/* B(164) = dA(93)/dV(66) */
B[164] = RCT[93]*V[70];
/* B(165) = dA(93)/dV(70) */
B[165] = RCT[93]*V[66];
/* B(166) = dA(94)/dV(65) */
B[166] = RCT[94]*V[66];
/* B(167) = dA(94)/dV(66) */
B[167] = RCT[94]*V[65];
/* B(168) = dA(95)/dV(66) */
B[168] = RCT[95]*V[67];
/* B(169) = dA(95)/dV(67) */
B[169] = RCT[95]*V[66];
/* B(170) = dA(96)/dV(47) */
B[170] = RCT[96]*V[66];
/* B(171) = dA(96)/dV(66) */
B[171] = RCT[96]*V[47];
/* B(172) = dA(97)/dV(63) */
B[172] = RCT[97]*V[66];
/* B(173) = dA(97)/dV(66) */
B[173] = RCT[97]*V[63];
/* B(174) = dA(98)/dV(66) */
B[174] = RCT[98]*V[71];
/* B(175) = dA(98)/dV(71) */
B[175] = RCT[98]*V[66];
/* B(176) = dA(99)/dV(66) */
B[176] = RCT[99]*V[72];
/* B(177) = dA(99)/dV(72) */
B[177] = RCT[99]*V[66];
/* B(178) = dA(100)/dV(66) */
B[178] = RCT[100]*2*V[66];
/* B(179) = dA(101)/dV(64) */
B[179] = RCT[101]*V[69];
/* B(180) = dA(101)/dV(69) */
B[180] = RCT[101]*V[64];
/* B(181) = dA(102)/dV(15) */
B[181] = RCT[102];
/* B(182) = dA(103)/dV(64) */
B[182] = RCT[103]*V[68];
/* B(183) = dA(103)/dV(68) */
B[183] = RCT[103]*V[64];
/* B(184) = dA(104)/dV(62) */
B[184] = RCT[104]*V[64];
/* B(185) = dA(104)/dV(64) */
B[185] = RCT[104]*V[62];
/* B(186) = dA(105)/dV(64) */
B[186] = RCT[105]*V[70];
/* B(187) = dA(105)/dV(70) */
B[187] = RCT[105]*V[64];
/* B(188) = dA(106)/dV(64) */
B[188] = RCT[106]*V[65];
/* B(189) = dA(106)/dV(65) */
B[189] = RCT[106]*V[64];
/* B(190) = dA(107)/dV(64) */
B[190] = RCT[107]*V[67];
/* B(191) = dA(107)/dV(67) */
B[191] = RCT[107]*V[64];
/* B(192) = dA(108)/dV(47) */
B[192] = RCT[108]*V[64];
/* B(193) = dA(108)/dV(64) */
B[193] = RCT[108]*V[47];
/* B(194) = dA(109)/dV(63) */
B[194] = RCT[109]*V[64];
/* B(195) = dA(109)/dV(64) */
B[195] = RCT[109]*V[63];
/* B(196) = dA(110)/dV(64) */
B[196] = RCT[110]*V[71];
/* B(197) = dA(110)/dV(71) */
B[197] = RCT[110]*V[64];
/* B(198) = dA(111)/dV(64) */
B[198] = RCT[111]*V[72];
/* B(199) = dA(111)/dV(72) */
B[199] = RCT[111]*V[64];
/* B(200) = dA(112)/dV(64) */
B[200] = RCT[112]*V[66];
/* B(201) = dA(112)/dV(66) */
B[201] = RCT[112]*V[64];
/* B(202) = dA(113)/dV(64) */
B[202] = RCT[113]*2*V[64];
/* B(203) = dA(114)/dV(21) */
B[203] = RCT[114]*V[69];
/* B(204) = dA(114)/dV(69) */
B[204] = RCT[114]*V[21];
/* B(205) = dA(115)/dV(21) */
B[205] = RCT[115];
/* B(206) = dA(116)/dV(45) */
B[206] = RCT[116]*V[69];
/* B(207) = dA(116)/dV(69) */
B[207] = RCT[116]*V[45];
/* B(208) = dA(117)/dV(45) */
B[208] = RCT[117]*V[62];
/* B(209) = dA(117)/dV(62) */
B[209] = RCT[117]*V[45];
/* B(210) = dA(118)/dV(45) */
B[210] = RCT[118];
/* B(211) = dA(119)/dV(27) */
B[211] = RCT[119]*V[69];
/* B(212) = dA(119)/dV(69) */
B[212] = RCT[119]*V[27];
/* B(213) = dA(120)/dV(27) */
B[213] = RCT[120]*V[62];
/* B(214) = dA(120)/dV(62) */
B[214] = RCT[120]*V[27];
/* B(215) = dA(121)/dV(27) */
B[215] = RCT[121];
/* B(216) = dA(122)/dV(55) */
B[216] = RCT[122];
/* B(217) = dA(123)/dV(55) */
B[217] = RCT[123];
/* B(218) = dA(124)/dV(55) */
B[218] = RCT[124]*V[73];
/* B(219) = dA(124)/dV(73) */
B[219] = RCT[124]*V[55];
/* B(220) = dA(125)/dV(55) */
B[220] = RCT[125]*V[62];
/* B(221) = dA(125)/dV(62) */
B[221] = RCT[125]*V[55];
/* B(222) = dA(126)/dV(26) */
B[222] = RCT[126];
/* B(223) = dA(127)/dV(26) */
B[223] = RCT[127]*V[68];
/* B(224) = dA(127)/dV(68) */
B[224] = RCT[127]*V[26];
/* B(225) = dA(128)/dV(55) */
B[225] = RCT[128]*V[70];
/* B(226) = dA(128)/dV(70) */
B[226] = RCT[128]*V[55];
/* B(227) = dA(129)/dV(54) */
B[227] = RCT[129]*V[73];
/* B(228) = dA(129)/dV(73) */
B[228] = RCT[129]*V[54];
/* B(229) = dA(130)/dV(54) */
B[229] = RCT[130];
/* B(230) = dA(131)/dV(54) */
B[230] = RCT[131]*V[70];
/* B(231) = dA(131)/dV(70) */
B[231] = RCT[131]*V[54];
/* B(232) = dA(132)/dV(58) */
B[232] = RCT[132]*V[73];
/* B(233) = dA(132)/dV(73) */
B[233] = RCT[132]*V[58];
/* B(234) = dA(133)/dV(58) */
B[234] = RCT[133];
/* B(235) = dA(134)/dV(58) */
B[235] = RCT[134]*V[70];
/* B(236) = dA(134)/dV(70) */
B[236] = RCT[134]*V[58];
/* B(237) = dA(135)/dV(41) */
B[237] = RCT[135]*V[73];
/* B(238) = dA(135)/dV(73) */
B[238] = RCT[135]*V[41];
/* B(239) = dA(136)/dV(41) */
B[239] = RCT[136];
/* B(240) = dA(137)/dV(59) */
B[240] = RCT[137]*V[73];
/* B(241) = dA(137)/dV(73) */
B[241] = RCT[137]*V[59];
/* B(242) = dA(138)/dV(59) */
B[242] = RCT[138];
/* B(243) = dA(139)/dV(28) */
B[243] = RCT[139]*V[73];
/* B(244) = dA(139)/dV(73) */
B[244] = RCT[139]*V[28];
/* B(245) = dA(140)/dV(25) */
B[245] = RCT[140]*V[73];
/* B(246) = dA(140)/dV(73) */
B[246] = RCT[140]*V[25];
/* B(247) = dA(141)/dV(25) */
B[247] = RCT[141];
/* B(248) = dA(142)/dV(36) */
B[248] = RCT[142]*V[73];
/* B(249) = dA(142)/dV(73) */
B[249] = RCT[142]*V[36];
/* B(250) = dA(143)/dV(36) */
B[250] = RCT[143];
/* B(251) = dA(144)/dV(44) */
B[251] = RCT[144];
/* B(252) = dA(145)/dV(44) */
B[252] = RCT[145];
/* B(253) = dA(146)/dV(44) */
B[253] = RCT[146]*V[73];
/* B(254) = dA(146)/dV(73) */
B[254] = RCT[146]*V[44];
/* B(255) = dA(147)/dV(44) */
B[255] = RCT[147]*V[70];
/* B(256) = dA(147)/dV(70) */
B[256] = RCT[147]*V[44];
/* B(257) = dA(148)/dV(40) */
B[257] = RCT[148];
/* B(258) = dA(149)/dV(40) */
B[258] = 1.5e-11*V[73];
/* B(259) = dA(149)/dV(73) */
B[259] = 1.5e-11*V[40];
/* B(260) = dA(150)/dV(40) */
B[260] = RCT[150]*V[70];
/* B(261) = dA(150)/dV(70) */
B[261] = RCT[150]*V[40];
/* B(262) = dA(151)/dV(11) */
B[262] = RCT[151];
/* B(263) = dA(152)/dV(38) */
B[263] = RCT[152]*V[73];
/* B(264) = dA(152)/dV(73) */
B[264] = RCT[152]*V[38];
/* B(265) = dA(153)/dV(38) */
B[265] = RCT[153]*V[70];
/* B(266) = dA(153)/dV(70) */
B[266] = RCT[153]*V[38];
/* B(267) = dA(154)/dV(33) */
B[267] = RCT[154]*V[73];
/* B(268) = dA(154)/dV(73) */
B[268] = RCT[154]*V[33];
/* B(269) = dA(155)/dV(33) */
B[269] = RCT[155]*V[70];
/* B(270) = dA(155)/dV(70) */
B[270] = RCT[155]*V[33];
/* B(271) = dA(156)/dV(35) */
B[271] = RCT[156]*V[70];
/* B(272) = dA(156)/dV(70) */
B[272] = RCT[156]*V[35];
/* B(273) = dA(157)/dV(37) */
B[273] = RCT[157]*V[73];
/* B(274) = dA(157)/dV(73) */
B[274] = RCT[157]*V[37];
/* B(275) = dA(158)/dV(37) */
B[275] = RCT[158];
/* B(276) = dA(159)/dV(37) */
B[276] = RCT[159]*V[70];
/* B(277) = dA(159)/dV(70) */
B[277] = RCT[159]*V[37];
/* B(278) = dA(160)/dV(49) */
B[278] = RCT[160]*V[73];
/* B(279) = dA(160)/dV(73) */
B[279] = RCT[160]*V[49];
/* B(280) = dA(161)/dV(49) */
B[280] = RCT[161]*V[61];
/* B(281) = dA(161)/dV(61) */
B[281] = RCT[161]*V[49];
/* B(282) = dA(162)/dV(49) */
B[282] = RCT[162]*V[70];
/* B(283) = dA(162)/dV(70) */
B[283] = RCT[162]*V[49];
/* B(284) = dA(163)/dV(49) */
B[284] = RCT[163]*V[57];
/* B(285) = dA(163)/dV(57) */
B[285] = RCT[163]*V[49];
/* B(286) = dA(164)/dV(49) */
B[286] = RCT[164];
/* B(287) = dA(165)/dV(53) */
B[287] = RCT[165]*V[73];
/* B(288) = dA(165)/dV(73) */
B[288] = RCT[165]*V[53];
/* B(289) = dA(166)/dV(53) */
B[289] = RCT[166]*V[61];
/* B(290) = dA(166)/dV(61) */
B[290] = RCT[166]*V[53];
/* B(291) = dA(167)/dV(53) */
B[291] = RCT[167]*V[57];
/* B(292) = dA(167)/dV(57) */
B[292] = RCT[167]*V[53];
/* B(293) = dA(168)/dV(53) */
B[293] = RCT[168];
/* B(294) = dA(169)/dV(51) */
B[294] = RCT[169]*V[73];
/* B(295) = dA(169)/dV(73) */
B[295] = RCT[169]*V[51];
/* B(296) = dA(170)/dV(51) */
B[296] = RCT[170]*V[61];
/* B(297) = dA(170)/dV(61) */
B[297] = RCT[170]*V[51];
/* B(298) = dA(171)/dV(51) */
B[298] = RCT[171]*V[70];
/* B(299) = dA(171)/dV(70) */
B[299] = RCT[171]*V[51];
/* B(300) = dA(172)/dV(51) */
B[300] = RCT[172];
/* B(301) = dA(173)/dV(60) */
B[301] = RCT[173]*V[73];
/* B(302) = dA(173)/dV(73) */
B[302] = RCT[173]*V[60];
/* B(303) = dA(174)/dV(60) */
B[303] = RCT[174];
/* B(304) = dA(175)/dV(56) */
B[304] = RCT[175]*V[73];
/* B(305) = dA(175)/dV(73) */
B[305] = RCT[175]*V[56];
/* B(306) = dA(176)/dV(56) */
B[306] = RCT[176];
/* B(307) = dA(177)/dV(34) */
B[307] = RCT[177]*V[73];
/* B(308) = dA(177)/dV(73) */
B[308] = RCT[177]*V[34];
/* B(309) = dA(178)/dV(34) */
B[309] = RCT[178]*V[61];
/* B(310) = dA(178)/dV(61) */
B[310] = RCT[178]*V[34];
/* B(311) = dA(179)/dV(31) */
B[311] = RCT[179]*V[73];
/* B(312) = dA(179)/dV(73) */
B[312] = RCT[179]*V[31];
/* B(313) = dA(180)/dV(31) */
B[313] = RCT[180];
/* B(314) = dA(181)/dV(32) */
B[314] = RCT[181]*V[73];
/* B(315) = dA(181)/dV(73) */
B[315] = RCT[181]*V[32];
/* B(316) = dA(182)/dV(32) */
B[316] = RCT[182];
/* B(317) = dA(183)/dV(73) */
B[317] = RCT[183]*F[4];
/* B(319) = dA(184)/dV(43) */
B[319] = RCT[184]*V[73];
/* B(320) = dA(184)/dV(73) */
B[320] = RCT[184]*V[43];
/* B(321) = dA(185)/dV(43) */
B[321] = RCT[185]*V[61];
/* B(322) = dA(185)/dV(61) */
B[322] = RCT[185]*V[43];
/* B(323) = dA(186)/dV(43) */
B[323] = RCT[186]*V[70];
/* B(324) = dA(186)/dV(70) */
B[324] = RCT[186]*V[43];
/* B(325) = dA(187)/dV(43) */
B[325] = RCT[187]*V[57];
/* B(326) = dA(187)/dV(57) */
B[326] = RCT[187]*V[43];
/* B(327) = dA(188)/dV(46) */
B[327] = RCT[188]*V[73];
/* B(328) = dA(188)/dV(73) */
B[328] = RCT[188]*V[46];
/* B(329) = dA(189)/dV(46) */
B[329] = RCT[189]*V[61];
/* B(330) = dA(189)/dV(61) */
B[330] = RCT[189]*V[46];
/* B(331) = dA(190)/dV(46) */
B[331] = RCT[190]*V[70];
/* B(332) = dA(190)/dV(70) */
B[332] = RCT[190]*V[46];
/* B(333) = dA(191)/dV(46) */
B[333] = RCT[191]*V[57];
/* B(334) = dA(191)/dV(57) */
B[334] = RCT[191]*V[46];
/* B(335) = dA(192)/dV(48) */
B[335] = RCT[192]*V[73];
/* B(336) = dA(192)/dV(73) */
B[336] = RCT[192]*V[48];
/* B(337) = dA(193)/dV(48) */
B[337] = RCT[193]*V[61];
/* B(338) = dA(193)/dV(61) */
B[338] = RCT[193]*V[48];
/* B(339) = dA(194)/dV(48) */
B[339] = RCT[194]*V[70];
/* B(340) = dA(194)/dV(70) */
B[340] = RCT[194]*V[48];
/* B(341) = dA(195)/dV(48) */
B[341] = RCT[195]*V[57];
/* B(342) = dA(195)/dV(57) */
B[342] = RCT[195]*V[48];
/* B(343) = dA(196)/dV(10) */
B[343] = RCT[196]*V[73];
/* B(344) = dA(196)/dV(73) */
B[344] = RCT[196]*V[10];
/* B(345) = dA(197)/dV(19) */
B[345] = RCT[197]*V[73];
/* B(346) = dA(197)/dV(73) */
B[346] = RCT[197]*V[19];
/* B(347) = dA(198)/dV(20) */
B[347] = RCT[198]*V[73];
/* B(348) = dA(198)/dV(73) */
B[348] = RCT[198]*V[20];
/* B(349) = dA(199)/dV(29) */
B[349] = RCT[199]*V[73];
/* B(350) = dA(199)/dV(73) */
B[350] = RCT[199]*V[29];
/* B(351) = dA(200)/dV(22) */
B[351] = RCT[200]*V[73];
/* B(352) = dA(200)/dV(73) */
B[352] = RCT[200]*V[22];
/* B(353) = dA(201)/dV(30) */
B[353] = RCT[201]*V[73];
/* B(354) = dA(201)/dV(73) */
B[354] = RCT[201]*V[30];
/* B(355) = dA(202)/dV(23) */
B[355] = RCT[202]*V[73];
/* B(356) = dA(202)/dV(73) */
B[356] = RCT[202]*V[23];
/* B(357) = dA(203)/dV(50) */
B[357] = RCT[203]*V[73];
/* B(358) = dA(203)/dV(73) */
B[358] = RCT[203]*V[50];
/* B(359) = dA(204)/dV(50) */
B[359] = RCT[204]*V[61];
/* B(360) = dA(204)/dV(61) */
B[360] = RCT[204]*V[50];
/* B(361) = dA(205)/dV(50) */
B[361] = RCT[205]*V[70];
/* B(362) = dA(205)/dV(70) */
B[362] = RCT[205]*V[50];
/* B(363) = dA(206)/dV(50) */
B[363] = RCT[206]*V[57];
/* B(364) = dA(206)/dV(57) */
B[364] = RCT[206]*V[50];
/* B(365) = dA(207)/dV(52) */
B[365] = RCT[207]*V[73];
/* B(366) = dA(207)/dV(73) */
B[366] = RCT[207]*V[52];
/* B(367) = dA(208)/dV(52) */
B[367] = RCT[208]*V[61];
/* B(368) = dA(208)/dV(61) */
B[368] = RCT[208]*V[52];
/* B(369) = dA(209)/dV(52) */
B[369] = RCT[209]*V[70];
/* B(370) = dA(209)/dV(70) */
B[370] = RCT[209]*V[52];
/* B(371) = dA(210)/dV(52) */
B[371] = RCT[210]*V[57];
/* B(372) = dA(210)/dV(57) */
B[372] = RCT[210]*V[52];
/* Construct the Jacobian terms from B's */
/* JVS(0) = Jac_FULL(0,0) */
JVS[0] = 0;
/* JVS(1) = Jac_FULL(0,8) */
JVS[1] = B[74];
/* JVS(2) = Jac_FULL(0,73) */
JVS[2] = B[75];
/* JVS(3) = Jac_FULL(1,1) */
JVS[3] = 0;
/* JVS(4) = Jac_FULL(1,19) */
JVS[4] = 0.121*B[345];
/* JVS(5) = Jac_FULL(1,26) */
JVS[5] = B[223];
/* JVS(6) = Jac_FULL(1,43) */
JVS[6] = 0.37*B[321];
/* JVS(7) = Jac_FULL(1,46) */
JVS[7] = 0.204*B[329];
/* JVS(8) = Jac_FULL(1,48) */
JVS[8] = 0.103*B[337];
/* JVS(9) = Jac_FULL(1,49) */
JVS[9] = 0.333*B[280];
/* JVS(10) = Jac_FULL(1,50) */
JVS[10] = 0.185*B[359];
/* JVS(11) = Jac_FULL(1,51) */
JVS[11] = 0.1*B[296];
/* JVS(12) = Jac_FULL(1,52) */
JVS[12] = 0.073*B[367];
/* JVS(13) = Jac_FULL(1,53) */
JVS[13] = 0.351*B[289];
/* JVS(14) = Jac_FULL(1,61) */
JVS[14] = 0.333*B[281]+0.351*B[290]+0.1*B[297]+0.37*B[322]+0.204
*B[330]+0.103*B[338]+0.185*B[360]+0.073*B[368];
/* JVS(15) = Jac_FULL(1,68) */
JVS[15] = B[224];
/* JVS(16) = Jac_FULL(1,73) */
JVS[16] = 0.121*B[346];
/* JVS(17) = Jac_FULL(2,2) */
JVS[17] = 0;
/* JVS(18) = Jac_FULL(2,50) */
JVS[18] = 0.05*B[359];
/* JVS(19) = Jac_FULL(2,52) */
JVS[19] = 0.129*B[367];
/* JVS(20) = Jac_FULL(2,61) */
JVS[20] = 0.05*B[360]+0.129*B[368];
/* JVS(21) = Jac_FULL(2,62) */
JVS[21] = 0.25*B[124];
/* JVS(22) = Jac_FULL(2,63) */
JVS[22] = B[134];
/* JVS(23) = Jac_FULL(2,65) */
JVS[23] = B[128];
/* JVS(24) = Jac_FULL(2,67) */
JVS[24] = B[130];
/* JVS(25) = Jac_FULL(2,71) */
JVS[25] = 0.25*B[125]+B[129]+B[131]+B[135];
/* JVS(26) = Jac_FULL(3,3) */
JVS[26] = 0;
/* JVS(27) = Jac_FULL(3,46) */
JVS[27] = 0.15*B[329];
/* JVS(28) = Jac_FULL(3,48) */
JVS[28] = 0.189*B[337];
/* JVS(29) = Jac_FULL(3,50) */
JVS[29] = 0.119*B[359];
/* JVS(30) = Jac_FULL(3,51) */
JVS[30] = 0.372*B[296];
/* JVS(31) = Jac_FULL(3,52) */
JVS[31] = 0.247*B[367];
/* JVS(32) = Jac_FULL(3,61) */
JVS[32] = 0.372*B[297]+0.15*B[330]+0.189*B[338]+0.119*B[360]+0.247
*B[368];
/* JVS(33) = Jac_FULL(3,62) */
JVS[33] = 0.25*B[142]+0.25*B[162]+0.25*B[184];
/* JVS(34) = Jac_FULL(3,63) */
JVS[34] = B[152]+B[172]+2*B[194];
/* JVS(35) = Jac_FULL(3,64) */
JVS[35] = 0.25*B[185]+B[188]+B[190]+2*B[195];
/* JVS(36) = Jac_FULL(3,65) */
JVS[36] = B[146]+B[166]+B[189];
/* JVS(37) = Jac_FULL(3,66) */
JVS[37] = 0.25*B[163]+B[167]+B[168]+B[173];
/* JVS(38) = Jac_FULL(3,67) */
JVS[38] = B[148]+B[169]+B[191];
/* JVS(39) = Jac_FULL(3,72) */
JVS[39] = 0.25*B[143]+B[147]+B[149]+B[153];
/* JVS(40) = Jac_FULL(4,4) */
JVS[40] = 0;
/* JVS(41) = Jac_FULL(4,62) */
JVS[41] = 0.75*B[124];
/* JVS(42) = Jac_FULL(4,71) */
JVS[42] = 0.75*B[125];
/* JVS(43) = Jac_FULL(5,5) */
JVS[43] = 0;
/* JVS(44) = Jac_FULL(5,62) */
JVS[44] = 0.75*B[142]+0.75*B[162]+0.75*B[184];
/* JVS(45) = Jac_FULL(5,64) */
JVS[45] = 0.75*B[185];
/* JVS(46) = Jac_FULL(5,66) */
JVS[46] = 0.75*B[163];
/* JVS(47) = Jac_FULL(5,72) */
JVS[47] = 0.75*B[143];
/* JVS(48) = Jac_FULL(6,6) */
JVS[48] = 0;
/* JVS(49) = Jac_FULL(6,27) */
JVS[49] = 2*B[211];
/* JVS(50) = Jac_FULL(6,69) */
JVS[50] = 2*B[212];
/* JVS(51) = Jac_FULL(7,7) */
JVS[51] = 0;
/* JVS(52) = Jac_FULL(7,27) */
JVS[52] = 6*B[211];
/* JVS(53) = Jac_FULL(7,37) */
JVS[53] = 7*B[275];
/* JVS(54) = Jac_FULL(7,69) */
JVS[54] = 6*B[212];
/* JVS(55) = Jac_FULL(8,8) */
JVS[55] = -B[74];
/* JVS(56) = Jac_FULL(8,73) */
JVS[56] = -B[75];
/* JVS(57) = Jac_FULL(9,9) */
JVS[57] = -B[32]-B[34];
/* JVS(58) = Jac_FULL(9,61) */
JVS[58] = B[31];
/* JVS(59) = Jac_FULL(10,10) */
JVS[59] = -B[343];
/* JVS(60) = Jac_FULL(10,73) */
JVS[60] = -B[344];
/* JVS(61) = Jac_FULL(11,11) */
JVS[61] = -B[262];
/* JVS(62) = Jac_FULL(11,23) */
JVS[62] = 0.087*B[355];
/* JVS(63) = Jac_FULL(11,48) */
JVS[63] = 0.031*B[337];
/* JVS(64) = Jac_FULL(11,61) */
JVS[64] = 0.031*B[338];
/* JVS(65) = Jac_FULL(11,73) */
JVS[65] = 0.087*B[356];
/* JVS(66) = Jac_FULL(12,12) */
JVS[66] = -B[121];
/* JVS(67) = Jac_FULL(12,69) */
JVS[67] = B[119];
/* JVS(68) = Jac_FULL(12,71) */
JVS[68] = B[120];
/* JVS(69) = Jac_FULL(13,13) */
JVS[69] = -B[139];
/* JVS(70) = Jac_FULL(13,69) */
JVS[70] = B[137];
/* JVS(71) = Jac_FULL(13,72) */
JVS[71] = B[138];
/* JVS(72) = Jac_FULL(14,14) */
JVS[72] = -B[159];
/* JVS(73) = Jac_FULL(14,66) */
JVS[73] = B[157];
/* JVS(74) = Jac_FULL(14,69) */
JVS[74] = B[158];
/* JVS(75) = Jac_FULL(15,15) */
JVS[75] = -B[181];
/* JVS(76) = Jac_FULL(15,64) */
JVS[76] = B[179];
/* JVS(77) = Jac_FULL(15,69) */
JVS[77] = B[180];
/* JVS(78) = Jac_FULL(16,16) */
JVS[78] = -B[69]-B[70];
/* JVS(79) = Jac_FULL(16,62) */
JVS[79] = B[63]+B[64];
/* JVS(80) = Jac_FULL(16,73) */
JVS[80] = -B[71];
/* JVS(81) = Jac_FULL(17,17) */
JVS[81] = -B[23]-B[24];
/* JVS(82) = Jac_FULL(17,69) */
JVS[82] = B[21];
/* JVS(83) = Jac_FULL(17,70) */
JVS[83] = B[22];
/* JVS(84) = Jac_FULL(18,18) */
JVS[84] = -B[38]-B[39]-B[40];
/* JVS(85) = Jac_FULL(18,68) */
JVS[85] = B[36];
/* JVS(86) = Jac_FULL(18,73) */
JVS[86] = B[37]-B[41];
/* JVS(87) = Jac_FULL(19,19) */
JVS[87] = -B[345];
/* JVS(88) = Jac_FULL(19,73) */
JVS[88] = -B[346];
/* JVS(89) = Jac_FULL(20,20) */
JVS[89] = -B[347];
/* JVS(90) = Jac_FULL(20,73) */
JVS[90] = -B[348];
/* JVS(91) = Jac_FULL(21,20) */
JVS[91] = 0.236*B[347];
/* JVS(92) = Jac_FULL(21,21) */
JVS[92] = -B[203]-B[205];
/* JVS(93) = Jac_FULL(21,69) */
JVS[93] = -B[204];
/* JVS(94) = Jac_FULL(21,73) */
JVS[94] = 0.236*B[348];
/* JVS(95) = Jac_FULL(22,22) */
JVS[95] = -B[351];
/* JVS(96) = Jac_FULL(22,73) */
JVS[96] = -B[352];
/* JVS(97) = Jac_FULL(23,23) */
JVS[97] = -B[355];
/* JVS(98) = Jac_FULL(23,73) */
JVS[98] = -B[356];
/* JVS(99) = Jac_FULL(24,24) */
JVS[99] = -B[57]-B[58]-B[59];
/* JVS(100) = Jac_FULL(24,62) */
JVS[100] = B[55];
/* JVS(101) = Jac_FULL(24,69) */
JVS[101] = B[56];
/* JVS(102) = Jac_FULL(24,73) */
JVS[102] = -B[60];
/* JVS(103) = Jac_FULL(25,25) */
JVS[103] = -B[245]-B[247];
/* JVS(104) = Jac_FULL(25,62) */
JVS[104] = B[80];
/* JVS(105) = Jac_FULL(25,65) */
JVS[105] = B[81];
/* JVS(106) = Jac_FULL(25,73) */
JVS[106] = -B[246];
/* JVS(107) = Jac_FULL(26,26) */
JVS[107] = -B[222]-B[223];
/* JVS(108) = Jac_FULL(26,55) */
JVS[108] = B[220];
/* JVS(109) = Jac_FULL(26,62) */
JVS[109] = B[221];
/* JVS(110) = Jac_FULL(26,68) */
JVS[110] = -B[224];
/* JVS(111) = Jac_FULL(27,27) */
JVS[111] = -B[211]-B[213]-B[215];
/* JVS(112) = Jac_FULL(27,35) */
JVS[112] = B[271];
/* JVS(113) = Jac_FULL(27,62) */
JVS[113] = -B[214];
/* JVS(114) = Jac_FULL(27,69) */
JVS[114] = -B[212];
/* JVS(115) = Jac_FULL(27,70) */
JVS[115] = B[272];
/* JVS(116) = Jac_FULL(28,28) */
JVS[116] = -B[243];
/* JVS(117) = Jac_FULL(28,63) */
JVS[117] = 0.25*B[110];
/* JVS(118) = Jac_FULL(28,65) */
JVS[118] = B[84]+0.25*B[92]+0.25*B[111];
/* JVS(119) = Jac_FULL(28,67) */
JVS[119] = 0.25*B[93];
/* JVS(120) = Jac_FULL(28,73) */
JVS[120] = -B[244];
/* JVS(121) = Jac_FULL(29,29) */
JVS[121] = -B[349];
/* JVS(122) = Jac_FULL(29,73) */
JVS[122] = -B[350];
/* JVS(123) = Jac_FULL(30,30) */
JVS[123] = -B[353];
/* JVS(124) = Jac_FULL(30,73) */
JVS[124] = -B[354];
/* JVS(125) = Jac_FULL(31,23) */
JVS[125] = 0.099*B[355];
/* JVS(126) = Jac_FULL(31,30) */
JVS[126] = 0.108*B[353];
/* JVS(127) = Jac_FULL(31,31) */
JVS[127] = -B[311]-B[313];
/* JVS(128) = Jac_FULL(31,73) */
JVS[128] = -B[312]+0.108*B[354]+0.099*B[356];
/* JVS(129) = Jac_FULL(32,23) */
JVS[129] = 0.093*B[355];
/* JVS(130) = Jac_FULL(32,30) */
JVS[130] = 0.051*B[353];
/* JVS(131) = Jac_FULL(32,32) */
JVS[131] = -B[314]-B[316];
/* JVS(132) = Jac_FULL(32,73) */
JVS[132] = -B[315]+0.051*B[354]+0.093*B[356];
/* JVS(133) = Jac_FULL(33,23) */
JVS[133] = 0.187*B[355];
/* JVS(134) = Jac_FULL(33,30) */
JVS[134] = 0.207*B[353];
/* JVS(135) = Jac_FULL(33,33) */
JVS[135] = -B[267]-B[269];
/* JVS(136) = Jac_FULL(33,70) */
JVS[136] = -B[270];
/* JVS(137) = Jac_FULL(33,73) */
JVS[137] = -B[268]+0.207*B[354]+0.187*B[356];
/* JVS(138) = Jac_FULL(34,23) */
JVS[138] = 0.561*B[355];
/* JVS(139) = Jac_FULL(34,30) */
JVS[139] = 0.491*B[353];
/* JVS(140) = Jac_FULL(34,34) */
JVS[140] = -B[307]-B[309];
/* JVS(141) = Jac_FULL(34,61) */
JVS[141] = -B[310];
/* JVS(142) = Jac_FULL(34,73) */
JVS[142] = -B[308]+0.491*B[354]+0.561*B[356];
/* JVS(143) = Jac_FULL(35,27) */
JVS[143] = B[213]+B[215];
/* JVS(144) = Jac_FULL(35,35) */
JVS[144] = -B[271];
/* JVS(145) = Jac_FULL(35,45) */
JVS[145] = B[206];
/* JVS(146) = Jac_FULL(35,62) */
JVS[146] = B[214];
/* JVS(147) = Jac_FULL(35,69) */
JVS[147] = B[207];
/* JVS(148) = Jac_FULL(35,70) */
JVS[148] = -B[272];
/* JVS(149) = Jac_FULL(36,36) */
JVS[149] = -B[248]-B[250];
/* JVS(150) = Jac_FULL(36,62) */
JVS[150] = B[88]+B[108];
/* JVS(151) = Jac_FULL(36,63) */
JVS[151] = B[109];
/* JVS(152) = Jac_FULL(36,67) */
JVS[152] = B[89];
/* JVS(153) = Jac_FULL(36,73) */
JVS[153] = -B[249];
/* JVS(154) = Jac_FULL(37,23) */
JVS[154] = 0.05*B[355];
/* JVS(155) = Jac_FULL(37,30) */
JVS[155] = 0.059*B[353];
/* JVS(156) = Jac_FULL(37,37) */
JVS[156] = -B[273]-B[275]-B[276];
/* JVS(157) = Jac_FULL(37,52) */
JVS[157] = 0.061*B[365]+0.042*B[367]+0.015*B[369];
/* JVS(158) = Jac_FULL(37,61) */
JVS[158] = 0.042*B[368];
/* JVS(159) = Jac_FULL(37,70) */
JVS[159] = -B[277]+0.015*B[370];
/* JVS(160) = Jac_FULL(37,73) */
JVS[160] = -B[274]+0.059*B[354]+0.05*B[356]+0.061*B[366];
/* JVS(161) = Jac_FULL(38,30) */
JVS[161] = 0.017*B[353];
/* JVS(162) = Jac_FULL(38,38) */
JVS[162] = -B[263]-B[265];
/* JVS(163) = Jac_FULL(38,45) */
JVS[163] = B[208]+B[210];
/* JVS(164) = Jac_FULL(38,62) */
JVS[164] = B[209];
/* JVS(165) = Jac_FULL(38,70) */
JVS[165] = -B[266];
/* JVS(166) = Jac_FULL(38,73) */
JVS[166] = -B[264]+0.017*B[354];
/* JVS(167) = Jac_FULL(39,19) */
JVS[167] = 0.16*B[345];
/* JVS(168) = Jac_FULL(39,29) */
JVS[168] = 0.002*B[349];
/* JVS(169) = Jac_FULL(39,31) */
JVS[169] = B[313];
/* JVS(170) = Jac_FULL(39,32) */
JVS[170] = B[316];
/* JVS(171) = Jac_FULL(39,34) */
JVS[171] = B[307]+1.5*B[309];
/* JVS(172) = Jac_FULL(39,39) */
JVS[172] = -B[49];
/* JVS(173) = Jac_FULL(39,40) */
JVS[173] = B[257]+B[258]+B[260];
/* JVS(174) = Jac_FULL(39,43) */
JVS[174] = 0.5*B[321]+0.491*B[325];
/* JVS(175) = Jac_FULL(39,44) */
JVS[175] = 2*B[251]+B[252]+1.26*B[253]+1.26*B[255];
/* JVS(176) = Jac_FULL(39,46) */
JVS[176] = 0.275*B[329];
/* JVS(177) = Jac_FULL(39,48) */
JVS[177] = 0.157*B[337];
/* JVS(178) = Jac_FULL(39,49) */
JVS[178] = 0.416*B[278]+0.45*B[280]+0.5*B[282]+0.67*B[286];
/* JVS(179) = Jac_FULL(39,50) */
JVS[179] = 0.345*B[359];
/* JVS(180) = Jac_FULL(39,51) */
JVS[180] = 0.336*B[294]+0.498*B[296]+0.572*B[298]+1.233*B[300];
/* JVS(181) = Jac_FULL(39,52) */
JVS[181] = 0.265*B[367]+0.012*B[371];
/* JVS(182) = Jac_FULL(39,53) */
JVS[182] = 0.475*B[289]+0.7*B[293];
/* JVS(183) = Jac_FULL(39,54) */
JVS[183] = B[229];
/* JVS(184) = Jac_FULL(39,55) */
JVS[184] = B[216]+B[217]+B[218]+B[225];
/* JVS(185) = Jac_FULL(39,57) */
JVS[185] = 0.491*B[326]+0.012*B[372];
/* JVS(186) = Jac_FULL(39,58) */
JVS[186] = 0.034*B[232]+B[234];
/* JVS(187) = Jac_FULL(39,61) */
JVS[187] = 0.45*B[281]+0.475*B[290]+0.498*B[297]+1.5*B[310]+0.5
*B[322]+0.275*B[330]+0.157*B[338]+0.345*B[360]+0.265*B[368];
/* JVS(188) = Jac_FULL(39,70) */
JVS[188] = B[226]+1.26*B[256]+B[261]+0.5*B[283]+0.572*B[299];
/* JVS(189) = Jac_FULL(39,73) */
JVS[189] = -B[50]+B[219]+0.034*B[233]+1.26*B[254]+B[259]+0.416*B[279]
+0.336*B[295]+B[308]+0.16*B[346]+0.002*B[350];
/* JVS(190) = Jac_FULL(40,23) */
JVS[190] = 0.287*B[355];
/* JVS(191) = Jac_FULL(40,30) */
JVS[191] = 0.119*B[353];
/* JVS(192) = Jac_FULL(40,31) */
JVS[192] = 0.5*B[313];
/* JVS(193) = Jac_FULL(40,32) */
JVS[193] = 0.5*B[316];
/* JVS(194) = Jac_FULL(40,33) */
JVS[194] = 0.23*B[267];
/* JVS(195) = Jac_FULL(40,40) */
JVS[195] = -B[257]-B[258]-B[260];
/* JVS(196) = Jac_FULL(40,49) */
JVS[196] = 0.084*B[278]+0.9*B[280];
/* JVS(197) = Jac_FULL(40,51) */
JVS[197] = 0.174*B[294]+0.742*B[296]+0.008*B[298];
/* JVS(198) = Jac_FULL(40,53) */
JVS[198] = 0.3*B[287]+0.95*B[289];
/* JVS(199) = Jac_FULL(40,61) */
JVS[199] = 0.9*B[281]+0.95*B[290]+0.742*B[297];
/* JVS(200) = Jac_FULL(40,70) */
JVS[200] = -B[261]+0.008*B[299];
/* JVS(201) = Jac_FULL(40,73) */
JVS[201] = -B[259]+0.23*B[268]+0.084*B[279]+0.3*B[288]+0.174*B[295]
+0.119*B[354]+0.287*B[356];
/* JVS(202) = Jac_FULL(41,19) */
JVS[202] = 0.417*B[345];
/* JVS(203) = Jac_FULL(41,20) */
JVS[203] = 0.024*B[347];
/* JVS(204) = Jac_FULL(41,21) */
JVS[204] = B[205];
/* JVS(205) = Jac_FULL(41,22) */
JVS[205] = 0.072*B[351];
/* JVS(206) = Jac_FULL(41,29) */
JVS[206] = 0.452*B[349];
/* JVS(207) = Jac_FULL(41,41) */
JVS[207] = -B[237]-B[239];
/* JVS(208) = Jac_FULL(41,48) */
JVS[208] = 0.13*B[337];
/* JVS(209) = Jac_FULL(41,50) */
JVS[209] = 0.005*B[357]+0.001*B[359]+0.024*B[361];
/* JVS(210) = Jac_FULL(41,52) */
JVS[210] = 0.127*B[365]+0.045*B[367]+0.102*B[369];
/* JVS(211) = Jac_FULL(41,56) */
JVS[211] = 0.006*B[304]+0.02*B[306];
/* JVS(212) = Jac_FULL(41,61) */
JVS[212] = 0.13*B[338]+0.001*B[360]+0.045*B[368];
/* JVS(213) = Jac_FULL(41,69) */
JVS[213] = 0;
/* JVS(214) = Jac_FULL(41,70) */
JVS[214] = 0.024*B[362]+0.102*B[370];
/* JVS(215) = Jac_FULL(41,73) */
JVS[215] = -B[238]+0.006*B[305]+0.417*B[346]+0.024*B[348]+0.452
*B[350]+0.072*B[352]+0.005*B[358]+0.127*B[366];
/* JVS(216) = Jac_FULL(42,17) */
JVS[216] = 2*B[24];
/* JVS(217) = Jac_FULL(42,33) */
JVS[217] = B[269];
/* JVS(218) = Jac_FULL(42,35) */
JVS[218] = B[271];
/* JVS(219) = Jac_FULL(42,37) */
JVS[219] = B[276];
/* JVS(220) = Jac_FULL(42,38) */
JVS[220] = B[265];
/* JVS(221) = Jac_FULL(42,40) */
JVS[221] = B[260];
/* JVS(222) = Jac_FULL(42,42) */
JVS[222] = -B[46]-B[48];
/* JVS(223) = Jac_FULL(42,44) */
JVS[223] = B[255];
/* JVS(224) = Jac_FULL(42,45) */
JVS[224] = 0;
/* JVS(225) = Jac_FULL(42,49) */
JVS[225] = 0.5*B[282];
/* JVS(226) = Jac_FULL(42,51) */
JVS[226] = 0.15*B[298];
/* JVS(227) = Jac_FULL(42,52) */
JVS[227] = 0;
/* JVS(228) = Jac_FULL(42,53) */
JVS[228] = 0;
/* JVS(229) = Jac_FULL(42,54) */
JVS[229] = B[230];
/* JVS(230) = Jac_FULL(42,55) */
JVS[230] = B[225];
/* JVS(231) = Jac_FULL(42,58) */
JVS[231] = B[235];
/* JVS(232) = Jac_FULL(42,61) */
JVS[232] = 0;
/* JVS(233) = Jac_FULL(42,62) */
JVS[233] = 0.2*B[66];
/* JVS(234) = Jac_FULL(42,69) */
JVS[234] = B[42];
/* JVS(235) = Jac_FULL(42,70) */
JVS[235] = 0.2*B[67]+B[226]+B[231]+B[236]+B[256]+B[261]+B[266]+B[270]
+B[272]+B[277]+0.5*B[283]+0.15*B[299];
/* JVS(236) = Jac_FULL(42,73) */
JVS[236] = B[43]-B[47];
/* JVS(237) = Jac_FULL(43,43) */
JVS[237] = -B[319]-B[321]-B[323]-B[325];
/* JVS(238) = Jac_FULL(43,57) */
JVS[238] = -B[326];
/* JVS(239) = Jac_FULL(43,61) */
JVS[239] = -B[322];
/* JVS(240) = Jac_FULL(43,70) */
JVS[240] = -B[324];
/* JVS(241) = Jac_FULL(43,73) */
JVS[241] = -B[320];
/* JVS(242) = Jac_FULL(44,19) */
JVS[242] = 0.248*B[345];
/* JVS(243) = Jac_FULL(44,23) */
JVS[243] = 0.097*B[355];
/* JVS(244) = Jac_FULL(44,30) */
JVS[244] = 0.118*B[353];
/* JVS(245) = Jac_FULL(44,31) */
JVS[245] = 0.5*B[313];
/* JVS(246) = Jac_FULL(44,32) */
JVS[246] = 0.5*B[316];
/* JVS(247) = Jac_FULL(44,34) */
JVS[247] = B[309];
/* JVS(248) = Jac_FULL(44,38) */
JVS[248] = 0.23*B[263];
/* JVS(249) = Jac_FULL(44,43) */
JVS[249] = 0.009*B[325];
/* JVS(250) = Jac_FULL(44,44) */
JVS[250] = -B[251]-B[252]-B[253]-B[255];
/* JVS(251) = Jac_FULL(44,45) */
JVS[251] = 0;
/* JVS(252) = Jac_FULL(44,48) */
JVS[252] = 0.001*B[337];
/* JVS(253) = Jac_FULL(44,51) */
JVS[253] = 0.15*B[294]+0.023*B[296];
/* JVS(254) = Jac_FULL(44,57) */
JVS[254] = 0.009*B[326];
/* JVS(255) = Jac_FULL(44,61) */
JVS[255] = 0.023*B[297]+B[310]+0.001*B[338];
/* JVS(256) = Jac_FULL(44,62) */
JVS[256] = 0;
/* JVS(257) = Jac_FULL(44,70) */
JVS[257] = -B[256];
/* JVS(258) = Jac_FULL(44,73) */
JVS[258] = -B[254]+0.23*B[264]+0.15*B[295]+0.248*B[346]+0.118*B[354]
+0.097*B[356];
/* JVS(259) = Jac_FULL(45,33) */
JVS[259] = 0.24*B[267]+B[269];
/* JVS(260) = Jac_FULL(45,38) */
JVS[260] = 0.24*B[263]+B[265];
/* JVS(261) = Jac_FULL(45,45) */
JVS[261] = -B[206]-B[208]-B[210];
/* JVS(262) = Jac_FULL(45,62) */
JVS[262] = -B[209];
/* JVS(263) = Jac_FULL(45,64) */
JVS[263] = B[200];
/* JVS(264) = Jac_FULL(45,66) */
JVS[264] = B[160]+B[164]+B[174]+B[176]+2*B[178]+B[201];
/* JVS(265) = Jac_FULL(45,68) */
JVS[265] = B[161];
/* JVS(266) = Jac_FULL(45,69) */
JVS[266] = -B[207];
/* JVS(267) = Jac_FULL(45,70) */
JVS[267] = B[165]+B[266]+B[270];
/* JVS(268) = Jac_FULL(45,71) */
JVS[268] = B[175];
/* JVS(269) = Jac_FULL(45,72) */
JVS[269] = B[177];
/* JVS(270) = Jac_FULL(45,73) */
JVS[270] = 0.24*B[264]+0.24*B[268];
/* JVS(271) = Jac_FULL(46,46) */
JVS[271] = -B[327]-B[329]-B[331]-B[333];
/* JVS(272) = Jac_FULL(46,57) */
JVS[272] = -B[334];
/* JVS(273) = Jac_FULL(46,61) */
JVS[273] = -B[330];
/* JVS(274) = Jac_FULL(46,70) */
JVS[274] = -B[332];
/* JVS(275) = Jac_FULL(46,73) */
JVS[275] = -B[328];
/* JVS(276) = Jac_FULL(47,20) */
JVS[276] = 0.559*B[347];
/* JVS(277) = Jac_FULL(47,22) */
JVS[277] = 0.948*B[351];
/* JVS(278) = Jac_FULL(47,29) */
JVS[278] = 0.936*B[349];
/* JVS(279) = Jac_FULL(47,31) */
JVS[279] = B[311]+B[313];
/* JVS(280) = Jac_FULL(47,32) */
JVS[280] = B[314]+B[316];
/* JVS(281) = Jac_FULL(47,41) */
JVS[281] = B[237];
/* JVS(282) = Jac_FULL(47,46) */
JVS[282] = 0.079*B[327]+0.126*B[329]+0.187*B[331]+0.24*B[333];
/* JVS(283) = Jac_FULL(47,47) */
JVS[283] = -B[95]-B[97]-B[99]-B[101]-B[103]-B[116]-B[132]-B[150]
-B[170]-B[192];
/* JVS(284) = Jac_FULL(47,48) */
JVS[284] = 0.5*B[335]+0.729*B[337]+0.75*B[339];
/* JVS(285) = Jac_FULL(47,50) */
JVS[285] = 0.205*B[357]+0.488*B[361];
/* JVS(286) = Jac_FULL(47,52) */
JVS[286] = 0.001*B[365]+0.137*B[367]+0.711*B[369];
/* JVS(287) = Jac_FULL(47,53) */
JVS[287] = 0.675*B[287];
/* JVS(288) = Jac_FULL(47,56) */
JVS[288] = 0.596*B[304]+0.152*B[306];
/* JVS(289) = Jac_FULL(47,57) */
JVS[289] = 0.24*B[334];
/* JVS(290) = Jac_FULL(47,59) */
JVS[290] = 0.616*B[240];
/* JVS(291) = Jac_FULL(47,60) */
JVS[291] = 0.515*B[303];
/* JVS(292) = Jac_FULL(47,61) */
JVS[292] = 0.126*B[330]+0.729*B[338]+0.137*B[368];
/* JVS(293) = Jac_FULL(47,62) */
JVS[293] = -B[98];
/* JVS(294) = Jac_FULL(47,63) */
JVS[294] = -B[117];
/* JVS(295) = Jac_FULL(47,64) */
JVS[295] = -B[193]+B[200];
/* JVS(296) = Jac_FULL(47,65) */
JVS[296] = -B[102];
/* JVS(297) = Jac_FULL(47,66) */
JVS[297] = B[160]+B[164]-B[171]+B[174]+B[176]+2*B[178]+B[201];
/* JVS(298) = Jac_FULL(47,67) */
JVS[298] = -B[104];
/* JVS(299) = Jac_FULL(47,68) */
JVS[299] = -B[96]+B[161];
/* JVS(300) = Jac_FULL(47,69) */
JVS[300] = 0;
/* JVS(301) = Jac_FULL(47,70) */
JVS[301] = -B[100]+B[165]+0.187*B[332]+0.75*B[340]+0.488*B[362]+0.711
*B[370];
/* JVS(302) = Jac_FULL(47,71) */
JVS[302] = -B[133]+B[175];
/* JVS(303) = Jac_FULL(47,72) */
JVS[303] = -B[151]+B[177];
/* JVS(304) = Jac_FULL(47,73) */
JVS[304] = B[238]+0.616*B[241]+0.675*B[288]+0.596*B[305]+B[312]
+B[315]+0.079*B[328]+0.5*B[336]+0.559*B[348]+0.936*B[350]
+0.948*B[352]+0.205*B[358]+0.001*B[366];
/* JVS(305) = Jac_FULL(48,48) */
JVS[305] = -B[335]-B[337]-B[339]-B[341];
/* JVS(306) = Jac_FULL(48,57) */
JVS[306] = -B[342];
/* JVS(307) = Jac_FULL(48,61) */
JVS[307] = -B[338];
/* JVS(308) = Jac_FULL(48,70) */
JVS[308] = -B[340];
/* JVS(309) = Jac_FULL(48,73) */
JVS[309] = -B[336];
/* JVS(310) = Jac_FULL(49,46) */
JVS[310] = 0.23*B[327]+0.39*B[329];
/* JVS(311) = Jac_FULL(49,49) */
JVS[311] = -B[278]-B[280]-B[282]-B[284]-B[286];
/* JVS(312) = Jac_FULL(49,52) */
JVS[312] = 0.025*B[365]+0.026*B[367]+0.012*B[371];
/* JVS(313) = Jac_FULL(49,57) */
JVS[313] = -B[285]+0.012*B[372];
/* JVS(314) = Jac_FULL(49,61) */
JVS[314] = -B[281]+0.39*B[330]+0.026*B[368];
/* JVS(315) = Jac_FULL(49,70) */
JVS[315] = -B[283];
/* JVS(316) = Jac_FULL(49,73) */
JVS[316] = -B[279]+0.23*B[328]+0.025*B[366];
/* JVS(317) = Jac_FULL(50,50) */
JVS[317] = -B[357]-B[359]-B[361]-B[363];
/* JVS(318) = Jac_FULL(50,57) */
JVS[318] = -B[364];
/* JVS(319) = Jac_FULL(50,61) */
JVS[319] = -B[360];
/* JVS(320) = Jac_FULL(50,70) */
JVS[320] = -B[362];
/* JVS(321) = Jac_FULL(50,73) */
JVS[321] = -B[358];
/* JVS(322) = Jac_FULL(51,46) */
JVS[322] = 0.357*B[327]+0.936*B[331];
/* JVS(323) = Jac_FULL(51,51) */
JVS[323] = -B[294]-B[296]-B[298]-B[300];
/* JVS(324) = Jac_FULL(51,52) */
JVS[324] = 0.025*B[365];
/* JVS(325) = Jac_FULL(51,57) */
JVS[325] = 0;
/* JVS(326) = Jac_FULL(51,61) */
JVS[326] = -B[297];
/* JVS(327) = Jac_FULL(51,70) */
JVS[327] = -B[299]+0.936*B[332];
/* JVS(328) = Jac_FULL(51,73) */
JVS[328] = -B[295]+0.357*B[328]+0.025*B[366];
/* JVS(329) = Jac_FULL(52,52) */
JVS[329] = -B[365]-B[367]-B[369]-B[371];
/* JVS(330) = Jac_FULL(52,57) */
JVS[330] = -B[372];
/* JVS(331) = Jac_FULL(52,61) */
JVS[331] = -B[368];
/* JVS(332) = Jac_FULL(52,70) */
JVS[332] = -B[370];
/* JVS(333) = Jac_FULL(52,73) */
JVS[333] = -B[366];
/* JVS(334) = Jac_FULL(53,46) */
JVS[334] = 0.32*B[327]+0.16*B[329];
/* JVS(335) = Jac_FULL(53,52) */
JVS[335] = 0.019*B[367]+0.048*B[369];
/* JVS(336) = Jac_FULL(53,53) */
JVS[336] = -B[287]-B[289]-B[291]-B[293];
/* JVS(337) = Jac_FULL(53,57) */
JVS[337] = -B[292];
/* JVS(338) = Jac_FULL(53,61) */
JVS[338] = -B[290]+0.16*B[330]+0.019*B[368];
/* JVS(339) = Jac_FULL(53,70) */
JVS[339] = 0.048*B[370];
/* JVS(340) = Jac_FULL(53,73) */
JVS[340] = -B[288]+0.32*B[328];
/* JVS(341) = Jac_FULL(54,10) */
JVS[341] = B[343];
/* JVS(342) = Jac_FULL(54,20) */
JVS[342] = 0.445*B[347];
/* JVS(343) = Jac_FULL(54,22) */
JVS[343] = 0.099*B[351];
/* JVS(344) = Jac_FULL(54,29) */
JVS[344] = 0.455*B[349];
/* JVS(345) = Jac_FULL(54,43) */
JVS[345] = 0.195*B[319]+0.25*B[325];
/* JVS(346) = Jac_FULL(54,50) */
JVS[346] = 0.294*B[357]+0.154*B[359]+0.009*B[361];
/* JVS(347) = Jac_FULL(54,51) */
JVS[347] = 0.129*B[294]+0.047*B[296]+0.467*B[300];
/* JVS(348) = Jac_FULL(54,52) */
JVS[348] = 0.732*B[365]+0.456*B[367]+0.507*B[369];
/* JVS(349) = Jac_FULL(54,54) */
JVS[349] = -B[227]-B[229]-B[230];
/* JVS(350) = Jac_FULL(54,56) */
JVS[350] = 0.439*B[304]+0.431*B[306];
/* JVS(351) = Jac_FULL(54,57) */
JVS[351] = 0.25*B[326];
/* JVS(352) = Jac_FULL(54,58) */
JVS[352] = 0.034*B[232]+B[234];
/* JVS(353) = Jac_FULL(54,59) */
JVS[353] = 0.482*B[240]+B[242];
/* JVS(354) = Jac_FULL(54,60) */
JVS[354] = 0.084*B[301]+0.246*B[303];
/* JVS(355) = Jac_FULL(54,61) */
JVS[355] = 0.047*B[297]+0.154*B[360]+0.456*B[368];
/* JVS(356) = Jac_FULL(54,64) */
JVS[356] = B[198];
/* JVS(357) = Jac_FULL(54,66) */
JVS[357] = B[176];
/* JVS(358) = Jac_FULL(54,68) */
JVS[358] = B[140];
/* JVS(359) = Jac_FULL(54,70) */
JVS[359] = B[144]-B[231]+0.009*B[362]+0.507*B[370];
/* JVS(360) = Jac_FULL(54,71) */
JVS[360] = B[154];
/* JVS(361) = Jac_FULL(54,72) */
JVS[361] = B[141]+B[145]+B[155]+2*B[156]+B[177]+B[199];
/* JVS(362) = Jac_FULL(54,73) */
JVS[362] = -B[228]+0.034*B[233]+0.482*B[241]+0.129*B[295]+0.084
*B[302]+0.439*B[305]+0.195*B[320]+B[344]+0.445*B[348]+0.455
*B[350]+0.099*B[352]+0.294*B[358]+0.732*B[366];
/* JVS(363) = Jac_FULL(55,19) */
JVS[363] = 0.039*B[345];
/* JVS(364) = Jac_FULL(55,20) */
JVS[364] = 0.026*B[347];
/* JVS(365) = Jac_FULL(55,22) */
JVS[365] = 0.026*B[351];
/* JVS(366) = Jac_FULL(55,25) */
JVS[366] = 0.35*B[245]+B[247];
/* JVS(367) = Jac_FULL(55,26) */
JVS[367] = B[222];
/* JVS(368) = Jac_FULL(55,28) */
JVS[368] = B[243];
/* JVS(369) = Jac_FULL(55,29) */
JVS[369] = 0.024*B[349];
/* JVS(370) = Jac_FULL(55,41) */
JVS[370] = B[237];
/* JVS(371) = Jac_FULL(55,43) */
JVS[371] = 1.61*B[319]+B[321]+0.191*B[325];
/* JVS(372) = Jac_FULL(55,44) */
JVS[372] = B[252];
/* JVS(373) = Jac_FULL(55,45) */
JVS[373] = 0;
/* JVS(374) = Jac_FULL(55,46) */
JVS[374] = 0.624*B[327]+0.592*B[329]+0.24*B[333];
/* JVS(375) = Jac_FULL(55,48) */
JVS[375] = 0.276*B[335]+0.235*B[337];
/* JVS(376) = Jac_FULL(55,49) */
JVS[376] = 0.084*B[278]+0.2*B[280]+0.67*B[286];
/* JVS(377) = Jac_FULL(55,50) */
JVS[377] = 0.732*B[357]+0.5*B[359];
/* JVS(378) = Jac_FULL(55,51) */
JVS[378] = 0.055*B[294]+0.125*B[296]+0.227*B[298]+0.3*B[300];
/* JVS(379) = Jac_FULL(55,52) */
JVS[379] = 0.244*B[365]+0.269*B[367]+0.079*B[369];
/* JVS(380) = Jac_FULL(55,53) */
JVS[380] = 0.3*B[287]+0.1*B[289];
/* JVS(381) = Jac_FULL(55,55) */
JVS[381] = -B[216]-B[217]-B[218]-B[220]-B[225];
/* JVS(382) = Jac_FULL(55,56) */
JVS[382] = 0.01*B[304]+0.134*B[306];
/* JVS(383) = Jac_FULL(55,57) */
JVS[383] = 0.191*B[326]+0.24*B[334];
/* JVS(384) = Jac_FULL(55,59) */
JVS[384] = 0.115*B[240];
/* JVS(385) = Jac_FULL(55,60) */
JVS[385] = 0.213*B[301]+0.506*B[303];
/* JVS(386) = Jac_FULL(55,61) */
JVS[386] = 0.2*B[281]+0.1*B[290]+0.125*B[297]+B[322]+0.592*B[330]
+0.235*B[338]+0.5*B[360]+0.269*B[368];
/* JVS(387) = Jac_FULL(55,62) */
JVS[387] = -B[221];
/* JVS(388) = Jac_FULL(55,63) */
JVS[388] = 0.75*B[110];
/* JVS(389) = Jac_FULL(55,64) */
JVS[389] = B[182]+B[186]+B[188]+B[196]+B[198]+B[200]+2*B[202];
/* JVS(390) = Jac_FULL(55,65) */
JVS[390] = B[78]+B[82]+B[84]+2*B[85]+0.75*B[92]+0.75*B[111]+B[128]
+B[146]+B[166]+B[189];
/* JVS(391) = Jac_FULL(55,66) */
JVS[391] = B[167]+B[201];
/* JVS(392) = Jac_FULL(55,67) */
JVS[392] = 0.75*B[93];
/* JVS(393) = Jac_FULL(55,68) */
JVS[393] = B[79]+B[183];
/* JVS(394) = Jac_FULL(55,69) */
JVS[394] = 0;
/* JVS(395) = Jac_FULL(55,70) */
JVS[395] = B[83]+B[187]-B[226]+0.227*B[299]+0.079*B[370];
/* JVS(396) = Jac_FULL(55,71) */
JVS[396] = B[129]+B[197];
/* JVS(397) = Jac_FULL(55,72) */
JVS[397] = B[147]+B[199];
/* JVS(398) = Jac_FULL(55,73) */
JVS[398] = -B[219]+B[238]+0.115*B[241]+B[244]+0.35*B[246]+0.084
*B[279]+0.3*B[288]+0.055*B[295]+0.213*B[302]+0.01*B[305]
+1.61*B[320]+0.624*B[328]+0.276*B[336]+0.039*B[346]+0.026
*B[348]+0.024*B[350]+0.026*B[352]+0.732*B[358]+0.244*B[366];
/* JVS(399) = Jac_FULL(56,21) */
JVS[399] = B[203];
/* JVS(400) = Jac_FULL(56,48) */
JVS[400] = 0.276*B[339];
/* JVS(401) = Jac_FULL(56,50) */
JVS[401] = 0.511*B[361];
/* JVS(402) = Jac_FULL(56,51) */
JVS[402] = 0.572*B[298];
/* JVS(403) = Jac_FULL(56,52) */
JVS[403] = 0.321*B[369];
/* JVS(404) = Jac_FULL(56,56) */
JVS[404] = -0.69*B[304]-B[306];
/* JVS(405) = Jac_FULL(56,57) */
JVS[405] = 0;
/* JVS(406) = Jac_FULL(56,61) */
JVS[406] = 0;
/* JVS(407) = Jac_FULL(56,63) */
JVS[407] = B[106];
/* JVS(408) = Jac_FULL(56,68) */
JVS[408] = B[107];
/* JVS(409) = Jac_FULL(56,69) */
JVS[409] = B[204];
/* JVS(410) = Jac_FULL(56,70) */
JVS[410] = 0.572*B[299]+0.276*B[340]+0.511*B[362]+0.321*B[370];
/* JVS(411) = Jac_FULL(56,73) */
JVS[411] = -0.69*B[305];
/* JVS(412) = Jac_FULL(57,9) */
JVS[412] = B[34];
/* JVS(413) = Jac_FULL(57,43) */
JVS[413] = -B[325];
/* JVS(414) = Jac_FULL(57,46) */
JVS[414] = -B[333];
/* JVS(415) = Jac_FULL(57,48) */
JVS[415] = -B[341];
/* JVS(416) = Jac_FULL(57,49) */
JVS[416] = -B[284];
/* JVS(417) = Jac_FULL(57,50) */
JVS[417] = -B[363];
/* JVS(418) = Jac_FULL(57,52) */
JVS[418] = -B[371];
/* JVS(419) = Jac_FULL(57,53) */
JVS[419] = -B[291];
/* JVS(420) = Jac_FULL(57,57) */
JVS[420] = -B[1]-B[4]-B[6]-B[9]-B[11]-B[285]-B[292]-B[326]-B[334]
-B[342]-B[364]-B[372];
/* JVS(421) = Jac_FULL(57,61) */
JVS[421] = -B[5]+B[30];
/* JVS(422) = Jac_FULL(57,68) */
JVS[422] = -B[7];
/* JVS(423) = Jac_FULL(57,69) */
JVS[423] = B[0]-B[10]-B[12];
/* JVS(424) = Jac_FULL(57,70) */
JVS[424] = B[29];
/* JVS(425) = Jac_FULL(57,73) */
JVS[425] = 0;
/* JVS(426) = Jac_FULL(58,19) */
JVS[426] = 0.155*B[345];
/* JVS(427) = Jac_FULL(58,20) */
JVS[427] = 0.122*B[347];
/* JVS(428) = Jac_FULL(58,22) */
JVS[428] = 0.204*B[351];
/* JVS(429) = Jac_FULL(58,29) */
JVS[429] = 0.244*B[349];
/* JVS(430) = Jac_FULL(58,31) */
JVS[430] = B[311];
/* JVS(431) = Jac_FULL(58,32) */
JVS[431] = B[314];
/* JVS(432) = Jac_FULL(58,34) */
JVS[432] = B[307];
/* JVS(433) = Jac_FULL(58,36) */
JVS[433] = B[248]+B[250];
/* JVS(434) = Jac_FULL(58,43) */
JVS[434] = B[323];
/* JVS(435) = Jac_FULL(58,48) */
JVS[435] = 0.474*B[335]+0.205*B[337]+0.474*B[339]+0.147*B[341];
/* JVS(436) = Jac_FULL(58,49) */
JVS[436] = B[284];
/* JVS(437) = Jac_FULL(58,50) */
JVS[437] = 0.497*B[357]+0.363*B[359]+0.037*B[361]+0.45*B[363];
/* JVS(438) = Jac_FULL(58,51) */
JVS[438] = 0.013*B[294]+0.218*B[298];
/* JVS(439) = Jac_FULL(58,52) */
JVS[439] = 0.511*B[365]+0.305*B[367]+0.151*B[369]+0.069*B[371];
/* JVS(440) = Jac_FULL(58,53) */
JVS[440] = 0.675*B[287]+0.45*B[291];
/* JVS(441) = Jac_FULL(58,56) */
JVS[441] = 0.213*B[304]+0.147*B[306];
/* JVS(442) = Jac_FULL(58,57) */
JVS[442] = B[285]+0.45*B[292]+0.147*B[342]+0.45*B[364]+0.069*B[372];
/* JVS(443) = Jac_FULL(58,58) */
JVS[443] = -B[232]-B[234]-B[235];
/* JVS(444) = Jac_FULL(58,59) */
JVS[444] = 0.37*B[240];
/* JVS(445) = Jac_FULL(58,60) */
JVS[445] = 0.558*B[301]+0.71*B[303];
/* JVS(446) = Jac_FULL(58,61) */
JVS[446] = 0.205*B[338]+0.363*B[360]+0.305*B[368];
/* JVS(447) = Jac_FULL(58,62) */
JVS[447] = 0;
/* JVS(448) = Jac_FULL(58,63) */
JVS[448] = 0;
/* JVS(449) = Jac_FULL(58,67) */
JVS[449] = 0;
/* JVS(450) = Jac_FULL(58,68) */
JVS[450] = 0;
/* JVS(451) = Jac_FULL(58,69) */
JVS[451] = 0;
/* JVS(452) = Jac_FULL(58,70) */
JVS[452] = -B[236]+0.218*B[299]+B[324]+0.474*B[340]+0.037*B[362]
+0.151*B[370];
/* JVS(453) = Jac_FULL(58,73) */
JVS[453] = -B[233]+0.37*B[241]+B[249]+0.675*B[288]+0.013*B[295]+0.558
*B[302]+0.213*B[305]+B[308]+B[312]+B[315]+0.474*B[336]
+0.155*B[346]+0.122*B[348]+0.244*B[350]+0.204*B[352]+0.497
*B[358]+0.511*B[366];
/* JVS(454) = Jac_FULL(59,20) */
JVS[454] = 0.332*B[347];
/* JVS(455) = Jac_FULL(59,22) */
JVS[455] = 0.089*B[351];
/* JVS(456) = Jac_FULL(59,29) */
JVS[456] = 0.11*B[349];
/* JVS(457) = Jac_FULL(59,49) */
JVS[457] = 0.416*B[278];
/* JVS(458) = Jac_FULL(59,50) */
JVS[458] = 0.437*B[363];
/* JVS(459) = Jac_FULL(59,51) */
JVS[459] = 0.15*B[294]+0.21*B[296]+0.233*B[300];
/* JVS(460) = Jac_FULL(59,52) */
JVS[460] = 0.072*B[365]+0.026*B[367]+0.001*B[369]+0.659*B[371];
/* JVS(461) = Jac_FULL(59,53) */
JVS[461] = 0.55*B[291];
/* JVS(462) = Jac_FULL(59,56) */
JVS[462] = 0.177*B[304]+0.243*B[306];
/* JVS(463) = Jac_FULL(59,57) */
JVS[463] = 0.55*B[292]+0.437*B[364]+0.659*B[372];
/* JVS(464) = Jac_FULL(59,59) */
JVS[464] = -B[240]-B[242];
/* JVS(465) = Jac_FULL(59,60) */
JVS[465] = 0.115*B[301];
/* JVS(466) = Jac_FULL(59,61) */
JVS[466] = 0.21*B[297]+0.026*B[368];
/* JVS(467) = Jac_FULL(59,63) */
JVS[467] = 0.5*B[110]+B[112]+0.5*B[114]+B[118];
/* JVS(468) = Jac_FULL(59,65) */
JVS[468] = 0.5*B[111];
/* JVS(469) = Jac_FULL(59,67) */
JVS[469] = 0.5*B[115];
/* JVS(470) = Jac_FULL(59,68) */
JVS[470] = 0;
/* JVS(471) = Jac_FULL(59,69) */
JVS[471] = 0;
/* JVS(472) = Jac_FULL(59,70) */
JVS[472] = B[113]+0.001*B[370];
/* JVS(473) = Jac_FULL(59,73) */
JVS[473] = -B[241]+0.416*B[279]+0.15*B[295]+0.115*B[302]+0.177*B[305]
+0.332*B[348]+0.11*B[350]+0.089*B[352]+0.072*B[366];
/* JVS(474) = Jac_FULL(60,22) */
JVS[474] = 0.417*B[351];
/* JVS(475) = Jac_FULL(60,29) */
JVS[475] = 0.125*B[349];
/* JVS(476) = Jac_FULL(60,30) */
JVS[476] = 0.055*B[353];
/* JVS(477) = Jac_FULL(60,46) */
JVS[477] = 0.1*B[329]+0.75*B[333];
/* JVS(478) = Jac_FULL(60,48) */
JVS[478] = 0.276*B[335]+0.276*B[337]+0.853*B[341];
/* JVS(479) = Jac_FULL(60,50) */
JVS[479] = 0.119*B[357]+0.215*B[359]+0.113*B[363];
/* JVS(480) = Jac_FULL(60,51) */
JVS[480] = 0.332*B[294];
/* JVS(481) = Jac_FULL(60,52) */
JVS[481] = 0.043*B[367]+0.259*B[371];
/* JVS(482) = Jac_FULL(60,53) */
JVS[482] = 0.7*B[293];
/* JVS(483) = Jac_FULL(60,56) */
JVS[483] = 0.048*B[304]+0.435*B[306];
/* JVS(484) = Jac_FULL(60,57) */
JVS[484] = 0.75*B[334]+0.853*B[342]+0.113*B[364]+0.259*B[372];
/* JVS(485) = Jac_FULL(60,60) */
JVS[485] = -0.671*B[301]-B[303];
/* JVS(486) = Jac_FULL(60,61) */
JVS[486] = 0.1*B[330]+0.276*B[338]+0.215*B[360]+0.043*B[368];
/* JVS(487) = Jac_FULL(60,63) */
JVS[487] = 0.5*B[110]+0.5*B[114]+B[118]+B[134]+B[152]+B[172];
/* JVS(488) = Jac_FULL(60,65) */
JVS[488] = 0.5*B[111];
/* JVS(489) = Jac_FULL(60,66) */
JVS[489] = B[173];
/* JVS(490) = Jac_FULL(60,67) */
JVS[490] = 0.5*B[115];
/* JVS(491) = Jac_FULL(60,68) */
JVS[491] = 0;
/* JVS(492) = Jac_FULL(60,69) */
JVS[492] = 0;
/* JVS(493) = Jac_FULL(60,70) */
JVS[493] = 0;
/* JVS(494) = Jac_FULL(60,71) */
JVS[494] = B[135];
/* JVS(495) = Jac_FULL(60,72) */
JVS[495] = B[153];
/* JVS(496) = Jac_FULL(60,73) */
JVS[496] = 0.332*B[295]-0.671*B[302]+0.048*B[305]+0.276*B[336]+0.125
*B[350]+0.417*B[352]+0.055*B[354]+0.119*B[358];
/* JVS(497) = Jac_FULL(61,34) */
JVS[497] = -B[309];
/* JVS(498) = Jac_FULL(61,43) */
JVS[498] = -B[321];
/* JVS(499) = Jac_FULL(61,46) */
JVS[499] = -B[329];
/* JVS(500) = Jac_FULL(61,48) */
JVS[500] = -B[337];
/* JVS(501) = Jac_FULL(61,49) */
JVS[501] = -B[280];
/* JVS(502) = Jac_FULL(61,50) */
JVS[502] = -B[359];
/* JVS(503) = Jac_FULL(61,51) */
JVS[503] = -B[296];
/* JVS(504) = Jac_FULL(61,52) */
JVS[504] = -B[367];
/* JVS(505) = Jac_FULL(61,53) */
JVS[505] = -B[289];
/* JVS(506) = Jac_FULL(61,57) */
JVS[506] = B[1]-B[4];
/* JVS(507) = Jac_FULL(61,61) */
JVS[507] = -B[5]-B[13]-B[15]-B[30]-B[31]-B[51]-B[61]-B[281]-B[290]
-B[297]-B[310]-B[322]-B[330]-B[338]-B[360]-B[368];
/* JVS(508) = Jac_FULL(61,62) */
JVS[508] = -B[62]+0.25*B[124]+0.25*B[142]+0.25*B[162]+0.25*B[184];
/* JVS(509) = Jac_FULL(61,64) */
JVS[509] = 0.25*B[185];
/* JVS(510) = Jac_FULL(61,66) */
JVS[510] = 0.25*B[163];
/* JVS(511) = Jac_FULL(61,68) */
JVS[511] = -B[14];
/* JVS(512) = Jac_FULL(61,69) */
JVS[512] = -B[16];
/* JVS(513) = Jac_FULL(61,70) */
JVS[513] = 0;
/* JVS(514) = Jac_FULL(61,71) */
JVS[514] = 0.25*B[125];
/* JVS(515) = Jac_FULL(61,72) */
JVS[515] = 0.25*B[143];
/* JVS(516) = Jac_FULL(61,73) */
JVS[516] = -B[52];
/* JVS(517) = Jac_FULL(62,8) */
JVS[517] = B[74];
/* JVS(518) = Jac_FULL(62,16) */
JVS[518] = B[70];
/* JVS(519) = Jac_FULL(62,18) */
JVS[519] = B[39];
/* JVS(520) = Jac_FULL(62,19) */
JVS[520] = 0.121*B[345];
/* JVS(521) = Jac_FULL(62,23) */
JVS[521] = 0.187*B[355];
/* JVS(522) = Jac_FULL(62,24) */
JVS[522] = B[57]+0.61*B[58];
/* JVS(523) = Jac_FULL(62,25) */
JVS[523] = B[247];
/* JVS(524) = Jac_FULL(62,26) */
JVS[524] = B[222]+B[223];
/* JVS(525) = Jac_FULL(62,27) */
JVS[525] = -B[213];
/* JVS(526) = Jac_FULL(62,28) */
JVS[526] = B[243];
/* JVS(527) = Jac_FULL(62,30) */
JVS[527] = 0.224*B[353];
/* JVS(528) = Jac_FULL(62,31) */
JVS[528] = 0.5*B[313];
/* JVS(529) = Jac_FULL(62,32) */
JVS[529] = 0.5*B[316];
/* JVS(530) = Jac_FULL(62,34) */
JVS[530] = 1.5*B[309];
/* JVS(531) = Jac_FULL(62,35) */
JVS[531] = 0;
/* JVS(532) = Jac_FULL(62,36) */
JVS[532] = B[250];
/* JVS(533) = Jac_FULL(62,39) */
JVS[533] = B[49];
/* JVS(534) = Jac_FULL(62,40) */
JVS[534] = B[257];
/* JVS(535) = Jac_FULL(62,43) */
JVS[535] = 0.12*B[321]+0.5*B[325];
/* JVS(536) = Jac_FULL(62,44) */
JVS[536] = 2*B[251]+0.63*B[253]+0.63*B[255];
/* JVS(537) = Jac_FULL(62,45) */
JVS[537] = -B[208];
/* JVS(538) = Jac_FULL(62,46) */
JVS[538] = 0;
/* JVS(539) = Jac_FULL(62,48) */
JVS[539] = 0.033*B[337];
/* JVS(540) = Jac_FULL(62,49) */
JVS[540] = 0.008*B[280]+0.34*B[286];
/* JVS(541) = Jac_FULL(62,50) */
JVS[541] = 0.056*B[359];
/* JVS(542) = Jac_FULL(62,51) */
JVS[542] = 0.4*B[296]+1.233*B[300];
/* JVS(543) = Jac_FULL(62,52) */
JVS[543] = 0.003*B[367]+0.013*B[371];
/* JVS(544) = Jac_FULL(62,53) */
JVS[544] = 0.064*B[289];
/* JVS(545) = Jac_FULL(62,54) */
JVS[545] = B[229];
/* JVS(546) = Jac_FULL(62,55) */
JVS[546] = 2*B[216]+B[218]-B[220]+B[225];
/* JVS(547) = Jac_FULL(62,56) */
JVS[547] = 0.113*B[304]+0.341*B[306];
/* JVS(548) = Jac_FULL(62,57) */
JVS[548] = 0.5*B[326]+0.013*B[372];
/* JVS(549) = Jac_FULL(62,58) */
JVS[549] = B[234];
/* JVS(550) = Jac_FULL(62,59) */
JVS[550] = 0;
/* JVS(551) = Jac_FULL(62,60) */
JVS[551] = 0.379*B[301];
/* JVS(552) = Jac_FULL(62,61) */
JVS[552] = B[51]-B[61]+0.008*B[281]+0.064*B[290]+0.4*B[297]+1.5
*B[310]+0.12*B[322]+0.033*B[338]+0.056*B[360]+0.003*B[368];
/* JVS(553) = Jac_FULL(62,62) */
JVS[553] = -B[53]-B[55]-B[62]-2*B[63]-2*B[64]-B[66]-B[72]-B[80]-B[88]
-B[108]-B[124]-B[142]-B[162]-B[184]-B[209]-B[214]-B[221];
/* JVS(554) = Jac_FULL(62,63) */
JVS[554] = -B[109]+B[110]+B[112]+B[114]+B[118];
/* JVS(555) = Jac_FULL(62,64) */
JVS[555] = -B[185];
/* JVS(556) = Jac_FULL(62,65) */
JVS[556] = B[78]-B[81]+B[82]+2*B[85]+B[92]+B[111];
/* JVS(557) = Jac_FULL(62,66) */
JVS[557] = -B[163];
/* JVS(558) = Jac_FULL(62,67) */
JVS[558] = B[86]-B[89]+B[90]+B[93]+B[94]+B[115];
/* JVS(559) = Jac_FULL(62,68) */
JVS[559] = -B[54]+B[79]+B[87]+B[224];
/* JVS(560) = Jac_FULL(62,69) */
JVS[560] = -B[56];
/* JVS(561) = Jac_FULL(62,70) */
JVS[561] = B[44]-B[67]+B[83]+B[91]+B[113]+B[226]+0.63*B[256];
/* JVS(562) = Jac_FULL(62,71) */
JVS[562] = -B[125];
/* JVS(563) = Jac_FULL(62,72) */
JVS[563] = -B[143];
/* JVS(564) = Jac_FULL(62,73) */
JVS[564] = B[45]+B[50]+B[52]+B[71]-B[73]+B[75]+B[76]+B[219]+B[244]
+0.63*B[254]+0.379*B[302]+0.113*B[305]+0.121*B[346]+0.224
*B[354]+0.187*B[356];
/* JVS(565) = Jac_FULL(63,19) */
JVS[565] = 0.021*B[345];
/* JVS(566) = Jac_FULL(63,20) */
JVS[566] = 0.07*B[347];
/* JVS(567) = Jac_FULL(63,22) */
JVS[567] = 0.347*B[351];
/* JVS(568) = Jac_FULL(63,23) */
JVS[568] = 0.009*B[355];
/* JVS(569) = Jac_FULL(63,29) */
JVS[569] = 0.143*B[349];
/* JVS(570) = Jac_FULL(63,30) */
JVS[570] = 0.011*B[353];
/* JVS(571) = Jac_FULL(63,46) */
JVS[571] = 0.093*B[327]+0.008*B[329]+0.064*B[331]+0.01*B[333];
/* JVS(572) = Jac_FULL(63,48) */
JVS[572] = 0.25*B[335]+0.18*B[337]+0.25*B[339];
/* JVS(573) = Jac_FULL(63,50) */
JVS[573] = 0.09*B[357]+0.001*B[359]+0.176*B[361];
/* JVS(574) = Jac_FULL(63,51) */
JVS[574] = 0.041*B[294]+0.051*B[298];
/* JVS(575) = Jac_FULL(63,52) */
JVS[575] = 0.082*B[365]+0.002*B[367]+0.136*B[369]+0.001*B[371];
/* JVS(576) = Jac_FULL(63,53) */
JVS[576] = 0.025*B[287];
/* JVS(577) = Jac_FULL(63,56) */
JVS[577] = 0.173*B[304]+0.095*B[306];
/* JVS(578) = Jac_FULL(63,57) */
JVS[578] = 0.01*B[334]+0.001*B[372];
/* JVS(579) = Jac_FULL(63,58) */
JVS[579] = 0.001*B[232];
/* JVS(580) = Jac_FULL(63,59) */
JVS[580] = 0.042*B[240];
/* JVS(581) = Jac_FULL(63,60) */
JVS[581] = 0.07*B[301]+0.04*B[303];
/* JVS(582) = Jac_FULL(63,61) */
JVS[582] = 0.008*B[330]+0.18*B[338]+0.001*B[360]+0.002*B[368];
/* JVS(583) = Jac_FULL(63,62) */
JVS[583] = -B[108];
/* JVS(584) = Jac_FULL(63,63) */
JVS[584] = -B[106]-B[109]-B[110]-B[112]-B[114]-2*B[118]-B[134]-B[152]
-B[172]-B[194];
/* JVS(585) = Jac_FULL(63,64) */
JVS[585] = -B[195];
/* JVS(586) = Jac_FULL(63,65) */
JVS[586] = -B[111];
/* JVS(587) = Jac_FULL(63,66) */
JVS[587] = -B[173];
/* JVS(588) = Jac_FULL(63,67) */
JVS[588] = -B[115];
/* JVS(589) = Jac_FULL(63,68) */
JVS[589] = -B[107];
/* JVS(590) = Jac_FULL(63,69) */
JVS[590] = 0;
/* JVS(591) = Jac_FULL(63,70) */
JVS[591] = -B[113]+0.051*B[299]+0.064*B[332]+0.25*B[340]+0.176*B[362]
+0.136*B[370];
/* JVS(592) = Jac_FULL(63,71) */
JVS[592] = -B[135];
/* JVS(593) = Jac_FULL(63,72) */
JVS[593] = -B[153];
/* JVS(594) = Jac_FULL(63,73) */
JVS[594] = 0.001*B[233]+0.042*B[241]+0.025*B[288]+0.041*B[295]+0.07
*B[302]+0.173*B[305]+0.093*B[328]+0.25*B[336]+0.021*B[346]
+0.07*B[348]+0.143*B[350]+0.347*B[352]+0.011*B[354]+0.009
*B[356]+0.09*B[358]+0.082*B[366];
/* JVS(595) = Jac_FULL(64,15) */
JVS[595] = B[181];
/* JVS(596) = Jac_FULL(64,46) */
JVS[596] = 0.192*B[329]+0.24*B[333];
/* JVS(597) = Jac_FULL(64,49) */
JVS[597] = 0.5*B[278]+0.5*B[282]+0.33*B[286];
/* JVS(598) = Jac_FULL(64,51) */
JVS[598] = 0.289*B[294]+0.15*B[298];
/* JVS(599) = Jac_FULL(64,52) */
JVS[599] = 0;
/* JVS(600) = Jac_FULL(64,53) */
JVS[600] = 0.3*B[293];
/* JVS(601) = Jac_FULL(64,57) */
JVS[601] = 0.24*B[334];
/* JVS(602) = Jac_FULL(64,61) */
JVS[602] = 0.192*B[330];
/* JVS(603) = Jac_FULL(64,62) */
JVS[603] = -B[184];
/* JVS(604) = Jac_FULL(64,63) */
JVS[604] = -B[194];
/* JVS(605) = Jac_FULL(64,64) */
JVS[605] = -B[179]-B[182]-B[185]-B[186]-B[188]-B[190]-B[195]-B[196]
-B[198]-B[200]-2*B[202];
/* JVS(606) = Jac_FULL(64,65) */
JVS[606] = -B[189];
/* JVS(607) = Jac_FULL(64,66) */
JVS[607] = -B[201];
/* JVS(608) = Jac_FULL(64,67) */
JVS[608] = -B[191];
/* JVS(609) = Jac_FULL(64,68) */
JVS[609] = -B[183];
/* JVS(610) = Jac_FULL(64,69) */
JVS[610] = -B[180];
/* JVS(611) = Jac_FULL(64,70) */
JVS[611] = -B[187]+0.5*B[283]+0.15*B[299];
/* JVS(612) = Jac_FULL(64,71) */
JVS[612] = -B[197];
/* JVS(613) = Jac_FULL(64,72) */
JVS[613] = -B[199];
/* JVS(614) = Jac_FULL(64,73) */
JVS[614] = 0.5*B[279]+0.289*B[295];
/* JVS(615) = Jac_FULL(65,21) */
JVS[615] = B[205];
/* JVS(616) = Jac_FULL(65,25) */
JVS[616] = 0.65*B[245];
/* JVS(617) = Jac_FULL(65,29) */
JVS[617] = 0.011*B[349];
/* JVS(618) = Jac_FULL(65,41) */
JVS[618] = B[239];
/* JVS(619) = Jac_FULL(65,43) */
JVS[619] = 0.3*B[325];
/* JVS(620) = Jac_FULL(65,46) */
JVS[620] = 0.25*B[333];
/* JVS(621) = Jac_FULL(65,48) */
JVS[621] = 0;
/* JVS(622) = Jac_FULL(65,50) */
JVS[622] = 0.076*B[359];
/* JVS(623) = Jac_FULL(65,52) */
JVS[623] = 0.197*B[367]+0.03*B[369];
/* JVS(624) = Jac_FULL(65,53) */
JVS[624] = 0.3*B[293];
/* JVS(625) = Jac_FULL(65,54) */
JVS[625] = B[229];
/* JVS(626) = Jac_FULL(65,56) */
JVS[626] = 0;
/* JVS(627) = Jac_FULL(65,57) */
JVS[627] = 0.3*B[326]+0.25*B[334];
/* JVS(628) = Jac_FULL(65,58) */
JVS[628] = 0;
/* JVS(629) = Jac_FULL(65,59) */
JVS[629] = 0;
/* JVS(630) = Jac_FULL(65,60) */
JVS[630] = 0;
/* JVS(631) = Jac_FULL(65,61) */
JVS[631] = 0.076*B[360]+0.197*B[368];
/* JVS(632) = Jac_FULL(65,62) */
JVS[632] = -B[80];
/* JVS(633) = Jac_FULL(65,63) */
JVS[633] = -B[110];
/* JVS(634) = Jac_FULL(65,64) */
JVS[634] = -B[188]+B[196];
/* JVS(635) = Jac_FULL(65,65) */
JVS[635] = -B[78]-B[81]-B[82]-2*B[84]-2*B[85]-B[92]-B[111]-B[128]
-B[146]-B[166]-B[189];
/* JVS(636) = Jac_FULL(65,66) */
JVS[636] = -B[167]+B[174];
/* JVS(637) = Jac_FULL(65,67) */
JVS[637] = -B[93];
/* JVS(638) = Jac_FULL(65,68) */
JVS[638] = -B[79]+B[122];
/* JVS(639) = Jac_FULL(65,69) */
JVS[639] = 0;
/* JVS(640) = Jac_FULL(65,70) */
JVS[640] = -B[83]+B[126]+0.03*B[370];
/* JVS(641) = Jac_FULL(65,71) */
JVS[641] = B[123]+B[127]-B[129]+2*B[136]+B[154]+B[175]+B[197];
/* JVS(642) = Jac_FULL(65,72) */
JVS[642] = -B[147]+B[155];
/* JVS(643) = Jac_FULL(65,73) */
JVS[643] = 0.65*B[246]+B[317]+0.011*B[350];
/* JVS(644) = Jac_FULL(66,14) */
JVS[644] = B[159];
/* JVS(645) = Jac_FULL(66,37) */
JVS[645] = B[273]+B[276];
/* JVS(646) = Jac_FULL(66,52) */
JVS[646] = 0;
/* JVS(647) = Jac_FULL(66,57) */
JVS[647] = 0;
/* JVS(648) = Jac_FULL(66,61) */
JVS[648] = 0;
/* JVS(649) = Jac_FULL(66,62) */
JVS[649] = -B[162];
/* JVS(650) = Jac_FULL(66,63) */
JVS[650] = -B[172];
/* JVS(651) = Jac_FULL(66,64) */
JVS[651] = -B[200];
/* JVS(652) = Jac_FULL(66,65) */
JVS[652] = -B[166];
/* JVS(653) = Jac_FULL(66,66) */
JVS[653] = -B[157]-B[160]-B[163]-B[164]-B[167]-B[168]-B[173]-B[174]
-B[176]-2*B[178]-B[201];
/* JVS(654) = Jac_FULL(66,67) */
JVS[654] = -B[169];
/* JVS(655) = Jac_FULL(66,68) */
JVS[655] = -B[161];
/* JVS(656) = Jac_FULL(66,69) */
JVS[656] = -B[158];
/* JVS(657) = Jac_FULL(66,70) */
JVS[657] = -B[165]+B[277];
/* JVS(658) = Jac_FULL(66,71) */
JVS[658] = -B[175];
/* JVS(659) = Jac_FULL(66,72) */
JVS[659] = -B[177];
/* JVS(660) = Jac_FULL(66,73) */
JVS[660] = B[274];
/* JVS(661) = Jac_FULL(67,10) */
JVS[661] = B[343];
/* JVS(662) = Jac_FULL(67,19) */
JVS[662] = 0.612*B[345];
/* JVS(663) = Jac_FULL(67,20) */
JVS[663] = 0.695*B[347];
/* JVS(664) = Jac_FULL(67,22) */
JVS[664] = 0.653*B[351];
/* JVS(665) = Jac_FULL(67,23) */
JVS[665] = 0.804*B[355];
/* JVS(666) = Jac_FULL(67,29) */
JVS[666] = 0.835*B[349];
/* JVS(667) = Jac_FULL(67,30) */
JVS[667] = 0.765*B[353];
/* JVS(668) = Jac_FULL(67,31) */
JVS[668] = B[313];
/* JVS(669) = Jac_FULL(67,32) */
JVS[669] = B[316];
/* JVS(670) = Jac_FULL(67,33) */
JVS[670] = 0.76*B[267];
/* JVS(671) = Jac_FULL(67,34) */
JVS[671] = B[307];
/* JVS(672) = Jac_FULL(67,36) */
JVS[672] = 0.34*B[248];
/* JVS(673) = Jac_FULL(67,38) */
JVS[673] = 0.76*B[263];
/* JVS(674) = Jac_FULL(67,43) */
JVS[674] = B[319]+B[323]+0.2*B[325];
/* JVS(675) = Jac_FULL(67,45) */
JVS[675] = 0;
/* JVS(676) = Jac_FULL(67,46) */
JVS[676] = 0.907*B[327]+0.066*B[329]+0.749*B[331];
/* JVS(677) = Jac_FULL(67,48) */
JVS[677] = 0.75*B[335]+0.031*B[337]+0.276*B[339];
/* JVS(678) = Jac_FULL(67,49) */
JVS[678] = 0.5*B[278]+0.1*B[280]+0.5*B[282]+0.33*B[286];
/* JVS(679) = Jac_FULL(67,50) */
JVS[679] = 0.91*B[357]+0.022*B[359]+0.824*B[361];
/* JVS(680) = Jac_FULL(67,51) */
JVS[680] = 0.67*B[294]+0.048*B[296]+0.799*B[298];
/* JVS(681) = Jac_FULL(67,52) */
JVS[681] = 0.918*B[365]+0.033*B[367]+0.442*B[369]+0.012*B[371];
/* JVS(682) = Jac_FULL(67,53) */
JVS[682] = 0.3*B[287]+0.05*B[289];
/* JVS(683) = Jac_FULL(67,56) */
JVS[683] = 0.376*B[304]+0.564*B[306];
/* JVS(684) = Jac_FULL(67,57) */
JVS[684] = 0.2*B[326]+0.012*B[372];
/* JVS(685) = Jac_FULL(67,58) */
JVS[685] = 0.034*B[232]+B[234];
/* JVS(686) = Jac_FULL(67,59) */
JVS[686] = 0.37*B[240]+B[242];
/* JVS(687) = Jac_FULL(67,60) */
JVS[687] = 0.473*B[301]+0.96*B[303];
/* JVS(688) = Jac_FULL(67,61) */
JVS[688] = 0.1*B[281]+0.05*B[290]+0.048*B[297]+0.066*B[330]+0.031
*B[338]+0.022*B[360]+0.033*B[368];
/* JVS(689) = Jac_FULL(67,62) */
JVS[689] = -B[88];
/* JVS(690) = Jac_FULL(67,63) */
JVS[690] = -B[114];
/* JVS(691) = Jac_FULL(67,64) */
JVS[691] = -B[190]+B[198];
/* JVS(692) = Jac_FULL(67,65) */
JVS[692] = -B[92];
/* JVS(693) = Jac_FULL(67,66) */
JVS[693] = -B[168]+B[176];
/* JVS(694) = Jac_FULL(67,67) */
JVS[694] = -B[86]-B[89]-B[90]-B[93]-2*B[94]-B[115]-B[130]-B[148]
-B[169]-B[191];
/* JVS(695) = Jac_FULL(67,68) */
JVS[695] = -B[87]+B[140];
/* JVS(696) = Jac_FULL(67,69) */
JVS[696] = 0;
/* JVS(697) = Jac_FULL(67,70) */
JVS[697] = -B[91]+B[144]+0.5*B[283]+0.799*B[299]+B[324]+0.749*B[332]
+0.276*B[340]+0.824*B[362]+0.442*B[370];
/* JVS(698) = Jac_FULL(67,71) */
JVS[698] = -B[131]+B[154];
/* JVS(699) = Jac_FULL(67,72) */
JVS[699] = B[141]+B[145]-B[149]+B[155]+2*B[156]+B[177]+B[199];
/* JVS(700) = Jac_FULL(67,73) */
JVS[700] = 0.034*B[233]+0.37*B[241]+0.34*B[249]+0.76*B[264]+0.76
*B[268]+0.5*B[279]+0.3*B[288]+0.67*B[295]+0.473*B[302]
+0.376*B[305]+B[308]+B[320]+0.907*B[328]+0.75*B[336]+B[344]
+0.612*B[346]+0.695*B[348]+0.835*B[350]+0.653*B[352]+0.765
*B[354]+0.804*B[356]+0.91*B[358]+0.918*B[366];
/* JVS(701) = Jac_FULL(68,18) */
JVS[701] = B[38];
/* JVS(702) = Jac_FULL(68,26) */
JVS[702] = -B[223];
/* JVS(703) = Jac_FULL(68,47) */
JVS[703] = -B[95];
/* JVS(704) = Jac_FULL(68,48) */
JVS[704] = 0;
/* JVS(705) = Jac_FULL(68,50) */
JVS[705] = 0;
/* JVS(706) = Jac_FULL(68,52) */
JVS[706] = 0;
/* JVS(707) = Jac_FULL(68,53) */
JVS[707] = 0;
/* JVS(708) = Jac_FULL(68,55) */
JVS[708] = 0;
/* JVS(709) = Jac_FULL(68,56) */
JVS[709] = 0;
/* JVS(710) = Jac_FULL(68,57) */
JVS[710] = -B[6]+B[9];
/* JVS(711) = Jac_FULL(68,59) */
JVS[711] = 0;
/* JVS(712) = Jac_FULL(68,60) */
JVS[712] = 0;
/* JVS(713) = Jac_FULL(68,61) */
JVS[713] = -B[13];
/* JVS(714) = Jac_FULL(68,62) */
JVS[714] = -B[53];
/* JVS(715) = Jac_FULL(68,63) */
JVS[715] = -B[106];
/* JVS(716) = Jac_FULL(68,64) */
JVS[716] = -B[182];
/* JVS(717) = Jac_FULL(68,65) */
JVS[717] = -B[78];
/* JVS(718) = Jac_FULL(68,66) */
JVS[718] = -B[160];
/* JVS(719) = Jac_FULL(68,67) */
JVS[719] = -B[86];
/* JVS(720) = Jac_FULL(68,68) */
JVS[720] = -B[7]-B[14]-B[17]-2*B[19]-B[36]-B[54]-B[79]-B[87]-B[96]
-B[107]-B[122]-B[140]-B[161]-B[183]-B[224];
/* JVS(721) = Jac_FULL(68,69) */
JVS[721] = B[0]+B[10]+B[26];
/* JVS(722) = Jac_FULL(68,70) */
JVS[722] = -B[18]+B[27]+B[28];
/* JVS(723) = Jac_FULL(68,71) */
JVS[723] = -B[123];
/* JVS(724) = Jac_FULL(68,72) */
JVS[724] = -B[141];
/* JVS(725) = Jac_FULL(68,73) */
JVS[725] = -B[37];
/* JVS(726) = Jac_FULL(69,12) */
JVS[726] = B[121];
/* JVS(727) = Jac_FULL(69,13) */
JVS[727] = B[139];
/* JVS(728) = Jac_FULL(69,14) */
JVS[728] = B[159];
/* JVS(729) = Jac_FULL(69,15) */
JVS[729] = B[181];
/* JVS(730) = Jac_FULL(69,17) */
JVS[730] = B[23];
/* JVS(731) = Jac_FULL(69,18) */
JVS[731] = B[39]+B[40];
/* JVS(732) = Jac_FULL(69,21) */
JVS[732] = -B[203];
/* JVS(733) = Jac_FULL(69,24) */
JVS[733] = B[57]+0.61*B[58]+B[59];
/* JVS(734) = Jac_FULL(69,26) */
JVS[734] = B[223];
/* JVS(735) = Jac_FULL(69,27) */
JVS[735] = -B[211];
/* JVS(736) = Jac_FULL(69,35) */
JVS[736] = 0;
/* JVS(737) = Jac_FULL(69,42) */
JVS[737] = B[48];
/* JVS(738) = Jac_FULL(69,44) */
JVS[738] = 0;
/* JVS(739) = Jac_FULL(69,45) */
JVS[739] = -B[206];
/* JVS(740) = Jac_FULL(69,46) */
JVS[740] = 0.187*B[331];
/* JVS(741) = Jac_FULL(69,47) */
JVS[741] = B[95]+B[99];
/* JVS(742) = Jac_FULL(69,48) */
JVS[742] = 0.474*B[339];
/* JVS(743) = Jac_FULL(69,49) */
JVS[743] = 0;
/* JVS(744) = Jac_FULL(69,50) */
JVS[744] = 0;
/* JVS(745) = Jac_FULL(69,51) */
JVS[745] = 0;
/* JVS(746) = Jac_FULL(69,52) */
JVS[746] = 0.391*B[369];
/* JVS(747) = Jac_FULL(69,53) */
JVS[747] = 0;
/* JVS(748) = Jac_FULL(69,54) */
JVS[748] = 0;
/* JVS(749) = Jac_FULL(69,55) */
JVS[749] = 0;
/* JVS(750) = Jac_FULL(69,56) */
JVS[750] = 0.338*B[304]+B[306];
/* JVS(751) = Jac_FULL(69,57) */
JVS[751] = B[6]-B[9]-B[11];
/* JVS(752) = Jac_FULL(69,58) */
JVS[752] = 0;
/* JVS(753) = Jac_FULL(69,59) */
JVS[753] = 0;
/* JVS(754) = Jac_FULL(69,60) */
JVS[754] = 0;
/* JVS(755) = Jac_FULL(69,61) */
JVS[755] = B[13]-B[15];
/* JVS(756) = Jac_FULL(69,62) */
JVS[756] = B[53]-B[55]+0.8*B[66];
/* JVS(757) = Jac_FULL(69,63) */
JVS[757] = B[112];
/* JVS(758) = Jac_FULL(69,64) */
JVS[758] = -B[179]+B[182]+B[186];
/* JVS(759) = Jac_FULL(69,65) */
JVS[759] = B[78]+B[82];
/* JVS(760) = Jac_FULL(69,66) */
JVS[760] = -B[157]+B[160]+B[164];
/* JVS(761) = Jac_FULL(69,67) */
JVS[761] = B[86]+B[90];
/* JVS(762) = Jac_FULL(69,68) */
JVS[762] = B[7]+B[14]+2*B[17]+2*B[19]+B[54]+B[79]+B[87]+B[96]+B[122]
+B[140]+B[161]+B[183]+B[224];
/* JVS(763) = Jac_FULL(69,69) */
JVS[763] = -B[0]-B[10]-B[12]-B[16]-B[21]-B[42]-B[56]-B[119]-B[137]
-B[158]-B[180]-B[204]-B[207]-B[212];
/* JVS(764) = Jac_FULL(69,70) */
JVS[764] = 2*B[18]-B[22]+B[29]+B[44]+0.8*B[67]+2*B[68]+B[83]+B[91]
+B[100]+B[113]+B[126]+B[144]+B[165]+B[187]+0.187*B[332]
+0.474*B[340]+0.391*B[370];
/* JVS(765) = Jac_FULL(69,71) */
JVS[765] = -B[120]+B[123]+B[127];
/* JVS(766) = Jac_FULL(69,72) */
JVS[766] = -B[138]+B[141]+B[145];
/* JVS(767) = Jac_FULL(69,73) */
JVS[767] = B[41]-B[43]+B[45]+B[60]+0.338*B[305];
/* JVS(768) = Jac_FULL(70,17) */
JVS[768] = B[23];
/* JVS(769) = Jac_FULL(70,24) */
JVS[769] = 0.39*B[58];
/* JVS(770) = Jac_FULL(70,33) */
JVS[770] = -B[269];
/* JVS(771) = Jac_FULL(70,35) */
JVS[771] = -B[271];
/* JVS(772) = Jac_FULL(70,37) */
JVS[772] = -B[276];
/* JVS(773) = Jac_FULL(70,38) */
JVS[773] = -B[265];
/* JVS(774) = Jac_FULL(70,40) */
JVS[774] = -B[260];
/* JVS(775) = Jac_FULL(70,42) */
JVS[775] = B[46];
/* JVS(776) = Jac_FULL(70,43) */
JVS[776] = -B[323];
/* JVS(777) = Jac_FULL(70,44) */
JVS[777] = -B[255];
/* JVS(778) = Jac_FULL(70,45) */
JVS[778] = 0;
/* JVS(779) = Jac_FULL(70,46) */
JVS[779] = -B[331];
/* JVS(780) = Jac_FULL(70,47) */
JVS[780] = -B[99];
/* JVS(781) = Jac_FULL(70,48) */
JVS[781] = -B[339];
/* JVS(782) = Jac_FULL(70,49) */
JVS[782] = -B[282];
/* JVS(783) = Jac_FULL(70,50) */
JVS[783] = -B[361];
/* JVS(784) = Jac_FULL(70,51) */
JVS[784] = -B[298];
/* JVS(785) = Jac_FULL(70,52) */
JVS[785] = -B[369];
/* JVS(786) = Jac_FULL(70,53) */
JVS[786] = 0;
/* JVS(787) = Jac_FULL(70,54) */
JVS[787] = -B[230];
/* JVS(788) = Jac_FULL(70,55) */
JVS[788] = -B[225];
/* JVS(789) = Jac_FULL(70,56) */
JVS[789] = 0;
/* JVS(790) = Jac_FULL(70,57) */
JVS[790] = B[11];
/* JVS(791) = Jac_FULL(70,58) */
JVS[791] = -B[235];
/* JVS(792) = Jac_FULL(70,59) */
JVS[792] = 0;
/* JVS(793) = Jac_FULL(70,60) */
JVS[793] = 0;
/* JVS(794) = Jac_FULL(70,61) */
JVS[794] = B[15];
/* JVS(795) = Jac_FULL(70,62) */
JVS[795] = -B[66];
/* JVS(796) = Jac_FULL(70,63) */
JVS[796] = -B[112];
/* JVS(797) = Jac_FULL(70,64) */
JVS[797] = -B[186];
/* JVS(798) = Jac_FULL(70,65) */
JVS[798] = -B[82];
/* JVS(799) = Jac_FULL(70,66) */
JVS[799] = -B[164];
/* JVS(800) = Jac_FULL(70,67) */
JVS[800] = -B[90];
/* JVS(801) = Jac_FULL(70,68) */
JVS[801] = -B[17];
/* JVS(802) = Jac_FULL(70,69) */
JVS[802] = B[12]+B[16]-B[21]-B[26];
/* JVS(803) = Jac_FULL(70,70) */
JVS[803] = -B[18]-B[22]-B[27]-B[28]-B[29]-B[44]-B[67]-2*B[68]-B[83]
-B[91]-B[100]-B[113]-B[126]-B[144]-B[165]-B[187]-B[226]
-B[231]-B[236]-B[256]-B[261]-B[266]-B[270]-B[272]-B[277]
-B[283]-B[299]-B[324]-B[332]-B[340]-B[362]-B[370];
/* JVS(804) = Jac_FULL(70,71) */
JVS[804] = -B[127];
/* JVS(805) = Jac_FULL(70,72) */
JVS[805] = -B[145];
/* JVS(806) = Jac_FULL(70,73) */
JVS[806] = -B[45]+B[47];
/* JVS(807) = Jac_FULL(71,11) */
JVS[807] = 2*B[262];
/* JVS(808) = Jac_FULL(71,12) */
JVS[808] = B[121];
/* JVS(809) = Jac_FULL(71,23) */
JVS[809] = 0;
/* JVS(810) = Jac_FULL(71,29) */
JVS[810] = 0.011*B[349];
/* JVS(811) = Jac_FULL(71,31) */
JVS[811] = B[311]+0.5*B[313];
/* JVS(812) = Jac_FULL(71,32) */
JVS[812] = B[314]+0.5*B[316];
/* JVS(813) = Jac_FULL(71,40) */
JVS[813] = B[257]+B[258]+B[260];
/* JVS(814) = Jac_FULL(71,41) */
JVS[814] = B[237]+B[239];
/* JVS(815) = Jac_FULL(71,48) */
JVS[815] = 0.123*B[337];
/* JVS(816) = Jac_FULL(71,49) */
JVS[816] = 0.67*B[286];
/* JVS(817) = Jac_FULL(71,50) */
JVS[817] = 0;
/* JVS(818) = Jac_FULL(71,51) */
JVS[818] = 0.467*B[300];
/* JVS(819) = Jac_FULL(71,52) */
JVS[819] = 0.137*B[367];
/* JVS(820) = Jac_FULL(71,53) */
JVS[820] = 0.675*B[287];
/* JVS(821) = Jac_FULL(71,54) */
JVS[821] = B[227]+B[230];
/* JVS(822) = Jac_FULL(71,56) */
JVS[822] = 0;
/* JVS(823) = Jac_FULL(71,57) */
JVS[823] = 0;
/* JVS(824) = Jac_FULL(71,58) */
JVS[824] = 0;
/* JVS(825) = Jac_FULL(71,59) */
JVS[825] = 0.492*B[240]+B[242];
/* JVS(826) = Jac_FULL(71,60) */
JVS[826] = 0.029*B[301]+0.667*B[303];
/* JVS(827) = Jac_FULL(71,61) */
JVS[827] = 0.123*B[338]+0.137*B[368];
/* JVS(828) = Jac_FULL(71,62) */
JVS[828] = -B[124];
/* JVS(829) = Jac_FULL(71,63) */
JVS[829] = -B[134];
/* JVS(830) = Jac_FULL(71,64) */
JVS[830] = B[182]+B[186]+B[198]+B[200]+2*B[202];
/* JVS(831) = Jac_FULL(71,65) */
JVS[831] = -B[128];
/* JVS(832) = Jac_FULL(71,66) */
JVS[832] = -B[174]+B[201];
/* JVS(833) = Jac_FULL(71,67) */
JVS[833] = -B[130];
/* JVS(834) = Jac_FULL(71,68) */
JVS[834] = -B[122]+B[183];
/* JVS(835) = Jac_FULL(71,69) */
JVS[835] = -B[119];
/* JVS(836) = Jac_FULL(71,70) */
JVS[836] = -B[126]+B[187]+B[231]+B[261];
/* JVS(837) = Jac_FULL(71,71) */
JVS[837] = -B[120]-B[123]-B[125]-B[127]-B[129]-B[131]-B[135]-2*B[136]
-B[154]-B[175];
/* JVS(838) = Jac_FULL(71,72) */
JVS[838] = -B[155]+B[199];
/* JVS(839) = Jac_FULL(71,73) */
JVS[839] = B[228]+B[238]+0.492*B[241]+B[259]+0.675*B[288]+0.029
*B[302]+B[312]+B[315]+0.011*B[350];
/* JVS(840) = Jac_FULL(72,13) */
JVS[840] = B[139];
/* JVS(841) = Jac_FULL(72,44) */
JVS[841] = 0.37*B[253]+0.37*B[255];
/* JVS(842) = Jac_FULL(72,45) */
JVS[842] = 0;
/* JVS(843) = Jac_FULL(72,48) */
JVS[843] = 0.201*B[337];
/* JVS(844) = Jac_FULL(72,49) */
JVS[844] = 0.1*B[280];
/* JVS(845) = Jac_FULL(72,51) */
JVS[845] = 0.048*B[296]+0.3*B[300];
/* JVS(846) = Jac_FULL(72,52) */
JVS[846] = 0.006*B[367];
/* JVS(847) = Jac_FULL(72,53) */
JVS[847] = 0.05*B[289];
/* JVS(848) = Jac_FULL(72,57) */
JVS[848] = 0;
/* JVS(849) = Jac_FULL(72,58) */
JVS[849] = 0.965*B[232]+B[235];
/* JVS(850) = Jac_FULL(72,59) */
JVS[850] = 0.096*B[240];
/* JVS(851) = Jac_FULL(72,60) */
JVS[851] = 0.049*B[301]+0.333*B[303];
/* JVS(852) = Jac_FULL(72,61) */
JVS[852] = 0.1*B[281]+0.05*B[290]+0.048*B[297]+0.201*B[338]+0.006
*B[368];
/* JVS(853) = Jac_FULL(72,62) */
JVS[853] = -B[142];
/* JVS(854) = Jac_FULL(72,63) */
JVS[854] = -B[152];
/* JVS(855) = Jac_FULL(72,64) */
JVS[855] = -B[198];
/* JVS(856) = Jac_FULL(72,65) */
JVS[856] = -B[146];
/* JVS(857) = Jac_FULL(72,66) */
JVS[857] = -B[176];
/* JVS(858) = Jac_FULL(72,67) */
JVS[858] = -B[148];
/* JVS(859) = Jac_FULL(72,68) */
JVS[859] = -B[140];
/* JVS(860) = Jac_FULL(72,69) */
JVS[860] = -B[137];
/* JVS(861) = Jac_FULL(72,70) */
JVS[861] = -B[144]+B[236]+0.37*B[256];
/* JVS(862) = Jac_FULL(72,71) */
JVS[862] = -B[154];
/* JVS(863) = Jac_FULL(72,72) */
JVS[863] = -B[138]-B[141]-B[143]-B[145]-B[147]-B[149]-B[153]-B[155]-2
*B[156]-B[177]-B[199];
/* JVS(864) = Jac_FULL(72,73) */
JVS[864] = 0.965*B[233]+0.096*B[241]+0.37*B[254]+0.049*B[302];
/* JVS(865) = Jac_FULL(73,8) */
JVS[865] = -B[74];
/* JVS(866) = Jac_FULL(73,9) */
JVS[866] = 2*B[32];
/* JVS(867) = Jac_FULL(73,10) */
JVS[867] = -B[343];
/* JVS(868) = Jac_FULL(73,16) */
JVS[868] = 2*B[69]-B[70];
/* JVS(869) = Jac_FULL(73,18) */
JVS[869] = B[38]-B[40];
/* JVS(870) = Jac_FULL(73,19) */
JVS[870] = -0.754*B[345];
/* JVS(871) = Jac_FULL(73,20) */
JVS[871] = -B[347];
/* JVS(872) = Jac_FULL(73,22) */
JVS[872] = -B[351];
/* JVS(873) = Jac_FULL(73,23) */
JVS[873] = -B[355];
/* JVS(874) = Jac_FULL(73,24) */
JVS[874] = 0.39*B[58]-B[59];
/* JVS(875) = Jac_FULL(73,25) */
JVS[875] = -0.65*B[245]+B[247];
/* JVS(876) = Jac_FULL(73,28) */
JVS[876] = -B[243];
/* JVS(877) = Jac_FULL(73,29) */
JVS[877] = -B[349];
/* JVS(878) = Jac_FULL(73,30) */
JVS[878] = -B[353];
/* JVS(879) = Jac_FULL(73,31) */
JVS[879] = -B[311];
/* JVS(880) = Jac_FULL(73,32) */
JVS[880] = -B[314];
/* JVS(881) = Jac_FULL(73,33) */
JVS[881] = -B[267];
/* JVS(882) = Jac_FULL(73,34) */
JVS[882] = -B[307]+0.5*B[309];
/* JVS(883) = Jac_FULL(73,36) */
JVS[883] = -0.34*B[248]+B[250];
/* JVS(884) = Jac_FULL(73,37) */
JVS[884] = -B[273];
/* JVS(885) = Jac_FULL(73,38) */
JVS[885] = -B[263];
/* JVS(886) = Jac_FULL(73,39) */
JVS[886] = -B[49];
/* JVS(887) = Jac_FULL(73,40) */
JVS[887] = -B[258];
/* JVS(888) = Jac_FULL(73,41) */
JVS[888] = -B[237];
/* JVS(889) = Jac_FULL(73,42) */
JVS[889] = -B[46]+B[48];
/* JVS(890) = Jac_FULL(73,43) */
JVS[890] = -B[319]+0.12*B[321];
/* JVS(891) = Jac_FULL(73,44) */
JVS[891] = -B[253];
/* JVS(892) = Jac_FULL(73,45) */
JVS[892] = 0;
/* JVS(893) = Jac_FULL(73,46) */
JVS[893] = -B[327]+0.266*B[329];
/* JVS(894) = Jac_FULL(73,48) */
JVS[894] = -B[335]+0.567*B[337];
/* JVS(895) = Jac_FULL(73,49) */
JVS[895] = -B[278]+0.208*B[280]+0.33*B[286];
/* JVS(896) = Jac_FULL(73,50) */
JVS[896] = -B[357]+0.155*B[359];
/* JVS(897) = Jac_FULL(73,51) */
JVS[897] = -B[294]+0.285*B[296];
/* JVS(898) = Jac_FULL(73,52) */
JVS[898] = -B[365]+0.378*B[367];
/* JVS(899) = Jac_FULL(73,53) */
JVS[899] = -B[287]+0.164*B[289];
/* JVS(900) = Jac_FULL(73,54) */
JVS[900] = -B[227];
/* JVS(901) = Jac_FULL(73,55) */
JVS[901] = -B[218];
/* JVS(902) = Jac_FULL(73,56) */
JVS[902] = -B[304];
/* JVS(903) = Jac_FULL(73,57) */
JVS[903] = 0;
/* JVS(904) = Jac_FULL(73,58) */
JVS[904] = -B[232];
/* JVS(905) = Jac_FULL(73,59) */
JVS[905] = -B[240];
/* JVS(906) = Jac_FULL(73,60) */
JVS[906] = -B[301];
/* JVS(907) = Jac_FULL(73,61) */
JVS[907] = -B[51]+B[61]+0.208*B[281]+0.164*B[290]+0.285*B[297]+0.5
*B[310]+0.12*B[322]+0.266*B[330]+0.567*B[338]+0.155*B[360]
+0.378*B[368];
/* JVS(908) = Jac_FULL(73,62) */
JVS[908] = B[53]+B[62]+0.8*B[66]-B[72];
/* JVS(909) = Jac_FULL(73,63) */
JVS[909] = 0;
/* JVS(910) = Jac_FULL(73,64) */
JVS[910] = 0;
/* JVS(911) = Jac_FULL(73,65) */
JVS[911] = 0;
/* JVS(912) = Jac_FULL(73,66) */
JVS[912] = 0;
/* JVS(913) = Jac_FULL(73,67) */
JVS[913] = 0;
/* JVS(914) = Jac_FULL(73,68) */
JVS[914] = -B[36]+B[54];
/* JVS(915) = Jac_FULL(73,69) */
JVS[915] = -B[42];
/* JVS(916) = Jac_FULL(73,70) */
JVS[916] = -B[44]+0.8*B[67];
/* JVS(917) = Jac_FULL(73,71) */
JVS[917] = 0;
/* JVS(918) = Jac_FULL(73,72) */
JVS[918] = 0;
/* JVS(919) = Jac_FULL(73,73) */
JVS[919] = -B[37]-B[41]-B[43]-B[45]-B[47]-B[50]-B[52]-B[60]-B[71]
-B[73]-B[75]-B[76]-B[219]-B[228]-B[233]-B[238]-B[241]
-B[244]-0.65*B[246]-0.34*B[249]-B[254]-B[259]-B[264]-B[268]
-B[274]-B[279]-B[288]-B[295]-B[302]-B[305]-B[308]-B[312]
-B[315]-B[317]-B[320]-B[328]-B[336]-B[344]-0.754*B[346]
-B[348]-B[350]-B[352]-B[354]-B[356]-B[358]-B[366];
}
/* End of Jac_SP function */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* */
/* Jac_SP_Vec - function for sparse multiplication: sparse Jacobian times vector */
/* Arguments : */
/* JVS - sparse Jacobian of variables */
/* UV - User vector for variables */
/* JUV - Jacobian times user vector */
/* */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
void Jac_SP_Vec(
double JVS[], /* sparse Jacobian of variables */
double UV[], /* User vector for variables */
double JUV[] /* Jacobian times user vector */
)
{
JUV[0] = JVS[0]*UV[0]+JVS[1]*UV[8]+JVS[2]*UV[73];
JUV[1] = JVS[3]*UV[1]+JVS[4]*UV[19]+JVS[5]*UV[26]+JVS[6]*UV[43]
+JVS[7]*UV[46]+JVS[8]*UV[48]+JVS[9]*UV[49]+JVS[10]*UV[50]
+JVS[11]*UV[51]+JVS[12]*UV[52]+JVS[13]*UV[53]+JVS[14]*UV[61]
+JVS[15]*UV[68]+JVS[16]*UV[73];
JUV[2] = JVS[17]*UV[2]+JVS[18]*UV[50]+JVS[19]*UV[52]+JVS[20]*UV[61]
+JVS[21]*UV[62]+JVS[22]*UV[63]+JVS[23]*UV[65]+JVS[24]*UV[67]
+JVS[25]*UV[71];
JUV[3] = JVS[26]*UV[3]+JVS[27]*UV[46]+JVS[28]*UV[48]+JVS[29]*UV[50]
+JVS[30]*UV[51]+JVS[31]*UV[52]+JVS[32]*UV[61]+JVS[33]*UV[62]
+JVS[34]*UV[63]+JVS[35]*UV[64]+JVS[36]*UV[65]+JVS[37]*UV[66]
+JVS[38]*UV[67]+JVS[39]*UV[72];
JUV[4] = JVS[40]*UV[4]+JVS[41]*UV[62]+JVS[42]*UV[71];
JUV[5] = JVS[43]*UV[5]+JVS[44]*UV[62]+JVS[45]*UV[64]+JVS[46]*UV[66]
+JVS[47]*UV[72];
JUV[6] = JVS[48]*UV[6]+JVS[49]*UV[27]+JVS[50]*UV[69];
JUV[7] = JVS[51]*UV[7]+JVS[52]*UV[27]+JVS[53]*UV[37]+JVS[54]*UV[69];
JUV[8] = JVS[55]*UV[8]+JVS[56]*UV[73];
JUV[9] = JVS[57]*UV[9]+JVS[58]*UV[61];
JUV[10] = JVS[59]*UV[10]+JVS[60]*UV[73];
JUV[11] = JVS[61]*UV[11]+JVS[62]*UV[23]+JVS[63]*UV[48]+JVS[64]*UV[61]
+JVS[65]*UV[73];
JUV[12] = JVS[66]*UV[12]+JVS[67]*UV[69]+JVS[68]*UV[71];
JUV[13] = JVS[69]*UV[13]+JVS[70]*UV[69]+JVS[71]*UV[72];
JUV[14] = JVS[72]*UV[14]+JVS[73]*UV[66]+JVS[74]*UV[69];
JUV[15] = JVS[75]*UV[15]+JVS[76]*UV[64]+JVS[77]*UV[69];
JUV[16] = JVS[78]*UV[16]+JVS[79]*UV[62]+JVS[80]*UV[73];
JUV[17] = JVS[81]*UV[17]+JVS[82]*UV[69]+JVS[83]*UV[70];
JUV[18] = JVS[84]*UV[18]+JVS[85]*UV[68]+JVS[86]*UV[73];
JUV[19] = JVS[87]*UV[19]+JVS[88]*UV[73];
JUV[20] = JVS[89]*UV[20]+JVS[90]*UV[73];
JUV[21] = JVS[91]*UV[20]+JVS[92]*UV[21]+JVS[93]*UV[69]+JVS[94]*UV[73];
JUV[22] = JVS[95]*UV[22]+JVS[96]*UV[73];
JUV[23] = JVS[97]*UV[23]+JVS[98]*UV[73];
JUV[24] = JVS[99]*UV[24]+JVS[100]*UV[62]+JVS[101]*UV[69]+JVS[102]
*UV[73];
JUV[25] = JVS[103]*UV[25]+JVS[104]*UV[62]+JVS[105]*UV[65]+JVS[106]
*UV[73];
JUV[26] = JVS[107]*UV[26]+JVS[108]*UV[55]+JVS[109]*UV[62]+JVS[110]
*UV[68];
JUV[27] = JVS[111]*UV[27]+JVS[112]*UV[35]+JVS[113]*UV[62]+JVS[114]
*UV[69]+JVS[115]*UV[70];
JUV[28] = JVS[116]*UV[28]+JVS[117]*UV[63]+JVS[118]*UV[65]+JVS[119]
*UV[67]+JVS[120]*UV[73];
JUV[29] = JVS[121]*UV[29]+JVS[122]*UV[73];
JUV[30] = JVS[123]*UV[30]+JVS[124]*UV[73];
JUV[31] = JVS[125]*UV[23]+JVS[126]*UV[30]+JVS[127]*UV[31]+JVS[128]
*UV[73];
JUV[32] = JVS[129]*UV[23]+JVS[130]*UV[30]+JVS[131]*UV[32]+JVS[132]
*UV[73];
JUV[33] = JVS[133]*UV[23]+JVS[134]*UV[30]+JVS[135]*UV[33]+JVS[136]
*UV[70]+JVS[137]*UV[73];
JUV[34] = JVS[138]*UV[23]+JVS[139]*UV[30]+JVS[140]*UV[34]+JVS[141]
*UV[61]+JVS[142]*UV[73];
JUV[35] = JVS[143]*UV[27]+JVS[144]*UV[35]+JVS[145]*UV[45]+JVS[146]
*UV[62]+JVS[147]*UV[69]+JVS[148]*UV[70];
JUV[36] = JVS[149]*UV[36]+JVS[150]*UV[62]+JVS[151]*UV[63]+JVS[152]
*UV[67]+JVS[153]*UV[73];
JUV[37] = JVS[154]*UV[23]+JVS[155]*UV[30]+JVS[156]*UV[37]+JVS[157]
*UV[52]+JVS[158]*UV[61]+JVS[159]*UV[70]+JVS[160]*UV[73];
JUV[38] = JVS[161]*UV[30]+JVS[162]*UV[38]+JVS[163]*UV[45]+JVS[164]
*UV[62]+JVS[165]*UV[70]+JVS[166]*UV[73];
JUV[39] = JVS[167]*UV[19]+JVS[168]*UV[29]+JVS[169]*UV[31]+JVS[170]
*UV[32]+JVS[171]*UV[34]+JVS[172]*UV[39]+JVS[173]*UV[40]
+JVS[174]*UV[43]+JVS[175]*UV[44]+JVS[176]*UV[46]+JVS[177]
*UV[48]+JVS[178]*UV[49]+JVS[179]*UV[50]+JVS[180]*UV[51]
+JVS[181]*UV[52]+JVS[182]*UV[53]+JVS[183]*UV[54]+JVS[184]
*UV[55]+JVS[185]*UV[57]+JVS[186]*UV[58]+JVS[187]*UV[61]
+JVS[188]*UV[70]+JVS[189]*UV[73];
JUV[40] = JVS[190]*UV[23]+JVS[191]*UV[30]+JVS[192]*UV[31]+JVS[193]
*UV[32]+JVS[194]*UV[33]+JVS[195]*UV[40]+JVS[196]*UV[49]
+JVS[197]*UV[51]+JVS[198]*UV[53]+JVS[199]*UV[61]+JVS[200]
*UV[70]+JVS[201]*UV[73];
JUV[41] = JVS[202]*UV[19]+JVS[203]*UV[20]+JVS[204]*UV[21]+JVS[205]
*UV[22]+JVS[206]*UV[29]+JVS[207]*UV[41]+JVS[208]*UV[48]
+JVS[209]*UV[50]+JVS[210]*UV[52]+JVS[211]*UV[56]+JVS[212]
*UV[61]+JVS[214]*UV[70]+JVS[215]*UV[73];
JUV[42] = JVS[216]*UV[17]+JVS[217]*UV[33]+JVS[218]*UV[35]+JVS[219]
*UV[37]+JVS[220]*UV[38]+JVS[221]*UV[40]+JVS[222]*UV[42]
+JVS[223]*UV[44]+JVS[225]*UV[49]+JVS[226]*UV[51]+JVS[229]
*UV[54]+JVS[230]*UV[55]+JVS[231]*UV[58]+JVS[233]*UV[62]
+JVS[234]*UV[69]+JVS[235]*UV[70]+JVS[236]*UV[73];
JUV[43] = JVS[237]*UV[43]+JVS[238]*UV[57]+JVS[239]*UV[61]+JVS[240]
*UV[70]+JVS[241]*UV[73];
JUV[44] = JVS[242]*UV[19]+JVS[243]*UV[23]+JVS[244]*UV[30]+JVS[245]
*UV[31]+JVS[246]*UV[32]+JVS[247]*UV[34]+JVS[248]*UV[38]
+JVS[249]*UV[43]+JVS[250]*UV[44]+JVS[252]*UV[48]+JVS[253]
*UV[51]+JVS[254]*UV[57]+JVS[255]*UV[61]+JVS[257]*UV[70]
+JVS[258]*UV[73];
JUV[45] = JVS[259]*UV[33]+JVS[260]*UV[38]+JVS[261]*UV[45]+JVS[262]
*UV[62]+JVS[263]*UV[64]+JVS[264]*UV[66]+JVS[265]*UV[68]
+JVS[266]*UV[69]+JVS[267]*UV[70]+JVS[268]*UV[71]+JVS[269]
*UV[72]+JVS[270]*UV[73];
JUV[46] = JVS[271]*UV[46]+JVS[272]*UV[57]+JVS[273]*UV[61]+JVS[274]
*UV[70]+JVS[275]*UV[73];
JUV[47] = JVS[276]*UV[20]+JVS[277]*UV[22]+JVS[278]*UV[29]+JVS[279]
*UV[31]+JVS[280]*UV[32]+JVS[281]*UV[41]+JVS[282]*UV[46]
+JVS[283]*UV[47]+JVS[284]*UV[48]+JVS[285]*UV[50]+JVS[286]
*UV[52]+JVS[287]*UV[53]+JVS[288]*UV[56]+JVS[289]*UV[57]
+JVS[290]*UV[59]+JVS[291]*UV[60]+JVS[292]*UV[61]+JVS[293]
*UV[62]+JVS[294]*UV[63]+JVS[295]*UV[64]+JVS[296]*UV[65]
+JVS[297]*UV[66]+JVS[298]*UV[67]+JVS[299]*UV[68]+JVS[301]
*UV[70]+JVS[302]*UV[71]+JVS[303]*UV[72]+JVS[304]*UV[73];
JUV[48] = JVS[305]*UV[48]+JVS[306]*UV[57]+JVS[307]*UV[61]+JVS[308]
*UV[70]+JVS[309]*UV[73];
JUV[49] = JVS[310]*UV[46]+JVS[311]*UV[49]+JVS[312]*UV[52]+JVS[313]
*UV[57]+JVS[314]*UV[61]+JVS[315]*UV[70]+JVS[316]*UV[73];
JUV[50] = JVS[317]*UV[50]+JVS[318]*UV[57]+JVS[319]*UV[61]+JVS[320]
*UV[70]+JVS[321]*UV[73];
JUV[51] = JVS[322]*UV[46]+JVS[323]*UV[51]+JVS[324]*UV[52]+JVS[326]
*UV[61]+JVS[327]*UV[70]+JVS[328]*UV[73];
JUV[52] = JVS[329]*UV[52]+JVS[330]*UV[57]+JVS[331]*UV[61]+JVS[332]
*UV[70]+JVS[333]*UV[73];
JUV[53] = JVS[334]*UV[46]+JVS[335]*UV[52]+JVS[336]*UV[53]+JVS[337]
*UV[57]+JVS[338]*UV[61]+JVS[339]*UV[70]+JVS[340]*UV[73];
JUV[54] = JVS[341]*UV[10]+JVS[342]*UV[20]+JVS[343]*UV[22]+JVS[344]
*UV[29]+JVS[345]*UV[43]+JVS[346]*UV[50]+JVS[347]*UV[51]
+JVS[348]*UV[52]+JVS[349]*UV[54]+JVS[350]*UV[56]+JVS[351]
*UV[57]+JVS[352]*UV[58]+JVS[353]*UV[59]+JVS[354]*UV[60]
+JVS[355]*UV[61]+JVS[356]*UV[64]+JVS[357]*UV[66]+JVS[358]
*UV[68]+JVS[359]*UV[70]+JVS[360]*UV[71]+JVS[361]*UV[72]
+JVS[362]*UV[73];
JUV[55] = JVS[363]*UV[19]+JVS[364]*UV[20]+JVS[365]*UV[22]+JVS[366]
*UV[25]+JVS[367]*UV[26]+JVS[368]*UV[28]+JVS[369]*UV[29]
+JVS[370]*UV[41]+JVS[371]*UV[43]+JVS[372]*UV[44]+JVS[374]
*UV[46]+JVS[375]*UV[48]+JVS[376]*UV[49]+JVS[377]*UV[50]
+JVS[378]*UV[51]+JVS[379]*UV[52]+JVS[380]*UV[53]+JVS[381]
*UV[55]+JVS[382]*UV[56]+JVS[383]*UV[57]+JVS[384]*UV[59]
+JVS[385]*UV[60]+JVS[386]*UV[61]+JVS[387]*UV[62]+JVS[388]
*UV[63]+JVS[389]*UV[64]+JVS[390]*UV[65]+JVS[391]*UV[66]
+JVS[392]*UV[67]+JVS[393]*UV[68]+JVS[395]*UV[70]+JVS[396]
*UV[71]+JVS[397]*UV[72]+JVS[398]*UV[73];
JUV[56] = JVS[399]*UV[21]+JVS[400]*UV[48]+JVS[401]*UV[50]+JVS[402]
*UV[51]+JVS[403]*UV[52]+JVS[404]*UV[56]+JVS[407]*UV[63]
+JVS[408]*UV[68]+JVS[409]*UV[69]+JVS[410]*UV[70]+JVS[411]
*UV[73];
JUV[57] = JVS[412]*UV[9]+JVS[413]*UV[43]+JVS[414]*UV[46]+JVS[415]
*UV[48]+JVS[416]*UV[49]+JVS[417]*UV[50]+JVS[418]*UV[52]
+JVS[419]*UV[53]+JVS[420]*UV[57]+JVS[421]*UV[61]+JVS[422]
*UV[68]+JVS[423]*UV[69]+JVS[424]*UV[70];
JUV[58] = JVS[426]*UV[19]+JVS[427]*UV[20]+JVS[428]*UV[22]+JVS[429]
*UV[29]+JVS[430]*UV[31]+JVS[431]*UV[32]+JVS[432]*UV[34]
+JVS[433]*UV[36]+JVS[434]*UV[43]+JVS[435]*UV[48]+JVS[436]
*UV[49]+JVS[437]*UV[50]+JVS[438]*UV[51]+JVS[439]*UV[52]
+JVS[440]*UV[53]+JVS[441]*UV[56]+JVS[442]*UV[57]+JVS[443]
*UV[58]+JVS[444]*UV[59]+JVS[445]*UV[60]+JVS[446]*UV[61]
+JVS[452]*UV[70]+JVS[453]*UV[73];
JUV[59] = JVS[454]*UV[20]+JVS[455]*UV[22]+JVS[456]*UV[29]+JVS[457]
*UV[49]+JVS[458]*UV[50]+JVS[459]*UV[51]+JVS[460]*UV[52]
+JVS[461]*UV[53]+JVS[462]*UV[56]+JVS[463]*UV[57]+JVS[464]
*UV[59]+JVS[465]*UV[60]+JVS[466]*UV[61]+JVS[467]*UV[63]
+JVS[468]*UV[65]+JVS[469]*UV[67]+JVS[472]*UV[70]+JVS[473]
*UV[73];
JUV[60] = JVS[474]*UV[22]+JVS[475]*UV[29]+JVS[476]*UV[30]+JVS[477]
*UV[46]+JVS[478]*UV[48]+JVS[479]*UV[50]+JVS[480]*UV[51]
+JVS[481]*UV[52]+JVS[482]*UV[53]+JVS[483]*UV[56]+JVS[484]
*UV[57]+JVS[485]*UV[60]+JVS[486]*UV[61]+JVS[487]*UV[63]
+JVS[488]*UV[65]+JVS[489]*UV[66]+JVS[490]*UV[67]+JVS[494]
*UV[71]+JVS[495]*UV[72]+JVS[496]*UV[73];
JUV[61] = JVS[497]*UV[34]+JVS[498]*UV[43]+JVS[499]*UV[46]+JVS[500]
*UV[48]+JVS[501]*UV[49]+JVS[502]*UV[50]+JVS[503]*UV[51]
+JVS[504]*UV[52]+JVS[505]*UV[53]+JVS[506]*UV[57]+JVS[507]
*UV[61]+JVS[508]*UV[62]+JVS[509]*UV[64]+JVS[510]*UV[66]
+JVS[511]*UV[68]+JVS[512]*UV[69]+JVS[514]*UV[71]+JVS[515]
*UV[72]+JVS[516]*UV[73];
JUV[62] = JVS[517]*UV[8]+JVS[518]*UV[16]+JVS[519]*UV[18]+JVS[520]
*UV[19]+JVS[521]*UV[23]+JVS[522]*UV[24]+JVS[523]*UV[25]
+JVS[524]*UV[26]+JVS[525]*UV[27]+JVS[526]*UV[28]+JVS[527]
*UV[30]+JVS[528]*UV[31]+JVS[529]*UV[32]+JVS[530]*UV[34]
+JVS[532]*UV[36]+JVS[533]*UV[39]+JVS[534]*UV[40]+JVS[535]
*UV[43]+JVS[536]*UV[44]+JVS[537]*UV[45]+JVS[539]*UV[48]
+JVS[540]*UV[49]+JVS[541]*UV[50]+JVS[542]*UV[51]+JVS[543]
*UV[52]+JVS[544]*UV[53]+JVS[545]*UV[54]+JVS[546]*UV[55]
+JVS[547]*UV[56]+JVS[548]*UV[57]+JVS[549]*UV[58]+JVS[551]
*UV[60]+JVS[552]*UV[61]+JVS[553]*UV[62]+JVS[554]*UV[63]
+JVS[555]*UV[64]+JVS[556]*UV[65]+JVS[557]*UV[66]+JVS[558]
*UV[67]+JVS[559]*UV[68]+JVS[560]*UV[69]+JVS[561]*UV[70]
+JVS[562]*UV[71]+JVS[563]*UV[72]+JVS[564]*UV[73];
JUV[63] = JVS[565]*UV[19]+JVS[566]*UV[20]+JVS[567]*UV[22]+JVS[568]
*UV[23]+JVS[569]*UV[29]+JVS[570]*UV[30]+JVS[571]*UV[46]
+JVS[572]*UV[48]+JVS[573]*UV[50]+JVS[574]*UV[51]+JVS[575]
*UV[52]+JVS[576]*UV[53]+JVS[577]*UV[56]+JVS[578]*UV[57]
+JVS[579]*UV[58]+JVS[580]*UV[59]+JVS[581]*UV[60]+JVS[582]
*UV[61]+JVS[583]*UV[62]+JVS[584]*UV[63]+JVS[585]*UV[64]
+JVS[586]*UV[65]+JVS[587]*UV[66]+JVS[588]*UV[67]+JVS[589]
*UV[68]+JVS[591]*UV[70]+JVS[592]*UV[71]+JVS[593]*UV[72]
+JVS[594]*UV[73];
JUV[64] = JVS[595]*UV[15]+JVS[596]*UV[46]+JVS[597]*UV[49]+JVS[598]
*UV[51]+JVS[600]*UV[53]+JVS[601]*UV[57]+JVS[602]*UV[61]
+JVS[603]*UV[62]+JVS[604]*UV[63]+JVS[605]*UV[64]+JVS[606]
*UV[65]+JVS[607]*UV[66]+JVS[608]*UV[67]+JVS[609]*UV[68]
+JVS[610]*UV[69]+JVS[611]*UV[70]+JVS[612]*UV[71]+JVS[613]
*UV[72]+JVS[614]*UV[73];
JUV[65] = JVS[615]*UV[21]+JVS[616]*UV[25]+JVS[617]*UV[29]+JVS[618]
*UV[41]+JVS[619]*UV[43]+JVS[620]*UV[46]+JVS[622]*UV[50]
+JVS[623]*UV[52]+JVS[624]*UV[53]+JVS[625]*UV[54]+JVS[627]
*UV[57]+JVS[631]*UV[61]+JVS[632]*UV[62]+JVS[633]*UV[63]
+JVS[634]*UV[64]+JVS[635]*UV[65]+JVS[636]*UV[66]+JVS[637]
*UV[67]+JVS[638]*UV[68]+JVS[640]*UV[70]+JVS[641]*UV[71]
+JVS[642]*UV[72]+JVS[643]*UV[73];
JUV[66] = JVS[644]*UV[14]+JVS[645]*UV[37]+JVS[649]*UV[62]+JVS[650]
*UV[63]+JVS[651]*UV[64]+JVS[652]*UV[65]+JVS[653]*UV[66]
+JVS[654]*UV[67]+JVS[655]*UV[68]+JVS[656]*UV[69]+JVS[657]
*UV[70]+JVS[658]*UV[71]+JVS[659]*UV[72]+JVS[660]*UV[73];
JUV[67] = JVS[661]*UV[10]+JVS[662]*UV[19]+JVS[663]*UV[20]+JVS[664]
*UV[22]+JVS[665]*UV[23]+JVS[666]*UV[29]+JVS[667]*UV[30]
+JVS[668]*UV[31]+JVS[669]*UV[32]+JVS[670]*UV[33]+JVS[671]
*UV[34]+JVS[672]*UV[36]+JVS[673]*UV[38]+JVS[674]*UV[43]
+JVS[676]*UV[46]+JVS[677]*UV[48]+JVS[678]*UV[49]+JVS[679]
*UV[50]+JVS[680]*UV[51]+JVS[681]*UV[52]+JVS[682]*UV[53]
+JVS[683]*UV[56]+JVS[684]*UV[57]+JVS[685]*UV[58]+JVS[686]
*UV[59]+JVS[687]*UV[60]+JVS[688]*UV[61]+JVS[689]*UV[62]
+JVS[690]*UV[63]+JVS[691]*UV[64]+JVS[692]*UV[65]+JVS[693]
*UV[66]+JVS[694]*UV[67]+JVS[695]*UV[68]+JVS[697]*UV[70]
+JVS[698]*UV[71]+JVS[699]*UV[72]+JVS[700]*UV[73];
JUV[68] = JVS[701]*UV[18]+JVS[702]*UV[26]+JVS[703]*UV[47]+JVS[710]
*UV[57]+JVS[713]*UV[61]+JVS[714]*UV[62]+JVS[715]*UV[63]
+JVS[716]*UV[64]+JVS[717]*UV[65]+JVS[718]*UV[66]+JVS[719]
*UV[67]+JVS[720]*UV[68]+JVS[721]*UV[69]+JVS[722]*UV[70]
+JVS[723]*UV[71]+JVS[724]*UV[72]+JVS[725]*UV[73];
JUV[69] = JVS[726]*UV[12]+JVS[727]*UV[13]+JVS[728]*UV[14]+JVS[729]
*UV[15]+JVS[730]*UV[17]+JVS[731]*UV[18]+JVS[732]*UV[21]
+JVS[733]*UV[24]+JVS[734]*UV[26]+JVS[735]*UV[27]+JVS[737]
*UV[42]+JVS[739]*UV[45]+JVS[740]*UV[46]+JVS[741]*UV[47]
+JVS[742]*UV[48]+JVS[746]*UV[52]+JVS[750]*UV[56]+JVS[751]
*UV[57]+JVS[755]*UV[61]+JVS[756]*UV[62]+JVS[757]*UV[63]
+JVS[758]*UV[64]+JVS[759]*UV[65]+JVS[760]*UV[66]+JVS[761]
*UV[67]+JVS[762]*UV[68]+JVS[763]*UV[69]+JVS[764]*UV[70]
+JVS[765]*UV[71]+JVS[766]*UV[72]+JVS[767]*UV[73];
JUV[70] = JVS[768]*UV[17]+JVS[769]*UV[24]+JVS[770]*UV[33]+JVS[771]
*UV[35]+JVS[772]*UV[37]+JVS[773]*UV[38]+JVS[774]*UV[40]
+JVS[775]*UV[42]+JVS[776]*UV[43]+JVS[777]*UV[44]+JVS[779]
*UV[46]+JVS[780]*UV[47]+JVS[781]*UV[48]+JVS[782]*UV[49]
+JVS[783]*UV[50]+JVS[784]*UV[51]+JVS[785]*UV[52]+JVS[787]
*UV[54]+JVS[788]*UV[55]+JVS[790]*UV[57]+JVS[791]*UV[58]
+JVS[794]*UV[61]+JVS[795]*UV[62]+JVS[796]*UV[63]+JVS[797]
*UV[64]+JVS[798]*UV[65]+JVS[799]*UV[66]+JVS[800]*UV[67]
+JVS[801]*UV[68]+JVS[802]*UV[69]+JVS[803]*UV[70]+JVS[804]
*UV[71]+JVS[805]*UV[72]+JVS[806]*UV[73];
JUV[71] = JVS[807]*UV[11]+JVS[808]*UV[12]+JVS[810]*UV[29]+JVS[811]
*UV[31]+JVS[812]*UV[32]+JVS[813]*UV[40]+JVS[814]*UV[41]
+JVS[815]*UV[48]+JVS[816]*UV[49]+JVS[818]*UV[51]+JVS[819]
*UV[52]+JVS[820]*UV[53]+JVS[821]*UV[54]+JVS[825]*UV[59]
+JVS[826]*UV[60]+JVS[827]*UV[61]+JVS[828]*UV[62]+JVS[829]
*UV[63]+JVS[830]*UV[64]+JVS[831]*UV[65]+JVS[832]*UV[66]
+JVS[833]*UV[67]+JVS[834]*UV[68]+JVS[835]*UV[69]+JVS[836]
*UV[70]+JVS[837]*UV[71]+JVS[838]*UV[72]+JVS[839]*UV[73];
JUV[72] = JVS[840]*UV[13]+JVS[841]*UV[44]+JVS[843]*UV[48]+JVS[844]
*UV[49]+JVS[845]*UV[51]+JVS[846]*UV[52]+JVS[847]*UV[53]
+JVS[849]*UV[58]+JVS[850]*UV[59]+JVS[851]*UV[60]+JVS[852]
*UV[61]+JVS[853]*UV[62]+JVS[854]*UV[63]+JVS[855]*UV[64]
+JVS[856]*UV[65]+JVS[857]*UV[66]+JVS[858]*UV[67]+JVS[859]
*UV[68]+JVS[860]*UV[69]+JVS[861]*UV[70]+JVS[862]*UV[71]
+JVS[863]*UV[72]+JVS[864]*UV[73];
JUV[73] = JVS[865]*UV[8]+JVS[866]*UV[9]+JVS[867]*UV[10]+JVS[868]
*UV[16]+JVS[869]*UV[18]+JVS[870]*UV[19]+JVS[871]*UV[20]
+JVS[872]*UV[22]+JVS[873]*UV[23]+JVS[874]*UV[24]+JVS[875]
*UV[25]+JVS[876]*UV[28]+JVS[877]*UV[29]+JVS[878]*UV[30]
+JVS[879]*UV[31]+JVS[880]*UV[32]+JVS[881]*UV[33]+JVS[882]
*UV[34]+JVS[883]*UV[36]+JVS[884]*UV[37]+JVS[885]*UV[38]
+JVS[886]*UV[39]+JVS[887]*UV[40]+JVS[888]*UV[41]+JVS[889]
*UV[42]+JVS[890]*UV[43]+JVS[891]*UV[44]+JVS[893]*UV[46]
+JVS[894]*UV[48]+JVS[895]*UV[49]+JVS[896]*UV[50]+JVS[897]
*UV[51]+JVS[898]*UV[52]+JVS[899]*UV[53]+JVS[900]*UV[54]
+JVS[901]*UV[55]+JVS[902]*UV[56]+JVS[904]*UV[58]+JVS[905]
*UV[59]+JVS[906]*UV[60]+JVS[907]*UV[61]+JVS[908]*UV[62]
+JVS[914]*UV[68]+JVS[915]*UV[69]+JVS[916]*UV[70]+JVS[919]
*UV[73];
}
/* End of Jac_SP_Vec function */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* */
/* JacTR_SP_Vec - sparse multiplication: sparse Jacobian transposed times vector */
/* Arguments : */
/* JVS - sparse Jacobian of variables */
/* UV - User vector for variables */
/* JTUV - Jacobian transposed times user vector */
/* */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
void JacTR_SP_Vec(
double JVS[], /* sparse Jacobian of variables */
double UV[], /* User vector for variables */
double JTUV[] /* Jacobian transposed times user vector */
)
{
JTUV[0] = JVS[0]*UV[0];
JTUV[1] = JVS[3]*UV[1];
JTUV[2] = JVS[17]*UV[2];
JTUV[3] = JVS[26]*UV[3];
JTUV[4] = JVS[40]*UV[4];
JTUV[5] = JVS[43]*UV[5];
JTUV[6] = JVS[48]*UV[6];
JTUV[7] = JVS[51]*UV[7];
JTUV[8] = JVS[1]*UV[0]+JVS[55]*UV[8]+JVS[517]*UV[62]+JVS[865]*UV[73];
JTUV[9] = JVS[57]*UV[9]+JVS[412]*UV[57]+JVS[866]*UV[73];
JTUV[10] = JVS[59]*UV[10]+JVS[341]*UV[54]+JVS[661]*UV[67]+JVS[867]
*UV[73];
JTUV[11] = JVS[61]*UV[11]+JVS[807]*UV[71];
JTUV[12] = JVS[66]*UV[12]+JVS[726]*UV[69]+JVS[808]*UV[71];
JTUV[13] = JVS[69]*UV[13]+JVS[727]*UV[69]+JVS[840]*UV[72];
JTUV[14] = JVS[72]*UV[14]+JVS[644]*UV[66]+JVS[728]*UV[69];
JTUV[15] = JVS[75]*UV[15]+JVS[595]*UV[64]+JVS[729]*UV[69];
JTUV[16] = JVS[78]*UV[16]+JVS[518]*UV[62]+JVS[868]*UV[73];
JTUV[17] = JVS[81]*UV[17]+JVS[216]*UV[42]+JVS[730]*UV[69]+JVS[768]
*UV[70];
JTUV[18] = JVS[84]*UV[18]+JVS[519]*UV[62]+JVS[701]*UV[68]+JVS[731]
*UV[69]+JVS[869]*UV[73];
JTUV[19] = JVS[4]*UV[1]+JVS[87]*UV[19]+JVS[167]*UV[39]+JVS[202]
*UV[41]+JVS[242]*UV[44]+JVS[363]*UV[55]+JVS[426]*UV[58]
+JVS[520]*UV[62]+JVS[565]*UV[63]+JVS[662]*UV[67]+JVS[870]
*UV[73];
JTUV[20] = JVS[89]*UV[20]+JVS[91]*UV[21]+JVS[203]*UV[41]+JVS[276]
*UV[47]+JVS[342]*UV[54]+JVS[364]*UV[55]+JVS[427]*UV[58]
+JVS[454]*UV[59]+JVS[566]*UV[63]+JVS[663]*UV[67]+JVS[871]
*UV[73];
JTUV[21] = JVS[92]*UV[21]+JVS[204]*UV[41]+JVS[399]*UV[56]+JVS[615]
*UV[65]+JVS[732]*UV[69];
JTUV[22] = JVS[95]*UV[22]+JVS[205]*UV[41]+JVS[277]*UV[47]+JVS[343]
*UV[54]+JVS[365]*UV[55]+JVS[428]*UV[58]+JVS[455]*UV[59]
+JVS[474]*UV[60]+JVS[567]*UV[63]+JVS[664]*UV[67]+JVS[872]
*UV[73];
JTUV[23] = JVS[62]*UV[11]+JVS[97]*UV[23]+JVS[125]*UV[31]+JVS[129]
*UV[32]+JVS[133]*UV[33]+JVS[138]*UV[34]+JVS[154]*UV[37]
+JVS[190]*UV[40]+JVS[243]*UV[44]+JVS[521]*UV[62]+JVS[568]
*UV[63]+JVS[665]*UV[67]+JVS[873]*UV[73];
JTUV[24] = JVS[99]*UV[24]+JVS[522]*UV[62]+JVS[733]*UV[69]+JVS[769]
*UV[70]+JVS[874]*UV[73];
JTUV[25] = JVS[103]*UV[25]+JVS[366]*UV[55]+JVS[523]*UV[62]+JVS[616]
*UV[65]+JVS[875]*UV[73];
JTUV[26] = JVS[5]*UV[1]+JVS[107]*UV[26]+JVS[367]*UV[55]+JVS[524]
*UV[62]+JVS[702]*UV[68]+JVS[734]*UV[69];
JTUV[27] = JVS[49]*UV[6]+JVS[52]*UV[7]+JVS[111]*UV[27]+JVS[143]
*UV[35]+JVS[525]*UV[62]+JVS[735]*UV[69];
JTUV[28] = JVS[116]*UV[28]+JVS[368]*UV[55]+JVS[526]*UV[62]+JVS[876]
*UV[73];
JTUV[29] = JVS[121]*UV[29]+JVS[168]*UV[39]+JVS[206]*UV[41]+JVS[278]
*UV[47]+JVS[344]*UV[54]+JVS[369]*UV[55]+JVS[429]*UV[58]
+JVS[456]*UV[59]+JVS[475]*UV[60]+JVS[569]*UV[63]+JVS[617]
*UV[65]+JVS[666]*UV[67]+JVS[810]*UV[71]+JVS[877]*UV[73];
JTUV[30] = JVS[123]*UV[30]+JVS[126]*UV[31]+JVS[130]*UV[32]+JVS[134]
*UV[33]+JVS[139]*UV[34]+JVS[155]*UV[37]+JVS[161]*UV[38]
+JVS[191]*UV[40]+JVS[244]*UV[44]+JVS[476]*UV[60]+JVS[527]
*UV[62]+JVS[570]*UV[63]+JVS[667]*UV[67]+JVS[878]*UV[73];
JTUV[31] = JVS[127]*UV[31]+JVS[169]*UV[39]+JVS[192]*UV[40]+JVS[245]
*UV[44]+JVS[279]*UV[47]+JVS[430]*UV[58]+JVS[528]*UV[62]
+JVS[668]*UV[67]+JVS[811]*UV[71]+JVS[879]*UV[73];
JTUV[32] = JVS[131]*UV[32]+JVS[170]*UV[39]+JVS[193]*UV[40]+JVS[246]
*UV[44]+JVS[280]*UV[47]+JVS[431]*UV[58]+JVS[529]*UV[62]
+JVS[669]*UV[67]+JVS[812]*UV[71]+JVS[880]*UV[73];
JTUV[33] = JVS[135]*UV[33]+JVS[194]*UV[40]+JVS[217]*UV[42]+JVS[259]
*UV[45]+JVS[670]*UV[67]+JVS[770]*UV[70]+JVS[881]*UV[73];
JTUV[34] = JVS[140]*UV[34]+JVS[171]*UV[39]+JVS[247]*UV[44]+JVS[432]
*UV[58]+JVS[497]*UV[61]+JVS[530]*UV[62]+JVS[671]*UV[67]
+JVS[882]*UV[73];
JTUV[35] = JVS[112]*UV[27]+JVS[144]*UV[35]+JVS[218]*UV[42]+JVS[771]
*UV[70];
JTUV[36] = JVS[149]*UV[36]+JVS[433]*UV[58]+JVS[532]*UV[62]+JVS[672]
*UV[67]+JVS[883]*UV[73];
JTUV[37] = JVS[53]*UV[7]+JVS[156]*UV[37]+JVS[219]*UV[42]+JVS[645]
*UV[66]+JVS[772]*UV[70]+JVS[884]*UV[73];
JTUV[38] = JVS[162]*UV[38]+JVS[220]*UV[42]+JVS[248]*UV[44]+JVS[260]
*UV[45]+JVS[673]*UV[67]+JVS[773]*UV[70]+JVS[885]*UV[73];
JTUV[39] = JVS[172]*UV[39]+JVS[533]*UV[62]+JVS[886]*UV[73];
JTUV[40] = JVS[173]*UV[39]+JVS[195]*UV[40]+JVS[221]*UV[42]+JVS[534]
*UV[62]+JVS[774]*UV[70]+JVS[813]*UV[71]+JVS[887]*UV[73];
JTUV[41] = JVS[207]*UV[41]+JVS[281]*UV[47]+JVS[370]*UV[55]+JVS[618]
*UV[65]+JVS[814]*UV[71]+JVS[888]*UV[73];
JTUV[42] = JVS[222]*UV[42]+JVS[737]*UV[69]+JVS[775]*UV[70]+JVS[889]
*UV[73];
JTUV[43] = JVS[6]*UV[1]+JVS[174]*UV[39]+JVS[237]*UV[43]+JVS[249]
*UV[44]+JVS[345]*UV[54]+JVS[371]*UV[55]+JVS[413]*UV[57]
+JVS[434]*UV[58]+JVS[498]*UV[61]+JVS[535]*UV[62]+JVS[619]
*UV[65]+JVS[674]*UV[67]+JVS[776]*UV[70]+JVS[890]*UV[73];
JTUV[44] = JVS[175]*UV[39]+JVS[223]*UV[42]+JVS[250]*UV[44]+JVS[372]
*UV[55]+JVS[536]*UV[62]+JVS[777]*UV[70]+JVS[841]*UV[72]
+JVS[891]*UV[73];
JTUV[45] = JVS[145]*UV[35]+JVS[163]*UV[38]+JVS[261]*UV[45]+JVS[537]
*UV[62]+JVS[739]*UV[69];
JTUV[46] = JVS[7]*UV[1]+JVS[27]*UV[3]+JVS[176]*UV[39]+JVS[271]*UV[46]
+JVS[282]*UV[47]+JVS[310]*UV[49]+JVS[322]*UV[51]+JVS[334]
*UV[53]+JVS[374]*UV[55]+JVS[414]*UV[57]+JVS[477]*UV[60]
+JVS[499]*UV[61]+JVS[571]*UV[63]+JVS[596]*UV[64]+JVS[620]
*UV[65]+JVS[676]*UV[67]+JVS[740]*UV[69]+JVS[779]*UV[70]
+JVS[893]*UV[73];
JTUV[47] = JVS[283]*UV[47]+JVS[703]*UV[68]+JVS[741]*UV[69]+JVS[780]
*UV[70];
JTUV[48] = JVS[8]*UV[1]+JVS[28]*UV[3]+JVS[63]*UV[11]+JVS[177]*UV[39]
+JVS[208]*UV[41]+JVS[252]*UV[44]+JVS[284]*UV[47]+JVS[305]
*UV[48]+JVS[375]*UV[55]+JVS[400]*UV[56]+JVS[415]*UV[57]
+JVS[435]*UV[58]+JVS[478]*UV[60]+JVS[500]*UV[61]+JVS[539]
*UV[62]+JVS[572]*UV[63]+JVS[677]*UV[67]+JVS[742]*UV[69]
+JVS[781]*UV[70]+JVS[815]*UV[71]+JVS[843]*UV[72]+JVS[894]
*UV[73];
JTUV[49] = JVS[9]*UV[1]+JVS[178]*UV[39]+JVS[196]*UV[40]+JVS[225]
*UV[42]+JVS[311]*UV[49]+JVS[376]*UV[55]+JVS[416]*UV[57]
+JVS[436]*UV[58]+JVS[457]*UV[59]+JVS[501]*UV[61]+JVS[540]
*UV[62]+JVS[597]*UV[64]+JVS[678]*UV[67]+JVS[782]*UV[70]
+JVS[816]*UV[71]+JVS[844]*UV[72]+JVS[895]*UV[73];
JTUV[50] = JVS[10]*UV[1]+JVS[18]*UV[2]+JVS[29]*UV[3]+JVS[179]*UV[39]
+JVS[209]*UV[41]+JVS[285]*UV[47]+JVS[317]*UV[50]+JVS[346]
*UV[54]+JVS[377]*UV[55]+JVS[401]*UV[56]+JVS[417]*UV[57]
+JVS[437]*UV[58]+JVS[458]*UV[59]+JVS[479]*UV[60]+JVS[502]
*UV[61]+JVS[541]*UV[62]+JVS[573]*UV[63]+JVS[622]*UV[65]
+JVS[679]*UV[67]+JVS[783]*UV[70]+JVS[896]*UV[73];
JTUV[51] = JVS[11]*UV[1]+JVS[30]*UV[3]+JVS[180]*UV[39]+JVS[197]
*UV[40]+JVS[226]*UV[42]+JVS[253]*UV[44]+JVS[323]*UV[51]
+JVS[347]*UV[54]+JVS[378]*UV[55]+JVS[402]*UV[56]+JVS[438]
*UV[58]+JVS[459]*UV[59]+JVS[480]*UV[60]+JVS[503]*UV[61]
+JVS[542]*UV[62]+JVS[574]*UV[63]+JVS[598]*UV[64]+JVS[680]
*UV[67]+JVS[784]*UV[70]+JVS[818]*UV[71]+JVS[845]*UV[72]
+JVS[897]*UV[73];
JTUV[52] = JVS[12]*UV[1]+JVS[19]*UV[2]+JVS[31]*UV[3]+JVS[157]*UV[37]
+JVS[181]*UV[39]+JVS[210]*UV[41]+JVS[286]*UV[47]+JVS[312]
*UV[49]+JVS[324]*UV[51]+JVS[329]*UV[52]+JVS[335]*UV[53]
+JVS[348]*UV[54]+JVS[379]*UV[55]+JVS[403]*UV[56]+JVS[418]
*UV[57]+JVS[439]*UV[58]+JVS[460]*UV[59]+JVS[481]*UV[60]
+JVS[504]*UV[61]+JVS[543]*UV[62]+JVS[575]*UV[63]+JVS[623]
*UV[65]+JVS[681]*UV[67]+JVS[746]*UV[69]+JVS[785]*UV[70]
+JVS[819]*UV[71]+JVS[846]*UV[72]+JVS[898]*UV[73];
JTUV[53] = JVS[13]*UV[1]+JVS[182]*UV[39]+JVS[198]*UV[40]+JVS[287]
*UV[47]+JVS[336]*UV[53]+JVS[380]*UV[55]+JVS[419]*UV[57]
+JVS[440]*UV[58]+JVS[461]*UV[59]+JVS[482]*UV[60]+JVS[505]
*UV[61]+JVS[544]*UV[62]+JVS[576]*UV[63]+JVS[600]*UV[64]
+JVS[624]*UV[65]+JVS[682]*UV[67]+JVS[820]*UV[71]+JVS[847]
*UV[72]+JVS[899]*UV[73];
JTUV[54] = JVS[183]*UV[39]+JVS[229]*UV[42]+JVS[349]*UV[54]+JVS[545]
*UV[62]+JVS[625]*UV[65]+JVS[787]*UV[70]+JVS[821]*UV[71]
+JVS[900]*UV[73];
JTUV[55] = JVS[108]*UV[26]+JVS[184]*UV[39]+JVS[230]*UV[42]+JVS[381]
*UV[55]+JVS[546]*UV[62]+JVS[788]*UV[70]+JVS[901]*UV[73];
JTUV[56] = JVS[211]*UV[41]+JVS[288]*UV[47]+JVS[350]*UV[54]+JVS[382]
*UV[55]+JVS[404]*UV[56]+JVS[441]*UV[58]+JVS[462]*UV[59]
+JVS[483]*UV[60]+JVS[547]*UV[62]+JVS[577]*UV[63]+JVS[683]
*UV[67]+JVS[750]*UV[69]+JVS[902]*UV[73];
JTUV[57] = JVS[185]*UV[39]+JVS[238]*UV[43]+JVS[254]*UV[44]+JVS[272]
*UV[46]+JVS[289]*UV[47]+JVS[306]*UV[48]+JVS[313]*UV[49]
+JVS[318]*UV[50]+JVS[330]*UV[52]+JVS[337]*UV[53]+JVS[351]
*UV[54]+JVS[383]*UV[55]+JVS[420]*UV[57]+JVS[442]*UV[58]
+JVS[463]*UV[59]+JVS[484]*UV[60]+JVS[506]*UV[61]+JVS[548]
*UV[62]+JVS[578]*UV[63]+JVS[601]*UV[64]+JVS[627]*UV[65]
+JVS[684]*UV[67]+JVS[710]*UV[68]+JVS[751]*UV[69]+JVS[790]
*UV[70];
JTUV[58] = JVS[186]*UV[39]+JVS[231]*UV[42]+JVS[352]*UV[54]+JVS[443]
*UV[58]+JVS[549]*UV[62]+JVS[579]*UV[63]+JVS[685]*UV[67]
+JVS[791]*UV[70]+JVS[849]*UV[72]+JVS[904]*UV[73];
JTUV[59] = JVS[290]*UV[47]+JVS[353]*UV[54]+JVS[384]*UV[55]+JVS[444]
*UV[58]+JVS[464]*UV[59]+JVS[580]*UV[63]+JVS[686]*UV[67]
+JVS[825]*UV[71]+JVS[850]*UV[72]+JVS[905]*UV[73];
JTUV[60] = JVS[291]*UV[47]+JVS[354]*UV[54]+JVS[385]*UV[55]+JVS[445]
*UV[58]+JVS[465]*UV[59]+JVS[485]*UV[60]+JVS[551]*UV[62]
+JVS[581]*UV[63]+JVS[687]*UV[67]+JVS[826]*UV[71]+JVS[851]
*UV[72]+JVS[906]*UV[73];
JTUV[61] = JVS[14]*UV[1]+JVS[20]*UV[2]+JVS[32]*UV[3]+JVS[58]*UV[9]
+JVS[64]*UV[11]+JVS[141]*UV[34]+JVS[158]*UV[37]+JVS[187]
*UV[39]+JVS[199]*UV[40]+JVS[212]*UV[41]+JVS[239]*UV[43]
+JVS[255]*UV[44]+JVS[273]*UV[46]+JVS[292]*UV[47]+JVS[307]
*UV[48]+JVS[314]*UV[49]+JVS[319]*UV[50]+JVS[326]*UV[51]
+JVS[331]*UV[52]+JVS[338]*UV[53]+JVS[355]*UV[54]+JVS[386]
*UV[55]+JVS[421]*UV[57]+JVS[446]*UV[58]+JVS[466]*UV[59]
+JVS[486]*UV[60]+JVS[507]*UV[61]+JVS[552]*UV[62]+JVS[582]
*UV[63]+JVS[602]*UV[64]+JVS[631]*UV[65]+JVS[688]*UV[67]
+JVS[713]*UV[68]+JVS[755]*UV[69]+JVS[794]*UV[70]+JVS[827]
*UV[71]+JVS[852]*UV[72]+JVS[907]*UV[73];
JTUV[62] = JVS[21]*UV[2]+JVS[33]*UV[3]+JVS[41]*UV[4]+JVS[44]*UV[5]
+JVS[79]*UV[16]+JVS[100]*UV[24]+JVS[104]*UV[25]+JVS[109]
*UV[26]+JVS[113]*UV[27]+JVS[146]*UV[35]+JVS[150]*UV[36]
+JVS[164]*UV[38]+JVS[233]*UV[42]+JVS[262]*UV[45]+JVS[293]
*UV[47]+JVS[387]*UV[55]+JVS[508]*UV[61]+JVS[553]*UV[62]
+JVS[583]*UV[63]+JVS[603]*UV[64]+JVS[632]*UV[65]+JVS[649]
*UV[66]+JVS[689]*UV[67]+JVS[714]*UV[68]+JVS[756]*UV[69]
+JVS[795]*UV[70]+JVS[828]*UV[71]+JVS[853]*UV[72]+JVS[908]
*UV[73];
JTUV[63] = JVS[22]*UV[2]+JVS[34]*UV[3]+JVS[117]*UV[28]+JVS[151]
*UV[36]+JVS[294]*UV[47]+JVS[388]*UV[55]+JVS[407]*UV[56]
+JVS[467]*UV[59]+JVS[487]*UV[60]+JVS[554]*UV[62]+JVS[584]
*UV[63]+JVS[604]*UV[64]+JVS[633]*UV[65]+JVS[650]*UV[66]
+JVS[690]*UV[67]+JVS[715]*UV[68]+JVS[757]*UV[69]+JVS[796]
*UV[70]+JVS[829]*UV[71]+JVS[854]*UV[72];
JTUV[64] = JVS[35]*UV[3]+JVS[45]*UV[5]+JVS[76]*UV[15]+JVS[263]*UV[45]
+JVS[295]*UV[47]+JVS[356]*UV[54]+JVS[389]*UV[55]+JVS[509]
*UV[61]+JVS[555]*UV[62]+JVS[585]*UV[63]+JVS[605]*UV[64]
+JVS[634]*UV[65]+JVS[651]*UV[66]+JVS[691]*UV[67]+JVS[716]
*UV[68]+JVS[758]*UV[69]+JVS[797]*UV[70]+JVS[830]*UV[71]
+JVS[855]*UV[72];
JTUV[65] = JVS[23]*UV[2]+JVS[36]*UV[3]+JVS[105]*UV[25]+JVS[118]
*UV[28]+JVS[296]*UV[47]+JVS[390]*UV[55]+JVS[468]*UV[59]
+JVS[488]*UV[60]+JVS[556]*UV[62]+JVS[586]*UV[63]+JVS[606]
*UV[64]+JVS[635]*UV[65]+JVS[652]*UV[66]+JVS[692]*UV[67]
+JVS[717]*UV[68]+JVS[759]*UV[69]+JVS[798]*UV[70]+JVS[831]
*UV[71]+JVS[856]*UV[72];
JTUV[66] = JVS[37]*UV[3]+JVS[46]*UV[5]+JVS[73]*UV[14]+JVS[264]*UV[45]
+JVS[297]*UV[47]+JVS[357]*UV[54]+JVS[391]*UV[55]+JVS[489]
*UV[60]+JVS[510]*UV[61]+JVS[557]*UV[62]+JVS[587]*UV[63]
+JVS[607]*UV[64]+JVS[636]*UV[65]+JVS[653]*UV[66]+JVS[693]
*UV[67]+JVS[718]*UV[68]+JVS[760]*UV[69]+JVS[799]*UV[70]
+JVS[832]*UV[71]+JVS[857]*UV[72];
JTUV[67] = JVS[24]*UV[2]+JVS[38]*UV[3]+JVS[119]*UV[28]+JVS[152]
*UV[36]+JVS[298]*UV[47]+JVS[392]*UV[55]+JVS[469]*UV[59]
+JVS[490]*UV[60]+JVS[558]*UV[62]+JVS[588]*UV[63]+JVS[608]
*UV[64]+JVS[637]*UV[65]+JVS[654]*UV[66]+JVS[694]*UV[67]
+JVS[719]*UV[68]+JVS[761]*UV[69]+JVS[800]*UV[70]+JVS[833]
*UV[71]+JVS[858]*UV[72];
JTUV[68] = JVS[15]*UV[1]+JVS[85]*UV[18]+JVS[110]*UV[26]+JVS[265]
*UV[45]+JVS[299]*UV[47]+JVS[358]*UV[54]+JVS[393]*UV[55]
+JVS[408]*UV[56]+JVS[422]*UV[57]+JVS[511]*UV[61]+JVS[559]
*UV[62]+JVS[589]*UV[63]+JVS[609]*UV[64]+JVS[638]*UV[65]
+JVS[655]*UV[66]+JVS[695]*UV[67]+JVS[720]*UV[68]+JVS[762]
*UV[69]+JVS[801]*UV[70]+JVS[834]*UV[71]+JVS[859]*UV[72]
+JVS[914]*UV[73];
JTUV[69] = JVS[50]*UV[6]+JVS[54]*UV[7]+JVS[67]*UV[12]+JVS[70]*UV[13]
+JVS[74]*UV[14]+JVS[77]*UV[15]+JVS[82]*UV[17]+JVS[93]
*UV[21]+JVS[101]*UV[24]+JVS[114]*UV[27]+JVS[147]*UV[35]
+JVS[234]*UV[42]+JVS[266]*UV[45]+JVS[409]*UV[56]+JVS[423]
*UV[57]+JVS[512]*UV[61]+JVS[560]*UV[62]+JVS[610]*UV[64]
+JVS[656]*UV[66]+JVS[721]*UV[68]+JVS[763]*UV[69]+JVS[802]
*UV[70]+JVS[835]*UV[71]+JVS[860]*UV[72]+JVS[915]*UV[73];
JTUV[70] = JVS[83]*UV[17]+JVS[115]*UV[27]+JVS[136]*UV[33]+JVS[148]
*UV[35]+JVS[159]*UV[37]+JVS[165]*UV[38]+JVS[188]*UV[39]
+JVS[200]*UV[40]+JVS[214]*UV[41]+JVS[235]*UV[42]+JVS[240]
*UV[43]+JVS[257]*UV[44]+JVS[267]*UV[45]+JVS[274]*UV[46]
+JVS[301]*UV[47]+JVS[308]*UV[48]+JVS[315]*UV[49]+JVS[320]
*UV[50]+JVS[327]*UV[51]+JVS[332]*UV[52]+JVS[339]*UV[53]
+JVS[359]*UV[54]+JVS[395]*UV[55]+JVS[410]*UV[56]+JVS[424]
*UV[57]+JVS[452]*UV[58]+JVS[472]*UV[59]+JVS[561]*UV[62]
+JVS[591]*UV[63]+JVS[611]*UV[64]+JVS[640]*UV[65]+JVS[657]
*UV[66]+JVS[697]*UV[67]+JVS[722]*UV[68]+JVS[764]*UV[69]
+JVS[803]*UV[70]+JVS[836]*UV[71]+JVS[861]*UV[72]+JVS[916]
*UV[73];
JTUV[71] = JVS[25]*UV[2]+JVS[42]*UV[4]+JVS[68]*UV[12]+JVS[268]*UV[45]
+JVS[302]*UV[47]+JVS[360]*UV[54]+JVS[396]*UV[55]+JVS[494]
*UV[60]+JVS[514]*UV[61]+JVS[562]*UV[62]+JVS[592]*UV[63]
+JVS[612]*UV[64]+JVS[641]*UV[65]+JVS[658]*UV[66]+JVS[698]
*UV[67]+JVS[723]*UV[68]+JVS[765]*UV[69]+JVS[804]*UV[70]
+JVS[837]*UV[71]+JVS[862]*UV[72];
JTUV[72] = JVS[39]*UV[3]+JVS[47]*UV[5]+JVS[71]*UV[13]+JVS[269]*UV[45]
+JVS[303]*UV[47]+JVS[361]*UV[54]+JVS[397]*UV[55]+JVS[495]
*UV[60]+JVS[515]*UV[61]+JVS[563]*UV[62]+JVS[593]*UV[63]
+JVS[613]*UV[64]+JVS[642]*UV[65]+JVS[659]*UV[66]+JVS[699]
*UV[67]+JVS[724]*UV[68]+JVS[766]*UV[69]+JVS[805]*UV[70]
+JVS[838]*UV[71]+JVS[863]*UV[72];
JTUV[73] = JVS[2]*UV[0]+JVS[16]*UV[1]+JVS[56]*UV[8]+JVS[60]*UV[10]
+JVS[65]*UV[11]+JVS[80]*UV[16]+JVS[86]*UV[18]+JVS[88]
*UV[19]+JVS[90]*UV[20]+JVS[94]*UV[21]+JVS[96]*UV[22]
+JVS[98]*UV[23]+JVS[102]*UV[24]+JVS[106]*UV[25]+JVS[120]
*UV[28]+JVS[122]*UV[29]+JVS[124]*UV[30]+JVS[128]*UV[31]
+JVS[132]*UV[32]+JVS[137]*UV[33]+JVS[142]*UV[34]+JVS[153]
*UV[36]+JVS[160]*UV[37]+JVS[166]*UV[38]+JVS[189]*UV[39]
+JVS[201]*UV[40]+JVS[215]*UV[41]+JVS[236]*UV[42]+JVS[241]
*UV[43]+JVS[258]*UV[44]+JVS[270]*UV[45]+JVS[275]*UV[46]
+JVS[304]*UV[47]+JVS[309]*UV[48]+JVS[316]*UV[49]+JVS[321]
*UV[50]+JVS[328]*UV[51]+JVS[333]*UV[52]+JVS[340]*UV[53]
+JVS[362]*UV[54]+JVS[398]*UV[55]+JVS[411]*UV[56]+JVS[453]
*UV[58]+JVS[473]*UV[59]+JVS[496]*UV[60]+JVS[516]*UV[61]
+JVS[564]*UV[62]+JVS[594]*UV[63]+JVS[614]*UV[64]+JVS[643]
*UV[65]+JVS[660]*UV[66]+JVS[700]*UV[67]+JVS[725]*UV[68]
+JVS[767]*UV[69]+JVS[806]*UV[70]+JVS[839]*UV[71]+JVS[864]
*UV[72]+JVS[919]*UV[73];
}
/* End of JacTR_SP_Vec function */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
| 51.94141 | 89 | 0.349582 | [
"vector",
"model"
] |
65b733404aa281bc62d188d6fb596327ba646964 | 2,049 | h | C | mindspore/ccsrc/minddata/dataset/core/de_tensor.h | chncwang/mindspore | 6dac92aedf0aa1541d181e6aedab29aaadc2dafb | [
"Apache-2.0"
] | null | null | null | mindspore/ccsrc/minddata/dataset/core/de_tensor.h | chncwang/mindspore | 6dac92aedf0aa1541d181e6aedab29aaadc2dafb | [
"Apache-2.0"
] | null | null | null | mindspore/ccsrc/minddata/dataset/core/de_tensor.h | chncwang/mindspore | 6dac92aedf0aa1541d181e6aedab29aaadc2dafb | [
"Apache-2.0"
] | null | null | null | /**
* Copyright 2020-2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_CORE_DETENSOR_H_
#define MINDSPORE_CCSRC_MINDDATA_DATASET_CORE_DETENSOR_H_
#include <string>
#include <vector>
#include <memory>
#include "include/api/status.h"
#include "include/api/types.h"
#include "mindspore/core/ir/api_tensor_impl.h"
#include "minddata/dataset/include/tensor.h"
namespace mindspore {
namespace dataset {
class DETensor : public mindspore::MSTensor::Impl {
public:
DETensor() = default;
~DETensor() override = default;
explicit DETensor(std::shared_ptr<dataset::Tensor> tensor_impl);
#ifndef ENABLE_ANDROID
explicit DETensor(std::shared_ptr<dataset::DeviceTensor> device_tensor_impl, bool is_device);
#endif
const std::string &Name() const override;
enum mindspore::DataType DataType() const override;
size_t DataSize() const override;
const std::vector<int64_t> &Shape() const override;
std::shared_ptr<const void> Data() const override;
void *MutableData() override;
bool IsDevice() const override;
std::shared_ptr<mindspore::MSTensor::Impl> Clone() const override;
private:
std::shared_ptr<dataset::Tensor> tensor_impl_;
#ifndef ENABLE_ANDROID
std::shared_ptr<dataset::DeviceTensor> device_tensor_impl_;
#endif
bool is_device_;
std::string name_;
enum mindspore::DataType type_;
std::vector<int64_t> shape_;
};
} // namespace dataset
} // namespace mindspore
#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_CORE_DETENSOR_H_
| 31.045455 | 95 | 0.763299 | [
"shape",
"vector"
] |
65ba0d71c36466e2356f4900981732bd7718ab76 | 12,025 | h | C | src/css/src/NimbusCSS.h | mchathura/nimbus | b3cdf71344e8648a09d06a7321b0b4f54bc0d48d | [
"Apache-2.0"
] | null | null | null | src/css/src/NimbusCSS.h | mchathura/nimbus | b3cdf71344e8648a09d06a7321b0b4f54bc0d48d | [
"Apache-2.0"
] | null | null | null | src/css/src/NimbusCSS.h | mchathura/nimbus | b3cdf71344e8648a09d06a7321b0b4f54bc0d48d | [
"Apache-2.0"
] | null | null | null | //
// Copyright 2011-2014 NimbusKit
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <Foundation/Foundation.h>
/**
* @defgroup NimbusCSS Nimbus CSS
* @{
*
* <div id="github" feature="css"></div>
*
* Nimbus CSS allows you to use cascading stylesheets to theme your native iOS application.
* Stylesheets provide a number of advantages over Interface Builder and native code.
*
* - Diffing CSS files is much easier than diffing Interface Builder's xibs.
* - CSS allows you to define cascading styles. Change one line and an entire class of views
* throughout your application will change.
* - CSS can be downloaded and swapped out post-App Store submission if you want to make any
* minor stylistic changes in production.
* - On that same note, CSS stylesheets can be swapped at runtime allowing you to easily change
* the application's UI when the app state changes. A good example of this is the Rdio app
* when you go into offline mode and the app's online components gray out.
* - Chameleon - modify CSS files and watch the changes affect your app in real time.
*
* <h2>How to Create a Stylesheet</h2>
*
* Start by creating a .css file. Add it to your project, ensuring that you include it in
* the copy resources phase. Place all of your CSS files in a subdirectory and add the folder
* to your project by creating a folder reference. Creating a folder reference will ensure
* that your subdirectories are maintained when the CSS files are copied to the device.
*
* You can then load the stylesheet:
*
@code
// In this example all of the app's css files are in a "css" folder. The "css" folder would be
// dragged into the Xcode project with the "Create folder reference" option selected.
NSString* pathPrefix = NIPathForBundleResource(nil, @"css");
NIStylesheet* stylesheet = [[[NIStylesheet alloc] init] autorelease];
if ([stylesheet loadFromPath:"common.css"
pathPrefix:pathPrefix]) {
// Successfully loaded <bundlePath>/css/common.css
}
@endcode
*
*
* <h2>Recommended Procedure for Storing Stylesheets</h2>
*
* Use a global NIStylesheetCache object to store your stylesheets in memory. Parsing a stylesheet
* is fast but care should be taken to avoid loading a stylesheet more often than necessary.
* By no means should you be allocating new stylesheets in tight loops.
* Using a global NIStylesheetCache will make it easy to ensure that your stylesheets are
* cached in memory and easily accessible.
*
* Another advantage to using a global NIStylesheetCache is that it allows you to easily use
* Chameleon. Chameleon will post notifications on the stylesheet objects
* registered in the NIStylesheetCache. Because the observer and you will use the same cache,
* you can register for notifications on the same stylesheet objects.
*
* The above example would look like this if you used a stylesheet cache:
*
@code
// In your app initialization code, create a global stylesheet cache:
NSString* pathPrefix = NIPathForBundleResource(nil, @"resources/css");
_stylesheetCache = [[NIStylesheetCache alloc] initWithPathPrefix:pathPrefix];
@endcode
*
@code
// Elsewhere in your app, when you need access to any stylesheet:
NIStylesheetCache* stylesheetCache =
[(AppDelegate *)[UIApplication sharedApplication].delegate stylesheetCache];
NIStylesheet* stylesheet = [stylesheetCache stylesheetWithPath:@"common.css"];
@endcode
*
* Reduce the dependencies on your application delegate by defining a global method somewhere:
*
@code
NIStylesheetCache* StylesheetCache(void);
@endcode
*
@code
#import "AppDelegate.h"
NIStylesheetCache* StylesheetCache(void) {
return [(AppDelegate *)[UIApplication sharedApplication].delegate stylesheetCache];
}
@endcode
*
*
* <h2>Using a Stylesheet</h2>
*
* The easiest way to apply a stylesheet to a set of views is by using a NIDOM object. Once
* you attach a stylesheet to an NIDOM object, the stylesheet will be applied to any views you
* attach to the NIDOM object.
*
*
* <h2>Linking to Other Stylesheets</h2>
*
* You can link to one stylesheet from another using @htmlonly @import url('url')@endhtmlonly
* in the .css file.
*
* For example, let's say you have a common CSS file, common.css, and a CSS file for a specific
* view controller, profile.css. You can import common.css in profile.css by adding the following
* line:
*
* @htmlonly @import url('common.css')@endhtmlonly
*
* Files are imported relative to the pathPrefix given to NIStylesheet.
*
* <h3>CSS Import Ordering Gotcha</h3>
*
* One might expect that placing an @htmlonly @import@endhtmlonly in the middle of a CSS
* file would import the file at that exact location. This is not currently the case,
* i.e. the parser does not insert the imported CSS where the @htmlonly @import@endhtmlonly
* is. Instead, all of the CSS within the imported stylesheet will be processed before
* the importer's CSS.
*
* For example, even if @htmlonly @import url('common.css')@endhtmlonly is placed at
* the bottom of the profile.css file, common.css will be processed first, followed by profile.css.
*
* This is a known limitation and will ideally be fixed in a later release.
*
* Relative ordering of @htmlonly @imports@endhtmlonly is respected.
*
*
* <h2>Supported CSS Properties</h2>
*
@code
UIView {
border: <dimension> <ignored> <color> {view.layer.borderWidth view.layer.borderColor}
border-color: <color> {view.layer.borderColor}
border-width: <dimension> {view.layer.borderWidth}
background-color: <color|image_name> {view.backgroundColor}
border-radius: <dimension> {view.layer.cornerRadius}
opacity: xx.xx {view.alpha}
-ios-autoresizing: [left|top|right|bottom|width|height|all|margins|dimensions] {view.autoresizingMask}
visibility: [hidden|visible] {view.hidden}
width: [x%,xpx,auto] {view.frameWidth}
height: [x%,xpx,auto] {view.frameHeight}
padding: <vertical unit> <horizontal unit> {used in auto height and width calculations}
-mobile-hpadding: <horizontal unit> {used in auto width}
-mobile-vpadding: <vertical unit> {used in auto height}
max-width: [x%,xpx] {view.frameWidth}
max-height: [x%,xps] {view.frameHeight}
min-width: [x%,xpx] {view.frameWidth}
min-height: [x%,xps] {view.frameHeight}
top: [x%,xpx] {view.frameMinY}
left: [x%,xpx] {view.frameMinX}
bottom: [x%,xpx] {view.frameMaxY}
right: [x%,xpx] {view.frameMaxX}
-mobile-halign: [left|right|center] {view.frameX}
-mobile-valign: [top|bottom|middle] {view.frameY}
-mobile-relative: [#id|.prev|.next|.first|.last] {controls the position of the view relative to another view}
margin-top: [x%,xpx,auto] {distance from view.frameMinY to relative.frameMaxY - % is relative to size of relative element, px is absolute, auto aligns the vertical centers}
margin-bottom: [x%,xpx,auto] {distance from view.frameMaxY to relative.frameMinY - % is relative to size of relative element, px is absolute, auto aligns the vertical centers}
margin-left: [x%,xpx,auto] {distance from view.frameMinX to relative.frameMaxX - % is relative to size of relative element, px is absolute, auto aligns the horizontal centers}
margin-right: [x%,xpx,auto] {distance from view.frameMaxX to relative.frameMinX - % is relative to size of relative element, px is absolute, auto aligns the horizontal centers}
}
UILabel {
color: <color> {label.textColor}
font: <font-size> <font-name> {label.font}
font-size: <font-size> {label.font}
font-family: <font-name> {label.font}
Can not be used in conjunction with font/font-family properties. Use the italic/bold font
name instead.
font-style: [italic|normal] {label.font}
font-weight: [bold|normal] {label.font}
text-align: [left|right|center] {label.textAlignment}
text-shadow: <color> <x-offset> <y-offset> {label.shadowColor label.shadowOffset}
-ios-highlighted-color: <color> {label.highlightedTextColor}
-ios-line-break-mode: [wrap|character-wrap|clip|head-truncate|tail-truncate|middle-truncate] [label.lineBreakMode]
-ios-number-of-lines: xx {label.numberOfLines}
-ios-minimum-font-size: <font-size> {label.minimumFontSize}
-ios-adjusts-font-size: [true|false] {label.adjustsFontSizeToFitWidth}
-ios-baseline-adjustment: [align-baselines|align-centers|none] {label.baselineAdjustment}
-mobile-text-key: "Key Name" {attaches a localized string (or the key name if not found) to this label}
}
UIButton {
-mobile-title-insets
-mobile-content-insets
-mobile-image-insets
font: <font-size> <font-name> {button.font}
Buttons also support pseudo selectors: :selected,:highlighted,:disabled with the following rules:
color: <color> {[button titleColorForState:]}
text-shadow: <color> {[button titleShadowColorForState:]}
-mobile-image: url(image_name)
-mobile-text-key: "Key Name" {attaches a localized string (or the key name if not found) to this button}
background-image: url(image_name)
-mobile-background-stretch: top left bottom right
-ios-button-adjust
}
UINavigationBar {
-ios-tint-color: <color> {navBar.tintColor}
}
UISearchBar {
-ios-tint-color: <color> {searchBar.tintColor}
}
UIToolbar {
-ios-tint-color: <color> {toolbar.tintColor}
}
@endcode
*
*
* <h2>Chameleon</h2>
*
* Chameleon is a web server that serves changes to CSS files in real time.
*
* You start Chameleon from the command line using node.js and tell it to watch a specific
* directory of CSS files for changes. This should ideally be the directory that contains
* all of your project's CSS files.
*
* Note: ensure that when you add the css directory to your project that it is added as a folder
* reference. This will ensure that the complete folder hierarchy is maintained when the files
* are copied to the device.
*
* To learn more about how to start up a Chameleon server, view the README file within
* nimbus/src/css/chameleon/. This README will walk you through the necessary steps to build
* and install node.js.
*
* Once you've started the Chameleon server, you simply create a Chameleon observer in your
* application, give it access to your global stylesheet cache, and then tell it to start
* watching Chameleon for skin changes. This logic is summed up below:
@code
_chameleonObserver = [[NIChameleonObserver alloc] initWithStylesheetCache:_stylesheetCache
host:host];
[_chameleonObserver watchSkinChanges];
@endcode
*
* You then simply register for NIStylesheetDidChangeNotification notifications on the stylesheets
* that you are interested in. You will get a notification when the stylesheet has been modified,
* at which point if you're using NIDOM you can tell the NIDOM object to refresh itself;
* this will reapply the stylesheet to all of its attached views.
*/
/**@}*/
#import "NICSSRuleset.h"
#import "NICSSParser.h"
#import "NIDOM.h"
#import "NIStyleable.h"
#import "NIStylesheet.h"
#import "NIStylesheetCache.h"
#import "NIChameleonObserver.h"
// Styleable UIKit views
#import "UIButton+NIStyleable.h"
#import "UILabel+NIStyleable.h"
#import "UINavigationBar+NIStyleable.h"
#import "UISearchBar+NIStyleable.h"
#import "UIToolbar+NIStyleable.h"
#import "UIView+NIStyleable.h"
// Dependencies
#import "NimbusCore.h"
| 43.100358 | 181 | 0.727651 | [
"object"
] |
65ba62ea51c6a9f2a732386255824cc399e02766 | 6,108 | h | C | JunctionPropertySheet/JunctionPropertySheet.h | tillig/JunctionShellExtensions | f6e6260914a2adc87194585ec7cdfa082d2e3ed1 | [
"MIT"
] | 3 | 2017-10-02T08:15:40.000Z | 2019-03-10T18:59:19.000Z | JunctionPropertySheet/JunctionPropertySheet.h | tillig/JunctionShellExtensions | f6e6260914a2adc87194585ec7cdfa082d2e3ed1 | [
"MIT"
] | null | null | null | JunctionPropertySheet/JunctionPropertySheet.h | tillig/JunctionShellExtensions | f6e6260914a2adc87194585ec7cdfa082d2e3ed1 | [
"MIT"
] | 3 | 2019-03-20T12:15:14.000Z | 2020-12-11T04:31:48.000Z |
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0361 */
/* at Fri Jul 01 13:44:56 2005
*/
/* Compiler settings for .\JunctionPropertySheet.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __JunctionPropertySheet_h__
#define __JunctionPropertySheet_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IJunctionPropertySheetShlExt_FWD_DEFINED__
#define __IJunctionPropertySheetShlExt_FWD_DEFINED__
typedef interface IJunctionPropertySheetShlExt IJunctionPropertySheetShlExt;
#endif /* __IJunctionPropertySheetShlExt_FWD_DEFINED__ */
#ifndef __JunctionPropertySheetShlExt_FWD_DEFINED__
#define __JunctionPropertySheetShlExt_FWD_DEFINED__
#ifdef __cplusplus
typedef class JunctionPropertySheetShlExt JunctionPropertySheetShlExt;
#else
typedef struct JunctionPropertySheetShlExt JunctionPropertySheetShlExt;
#endif /* __cplusplus */
#endif /* __JunctionPropertySheetShlExt_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#ifdef __cplusplus
extern "C"{
#endif
void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * );
#ifndef __IJunctionPropertySheetShlExt_INTERFACE_DEFINED__
#define __IJunctionPropertySheetShlExt_INTERFACE_DEFINED__
/* interface IJunctionPropertySheetShlExt */
/* [unique][helpstring][nonextensible][dual][uuid][object] */
EXTERN_C const IID IID_IJunctionPropertySheetShlExt;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("7FFC2BC8-879B-4B5D-A91B-BAAED45E2D4F")
IJunctionPropertySheetShlExt : public IDispatch
{
public:
};
#else /* C style interface */
typedef struct IJunctionPropertySheetShlExtVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IJunctionPropertySheetShlExt * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IJunctionPropertySheetShlExt * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IJunctionPropertySheetShlExt * This);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )(
IJunctionPropertySheetShlExt * This,
/* [out] */ UINT *pctinfo);
HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )(
IJunctionPropertySheetShlExt * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo **ppTInfo);
HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )(
IJunctionPropertySheetShlExt * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR *rgszNames,
/* [in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )(
IJunctionPropertySheetShlExt * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS *pDispParams,
/* [out] */ VARIANT *pVarResult,
/* [out] */ EXCEPINFO *pExcepInfo,
/* [out] */ UINT *puArgErr);
END_INTERFACE
} IJunctionPropertySheetShlExtVtbl;
interface IJunctionPropertySheetShlExt
{
CONST_VTBL struct IJunctionPropertySheetShlExtVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IJunctionPropertySheetShlExt_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define IJunctionPropertySheetShlExt_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define IJunctionPropertySheetShlExt_Release(This) \
(This)->lpVtbl -> Release(This)
#define IJunctionPropertySheetShlExt_GetTypeInfoCount(This,pctinfo) \
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
#define IJunctionPropertySheetShlExt_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IJunctionPropertySheetShlExt_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IJunctionPropertySheetShlExt_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IJunctionPropertySheetShlExt_INTERFACE_DEFINED__ */
#ifndef __JunctionPropertySheetLib_LIBRARY_DEFINED__
#define __JunctionPropertySheetLib_LIBRARY_DEFINED__
/* library JunctionPropertySheetLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_JunctionPropertySheetLib;
EXTERN_C const CLSID CLSID_JunctionPropertySheetShlExt;
#ifdef __cplusplus
class DECLSPEC_UUID("9C103B4A-6198-4156-B8C2-4BCF68159013")
JunctionPropertySheetShlExt;
#endif
#endif /* __JunctionPropertySheetLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
| 28.147465 | 124 | 0.705141 | [
"object"
] |
65bcea49a6e23ecf0ac779313ffb8cdc33a9a0d9 | 15,135 | h | C | Tudat/Astrodynamics/ReferenceFrames/apparentAccelerationModel.h | ViktorJordanov/tudat | 069ceeab8f12405c356e19f50d6df037914df85c | [
"BSD-3-Clause"
] | null | null | null | Tudat/Astrodynamics/ReferenceFrames/apparentAccelerationModel.h | ViktorJordanov/tudat | 069ceeab8f12405c356e19f50d6df037914df85c | [
"BSD-3-Clause"
] | null | null | null | Tudat/Astrodynamics/ReferenceFrames/apparentAccelerationModel.h | ViktorJordanov/tudat | 069ceeab8f12405c356e19f50d6df037914df85c | [
"BSD-3-Clause"
] | null | null | null | <<<<<<< HEAD
/* Copyright (c) 2010-2018, Delft University of Technology
=======
/* Copyright (c) 2010-2019, Delft University of Technology
>>>>>>> origin/master
* All rigths reserved
*
* This file is part of the Tudat. Redistribution and use in source and
* binary forms, with or without modification, are permitted exclusively
* under the terms of the Modified BSD license. You should have received
* a copy of the license with this file. If not, please or visit:
* http://tudat.tudelft.nl/LICENSE.
*
* References
* J.S. Torok, Analytical Mechanics, Wiley-Interscience, 2000.
*
*/
#ifndef TUDAT_APPARENT_ACCELERATION_MODEL_H
#define TUDAT_APPARENT_ACCELERATION_MODEL_H
#include <functional>
#include <memory>
#include <Eigen/Dense>
#include "Tudat/Astrodynamics/BasicAstrodynamics/accelerationModel.h"
namespace tudat
{
namespace reference_frames
{
//! Compute apparent acceleration due to non-inertiality of reference frame.
/*!
* Computes apparent acceleration experienced by an object, of which the position and velocity
* are provided in a non-inertial (i.e. rotating and/or accelerating) reference frame.
* The apparent acceleration of a particle due to the non-inertiality of the reference frame in
* which its state is given, is given by following equation:
* \f[
* \boldsymbol{a}_{apparent} =
* -\boldsymbol{a}_B - \dot{\boldsymbol{\omega}} \times \boldsymbol{r}_{ni} -
* \boldsymbol{\omega} \times (\boldsymbol{\omega} \times \boldsymbol{r}_{ni}) -
* 2(\boldsymbol{\omega} \times \boldsymbol{v}_{ni})
* \f]
* where \f$\boldsymbol{a}_B\f$ is the acceleration of the non-inertial frame with respect to
* an inertial reference frame, \f$\boldsymbol{\omega}\f$ is the respective rotation rate
* and \f$\boldsymbol{r}_{ni}\f$ and \f$\boldsymbol{v}_{ni}\f$ are the object's position and
* velocity vector in the non-inertial frame in which the apparent acceleration is computed.
* \param accelerationOfNonInertialReferenceFrame Acceleration vector of the non-inertial
* frame with respect to an inertial reference frame [m s^-2].
* \param angularVelocityOfNonInertialReferenceFrame Angular velocity vector of the non-inertial
* frame with respect to an inertial reference frame [rad s^-1].
* \param angularAccelerationOfNonInertialReferenceFrame Angular acceleration vector of the
* non-inertial frame with respect to an inertial reference frame [rad s^-1].
* \param positionOfBodyInNonInertialReferenceFrame Position vector of body in the non-inertial
* frame of reference in which the apparent acceleration is computed [m].
* \param velocityOfBodyInNonInertialReferenceFrame Velocity vector of body in the non-inertial
* frame of reference in which the apparent acceleration is computed [m s^-1].
* \return Apparent acceleration as seen by an observer in the rotating and accelerating frame.
*/
Eigen::Vector3d computeApparentAcceleration(
const Eigen::Vector3d& accelerationOfNonInertialReferenceFrame,
const Eigen::Vector3d& angularVelocityOfNonInertialReferenceFrame,
const Eigen::Vector3d& angularAccelerationOfNonInertialReferenceFrame,
const Eigen::Vector3d& positionOfBodyInNonInertialReferenceFrame,
const Eigen::Vector3d& velocityOfBodyInNonInertialReferenceFrame );
//! Compute centripetal acceleration due to non-inertiality of reference frame.
/*!
* Computes centripetal acceleration experienced by an object, of which the position is
* provided in a rotating reference frame.
* The centripetal acceleration of a particle due to the non-inertiality of the reference frame in
* which its state is given, is given by following equation:
* \f[
* \boldsymbol{a}_{centripetal} =
* -\boldsymbol{\omega} \times (\boldsymbol{\omega} \times \boldsymbol{r}_{ni})
* \f]
* where \f$\boldsymbol{\omega}\f$ is the rotation rate of the non-inertial frame with respect to
* an inertial reference frame and \f$\boldsymbol{r}_{ni}\f$ is the object's position in the
* non-inertial frame in which the apparent acceleration is computed.
* \param angularVelocityOfNonInertialReferenceFrame Angular velocity vector of the non-inertial
* frame with respect to an inertial reference frame [rad s^-1].
* \param positionOfBodyInNonInertialReferenceFrame Position vector of body in the non-inertial
* frame of reference in which the apparent acceleration is computed [m].
* \return Centripetal acceleration as seen by an observer in the rotating frame.
*/
Eigen::Vector3d computeCentripetalAcceleration(
const Eigen::Vector3d& angularVelocityOfNonInertialReferenceFrame,
const Eigen::Vector3d& positionOfBodyInNonInertialReferenceFrame );
//! Compute Coriolis acceleration due to non-inertiality of reference frame.
/*!
* Computes Coriolis acceleration experienced by an object, of which the position is
* provided in a rotating reference frame.
* The Coriolis acceleration of a particle due to the non-inertiality of the reference frame in
* which its state is given, is given by following equation:
* \f[
* \boldsymbol{a}_{Coriolis} =
* -2(\boldsymbol{\omega} \times \boldsymbol{v}_{ni})
* \f]
* where \f$\boldsymbol{\omega}\f$ is the rotation rate of the non-inertial frame with respect to
* an inertial reference frame and \f$\boldsymbol{v}_{ni}\f$ is the object's velocity in the
* non-inertial frame in which the apparent acceleration is computed.
* \param angularVelocityOfNonInertialReferenceFrame Angular velocity vector of the non-inertial
* frame with respect to an inertial reference frame [rad s^-1].
* \param velocityOfBodyInNonInertialReferenceFrame Velocity vector of body in the non-inertial
* frame of reference in which the apparent acceleration is computed [m s^-1].
* \return Coriolis acceleration as seen by an observer in the rotating frame.
*/
Eigen::Vector3d computeCoriolisAcceleration(
const Eigen::Vector3d& angularVelocityOfNonInertialReferenceFrame,
const Eigen::Vector3d& velocityOfBodyInNonInertialReferenceFrame );
//! Compute Euler acceleration due to non-inertiality of reference frame.
/*!
* Computes Euler acceleration experienced by an object, of which the position is
* provided in a rotationally accelerating reference frame.
* The Euler acceleration of a particle due to the non-inertiality of the reference frame in
* which its state is given, is given by following equation:
* \f[
* \boldsymbol{a}_{Euler} =
* - \dot{\boldsymbol{\omega}} \times \boldsymbol{r}_{ni}
* \f]
* where \f$\dot{\boldsymbol{\omega}}\f$ is the rate of change of the rotation rate of the
* non-inertial frame with respect to an inertial reference frame and \f$\boldsymbol{r}_{ni}\f$
* is the object's position in the non-inertial frame in which the apparent acceleration is
* computed.
* \param angularAccelerationOfNonInertialReferenceFrame Angular acceleration vector of the
* non-inertial frame with respect to an inertial reference frame [rad s^-1].
* \param positionOfBodyInNonInertialReferenceFrame Position vector of body in the non-inertial
* frame of reference in which the apparent acceleration is computed [m].
* \return Euler acceleration as seen by an observer in the rotationally accelerating frame.
*/
Eigen::Vector3d computeEulerAcceleration(
const Eigen::Vector3d& angularAccelerationOfNonInertialReferenceFrame,
const Eigen::Vector3d& positionOfBodyInNonInertialReferenceFrame );
//! Apparent acceleration model class.
/*!
* Implementation of apparent acceleration due to non-inertiality of a reference system in which
* the equations of motion are evaluated. It evaluates the total apparent acceleration due to the
* acceleration of the reference frame, as well as the Coriolis, centripetal and Euler
* accelerations.
*/
class ApparentAccelerationModel : public basic_astrodynamics::AccelerationModel< Eigen::Vector3d >
{
private:
//! Typedef for Eigen::Vector3d returning function.
typedef std::function< Eigen::Vector3d( ) > Vector3dReturningFunction;
public:
//! Class constructor.
/*!
* Constructor for apparent acceleration model.
* \param accelerationOfNonInertialReferenceFrameFunction Pointer to a function returning
* the acceleration vector of the non-intertial reference frame w.r.t. an
* inertial frame of reference.
* \param angularVelocityOfNonInertialReferenceFrameFunction Pointer to a function returning
* the angular velocity vector of the non-intertial reference frame w.r.t. an
* inertial frame of reference.
* \param angularAccelerationOfNonInertialReferenceFrameFunction Pointer to a function
* returning the angular acceleration vector of the non-inertial frame with respect to
* an inertial reference frame.
* \param positionOfBodyInNonInertialReferenceFrameFunction Pointer to a function returning
* the position vector in the non-inertial frame of reference in which the apparent
* acceleration is computed.
* \param velocityOfBodyInNonInertialReferenceFrameFunction Pointer to a function returning
* the velocity vector in the non-inertial frame of reference in which the apparent
* acceleration is computed.
*/
ApparentAccelerationModel(
Vector3dReturningFunction accelerationOfNonInertialReferenceFrameFunction,
Vector3dReturningFunction angularVelocityOfNonInertialReferenceFrameFunction,
Vector3dReturningFunction angularAccelerationOfNonInertialReferenceFrameFunction,
Vector3dReturningFunction positionOfBodyInNonInertialReferenceFrameFunction,
Vector3dReturningFunction velocityOfBodyInNonInertialReferenceFrameFunction )
: accelerationOfNonInertialReferenceFrameFunction_(
accelerationOfNonInertialReferenceFrameFunction ),
angularVelocityOfNonInertialReferenceFrameFunction_(
angularVelocityOfNonInertialReferenceFrameFunction ),
angularAccelerationOfNonInertialReferenceFrameFunction_(
angularAccelerationOfNonInertialReferenceFrameFunction ),
positionOfBodyInNonInertialReferenceFrameFunction_(
positionOfBodyInNonInertialReferenceFrameFunction ),
velocityOfBodyInNonInertialReferenceFrameFunction_(
velocityOfBodyInNonInertialReferenceFrameFunction )
{
updateMembers( );
}
//! Get apparent acceleration.
/*!
* Computes and returns the acceleration.
* \return Vector of the apparent acceleration in the non-inertial Cartesian frame in which the
* object's state is defined.
*/
Eigen::Vector3d getAcceleration( )
{
return computeApparentAcceleration( currentAccelerationOfNonInertialReferenceFrame_,
currentAngularVelocityOfNonInertialReferenceFrame_,
currentAngularAccelerationOfNonInertialReferenceFrame_,
currentPositionOfBodyInNonInertialReferenceFrame_,
currentVelocityOfBodyInNonInertialReferenceFrame_ );
}
//! Update member variables used by apparent acceleration model.
/*!
* Function to update member variables used by this acceleration model. The variables
* that are required as input for the evaluation of the accelerations are retrieved from
* std::functions that may or may not give constant return values, depending on the
* user input. This function sets the member variables using these functions.
* \param currentTime Time at which acceleration model is to be updated.
*/
void updateMembers( const double currentTime = TUDAT_NAN );
protected:
private:
//! Function returning translational acceleration vector of non-inertial reference frame.
/*!
* Function returning translational acceleration vector of non-inertial reference frame.
*/
const Vector3dReturningFunction accelerationOfNonInertialReferenceFrameFunction_;
//! Function returning angular velocity vector of non-inertial reference frame.
/*!
* Function returning angular velocity vector of non-inertial reference frame.
*/
const Vector3dReturningFunction angularVelocityOfNonInertialReferenceFrameFunction_;
//! Function returning angular acceleration vector of non-inertial reference frame.
/*!
* Function returning angular acceleration vector of non-inertial reference frame.
*/
const Vector3dReturningFunction angularAccelerationOfNonInertialReferenceFrameFunction_;
//! Function returning position vector in non-inertial reference frame.
/*!
* Function returning position vector in non-inertial reference frame.
*/
const Vector3dReturningFunction positionOfBodyInNonInertialReferenceFrameFunction_;
//! Function returning velocity vector in non-inertial reference frame.
/*!
* Function returning velocity vector in non-inertial reference frame.
*/
const Vector3dReturningFunction velocityOfBodyInNonInertialReferenceFrameFunction_;
//! Current translational acceleration vector of non-inertial reference frame.
/*!
* Current translational acceleration vector of non-inertial reference frame. This vector
* is updated by the updateMembers( ) function.
*/
Eigen::Vector3d currentAccelerationOfNonInertialReferenceFrame_;
//! Current angular velocity vector of non-inertial reference frame.
/*!
* Current angular velocity vector of non-inertial reference frame. This vector
* is updated by the updateMembers( ) function.
*/
Eigen::Vector3d currentAngularVelocityOfNonInertialReferenceFrame_;
//! Current angular acceleration vector of non-inertial reference frame.
/*!
* Current angular acceleration vector of non-inertial reference frame. This vector
* is updated by the updateMembers( ) function.
*/
Eigen::Vector3d currentAngularAccelerationOfNonInertialReferenceFrame_;
//! Current position vector in non-inertial reference frame.
/*!
* Current position vector in non-inertial reference frame. This vector
* is updated by the updateMembers( ) function.
*/
Eigen::Vector3d currentPositionOfBodyInNonInertialReferenceFrame_;
//! Current velocity vector in non-inertial reference frame.
/*!
* Current velocity vector in non-inertial reference frame. This vector
* is updated by the updateMembers( ) function.
*/
Eigen::Vector3d currentVelocityOfBodyInNonInertialReferenceFrame_;
};
//! Typedef for shared-pointer to ApparentAccelerationModel object.
typedef std::shared_ptr< ApparentAccelerationModel > ApparentAccelerationModelPointer;
} // namespace reference_frames
} // namespace tudat
#endif // TUDAT_APPARENT_ACCELERATION_MODEL_H
| 51.131757 | 99 | 0.741592 | [
"object",
"vector",
"model"
] |
65bdb2c3035cd129f2d14104add5e85bb56d196c | 3,560 | h | C | src/grin/CommonGrin.h | coffevei/btcpool | 6035816b2fadc53f2471a7567fc86633e8702c96 | [
"MIT"
] | null | null | null | src/grin/CommonGrin.h | coffevei/btcpool | 6035816b2fadc53f2471a7567fc86633e8702c96 | [
"MIT"
] | null | null | null | src/grin/CommonGrin.h | coffevei/btcpool | 6035816b2fadc53f2471a7567fc86633e8702c96 | [
"MIT"
] | null | null | null | /*
The MIT License (MIT)
Copyright (c) [2016] [BTC.COM]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#pragma once
#include "uint256.h"
#include <boost/endian/buffers.hpp>
struct PrePowGrin {
/// Version of the block
boost::endian::big_uint16_buf_t version;
/// Height of this block since the genesis block (height 0)
boost::endian::big_uint64_buf_t height;
/// Timestamp at which the block was built.
boost::endian::big_int64_buf_t timestamp;
/// Hash of the block previous to this in the chain.
uint256 prevHash;
/// Root hash of the header MMR at the previous header.
uint256 prevRoot;
/// Merklish root of all the commitments in the TxHashSet
uint256 outputRoot;
/// Merklish root of all range proofs in the TxHashSet
uint256 rangeProofRoot;
/// Merklish root of all transaction kernels in the TxHashSet
uint256 kernelRoot;
/// Total accumulated sum of kernel offsets since genesis block.
/// We can derive the kernel offset sum for *this* block from
/// the total kernel offset of the previous block header.
uint256 totalKernelOffset;
/// Total size of the output MMR after applying this block
boost::endian::big_uint64_buf_t outputMmrSize;
/// Total size of the kernel MMR after applying this block
boost::endian::big_uint64_buf_t kernelMmrSize;
/// Total accumulated difficulty since genesis block
boost::endian::big_uint64_buf_t totoalDifficulty;
/// Variable difficulty scaling factor fo secondary proof of work
boost::endian::big_uint32_buf_t secondaryScaling;
};
struct PreProofGrin {
/// Field before nonce
PrePowGrin prePow;
/// Nonce increment used to mine this block.
boost::endian::big_uint64_buf_t nonce;
};
class siphash_keys;
bool VerifyPowGrinPrimary(
const std::vector<uint64_t> &edges, siphash_keys &keys, uint32_t edgeBits);
bool VerifyPowGrinSecondary(
const std::vector<uint64_t> &edges,
siphash_keys &keys,
uint32_t edgeBits,
uint16_t version);
bool VerifyPowGrin(
const PreProofGrin &preProof,
uint32_t edgeBits,
const std::vector<uint64_t> &proofs);
uint256 PowHashGrin(
uint64_t height,
uint32_t edgeBits,
uint32_t secondaryScaling,
const std::vector<uint64_t> &proofs);
uint32_t GraphWeightGrin(uint64_t height, uint32_t edgeBits);
uint32_t
PowScalingGrin(uint64_t height, uint32_t edgeBits, uint32_t secondaryScaling);
uint64_t PowDifficultyGrin(
uint64_t height,
uint32_t edgeBits,
uint32_t secondaryScaling,
const std::vector<uint64_t> &proofs);
uint64_t GetBlockRewardGrin(uint64_t height);
| 36.701031 | 79 | 0.763764 | [
"vector"
] |
65bde029a729abd0623de1cde91c9ee44b74862f | 1,295 | h | C | src/UGF12/IO/KeyStates.h | Ohjurot/UGF12 | b3ac8ed9d37bf37ad4a0ac5c2517698e857914f9 | [
"BSD-2-Clause"
] | null | null | null | src/UGF12/IO/KeyStates.h | Ohjurot/UGF12 | b3ac8ed9d37bf37ad4a0ac5c2517698e857914f9 | [
"BSD-2-Clause"
] | null | null | null | src/UGF12/IO/KeyStates.h | Ohjurot/UGF12 | b3ac8ed9d37bf37ad4a0ac5c2517698e857914f9 | [
"BSD-2-Clause"
] | null | null | null | #pragma once
#include "pch.h"
#include <UGF12/IO/KeyBind.h>
namespace GxIO {
/// <summary>
/// Clase witch holds the keystate of all keys abd bindings
/// </summary>
class KeyState {
public:
/// <summary>
/// Update XInput
/// </summary>
void update();
/// <summary>
/// Notify called by window for a key down
/// </summary>
/// <param name="key">Input keyboard key</param>
void keyDown(KB_KEY key);
/// <summary>
/// Notify called by window for a key up
/// </summary>
/// <param name="key">Input keyboard key</param>
void keyUp(KB_KEY key);
/// <summary>
/// Clear function call by window on deactivate
/// </summary>
void clearKeys();
/// <summary>
/// Add a static callback to the list of callbacks
/// </summary>
/// <param name="keyboard">Key of the keyboard</param>
/// <param name="controler">Key of the controler</param>
/// <param name="ptrListener">Object who wants to listen</param>
void addCallback(KB_KEY keyboard, HC_KEY controler, GxIO::IKeyListener* ptrListener);
private:
/// <summary>
/// Assignments to be called
/// </summary>
std::vector<GxIO::KeyAssign> m_vecAssignments;
/// <summary>
/// Old ximput state
/// </summary>
XINPUT_STATE m_xStateOld = {};
};
} | 24.903846 | 88 | 0.622394 | [
"object",
"vector"
] |
65be2e8a7c5f4402fb1400fa816de66d0febe9ce | 25,887 | h | C | AABB_tree/test/AABB_tree/AABB_test_util.h | ffteja/cgal | c1c7f4ad9a4cd669e33ca07a299062a461581812 | [
"CC0-1.0"
] | 3,227 | 2015-03-05T00:19:18.000Z | 2022-03-31T08:20:35.000Z | AABB_tree/test/AABB_tree/AABB_test_util.h | ffteja/cgal | c1c7f4ad9a4cd669e33ca07a299062a461581812 | [
"CC0-1.0"
] | 5,574 | 2015-03-05T00:01:56.000Z | 2022-03-31T15:08:11.000Z | AABB_tree/test/AABB_tree/AABB_test_util.h | ffteja/cgal | c1c7f4ad9a4cd669e33ca07a299062a461581812 | [
"CC0-1.0"
] | 1,274 | 2015-03-05T00:01:12.000Z | 2022-03-31T14:47:56.000Z | // Copyright (c) 2009 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Pierre Alliez, Stephane Tayeb, Camille Wormser
//
//******************************************************************************
// File Description :
//
//******************************************************************************
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/AABB_face_graph_triangle_primitive.h>
#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Timer.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/AABB_tree/internal/Primitive_helper.h>
#include <CGAL/use.h>
#include <boost/mem_fn.hpp>
double random_in(const double a,
const double b)
{
double r = rand() / static_cast<double>(RAND_MAX);
return a + (b - a) * r;
}
template <class K>
typename K::Point_3 random_point_in(const CGAL::Bbox_3& bbox)
{
typedef typename K::FT FT;
FT x = (FT)random_in(bbox.xmin(),bbox.xmax());
FT y = (FT)random_in(bbox.ymin(),bbox.ymax());
FT z = (FT)random_in(bbox.zmin(),bbox.zmax());
return typename K::Point_3(x,y,z);
}
template <class K>
typename K::Vector_3 random_vector()
{
typedef typename K::FT FT;
FT x = (FT)random_in(0.0,1.0);
FT y = (FT)random_in(0.0,1.0);
FT z = (FT)random_in(0.0,1.0);
return typename K::Vector_3(x,y,z);
}
template <class Tree, class K>
void test_all_intersection_query_types(Tree& tree)
{
std::cout << "Test all query types" << std::endl;
typedef typename K::FT FT;
typedef typename K::Ray_3 Ray;
typedef typename K::Line_3 Line;
typedef typename K::Point_3 Point;
typedef typename K::Segment_3 Segment;
typedef typename Tree::Primitive Primitive;
Point p((FT)-0.5, (FT)-0.5, (FT)-0.5);
Point q((FT) 0.5, (FT) 0.5, (FT) 0.5);
Ray ray(p,q);
Line line(p,q);
Segment segment(p,q);
bool success = false;
// do_intersect
success = tree.do_intersect(ray);
success = tree.do_intersect(line);
success = tree.do_intersect(segment);
(void) success;
// number_of_intersected_primitives
tree.number_of_intersected_primitives(ray);
tree.number_of_intersected_primitives(line);
tree.number_of_intersected_primitives(segment);
// all_intersected_primitives
std::list<typename Primitive::Id> primitives;
tree.all_intersected_primitives(ray,std::back_inserter(primitives));
tree.all_intersected_primitives(line,std::back_inserter(primitives));
tree.all_intersected_primitives(segment,std::back_inserter(primitives));
// any_intersection
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > r = tree.any_intersection(ray);
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > l = tree.any_intersection(line);
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > s = tree.any_intersection(segment);
// any_intersected_primitive
boost::optional<typename Primitive::Id> optional_primitive;
optional_primitive = tree.any_intersected_primitive(ray);
optional_primitive = tree.any_intersected_primitive(line);
optional_primitive = tree.any_intersected_primitive(segment);
// all_intersections
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > > intersections_r;
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > > intersections_l;
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > > intersections_s;
tree.all_intersections(ray,std::back_inserter(intersections_r));
tree.all_intersections(line,std::back_inserter(intersections_l));
tree.all_intersections(segment,std::back_inserter(intersections_s));
}
template <class Tree, class K>
void test_all_distance_query_types(Tree& tree)
{
typedef typename K::FT FT;
// typedef typename K::Ray_3 Ray;
typedef typename K::Point_3 Point;
// typedef typename K::Vector_3 Vector;
// typedef typename Tree::Primitive Primitive;
typedef typename Tree::Point_and_primitive_id Point_and_primitive_id;
Point query = random_point_in<K>(tree.bbox());
Point_and_primitive_id hint = tree.any_reference_point_and_id();
FT sqd1 = tree.squared_distance(query);
FT sqd2 = tree.squared_distance(query,hint.first);
if(sqd1 != sqd2)
std::cout << "different distances with and without hint";
Point p1 = tree.closest_point(query);
Point p2 = tree.closest_point(query,hint.first);
if(p1 != p2)
std::cout << "Different closest points with and without hint (possible, in case there are more than one)";
Point_and_primitive_id pp1 = tree.closest_point_and_primitive(query);
Point_and_primitive_id pp2 = tree.closest_point_and_primitive(query,hint);
if(pp1.second != pp2.second)
std::cout << "Different closest primitives with and without hint (possible, in case there are more than one)";
}
template <class Tree, class K>
void test_distance_speed(Tree& tree,
const double duration)
{
// typedef typename K::FT FT;
// typedef typename K::Ray_3 Ray;
typedef typename K::Point_3 Point;
// typedef typename K::Vector_3 Vector;
CGAL::Timer timer;
timer.start();
unsigned int nb = 0;
while(timer.time() < duration)
{
// picks a random point in the tree bbox
Point query = random_point_in<K>(tree.bbox());
Point closest = tree.closest_point(query);
(void) closest;
nb++;
}
double speed = static_cast<double>(nb) / timer.time();
std::cout << speed << " distance queries/s" << std::endl;
timer.stop();
}
//-------------------------------------------------------
// Helpers
//-------------------------------------------------------
enum Primitive_type {
SEGMENT, TRIANGLE
};
/**
* Primitive_generator : designed to tell void test<K,Primitive>(const char* filename)
* some information about which primitive to use.
*
* Must define:
* type Primitive
* type iterator
* iterator begin(Polyhedron&)
* iterator end(Polyhedron&)
*
* begin & end are used to build the AABB_tree.
*/
template<Primitive_type Primitive, class K, class Polyhedron>
struct Primitive_generator {};
template<class K, class Polyhedron>
struct Primitive_generator<SEGMENT, K, Polyhedron>
{
typedef CGAL::AABB_halfedge_graph_segment_primitive<Polyhedron> Primitive;
typedef typename boost::graph_traits<Polyhedron>
::edge_iterator iterator;
iterator begin(Polyhedron& p) {
// test the availability of primitive constructor
Primitive foobar(*(edges(p).first), p);
CGAL_USE(foobar);
return CGAL::edges(p).first;
}
iterator end(Polyhedron& p) { return CGAL::edges(p).second; }
};
template<class K, class Polyhedron>
struct Primitive_generator<TRIANGLE, K, Polyhedron>
{
typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
typedef typename boost::graph_traits<Polyhedron>::face_iterator iterator;
iterator begin(Polyhedron& p) {
// test the availability of primitive constructor
Primitive foobar(*(faces(p).first), p);
CGAL_USE(foobar);
return faces(p).first;
}
iterator end(Polyhedron& p) { return faces(p).second; }
};
/**
* Declaration only, implementation should be given in .cpp file
*/
template<class K, class Tree, class Polyhedron, Primitive_type Type>
void test_impl(Tree& tree, Polyhedron& p, const double duration);
/**
* Generic test method. Build AABB_tree and call test_impl()
*/
template <class K, Primitive_type Primitive>
void test(const std::string filename,
const double duration)
{
typedef CGAL::Polyhedron_3<K> Polyhedron;
typedef Primitive_generator<Primitive,K,Polyhedron> Pr_generator;
typedef typename Pr_generator::Primitive Pr;
typedef CGAL::AABB_traits<K, Pr> Traits;
typedef CGAL::AABB_tree<Traits> Tree;
Polyhedron polyhedron;
std::ifstream ifs(filename);
ifs >> polyhedron;
// constructs AABB tree and internal search KD-tree with
// the points of the polyhedron
Tree tree(Pr_generator().begin(polyhedron),Pr_generator().end(polyhedron), polyhedron);
//tree.accelerate_distance_queries(polyhedron.points_begin(),polyhedron.points_end());
// call all tests
test_impl<K,Tree,Polyhedron,Primitive>(tree,polyhedron,duration);
}
/**
* Generic test_kernel method. call test<K> for various kernel K.
*/
template<Primitive_type Primitive>
void test_kernels(const std::string filename,
const double duration)
{
std::cout << std::endl;
std::cout << "Polyhedron " << filename << std::endl;
std::cout << "============================" << std::endl;
std::cout << std::endl;
std::cout << "Simple cartesian float kernel" << std::endl;
test<CGAL::Simple_cartesian<float>,Primitive>(filename,duration);
std::cout << std::endl;
std::cout << "Cartesian float kernel" << std::endl;
test<CGAL::Cartesian<float>,Primitive>(filename,duration);
std::cout << std::endl;
std::cout << "Simple cartesian double kernel" << std::endl;
test<CGAL::Simple_cartesian<double>,Primitive>(filename,duration);
std::cout << std::endl;
std::cout << "Cartesian double kernel" << std::endl;
test<CGAL::Cartesian<double>,Primitive>(filename,duration);
std::cout << std::endl;
std::cout << "Epic kernel" << std::endl;
test<CGAL::Exact_predicates_inexact_constructions_kernel,Primitive>(filename,duration);
}
//-------------------------------------------------------
// Naive Implementations
//-------------------------------------------------------
/**
* Implements queries defined by AABB_tree class in naive way: iterate on
* the primitive.
*/
template<typename Polyhedron,
typename K,
Primitive_type Primitive >
class Naive_implementations
{
typedef Primitive_generator<Primitive,K,Polyhedron> Pr_generator;
typedef typename Pr_generator::Primitive Pr;
typedef CGAL::AABB_traits<K, Pr> Traits;
typedef typename Pr_generator::iterator Polyhedron_primitive_iterator;
typedef unsigned int size_type;
typedef typename Traits::Object_and_primitive_id Object_and_primitive_id;
typedef typename Pr::Id Primitive_id;
typedef typename Traits::FT FT;
typedef typename Traits::Point_3 Point;
typedef typename Traits::Point_and_primitive_id Point_and_primitive_id;
typedef boost::optional<Object_and_primitive_id> Intersection_result;
const Traits& m_traits;
public:
Naive_implementations(const Traits& traits):m_traits(traits){}
template<typename Query>
bool do_intersect(const Query& query, Polyhedron& p) const
{
Polyhedron_primitive_iterator it = Pr_generator().begin(p);
for ( ; it != Pr_generator().end(p) ; ++it )
{
if ( m_traits.do_intersect_object()(query, Pr(it,p) ) )
return true;
}
return false;
}
template<typename Query>
size_type number_of_intersected_primitives(const Query& query,
Polyhedron& p) const
{
size_type result = 0;
Polyhedron_primitive_iterator it = Pr_generator().begin(p);
for ( ; it != Pr_generator().end(p) ; ++it )
{
if ( m_traits.do_intersect_object()(query, Pr(it,p) ) )
++result;
}
return result;
}
template<typename Query, typename OutputIterator>
OutputIterator all_intersected_primitives(const Query& query,
Polyhedron& p,
OutputIterator out) const
{
Polyhedron_primitive_iterator it = Pr_generator().begin(p);
for ( ; it != Pr_generator().end(p) ; ++it )
{
if ( m_traits.do_intersect_object()(query, Pr(it,p) ) )
*out++ = Pr(it,p).id();
}
return out;
}
template<typename Query, typename OutputIterator>
OutputIterator all_intersections(const Query& query,
Polyhedron& p,
OutputIterator out) const
{
Polyhedron_primitive_iterator it = Pr_generator().begin(p);
for ( ; it != Pr_generator().end(p) ; ++it )
{
boost::optional< typename Traits::template Intersection_and_primitive_id<Query>::Type >
intersection = m_traits.intersection_object()(query, Pr(it,p));
if ( intersection )
*out++ = *intersection;
}
return out;
}
Point closest_point(const Point& query,
Polyhedron& p) const
{
Polyhedron_primitive_iterator it = Pr_generator().begin(p);
assert ( it != Pr_generator().end(p) );
// Get a point on the primitive
Point closest_point = CGAL::internal::Primitive_helper<Traits>::get_reference_point(Pr(it,p),m_traits);
for ( ; it != Pr_generator().end(p) ; ++it )
{
closest_point = m_traits.closest_point_object()(query, Pr(it,p), closest_point);
}
return closest_point;
}
Point_and_primitive_id closest_point_and_primitive(const Point& query,
Polyhedron& p) const
{
Polyhedron_primitive_iterator it = Pr_generator().begin(p);
assert ( it != Pr_generator().end(p) );
// Get a point on the primitive
Pr closest_primitive = Pr(it,p);
Point closest_point = CGAL::internal::Primitive_helper<Traits>::get_reference_point(closest_primitive,m_traits);
for ( ; it != Pr_generator().end(p) ; ++it )
{
Pr tmp_pr(it,p);
Point tmp_pt = m_traits.closest_point_object()(query, tmp_pr, closest_point);
if ( tmp_pt != closest_point )
{
closest_point = tmp_pt;
closest_primitive = tmp_pr;
}
}
return Point_and_primitive_id(closest_point,closest_primitive.id());
}
};
//-------------------------------------------------------
// Naive Tester
//-------------------------------------------------------
template <class Tree, class Polyhedron, class K, Primitive_type Type>
class Tree_vs_naive
{
typedef typename K::FT FT;
typedef typename K::Ray_3 Ray;
typedef typename K::Line_3 Line;
typedef typename K::Point_3 Point;
typedef typename K::Vector_3 Vector;
typedef typename K::Segment_3 Segment;
typedef typename Tree::Primitive Primitive;
typedef typename Tree::Point_and_primitive_id Point_and_primitive_id;
typedef typename Tree::Object_and_primitive_id Object_and_primitive_id;
typedef typename Tree::size_type size_type;
typedef Naive_implementations<Polyhedron, K, Type> Naive_implementation;
public:
Tree_vs_naive(Tree& tree, Polyhedron& p)
: m_tree(tree)
, m_polyhedron(p)
, m_naive(m_tree.traits())
, m_naive_time(0)
, m_tree_time(0) {}
void test_all_intersection_methods(double duration) const
{
m_naive_time = 0;
m_tree_time = 0;
test_do_intersect(duration);
test_number_of_intersected_primitives(duration);
test_intersected_primitives(duration);
test_intersections(duration);
std::cerr << "\tNaive test time: " << m_naive_time*1000 << "ms" << std::endl;
std::cerr << "\tTree test time: " << m_tree_time*1000 << "ms" << std::endl;
}
void test_all_distance_methods(double duration) const
{
m_naive_time = 0;
m_tree_time = 0;
test_closest_point(duration);
test_closest_point_and_primitive(duration);
std::cerr << "\tNaive test time: " << m_naive_time*1000 << "ms" << std::endl;
std::cerr << "\tTree test time: " << m_tree_time*1000 << "ms" << std::endl;
}
void test_do_intersect(double duration) const
{
loop(duration, Do_intersect());
}
void test_number_of_intersected_primitives(double duration) const
{
loop(duration, Number_of_intersected_primitives());
}
void test_intersected_primitives(double duration) const
{
loop(duration, Intersected_primitives());
}
void test_intersections(double duration) const
{
loop(duration, Intersections());
}
void test_closest_point(double duration) const
{
loop_distance(duration, Closest_point());
}
void test_closest_point_and_primitive(double duration) const
{
loop_distance(duration, Closest_point_and_primitive());
}
private:
template<typename Test>
void loop(double duration,
const Test& test) const
{
CGAL::Timer timer;
timer.start();
int nb_test = 0;
while ( timer.time() < duration )
{
Point a = random_point_in<K>(m_tree.bbox());
Point b = random_point_in<K>(m_tree.bbox());
Segment segment(a,b);
Ray ray(a,b);
Line line(a,b);
test(segment, m_polyhedron, m_tree, m_naive);
test(ray, m_polyhedron, m_tree, m_naive);
test(line, m_polyhedron, m_tree, m_naive);
++nb_test;
}
timer.stop();
m_naive_time += test.naive_timer.time();
m_tree_time += test.tree_timer.time();
}
template<typename Test>
void loop_distance(double duration,
const Test& test) const
{
CGAL::Timer timer;
timer.start();
while ( timer.time() < duration )
{
Point a = random_point_in<K>(m_tree.bbox());
test(a, m_polyhedron, m_tree, m_naive);
}
timer.stop();
m_naive_time += test.naive_timer.time();
m_tree_time += test.tree_timer.time();
}
private:
/**
* Tests do_intersect
*/
struct Do_intersect
{
template<typename Query>
void
operator()(const Query& query,
Polyhedron& p,
Tree& tree,
const Naive_implementation& naive) const
{
naive_timer.start();
bool result_naive = naive.do_intersect(query, p);
naive_timer.stop();
tree_timer.start();
bool result_tree = tree.do_intersect(query);
tree_timer.stop();
// Check
assert ( result_naive == result_tree );
}
mutable CGAL::Timer naive_timer;
mutable CGAL::Timer tree_timer;
};
/**
* Tests number_of_intersected_primitives
*/
struct Number_of_intersected_primitives
{
template<typename Query>
void
operator()(const Query& query,
Polyhedron& p,
Tree& tree,
const Naive_implementation& naive) const
{
naive_timer.start();
size_type number_naive = naive.number_of_intersected_primitives(query, p);
naive_timer.stop();
tree_timer.start();
size_type number_tree = tree.number_of_intersected_primitives(query);
tree_timer.stop();
// Check
assert ( number_naive == number_tree );
}
mutable CGAL::Timer naive_timer;
mutable CGAL::Timer tree_timer;
};
/**
* Tests all_intersected_primitives and any_intersected_primitives
*/
struct Intersected_primitives
{
template<typename Query>
void
operator()(const Query& query,
Polyhedron& p,
Tree& tree,
const Naive_implementation& naive) const
{
typedef std::vector<typename Primitive::Id> Id_vector;
Id_vector primitives_naive;
naive_timer.start();
naive.all_intersected_primitives(query, p, std::back_inserter(primitives_naive));
naive_timer.stop();
Id_vector primitives_tree;
tree_timer.start();
tree.all_intersected_primitives(query, std::back_inserter(primitives_tree));
tree_timer.stop();
// Check: we don't know elements order...
for ( typename Id_vector::iterator it = primitives_naive.begin() ;
it != primitives_naive.end() ;
++it )
{
assert( std::find(primitives_tree.begin(), primitives_tree.end(), *it)
!= primitives_tree.end() );
}
// any_intersected_primitive test (do not count time here)
typedef boost::optional<typename Primitive::Id> Any_primitive;
Any_primitive primitive = tree.any_intersected_primitive(query);
// Check: verify we do get the result by naive method
if ( primitive )
{
assert( std::find(primitives_naive.begin(),
primitives_naive.end(),
*primitive)
!= primitives_naive.end());
}
else if ( primitives_naive.size() != 0 )
assert(false);
}
mutable CGAL::Timer naive_timer;
mutable CGAL::Timer tree_timer;
};
/**
* Tests all_intersections and any_intersection
*/
struct Intersections
{
template<typename Query>
void
operator()(const Query& query,
Polyhedron& p,
Tree& tree,
const Naive_implementation& naive) const
{
typedef
typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type
Obj_type;
typedef
std::vector<Obj_type>
Obj_Id_vector;
Obj_Id_vector intersections_naive;
naive_timer.start();
naive.all_intersections(query, p, std::back_inserter(intersections_naive));
naive_timer.stop();
Obj_Id_vector intersections_tree;
tree_timer.start();
tree.all_intersections(query, std::back_inserter(intersections_tree));
tree_timer.stop();
// Check: we don't know elements order...
// Test equality of vectors on ids only
typedef std::vector<typename Primitive::Id> Id_vector;
Id_vector intersections_naive_id;
std::transform(intersections_naive.begin(),
intersections_naive.end(),
std::back_inserter(intersections_naive_id),
boost::mem_fn(&Obj_type::second)
);
for ( typename Obj_Id_vector::iterator it = intersections_tree.begin() ;
it != intersections_tree.end() ;
++it )
{
assert( std::find(intersections_naive_id.begin(),
intersections_naive_id.end(),
it->second)
!= intersections_naive_id.end() );
}
// Any intersection test (do not count time here)
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type >
intersection = tree.any_intersection(query);
// Check: verify we do get the result by naive method
if ( intersection )
{
assert( std::find(intersections_naive_id.begin(),
intersections_naive_id.end(),
intersection->second)
!= intersections_naive_id.end());
}
else if ( intersections_naive.size() != 0 )
assert(false);
}
static typename Primitive::Id primitive_id_o(const Object_and_primitive_id& o)
{
return o.second;
}
mutable CGAL::Timer naive_timer;
mutable CGAL::Timer tree_timer;
};
struct Closest_point
{
void operator()(const Point& query,
Polyhedron& p,
Tree& tree,
const Naive_implementation& naive) const
{
naive_timer.start();
Point point_naive = naive.closest_point(query,p);
naive_timer.stop();
tree_timer.start();
Point point_tree = tree.closest_point(query);
tree_timer.stop();
FT dist_naive = CGAL::squared_distance(query, point_naive);
FT dist_tree = CGAL::squared_distance(query, point_tree);
const FT epsilon = FT(1e-7);
if (CGAL::abs(dist_naive - dist_tree) > epsilon) {
std::cerr.precision(17);
std::cerr << "dist_tree: " << dist_tree
<< "\ndist_naive: " << dist_naive
<< "\ndifference: " << (dist_naive - dist_tree) << std::endl;
}
assert( (dist_naive - dist_tree) <= epsilon );
assert( (dist_naive - dist_tree) >= (-1. * epsilon) );
}
mutable CGAL::Timer naive_timer;
mutable CGAL::Timer tree_timer;
};
struct Closest_point_and_primitive
{
void operator()(const Point& query,
Polyhedron& p,
Tree& tree,
const Naive_implementation& naive) const
{
naive_timer.start();
Point_and_primitive_id point_naive = naive.closest_point_and_primitive(query,p);
naive_timer.stop();
tree_timer.start();
Point_and_primitive_id point_tree = tree.closest_point_and_primitive(query);
tree_timer.stop();
// Laurent Rineau, 2014/02/05: With a non exact kernel, there is no
// reason that the points are equal!
// if ( point_naive.second == point_tree.second )
// {
// // Points should be the same
// assert(point_naive.first == point_tree.first);
// }
// else
{
// Compare distance
FT dist_naive = CGAL::squared_distance(query, point_naive.first);
FT dist_tree = CGAL::squared_distance(query, point_tree.first);
const FT epsilon = FT(1e-7);
if (CGAL::abs(dist_naive - dist_tree) > epsilon) {
std::cerr.precision(17);
std::cerr << "dist_tree: " << dist_tree
<< "\ndist_naive: " << dist_naive
<< "\ndifference: " << (dist_naive - dist_tree) << std::endl;
}
assert( (dist_naive - dist_tree) <= epsilon );
assert( (dist_naive - dist_tree) >= (-1. * epsilon) );
}
}
mutable CGAL::Timer naive_timer;
mutable CGAL::Timer tree_timer;
};
private:
Tree& m_tree;
Polyhedron& m_polyhedron;
Naive_implementation m_naive;
mutable double m_naive_time;
mutable double m_tree_time;
};
#include <CGAL/enable_warnings.h>
| 30.744656 | 140 | 0.644262 | [
"vector",
"transform"
] |
65c09d789fc5660636b19f244b6c6b43aa7024fa | 5,195 | h | C | thirdparty/physx/PhysXSDK/Source/SimulationController/src/particles/ScParticleSystemSim.h | johndpope/echo | e9ce2f4037e8a5d49b74cc7a9d9ee09f296e7fa7 | [
"MIT"
] | null | null | null | thirdparty/physx/PhysXSDK/Source/SimulationController/src/particles/ScParticleSystemSim.h | johndpope/echo | e9ce2f4037e8a5d49b74cc7a9d9ee09f296e7fa7 | [
"MIT"
] | 2 | 2015-06-21T17:38:11.000Z | 2015-06-22T20:54:42.000Z | thirdparty/physx/PhysXSDK/Source/SimulationController/src/particles/ScParticleSystemSim.h | johndpope/echo | e9ce2f4037e8a5d49b74cc7a9d9ee09f296e7fa7 | [
"MIT"
] | null | null | null | /*
* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA CORPORATION is strictly prohibited.
*/
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
#ifndef PX_PHYSICS_SCP_PARTICLE_SYSTEM_SIM
#define PX_PHYSICS_SCP_PARTICLE_SYSTEM_SIM
#include "CmPhysXCommon.h"
#include "PxPhysXConfig.h"
#if PX_USE_PARTICLE_SYSTEM_API
#include "ScScene.h"
#include "ScRigidSim.h"
#include "ScActor.h"
#include "PsPool.h"
#include "ScParticlePacketShape.h"
#include "PxvParticleSystemSim.h"
namespace physx
{
class PxvParticleSystemSim;
class PxvParticleSystemState;
struct PxvParticleSystemSimDataDesc;
struct PxvParticleShapesUpdateInput;
struct PxvParticleCollisionUpdateInput;
#if PX_SUPPORT_GPU_PHYSX
class PxParticleDeviceExclusiveAccess;
#endif
namespace Sc
{
class ParticleSystemCore;
class ShapeSim;
class ParticlePacketShape;
#define PX_PARTICLE_SYSTEM_DEBUG_RENDERING 1
class ParticleSystemSim : public ActorSim
{
public:
ParticleSystemSim(Scene&, ParticleSystemCore&);
void release(bool releaseStateBuffers);
PxFilterData getSimulationFilterData() const;
void scheduleRefiltering();
void resetFiltering();
void setFlags(PxU32 flags);
PxU32 getInternalFlags() const;
void getSimParticleData(PxvParticleSystemSimDataDesc& simParticleData, bool devicePtr) const;
PxvParticleSystemState& getParticleState();
void addInteraction(const ParticlePacketShape& particleShape, const ShapeSim& shape, const PxU32 ccdPass);
void removeInteraction(const ParticlePacketShape& particleShape, const ShapeSim& shape, bool isDyingRb, const PxU32 ccdPass);
void onRbShapeChange(const ParticlePacketShape& particleShape, const ShapeSim& shape);
void processShapesUpdate();
#if PX_SUPPORT_GPU_PHYSX
Ps::IntBool isGpu() const { return mLLSim->isGpuV(); }
#endif
// batched updates
static PxBaseTask& scheduleShapeGeneration(InteractionScene& scene, const Ps::Array<ParticleSystemSim*>& particleSystems, PxBaseTask& continuation);
static PxBaseTask& scheduleDynamicsCpu(InteractionScene& scene, const Ps::Array<ParticleSystemSim*>& particleSystems, PxBaseTask& continuation);
static PxBaseTask& scheduleCollisionPrep(InteractionScene& scene, const Ps::Array<ParticleSystemSim*>& particleSystems, PxBaseTask& continuation);
static PxBaseTask& scheduleCollisionCpu(InteractionScene& scene, const Ps::Array<ParticleSystemSim*>& particleSystems, PxBaseTask& continuation);
static PxBaseTask& schedulePipelineGpu(InteractionScene& scene, const Ps::Array<ParticleSystemSim*>& particleSystems, PxBaseTask& continuation);
//---------------------------------------------------------------------------------
// Actor implementation
//---------------------------------------------------------------------------------
public:
// non-DDI methods:
// Core functionality
void startStep();
void endStep();
void unlinkParticleShape(ParticlePacketShape* particleShape);
ParticleSystemCore& getCore() const;
#if PX_SUPPORT_GPU_PHYSX
void enableDeviceExclusiveModeGpu();
PxParticleDeviceExclusiveAccess*
getDeviceExclusiveAccessGpu() const;
#endif
private:
~ParticleSystemSim() {}
void createShapeUpdateInput(PxvParticleShapesUpdateInput& input);
void createCollisionUpdateInput(PxvParticleCollisionUpdateInput& input);
void updateRigidBodies();
void prepareCollisionInput(PxBaseTask* continuation);
// ParticleSystem packet handling
void releaseParticlePacketShapes();
PX_INLINE void addParticlePacket(PxvParticleShape* llParticleShape);
PX_INLINE void removeParticlePacket(const PxvParticleShape * llParticleShape);
#if PX_ENABLE_DEBUG_VISUALIZATION
public:
void visualizeStartStep(Cm::RenderOutput& out);
void visualizeEndStep(Cm::RenderOutput& out);
private:
void visualizeParticlesBounds(Cm::RenderOutput& out);
void visualizeParticles(Cm::RenderOutput& out);
void visualizeCollisionNormals(Cm::RenderOutput& out);
void visualizeSpatialGrid(Cm::RenderOutput& out);
void visualizeBroadPhaseBounds(Cm::RenderOutput& out);
void visualizeInteractions(Cm::RenderOutput& out); // MS: Might be helpful for debugging
#endif // PX_ENABLE_DEBUG_VISUALIZATION
private:
PxvParticleSystemSim* mLLSim;
// Array of particle packet shapes
Ps::Pool<ParticlePacketShape> mParticlePacketShapePool;
Ps::Array<ParticlePacketShape*> mParticlePacketShapes;
// Count interactions for sizing the contact manager stream
PxU32 mInteractionCount;
typedef Cm::DelegateTask<Sc::ParticleSystemSim, &Sc::ParticleSystemSim::prepareCollisionInput> CollisionInputPrepTask;
CollisionInputPrepTask mCollisionInputPrepTask;
};
} // namespace Sc
}
#endif // PX_USE_PARTICLE_SYSTEM_API
#endif
| 33.954248 | 150 | 0.764581 | [
"shape"
] |
65c305edf11b7229a2c9d8225b5dc54caf0bbbfe | 9,652 | h | C | src/lib/lgui/layout/relativelayouthelpers.h | frank256/lgui | 4eae1ae100756256863a84f7698ced6584387e0f | [
"BSD-3-Clause"
] | 8 | 2018-09-25T21:09:07.000Z | 2022-01-25T10:37:17.000Z | src/lib/lgui/layout/relativelayouthelpers.h | frank256/lgui | 4eae1ae100756256863a84f7698ced6584387e0f | [
"BSD-3-Clause"
] | 3 | 2018-09-28T21:44:06.000Z | 2021-12-23T17:34:39.000Z | src/lib/lgui/layout/relativelayouthelpers.h | frank256/lgui | 4eae1ae100756256863a84f7698ced6584387e0f | [
"BSD-3-Clause"
] | 2 | 2021-03-01T14:10:05.000Z | 2022-01-27T02:09:43.000Z | /* _ _
* | | (_)
* | | __ _ _ _ _
* | | / _` || | | || |
* | || (_| || |_| || |
* |_| \__, | \__,_||_|
* __/ |
* |___/
*
* Copyright (c) 2015-22 frank256
*
* License (BSD):
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
The RelativeLayout has been inspired by the RelativeLayout of the Android operating system.
Here is the copyright notice from the relevant Android Java file:
-------------------------------------------------------------------------------------------
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-------------------------------------------------------------------------------------------
*/
#ifndef LGUI_RELATIVELAYOUTHELPERS_H
#define LGUI_RELATIVELAYOUTHELPERS_H
#include <array>
#include <vector>
#include <unordered_map>
#include "layoutitem.h"
namespace lgui {
namespace dtl {
using RelativeLayoutElementId = unsigned long;
class RelativeLayoutConstraints {
public:
RelativeLayoutConstraints();
/** Types of constraints to be used for RelativeLayout.
* Those ending with ...Perc take a float value (called `p`) between 0.0 and 1.0 as parameters;
* AlignLeft, AlignRight, AlignTop, AlignBottom, LeftOf, RightOf, Above, and Below take another item
* as parameter (called `dep`). The others go without parameters. */
enum Constraint {
/** The left edge of the item should be fixed at p% of the parent width. */
AlignLeftParentPerc,
/** The right edge of the item should be fixed at p% of the parent width. */
AlignRightParentPerc,
/** The top edge of the item should be fixed at p% of the parent height. */
AlignTopParentPerc,
/** The bottom edge of the item should be fixed at p% of the parent height. */
AlignBottomParentPerc,
/** The item should be centered horizontally within its parent. */
HCenterInParent,
/** The item should be centered vertically within its parent. */
VCenterInParent,
/** The left edge of the item should be aligned with the left edge of dep. */
AlignLeft,
/** The right edge of the item should be aligned with the right edge of dep. */
AlignRight,
/** The top edge of the item should be aligned with the top edge of dep. */
AlignTop,
/** The bottom edge of the item should be aligned with the bottom edge of dep. */
AlignBottom,
/** The right edge of the item should be aligned with the left edge of dep. */
LeftOf,
/** The left edge of the item should be aligned with the right edge of dep. */
RightOf,
/** The bottom edge of the item should be aligned with the top edge of dep. */
Above,
/** The top edge of the item should be aligned with the bottom edge of dep. */
Below,
/** (internal, do not use) */
NoSavedConstraints,
// Extra constraints for convenience which are translated into others:
/** Shortcut for AlignLeftParentPerc with p=0.0 */
AlignParentLeft,
/** Shortcut for AlignRightParentPerc with p=1.0 */
AlignParentRight,
/** Shortcut for AlignTopParentPerc with p=0.0 */
AlignParentTop,
/** Shortcut for AlignBottomParentPerc with p=1.0 */
AlignParentBottom,
/** Apply both HCenterInParent and VCenterInParent. */
CenterInParent
};
void add_constraint(Constraint c);
void add_constraint(Constraint c, float perc);
void add_constraint(Constraint c, RelativeLayoutElementId dependency);
RelativeLayoutElementId get_constraint(Constraint c) const;
float get_perc_constraint(Constraint c) const;
void remove(Constraint c);
void clear_constraints();
void purge_id(RelativeLayoutElementId id);
using ConstraintFilterSet = std::array<Constraint, 7>;
static const ConstraintFilterSet& get_horizontal_constraints() { return HORIZONTAL_CONSTRAINTS; }
static const ConstraintFilterSet& get_vertical_constraints() { return VERTICAL_CONSTRAINTS; }
static bool does_constraint_need_argument(Constraint c);
static bool does_constraint_need_dependency_argument(Constraint c);
static bool does_constraint_need_perc_argument(Constraint c);
private:
using ConstraintsArray = std::array<RelativeLayoutElementId, NoSavedConstraints>;
ConstraintsArray mconstraints;
std::array<float, 4> mpercs;
static const ConstraintFilterSet HORIZONTAL_CONSTRAINTS, VERTICAL_CONSTRAINTS;
};
class RelativeLayoutPosition : public Padding {
public:
RelativeLayoutPosition() :
Padding(REL_POS_NOT_SET) {}
bool is_left_set() const { return left() != REL_POS_NOT_SET; }
bool is_right_set() const { return right() != REL_POS_NOT_SET; }
bool is_top_set() const { return top() != REL_POS_NOT_SET; }
bool is_bottom_set() const { return bottom() != REL_POS_NOT_SET; }
static const int REL_POS_NOT_SET;
};
// Wrapper for a layout item and an ID, starting at 2
class RelativeLayoutItem : public LayoutItem {
public:
RelativeLayoutItem(const LayoutItemProxy& le, const RelativeLayoutConstraints& constraints,
RelativeLayoutElementId id)
: LayoutItem(le), mconstraints(constraints), mid(id) {}
RelativeLayoutElementId id() const { return mid; }
const RelativeLayoutConstraints& constraints() const { return mconstraints; }
RelativeLayoutConstraints& constraints() { return mconstraints; }
const RelativeLayoutPosition& rel_pos() const { return mrel_pos; }
RelativeLayoutPosition& rel_pos() { return mrel_pos; }
private:
RelativeLayoutPosition mrel_pos;
RelativeLayoutConstraints mconstraints;
RelativeLayoutElementId mid;
};
class RelativeLayoutItemSorter {
public:
void clear();
void prepare_for(size_t no_items);
// Insert all at once?
void add(RelativeLayoutItem& item);
void retrieve_sorted_list(const RelativeLayoutConstraints::ConstraintFilterSet& filter,
std::vector<RelativeLayoutItem*>& insert_into);
private:
struct GraphNode {
GraphNode(RelativeLayoutItem* item) {
this->item = item;
}
RelativeLayoutItem* item;
std::vector <GraphNode*> dependencies;
std::vector <GraphNode*> dependents;
};
std::unordered_map <RelativeLayoutElementId, GraphNode> mmap;
void clear_graph();
void build_graph(const RelativeLayoutConstraints::ConstraintFilterSet& filter);
std::vector<GraphNode*> collect_roots();
};
}
}
#endif // LGUI_RELATIVELAYOUTHELPERS_H
| 44.479263 | 109 | 0.616349 | [
"vector"
] |
65c6e6b3cfe36667b15d4c3c0465ae8fbad77390 | 11,444 | h | C | ramdisk_tools/IOUSBDeviceControllerLib.h | slango20/iphone-dataprotection | 424317205f2077dbb8d9712286ae4c181fb05075 | [
"Xnet",
"X11"
] | 1 | 2017-12-11T03:08:14.000Z | 2017-12-11T03:08:14.000Z | ramdisk_tools/IOUSBDeviceControllerLib.h | slango20/iphone-dataprotection | 424317205f2077dbb8d9712286ae4c181fb05075 | [
"Xnet",
"X11"
] | null | null | null | ramdisk_tools/IOUSBDeviceControllerLib.h | slango20/iphone-dataprotection | 424317205f2077dbb8d9712286ae4c181fb05075 | [
"Xnet",
"X11"
] | null | null | null | #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmissing-declarations"
/*
* Copyright (c) 2008 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* IOUSBDeviceControllerLib.h
* IOUSBDeviceFamily
*
* Created by Paul Chinn on 11/6/07.
* Copyright 2007 Apple Inc. All rights reserved.
*
*/
#ifndef _IOKIT_IOUSBDEVICECONTROLLERLIB_H_
#define _IOKIT_IOUSBDEVICECONTROLLERLIB_H_
#include <IOKit/IOTypes.h>
#include <IOKit/IOReturn.h>
#include <CoreFoundation/CoreFoundation.h>
/*!
@header IOUSBDeviceControllerLib
IOUSBDeviceControllerLib provides some API to access devicce-mode-usb controllers.
*/
__BEGIN_DECLS
/*! @typedef IOUSBDeviceControllerRef
@abstract This is the type of a reference to the IOUSBDeviceController.
*/
typedef struct __IOUSBDeviceController* IOUSBDeviceControllerRef;
/*! @typedef IOUSBDeviceDescriptionRef
@abstract Object that describes the device, configurations and interfaces of a IOUSBDeviceController.
*/
typedef struct __IOUSBDeviceDescription* IOUSBDeviceDescriptionRef;
/*! @typedef IOUSBDeviceArrivalCallback
@abstract Function callback for notification of asynchronous arrival of an IOUSBDeviceController .
*/
typedef void (*IOUSBDeviceArrivalCallback) (
void * context,
IOUSBDeviceControllerRef device);
/*!
@function IOUSBDeviceControllerGetTypeID
@abstract Returns the type identifier of all IOUSBDeviceController instances.
*/
CF_EXPORT
CFTypeID IOUSBDeviceControllerGetTypeID(void)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*!
@function IOUSBDeviceDescriptionGetTypeID
@abstract Returns the type identifier of all IOUSBDeviceDescription instances.
*/
CF_EXPORT
CFTypeID IOUSBDeviceDescriptionGetTypeID(void)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*!
@function IOUSBDeviceControllerCreate
@abstract Creates an IOUSBDeviceController object.
@discussion Creates a CF object that provides access to the kernel's IOUSBDeviceController IOKit object.
@param allocator Allocator to be used during creation.
@param deviceRef The newly created object. Only valid if the call succeeds.
@result The status of the call. The call will fail if no IOUSBDeviceController exists in the kernel.
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerCreate(
CFAllocatorRef allocator,
IOUSBDeviceControllerRef* deviceRef
)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*!
@function IOUSBDeviceControllerGoOffAndOnBus
@abstract Cause the controller to drop off bus and return.
@discussion The controller will drop off USB appearing to the host as if it has been unlugged. After the given msecDelay
has elapsed, it will come back on bus.
@param deviceRef The controller object
@param msecDelay The time in milliseconds to stay off-bus.
@result The status of the call.
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerGoOffAndOnBus(IOUSBDeviceControllerRef device, uint32_t msecDelay)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*!
@function IOUSBDeviceControllerForceOffBus
@abstract Cause the controller to stay off.
@discussion The controller will drop off USB appearing to the host as if it has been unlugged.
@param deviceRef The controller object
@param enable If true the controller is dropped off the bus and kept off. When false the controller will no longer be forced off.
@result The status of the call.
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerForceOffBus(IOUSBDeviceControllerRef device, int enable)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*! @function IOUSBDeviceControllerRegisterArrivalCallback
@abstract Schedules async controller arrival with a run loop
@discussion Establishs a callback to be invoked when an IOUSBDeviceController becomes available in-kernel.
@param callback The function invoked when the controller arrives. It receives a IOUSBDeviceControllerRef annd the caller-provided context.
@param context A caller-specified pointer that is provided when the callback is invoked.
@param runLoop RunLoop to be used when scheduling any asynchronous activity.
@param runLoopMode Run loop mode to be used when scheduling any asynchronous activity.
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerRegisterArrivalCallback(IOUSBDeviceArrivalCallback callback, void *context, CFRunLoopRef runLoop, CFStringRef runLoopMode)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
void IOUSBDeviceControllerRemoveArrivalCallback()
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*! @function IOUSBDeviceControllerSetDescription
@abstract Provide the information required to configure the IOUSBDeviceController in kernel
@param device The controller instance to receive the description
@param description The description to use.
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerSetDescription(IOUSBDeviceControllerRef device, IOUSBDeviceDescriptionRef description)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*! @function IOUSBDeviceControllerSendCommand
@abstract Issue a command to the in-kernel usb-device stack
@discussion This sends a command string and optional parameter object into the kernel. Commands are passed to the controller-driver, the
"device", then to the individual interface drivers, until one of those handles it.
@param device The controller instance to receive the command
@param command A string command. Valid commands are determined by the various in-kernel drivers comprising the usb-device stack
@param param An optional, arbitrary object that is appropriate for the given command
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerSendCommand(IOUSBDeviceControllerRef device, CFStringRef command, CFTypeRef param)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*! @function IOUSBDeviceControllerSetPreferredConfiguration
@abstract Sets the preferred configuration number to gain desired functionality on the host
@param device The controller instance to receive the description
@param config Preferred configuration number that will be sent to the host.
*/
CF_EXPORT
IOReturn IOUSBDeviceControllerSetPreferredConfiguration(IOUSBDeviceControllerRef device, int config)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
IOUSBDeviceDescriptionRef IOUSBDeviceDescriptionCreate(CFAllocatorRef allocator)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*! @function IOUSBDeviceDescriptionCreateFromController
@abstract Retrieve the current description from the IOUSBDeviceController
@discussion This retrieves the currently set description from the kernel's IOUSBDeviceController. It represents the full description of the device as
it is currently presented on the USB. The call can fail if the controller exists but has not et received a description.
@param allocator The CF allocator to use when creating the description
@param device The controller instance from which to receive the description
*/
CF_EXPORT
IOUSBDeviceDescriptionRef IOUSBDeviceDescriptionCreateFromController(CFAllocatorRef allocator, IOUSBDeviceControllerRef)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
/*! @function IOUSBDeviceDescriptionCreateFromDefaults
@abstract Create a descripion based on the hardwares default usb description.
@discussion This retrieves the default description for the device. It describes the main usb functionality provided by the device and is what is used for
a normal system. Currently the description is retrieved from a plist on disk and is keyed to a sysctl that describes the hardware.
@param allocator The CF allocator to use when creating the description
*/
CF_EXPORT
IOUSBDeviceDescriptionRef IOUSBDeviceDescriptionCreateFromDefaults(CFAllocatorRef allocator)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
IOUSBDeviceDescriptionRef IOUSBDeviceDescriptionCreate(CFAllocatorRef allocator)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
uint8_t IOUSBDeviceDescriptionGetClass(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
void IOUSBDeviceDescriptionSetClass(IOUSBDeviceDescriptionRef ref, UInt8 bClass)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
uint8_t IOUSBDeviceDescriptionGetSubClass(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
uint8_t IOUSBDeviceDescriptionGetProtocol(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
uint16_t IOUSBDeviceDescriptionGetVendorID(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
void IOUSBDeviceDescriptionSetVendorID(IOUSBDeviceDescriptionRef devDesc, UInt16 vendorID)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
uint16_t IOUSBDeviceDescriptionGetProductID(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
void IOUSBDeviceDescriptionSetProductID(IOUSBDeviceDescriptionRef devDesc, UInt16 productID)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
uint16_t IOUSBDeviceDescriptionGetVersion(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
CFStringRef IOUSBDeviceDescriptionGetManufacturerString(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
CFStringRef IOUSBDeviceDescriptionGetProductString(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
CFStringRef IOUSBDeviceDescriptionGetSerialString(IOUSBDeviceDescriptionRef ref)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
void IOUSBDeviceDescriptionSetSerialString(IOUSBDeviceDescriptionRef ref, CFStringRef serial)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
int IOUSBDeviceDescriptionAppendInterfaceToConfiguration(IOUSBDeviceDescriptionRef devDesc, int config, CFStringRef name);
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
int IOUSBDeviceDescriptionAppendConfiguration(IOUSBDeviceDescriptionRef devDesc, CFStringRef textDescription, UInt8 attributes, UInt8 maxPower);
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
void IOUSBDeviceDescriptionRemoveAllConfigurations(IOUSBDeviceDescriptionRef devDesc)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
io_service_t IOUSBDeviceControllerGetService(IOUSBDeviceControllerRef controller);
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
CF_EXPORT
int IOUSBDeviceDescriptionGetMatchingConfiguration(IOUSBDeviceDescriptionRef devDesc, CFArrayRef interfaceNames);
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
__END_DECLS
#endif
#pragma clang diagnostic pop | 41.919414 | 154 | 0.834411 | [
"object"
] |
65c99e9660bd0404bf3e97da5da20ffb78b038ed | 8,497 | h | C | nlp/parser/parser.h | Betterpath/Sling | 549299786667ba2b8ac9456adb51f2af9f114f73 | [
"Apache-2.0"
] | 1 | 2020-03-16T05:03:21.000Z | 2020-03-16T05:03:21.000Z | nlp/parser/parser.h | Betterpath/Sling | 549299786667ba2b8ac9456adb51f2af9f114f73 | [
"Apache-2.0"
] | null | null | null | nlp/parser/parser.h | Betterpath/Sling | 549299786667ba2b8ac9456adb51f2af9f114f73 | [
"Apache-2.0"
] | null | null | null | // Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NLP_PARSER_PARSER_H_
#define NLP_PARSER_PARSER_H_
#include <limits>
#include <string>
#include <unordered_map>
#include <vector>
#include "base/logging.h"
#include "base/types.h"
#include "file/file.h"
#include "frame/store.h"
#include "myelin/compute.h"
#include "myelin/flow.h"
#include "myelin/profile.h"
#include "nlp/document/document.h"
#include "nlp/document/features.h"
#include "nlp/document/lexicon.h"
#include "nlp/parser/action-table.h"
#include "nlp/parser/parser-state.h"
#include "nlp/parser/roles.h"
namespace sling {
namespace nlp {
class ParserInstance;
// Frame semantics parser model.
class Parser {
public:
// Profile summary for each cell.
struct Profile {
Profile(Parser *parser)
: lr(parser->lr_.cell), rl(parser->rl_.cell), ff(parser->ff_.cell) {}
myelin::ProfileSummary lr; // profile summary for LR LSTM
myelin::ProfileSummary rl; // profile summary for RL LSTM
myelin::ProfileSummary ff; // profile summary for FF
};
~Parser() { delete profile_; }
// Load and initialize parser model.
void Load(Store *store, const string &filename);
// Parse document.
void Parse(Document *document) const;
// Enable profiling. Must be called before Load().
void EnableProfiling() {
network_.options().profiling = true;
network_.options().external_profiler = true;
}
// Enable fast fallback. Must be called before Load().
void EnableFastFallback() { fast_fallback_ = true; }
// Run parser on GPU if available. Must be called before Load().
void EnableGPU();
// Return profile summary for parser.
Profile *profile() const { return profile_; }
private:
// LSTM cell.
struct LSTM {
// Cell.
myelin::Cell *cell; // LSTM cell
bool reverse; // LSTM direction
myelin::Tensor *profile; // LSTM profiling block
// Connectors.
myelin::Connector *control; // LSTM control layer
myelin::Connector *hidden; // LSTM hidden layer
// Features.
myelin::Tensor *word_feature; // word feature
myelin::Tensor *prefix_feature; // prefix feature
myelin::Tensor *suffix_feature; // suffix feature
myelin::Tensor *hyphen_feature; // hyphenation feature
myelin::Tensor *caps_feature; // capitalization feature
myelin::Tensor *punct_feature; // punctuation feature
myelin::Tensor *quote_feature; // quote feature
myelin::Tensor *digit_feature; // digit feature
int prefix_size = 0; // max prefix length
int suffix_size = 0; // max suffix length
// Links.
myelin::Tensor *c_in; // link to LSTM control input
myelin::Tensor *c_out; // link to LSTM control output
myelin::Tensor *h_in; // link to LSTM hidden input
myelin::Tensor *h_out; // link to LSTM hidden output
};
// Feed-forward cell.
struct FF {
myelin::Cell *cell; // feed-forward cell
myelin::Connector *step; // FF step hidden activations
myelin::Tensor *profile; // FF profiling block
// Features.
myelin::Tensor *lr_focus_feature; // LR LSTM input focus feature
myelin::Tensor *rl_focus_feature; // RL LSTM input focus feature
myelin::Tensor *lr_attention_feature; // LR LSTM frame attention feature
myelin::Tensor *rl_attention_feature; // LR LSTM frame attention feature
myelin::Tensor *frame_create_feature; // FF frame create feature
myelin::Tensor *frame_focus_feature; // FF frame focus feature
myelin::Tensor *history_feature; // history feature
myelin::Tensor *out_roles_feature; // out roles feature
myelin::Tensor *in_roles_feature; // in roles feature
myelin::Tensor *unlabeled_roles_feature; // unlabeled roles feature
myelin::Tensor *labeled_roles_feature; // labeled roles feature
int attention_depth = 0; // number of attention features
int history_size = 0; // number of history features
int out_roles_size = 0; // max number of out roles
int in_roles_size = 0; // max number of in roles
int labeled_roles_size = 0; // max number of unlabeled roles
int unlabeled_roles_size = 0; // max number of labeled roles
// Links.
myelin::Tensor *lr_lstm; // link to LR LSTM hidden layer
myelin::Tensor *rl_lstm; // link to RL LSTM hidden layer
myelin::Tensor *steps; // link to FF step hidden layer
myelin::Tensor *hidden; // link to FF hidden layer output
myelin::Tensor *output; // link to FF logit layer output
myelin::Tensor *prediction; // link to FF argmax
};
// Initialize LSTM cell.
void InitLSTM(const string &name, LSTM *lstm, bool reverse);
// Initialize FF cell.
void InitFF(const string &name, FF *ff);
// Lookup cells, connectors, and parameters.
myelin::Cell *GetCell(const string &name);
myelin::Connector *GetConnector(const string &name);
myelin::Tensor *GetParam(const string &name, bool optional = false);
// Parser network.
myelin::Library library_;
myelin::Network network_;
// Cells.
LSTM lr_; // left-to-right LSTM cell
LSTM rl_; // right-to-left LSTM cell
FF ff_; // feed-forward cell
// Profile summary.
Profile *profile_ = nullptr;
// Number of output actions.
int num_actions_;
// Lexicon.
Lexicon lexicon_;
// Global store for parser.
Store *store_ = nullptr;
// Parser action table.
ActionTable actions_;
// Maximum attention index considered (exclusive).
int frame_limit_ = 5;
// Set of roles considered.
RoleSet roles_;
// Fast fallback using argmax.
bool fast_fallback_ = false;
// Run parser on GPU.
bool use_gpu_ = false;
// Symbols.
Names names_;
Name n_document_tokens_{names_, "/s/document/tokens"};
Name n_token_text_{names_, "/s/token/text"};
Name n_token_break_{names_, "/s/token/break"};
friend class ParserInstance;
};
// Parser state for running an instance of the parser on a document.
class ParserInstance {
public:
ParserInstance(const Parser *parser, Document *document, int begin, int end);
// Attach connectors for LR LSTM.
void AttachLR(int input, int output);
// Attach connectors for RL LSTM.
void AttachRL(int input, int output);
// Attach connectors for FF.
void AttachFF(int output);
// Extract features for LSTM.
void ExtractFeaturesLSTM(int token,
const DocumentFeatures &features,
const Parser::LSTM &lstm,
myelin::Instance *data);
// Extract features for FF.
void ExtractFeaturesFF(int step);
private:
// Get feature vector for FF.
int *GetFF(myelin::Tensor *type) {
return type ? ff_.Get<int>(type) : nullptr;
}
// Parser model.
const Parser *parser_;
// Parser transition state.
ParserState state_;
// Instances for network computations.
myelin::Instance lr_;
myelin::Instance rl_;
myelin::Instance ff_;
// Channels for connectors.
myelin::Channel lr_c_;
myelin::Channel lr_h_;
myelin::Channel rl_c_;
myelin::Channel rl_h_;
myelin::Channel ff_step_;
// Frame creation and focus steps.
std::vector<int> create_step_;
std::vector<int> focus_step_;
friend class Parser;
};
} // namespace nlp
} // namespace sling
#endif // NLP_PARSER_PARSER_H_
| 32.185606 | 80 | 0.632341 | [
"vector",
"model"
] |
65cac40a733aa8e2915f9e043d6bd256d15fbfd2 | 1,127 | h | C | src/libs/profilerhost_util/Eval.h | UofT-EcoSystem/rlscope | cdd9bbdc2a3a832be24f20105b8c9fe28149cb63 | [
"Apache-2.0"
] | 35 | 2021-01-26T22:34:17.000Z | 2022-03-02T01:25:11.000Z | EPOpt/Eval.h | ruixueqingyang/GPOEO | 8fe65ac3e0ae4d097fdd0d58878aa2cf3201a18c | [
"MIT"
] | 1 | 2022-03-15T01:40:03.000Z | 2022-03-15T01:40:03.000Z | EPOpt/Eval.h | ruixueqingyang/GPOEO | 8fe65ac3e0ae4d097fdd0d58878aa2cf3201a18c | [
"MIT"
] | 1 | 2021-03-17T08:49:07.000Z | 2021-03-17T08:49:07.000Z | #pragma once
#include <string>
#include <vector>
namespace NV {
namespace Metric {
namespace Eval {
struct MetricNameValue {
std::string metricName;
int numRanges;
// <rangeName , metricValue> pair
std::vector < std::pair<std::string, double> > rangeNameMetricValueMap;
};
/* Function to get aggregate metric value
* @param[in] chipName Chip name for which to get metric values
* @param[in] counterDataImage Counter data image
* @param[in] metricNames List of metrics to read from counter data image
* @param[out] metricNameValueMap Metric name value map
*/
bool GetMetricGpuValue(std::string chipName, std::vector<uint8_t> counterDataImage, std::vector<std::string> metricNames, std::vector<MetricNameValue>& metricNameValueMap);
bool PrintMetricValues(std::string chipName, std::vector<uint8_t> counterDataImage, std::vector<std::string> metricNames);
}
}
} | 40.25 | 184 | 0.590949 | [
"vector"
] |
65cef0bb4cc47dc111b9cd13583681c840685711 | 3,187 | c | C | src/contrib/ofed/opensm/opensm/osm_mcm_port.c | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/contrib/ofed/opensm/opensm/osm_mcm_port.c | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/contrib/ofed/opensm/opensm/osm_mcm_port.c | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | /*
* Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved.
* Copyright (c) 2002-2012 Mellanox Technologies LTD. All rights reserved.
* Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* OpenIB.org BSD license below:
*
* 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.
*
* 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.
*
*/
/*
* Abstract:
* Implementation of osm_mcm_port_t.
* This object represents the membership of a port in a multicast group.
* This object is part of the OpenSM family of objects.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#include <opensm/osm_file_ids.h>
#define FILE_ID OSM_FILE_MCM_PORT_C
#include <opensm/osm_mcm_port.h>
#include <opensm/osm_multicast.h>
osm_mcm_port_t *osm_mcm_port_new(IN osm_port_t *port, IN osm_mgrp_t *mgrp)
{
osm_mcm_port_t *p_mcm;
p_mcm = malloc(sizeof(*p_mcm));
if (p_mcm) {
memset(p_mcm, 0, sizeof(*p_mcm));
p_mcm->port = port;
p_mcm->mgrp = mgrp;
}
return p_mcm;
}
void osm_mcm_port_delete(IN osm_mcm_port_t * p_mcm)
{
CL_ASSERT(p_mcm);
free(p_mcm);
}
osm_mcm_alias_guid_t *osm_mcm_alias_guid_new(IN osm_mcm_port_t *p_base_mcm_port,
IN ib_member_rec_t *mcmr,
IN boolean_t proxy)
{
osm_mcm_alias_guid_t *p_mcm_alias_guid;
p_mcm_alias_guid = calloc(1, sizeof(*p_mcm_alias_guid));
if (p_mcm_alias_guid) {
p_mcm_alias_guid->alias_guid = mcmr->port_gid.unicast.interface_id;
p_mcm_alias_guid->p_base_mcm_port = p_base_mcm_port;
p_mcm_alias_guid->port_gid.unicast.prefix = mcmr->port_gid.unicast.prefix;
p_mcm_alias_guid->port_gid.unicast.interface_id = mcmr->port_gid.unicast.interface_id;
p_mcm_alias_guid->scope_state = mcmr->scope_state;
p_mcm_alias_guid->proxy_join = proxy;
}
return p_mcm_alias_guid;
}
void osm_mcm_alias_guid_delete(IN OUT osm_mcm_alias_guid_t ** pp_mcm_alias_guid)
{
free(*pp_mcm_alias_guid);
*pp_mcm_alias_guid = NULL;
}
| 32.191919 | 88 | 0.74145 | [
"object"
] |
65d13ff1753630eae190cc446e7e39bcbe0ed94a | 4,927 | h | C | linux-4.14.90-dev/linux-4.14.90/drivers/media/i2c/soc_camera/ov9640.h | bingchunjin/1806_SDK | d5ed0258fc22f60e00ec025b802d175f33da6e41 | [
"MIT"
] | 55 | 2019-12-20T03:25:14.000Z | 2022-01-16T07:19:47.000Z | linux-4.14.90-dev/linux-4.14.90/drivers/media/i2c/soc_camera/ov9640.h | bingchunjin/1806_SDK | d5ed0258fc22f60e00ec025b802d175f33da6e41 | [
"MIT"
] | 5 | 2020-04-04T09:24:09.000Z | 2020-04-19T12:33:55.000Z | linux-4.14.90-dev/linux-4.14.90/drivers/media/i2c/soc_camera/ov9640.h | bingchunjin/1806_SDK | d5ed0258fc22f60e00ec025b802d175f33da6e41 | [
"MIT"
] | 30 | 2018-05-02T08:43:27.000Z | 2022-01-23T03:25:54.000Z | /*
* OmniVision OV96xx Camera Header File
*
* Copyright (C) 2009 Marek Vasut <marek.vasut@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __DRIVERS_MEDIA_VIDEO_OV9640_H__
#define __DRIVERS_MEDIA_VIDEO_OV9640_H__
/* Register definitions */
#define OV9640_GAIN 0x00
#define OV9640_BLUE 0x01
#define OV9640_RED 0x02
#define OV9640_VFER 0x03
#define OV9640_COM1 0x04
#define OV9640_BAVE 0x05
#define OV9640_GEAVE 0x06
#define OV9640_RSID 0x07
#define OV9640_RAVE 0x08
#define OV9640_COM2 0x09
#define OV9640_PID 0x0a
#define OV9640_VER 0x0b
#define OV9640_COM3 0x0c
#define OV9640_COM4 0x0d
#define OV9640_COM5 0x0e
#define OV9640_COM6 0x0f
#define OV9640_AECH 0x10
#define OV9640_CLKRC 0x11
#define OV9640_COM7 0x12
#define OV9640_COM8 0x13
#define OV9640_COM9 0x14
#define OV9640_COM10 0x15
/* 0x16 - RESERVED */
#define OV9640_HSTART 0x17
#define OV9640_HSTOP 0x18
#define OV9640_VSTART 0x19
#define OV9640_VSTOP 0x1a
#define OV9640_PSHFT 0x1b
#define OV9640_MIDH 0x1c
#define OV9640_MIDL 0x1d
#define OV9640_MVFP 0x1e
#define OV9640_LAEC 0x1f
#define OV9640_BOS 0x20
#define OV9640_GBOS 0x21
#define OV9640_GROS 0x22
#define OV9640_ROS 0x23
#define OV9640_AEW 0x24
#define OV9640_AEB 0x25
#define OV9640_VPT 0x26
#define OV9640_BBIAS 0x27
#define OV9640_GBBIAS 0x28
/* 0x29 - RESERVED */
#define OV9640_EXHCH 0x2a
#define OV9640_EXHCL 0x2b
#define OV9640_RBIAS 0x2c
#define OV9640_ADVFL 0x2d
#define OV9640_ADVFH 0x2e
#define OV9640_YAVE 0x2f
#define OV9640_HSYST 0x30
#define OV9640_HSYEN 0x31
#define OV9640_HREF 0x32
#define OV9640_CHLF 0x33
#define OV9640_ARBLM 0x34
/* 0x35..0x36 - RESERVED */
#define OV9640_ADC 0x37
#define OV9640_ACOM 0x38
#define OV9640_OFON 0x39
#define OV9640_TSLB 0x3a
#define OV9640_COM11 0x3b
#define OV9640_COM12 0x3c
#define OV9640_COM13 0x3d
#define OV9640_COM14 0x3e
#define OV9640_EDGE 0x3f
#define OV9640_COM15 0x40
#define OV9640_COM16 0x41
#define OV9640_COM17 0x42
/* 0x43..0x4e - RESERVED */
#define OV9640_MTX1 0x4f
#define OV9640_MTX2 0x50
#define OV9640_MTX3 0x51
#define OV9640_MTX4 0x52
#define OV9640_MTX5 0x53
#define OV9640_MTX6 0x54
#define OV9640_MTX7 0x55
#define OV9640_MTX8 0x56
#define OV9640_MTX9 0x57
#define OV9640_MTXS 0x58
/* 0x59..0x61 - RESERVED */
#define OV9640_LCC1 0x62
#define OV9640_LCC2 0x63
#define OV9640_LCC3 0x64
#define OV9640_LCC4 0x65
#define OV9640_LCC5 0x66
#define OV9640_MANU 0x67
#define OV9640_MANV 0x68
#define OV9640_HV 0x69
#define OV9640_MBD 0x6a
#define OV9640_DBLV 0x6b
#define OV9640_GSP 0x6c /* ... till 0x7b */
#define OV9640_GST 0x7c /* ... till 0x8a */
#define OV9640_CLKRC_DPLL_EN 0x80
#define OV9640_CLKRC_DIRECT 0x40
#define OV9640_CLKRC_DIV(x) ((x) & 0x3f)
#define OV9640_PSHFT_VAL(x) ((x) & 0xff)
#define OV9640_ACOM_2X_ANALOG 0x80
#define OV9640_ACOM_RSVD 0x12
#define OV9640_MVFP_V 0x10
#define OV9640_MVFP_H 0x20
#define OV9640_COM1_HREF_NOSKIP 0x00
#define OV9640_COM1_HREF_2SKIP 0x04
#define OV9640_COM1_HREF_3SKIP 0x08
#define OV9640_COM1_QQFMT 0x20
#define OV9640_COM2_SSM 0x10
#define OV9640_COM3_VP 0x04
#define OV9640_COM4_QQ_VP 0x80
#define OV9640_COM4_RSVD 0x40
#define OV9640_COM5_SYSCLK 0x80
#define OV9640_COM5_LONGEXP 0x01
#define OV9640_COM6_OPT_BLC 0x40
#define OV9640_COM6_ADBLC_BIAS 0x08
#define OV9640_COM6_FMT_RST 0x82
#define OV9640_COM6_ADBLC_OPTEN 0x01
#define OV9640_COM7_RAW_RGB 0x01
#define OV9640_COM7_RGB 0x04
#define OV9640_COM7_QCIF 0x08
#define OV9640_COM7_QVGA 0x10
#define OV9640_COM7_CIF 0x20
#define OV9640_COM7_VGA 0x40
#define OV9640_COM7_SCCB_RESET 0x80
#define OV9640_TSLB_YVYU_YUYV 0x04
#define OV9640_TSLB_YUYV_UYVY 0x08
#define OV9640_COM12_YUV_AVG 0x04
#define OV9640_COM12_RSVD 0x40
#define OV9640_COM13_GAMMA_NONE 0x00
#define OV9640_COM13_GAMMA_Y 0x40
#define OV9640_COM13_GAMMA_RAW 0x80
#define OV9640_COM13_RGB_AVG 0x20
#define OV9640_COM13_MATRIX_EN 0x10
#define OV9640_COM13_Y_DELAY_EN 0x08
#define OV9640_COM13_YUV_DLY(x) ((x) & 0x07)
#define OV9640_COM15_OR_00FF 0x00
#define OV9640_COM15_OR_01FE 0x40
#define OV9640_COM15_OR_10F0 0xc0
#define OV9640_COM15_RGB_NORM 0x00
#define OV9640_COM15_RGB_565 0x10
#define OV9640_COM15_RGB_555 0x30
#define OV9640_COM16_RB_AVG 0x01
/* IDs */
#define OV9640_V2 0x9648
#define OV9640_V3 0x9649
#define VERSION(pid, ver) (((pid) << 8) | ((ver) & 0xFF))
/* supported resolutions */
enum {
W_QQCIF = 88,
W_QQVGA = 160,
W_QCIF = 176,
W_QVGA = 320,
W_CIF = 352,
W_VGA = 640,
W_SXGA = 1280
};
#define H_SXGA 960
/* Misc. structures */
struct ov9640_reg_alt {
u8 com7;
u8 com12;
u8 com13;
u8 com15;
};
struct ov9640_reg {
u8 reg;
u8 val;
};
struct ov9640_priv {
struct v4l2_subdev subdev;
struct v4l2_ctrl_handler hdl;
struct v4l2_clk *clk;
int model;
int revision;
};
#endif /* __DRIVERS_MEDIA_VIDEO_OV9640_H__ */
| 23.574163 | 71 | 0.805155 | [
"model"
] |
65d85fcb313acc0c173f6989a78ed2485b3a5563 | 25,601 | h | C | Util/llvm/include/llvm/CodeGen/SlotIndexes.h | ianloic/unladen-swallow | 28148f4ddbb3d519042de1f9fc9f1356fdd31e31 | [
"PSF-2.0"
] | 5 | 2020-06-30T05:06:40.000Z | 2021-05-24T08:38:33.000Z | Util/llvm/include/llvm/CodeGen/SlotIndexes.h | ianloic/unladen-swallow | 28148f4ddbb3d519042de1f9fc9f1356fdd31e31 | [
"PSF-2.0"
] | null | null | null | Util/llvm/include/llvm/CodeGen/SlotIndexes.h | ianloic/unladen-swallow | 28148f4ddbb3d519042de1f9fc9f1356fdd31e31 | [
"PSF-2.0"
] | 2 | 2015-10-01T18:28:20.000Z | 2020-09-09T16:25:27.000Z | //===- llvm/CodeGen/SlotIndexes.h - Slot indexes representation -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements SlotIndex and related classes. The purpuse of SlotIndex
// is to describe a position at which a register can become live, or cease to
// be live.
//
// SlotIndex is mostly a proxy for entries of the SlotIndexList, a class which
// is held is LiveIntervals and provides the real numbering. This allows
// LiveIntervals to perform largely transparent renumbering. The SlotIndex
// class does hold a PHI bit, which determines whether the index relates to a
// PHI use or def point, or an actual instruction. See the SlotIndex class
// description for futher information.
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_SLOTINDEXES_H
#define LLVM_CODEGEN_SLOTINDEXES_H
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ErrorHandling.h"
namespace llvm {
/// This class represents an entry in the slot index list held in the
/// SlotIndexes pass. It should not be used directly. See the
/// SlotIndex & SlotIndexes classes for the public interface to this
/// information.
class IndexListEntry {
private:
static const unsigned EMPTY_KEY_INDEX = ~0U & ~3U,
TOMBSTONE_KEY_INDEX = ~0U & ~7U;
IndexListEntry *next, *prev;
MachineInstr *mi;
unsigned index;
protected:
typedef enum { EMPTY_KEY, TOMBSTONE_KEY } ReservedEntryType;
// This constructor is only to be used by getEmptyKeyEntry
// & getTombstoneKeyEntry. It sets index to the given
// value and mi to zero.
IndexListEntry(ReservedEntryType r) : mi(0) {
switch(r) {
case EMPTY_KEY: index = EMPTY_KEY_INDEX; break;
case TOMBSTONE_KEY: index = TOMBSTONE_KEY_INDEX; break;
default: assert(false && "Invalid value for constructor.");
}
next = this;
prev = this;
}
public:
IndexListEntry(MachineInstr *mi, unsigned index) : mi(mi), index(index) {
if (index == EMPTY_KEY_INDEX || index == TOMBSTONE_KEY_INDEX) {
llvm_report_error("Attempt to create invalid index. "
"Available indexes may have been exhausted?.");
}
}
MachineInstr* getInstr() const { return mi; }
void setInstr(MachineInstr *mi) {
assert(index != EMPTY_KEY_INDEX && index != TOMBSTONE_KEY_INDEX &&
"Attempt to modify reserved index.");
this->mi = mi;
}
unsigned getIndex() const { return index; }
void setIndex(unsigned index) {
assert(index != EMPTY_KEY_INDEX && index != TOMBSTONE_KEY_INDEX &&
"Attempt to set index to invalid value.");
assert(this->index != EMPTY_KEY_INDEX &&
this->index != TOMBSTONE_KEY_INDEX &&
"Attempt to reset reserved index value.");
this->index = index;
}
IndexListEntry* getNext() { return next; }
const IndexListEntry* getNext() const { return next; }
void setNext(IndexListEntry *next) {
assert(index != EMPTY_KEY_INDEX && index != TOMBSTONE_KEY_INDEX &&
"Attempt to modify reserved index.");
this->next = next;
}
IndexListEntry* getPrev() { return prev; }
const IndexListEntry* getPrev() const { return prev; }
void setPrev(IndexListEntry *prev) {
assert(index != EMPTY_KEY_INDEX && index != TOMBSTONE_KEY_INDEX &&
"Attempt to modify reserved index.");
this->prev = prev;
}
// This function returns the index list entry that is to be used for empty
// SlotIndex keys.
static IndexListEntry* getEmptyKeyEntry();
// This function returns the index list entry that is to be used for
// tombstone SlotIndex keys.
static IndexListEntry* getTombstoneKeyEntry();
};
// Specialize PointerLikeTypeTraits for IndexListEntry.
template <>
class PointerLikeTypeTraits<IndexListEntry*> {
public:
static inline void* getAsVoidPointer(IndexListEntry *p) {
return p;
}
static inline IndexListEntry* getFromVoidPointer(void *p) {
return static_cast<IndexListEntry*>(p);
}
enum { NumLowBitsAvailable = 3 };
};
/// SlotIndex - An opaque wrapper around machine indexes.
class SlotIndex {
friend class SlotIndexes;
friend struct DenseMapInfo<SlotIndex>;
private:
static const unsigned PHI_BIT = 1 << 2;
PointerIntPair<IndexListEntry*, 3, unsigned> lie;
SlotIndex(IndexListEntry *entry, unsigned phiAndSlot)
: lie(entry, phiAndSlot) {
assert(entry != 0 && "Attempt to construct index with 0 pointer.");
}
IndexListEntry& entry() const {
return *lie.getPointer();
}
int getIndex() const {
return entry().getIndex() | getSlot();
}
static inline unsigned getHashValue(const SlotIndex &v) {
IndexListEntry *ptrVal = &v.entry();
return (unsigned((intptr_t)ptrVal) >> 4) ^
(unsigned((intptr_t)ptrVal) >> 9);
}
public:
// FIXME: Ugh. This is public because LiveIntervalAnalysis is still using it
// for some spill weight stuff. Fix that, then make this private.
enum Slot { LOAD, USE, DEF, STORE, NUM };
static inline SlotIndex getEmptyKey() {
return SlotIndex(IndexListEntry::getEmptyKeyEntry(), 0);
}
static inline SlotIndex getTombstoneKey() {
return SlotIndex(IndexListEntry::getTombstoneKeyEntry(), 0);
}
/// Construct an invalid index.
SlotIndex() : lie(IndexListEntry::getEmptyKeyEntry(), 0) {}
// Construct a new slot index from the given one, set the phi flag on the
// new index to the value of the phi parameter.
SlotIndex(const SlotIndex &li, bool phi)
: lie(&li.entry(), phi ? PHI_BIT & li.getSlot() : (unsigned)li.getSlot()){
assert(lie.getPointer() != 0 &&
"Attempt to construct index with 0 pointer.");
}
// Construct a new slot index from the given one, set the phi flag on the
// new index to the value of the phi parameter, and the slot to the new slot.
SlotIndex(const SlotIndex &li, bool phi, Slot s)
: lie(&li.entry(), phi ? PHI_BIT & s : (unsigned)s) {
assert(lie.getPointer() != 0 &&
"Attempt to construct index with 0 pointer.");
}
/// Returns true if this is a valid index. Invalid indicies do
/// not point into an index table, and cannot be compared.
bool isValid() const {
return (lie.getPointer() != 0) && (lie.getPointer()->getIndex() != 0);
}
/// Print this index to the given raw_ostream.
void print(raw_ostream &os) const;
/// Dump this index to stderr.
void dump() const;
/// Compare two SlotIndex objects for equality.
bool operator==(SlotIndex other) const {
return getIndex() == other.getIndex();
}
/// Compare two SlotIndex objects for inequality.
bool operator!=(SlotIndex other) const {
return getIndex() != other.getIndex();
}
/// Compare two SlotIndex objects. Return true if the first index
/// is strictly lower than the second.
bool operator<(SlotIndex other) const {
return getIndex() < other.getIndex();
}
/// Compare two SlotIndex objects. Return true if the first index
/// is lower than, or equal to, the second.
bool operator<=(SlotIndex other) const {
return getIndex() <= other.getIndex();
}
/// Compare two SlotIndex objects. Return true if the first index
/// is greater than the second.
bool operator>(SlotIndex other) const {
return getIndex() > other.getIndex();
}
/// Compare two SlotIndex objects. Return true if the first index
/// is greater than, or equal to, the second.
bool operator>=(SlotIndex other) const {
return getIndex() >= other.getIndex();
}
/// Return the distance from this index to the given one.
int distance(SlotIndex other) const {
return other.getIndex() - getIndex();
}
/// Returns the slot for this SlotIndex.
Slot getSlot() const {
return static_cast<Slot>(lie.getInt() & ~PHI_BIT);
}
/// Returns the state of the PHI bit.
bool isPHI() const {
return lie.getInt() & PHI_BIT;
}
/// Returns the base index for associated with this index. The base index
/// is the one associated with the LOAD slot for the instruction pointed to
/// by this index.
SlotIndex getBaseIndex() const {
return getLoadIndex();
}
/// Returns the boundary index for associated with this index. The boundary
/// index is the one associated with the LOAD slot for the instruction
/// pointed to by this index.
SlotIndex getBoundaryIndex() const {
return getStoreIndex();
}
/// Returns the index of the LOAD slot for the instruction pointed to by
/// this index.
SlotIndex getLoadIndex() const {
return SlotIndex(&entry(), SlotIndex::LOAD);
}
/// Returns the index of the USE slot for the instruction pointed to by
/// this index.
SlotIndex getUseIndex() const {
return SlotIndex(&entry(), SlotIndex::USE);
}
/// Returns the index of the DEF slot for the instruction pointed to by
/// this index.
SlotIndex getDefIndex() const {
return SlotIndex(&entry(), SlotIndex::DEF);
}
/// Returns the index of the STORE slot for the instruction pointed to by
/// this index.
SlotIndex getStoreIndex() const {
return SlotIndex(&entry(), SlotIndex::STORE);
}
/// Returns the next slot in the index list. This could be either the
/// next slot for the instruction pointed to by this index or, if this
/// index is a STORE, the first slot for the next instruction.
/// WARNING: This method is considerably more expensive than the methods
/// that return specific slots (getUseIndex(), etc). If you can - please
/// use one of those methods.
SlotIndex getNextSlot() const {
Slot s = getSlot();
if (s == SlotIndex::STORE) {
return SlotIndex(entry().getNext(), SlotIndex::LOAD);
}
return SlotIndex(&entry(), s + 1);
}
/// Returns the next index. This is the index corresponding to the this
/// index's slot, but for the next instruction.
SlotIndex getNextIndex() const {
return SlotIndex(entry().getNext(), getSlot());
}
/// Returns the previous slot in the index list. This could be either the
/// previous slot for the instruction pointed to by this index or, if this
/// index is a LOAD, the last slot for the previous instruction.
/// WARNING: This method is considerably more expensive than the methods
/// that return specific slots (getUseIndex(), etc). If you can - please
/// use one of those methods.
SlotIndex getPrevSlot() const {
Slot s = getSlot();
if (s == SlotIndex::LOAD) {
return SlotIndex(entry().getPrev(), SlotIndex::STORE);
}
return SlotIndex(&entry(), s - 1);
}
/// Returns the previous index. This is the index corresponding to this
/// index's slot, but for the previous instruction.
SlotIndex getPrevIndex() const {
return SlotIndex(entry().getPrev(), getSlot());
}
};
/// DenseMapInfo specialization for SlotIndex.
template <>
struct DenseMapInfo<SlotIndex> {
static inline SlotIndex getEmptyKey() {
return SlotIndex::getEmptyKey();
}
static inline SlotIndex getTombstoneKey() {
return SlotIndex::getTombstoneKey();
}
static inline unsigned getHashValue(const SlotIndex &v) {
return SlotIndex::getHashValue(v);
}
static inline bool isEqual(const SlotIndex &LHS, const SlotIndex &RHS) {
return (LHS == RHS);
}
static inline bool isPod() { return false; }
};
inline raw_ostream& operator<<(raw_ostream &os, SlotIndex li) {
li.print(os);
return os;
}
typedef std::pair<SlotIndex, MachineBasicBlock*> IdxMBBPair;
inline bool operator<(SlotIndex V, const IdxMBBPair &IM) {
return V < IM.first;
}
inline bool operator<(const IdxMBBPair &IM, SlotIndex V) {
return IM.first < V;
}
struct Idx2MBBCompare {
bool operator()(const IdxMBBPair &LHS, const IdxMBBPair &RHS) const {
return LHS.first < RHS.first;
}
};
/// SlotIndexes pass.
///
/// This pass assigns indexes to each instruction.
class SlotIndexes : public MachineFunctionPass {
private:
MachineFunction *mf;
IndexListEntry *indexListHead;
unsigned functionSize;
typedef DenseMap<const MachineInstr*, SlotIndex> Mi2IndexMap;
Mi2IndexMap mi2iMap;
/// MBB2IdxMap - The indexes of the first and last instructions in the
/// specified basic block.
typedef DenseMap<const MachineBasicBlock*,
std::pair<SlotIndex, SlotIndex> > MBB2IdxMap;
MBB2IdxMap mbb2IdxMap;
/// Idx2MBBMap - Sorted list of pairs of index of first instruction
/// and MBB id.
std::vector<IdxMBBPair> idx2MBBMap;
typedef DenseMap<const MachineBasicBlock*, SlotIndex> TerminatorGapsMap;
TerminatorGapsMap terminatorGaps;
// IndexListEntry allocator.
BumpPtrAllocator ileAllocator;
IndexListEntry* createEntry(MachineInstr *mi, unsigned index) {
IndexListEntry *entry =
static_cast<IndexListEntry*>(
ileAllocator.Allocate(sizeof(IndexListEntry),
alignof<IndexListEntry>()));
new (entry) IndexListEntry(mi, index);
return entry;
}
void initList() {
assert(indexListHead == 0 && "Zero entry non-null at initialisation.");
indexListHead = createEntry(0, ~0U);
indexListHead->setNext(0);
indexListHead->setPrev(indexListHead);
}
void clearList() {
indexListHead = 0;
ileAllocator.Reset();
}
IndexListEntry* getTail() {
assert(indexListHead != 0 && "Call to getTail on uninitialized list.");
return indexListHead->getPrev();
}
const IndexListEntry* getTail() const {
assert(indexListHead != 0 && "Call to getTail on uninitialized list.");
return indexListHead->getPrev();
}
// Returns true if the index list is empty.
bool empty() const { return (indexListHead == getTail()); }
IndexListEntry* front() {
assert(!empty() && "front() called on empty index list.");
return indexListHead;
}
const IndexListEntry* front() const {
assert(!empty() && "front() called on empty index list.");
return indexListHead;
}
IndexListEntry* back() {
assert(!empty() && "back() called on empty index list.");
return getTail()->getPrev();
}
const IndexListEntry* back() const {
assert(!empty() && "back() called on empty index list.");
return getTail()->getPrev();
}
/// Insert a new entry before itr.
void insert(IndexListEntry *itr, IndexListEntry *val) {
assert(itr != 0 && "itr should not be null.");
IndexListEntry *prev = itr->getPrev();
val->setNext(itr);
val->setPrev(prev);
if (itr != indexListHead) {
prev->setNext(val);
}
else {
indexListHead = val;
}
itr->setPrev(val);
}
/// Push a new entry on to the end of the list.
void push_back(IndexListEntry *val) {
insert(getTail(), val);
}
public:
static char ID;
SlotIndexes() : MachineFunctionPass(&ID), indexListHead(0) {}
virtual void getAnalysisUsage(AnalysisUsage &au) const;
virtual void releaseMemory();
virtual bool runOnMachineFunction(MachineFunction &fn);
/// Dump the indexes.
void dump() const;
/// Renumber the index list, providing space for new instructions.
void renumberIndexes();
/// Returns the zero index for this analysis.
SlotIndex getZeroIndex() {
assert(front()->getIndex() == 0 && "First index is not 0?");
return SlotIndex(front(), 0);
}
/// Returns the invalid index marker for this analysis.
SlotIndex getInvalidIndex() {
return getZeroIndex();
}
/// Returns the distance between the highest and lowest indexes allocated
/// so far.
unsigned getIndexesLength() const {
assert(front()->getIndex() == 0 &&
"Initial index isn't zero?");
return back()->getIndex();
}
/// Returns the number of instructions in the function.
unsigned getFunctionSize() const {
return functionSize;
}
/// Returns true if the given machine instr is mapped to an index,
/// otherwise returns false.
bool hasIndex(const MachineInstr *instr) const {
return (mi2iMap.find(instr) != mi2iMap.end());
}
/// Returns the base index for the given instruction.
SlotIndex getInstructionIndex(const MachineInstr *instr) const {
Mi2IndexMap::const_iterator itr = mi2iMap.find(instr);
assert(itr != mi2iMap.end() && "Instruction not found in maps.");
return itr->second;
}
/// Returns the instruction for the given index, or null if the given
/// index has no instruction associated with it.
MachineInstr* getInstructionFromIndex(SlotIndex index) const {
return index.entry().getInstr();
}
/// Returns the next non-null index.
SlotIndex getNextNonNullIndex(SlotIndex index) {
SlotIndex nextNonNull = index.getNextIndex();
while (&nextNonNull.entry() != getTail() &&
getInstructionFromIndex(nextNonNull) == 0) {
nextNonNull = nextNonNull.getNextIndex();
}
return nextNonNull;
}
/// Returns the first index in the given basic block.
SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const {
MBB2IdxMap::const_iterator itr = mbb2IdxMap.find(mbb);
assert(itr != mbb2IdxMap.end() && "MBB not found in maps.");
return itr->second.first;
}
/// Returns the last index in the given basic block.
SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const {
MBB2IdxMap::const_iterator itr = mbb2IdxMap.find(mbb);
assert(itr != mbb2IdxMap.end() && "MBB not found in maps.");
return itr->second.second;
}
/// Returns the terminator gap for the given index.
SlotIndex getTerminatorGap(const MachineBasicBlock *mbb) {
TerminatorGapsMap::iterator itr = terminatorGaps.find(mbb);
assert(itr != terminatorGaps.end() &&
"All MBBs should have terminator gaps in their indexes.");
return itr->second;
}
/// Returns the basic block which the given index falls in.
MachineBasicBlock* getMBBFromIndex(SlotIndex index) const {
std::vector<IdxMBBPair>::const_iterator I =
std::lower_bound(idx2MBBMap.begin(), idx2MBBMap.end(), index);
// Take the pair containing the index
std::vector<IdxMBBPair>::const_iterator J =
((I != idx2MBBMap.end() && I->first > index) ||
(I == idx2MBBMap.end() && idx2MBBMap.size()>0)) ? (I-1): I;
assert(J != idx2MBBMap.end() && J->first <= index &&
index <= getMBBEndIdx(J->second) &&
"index does not correspond to an MBB");
return J->second;
}
bool findLiveInMBBs(SlotIndex start, SlotIndex end,
SmallVectorImpl<MachineBasicBlock*> &mbbs) const {
std::vector<IdxMBBPair>::const_iterator itr =
std::lower_bound(idx2MBBMap.begin(), idx2MBBMap.end(), start);
bool resVal = false;
while (itr != idx2MBBMap.end()) {
if (itr->first >= end)
break;
mbbs.push_back(itr->second);
resVal = true;
++itr;
}
return resVal;
}
/// Return a list of MBBs that can be reach via any branches or
/// fall-throughs.
bool findReachableMBBs(SlotIndex start, SlotIndex end,
SmallVectorImpl<MachineBasicBlock*> &mbbs) const {
std::vector<IdxMBBPair>::const_iterator itr =
std::lower_bound(idx2MBBMap.begin(), idx2MBBMap.end(), start);
bool resVal = false;
while (itr != idx2MBBMap.end()) {
if (itr->first > end)
break;
MachineBasicBlock *mbb = itr->second;
if (getMBBEndIdx(mbb) > end)
break;
for (MachineBasicBlock::succ_iterator si = mbb->succ_begin(),
se = mbb->succ_end(); si != se; ++si)
mbbs.push_back(*si);
resVal = true;
++itr;
}
return resVal;
}
/// Returns the MBB covering the given range, or null if the range covers
/// more than one basic block.
MachineBasicBlock* getMBBCoveringRange(SlotIndex start, SlotIndex end) const {
assert(start < end && "Backwards ranges not allowed.");
std::vector<IdxMBBPair>::const_iterator itr =
std::lower_bound(idx2MBBMap.begin(), idx2MBBMap.end(), start);
if (itr == idx2MBBMap.end()) {
itr = prior(itr);
return itr->second;
}
// Check that we don't cross the boundary into this block.
if (itr->first < end)
return 0;
itr = prior(itr);
if (itr->first <= start)
return itr->second;
return 0;
}
/// Insert the given machine instruction into the mapping. Returns the
/// assigned index.
SlotIndex insertMachineInstrInMaps(MachineInstr *mi,
bool *deferredRenumber = 0) {
assert(mi2iMap.find(mi) == mi2iMap.end() && "Instr already indexed.");
MachineBasicBlock *mbb = mi->getParent();
assert(mbb != 0 && "Instr must be added to function.");
MBB2IdxMap::iterator mbbRangeItr = mbb2IdxMap.find(mbb);
assert(mbbRangeItr != mbb2IdxMap.end() &&
"Instruction's parent MBB has not been added to SlotIndexes.");
MachineBasicBlock::iterator miItr(mi);
bool needRenumber = false;
IndexListEntry *newEntry;
IndexListEntry *prevEntry;
if (miItr == mbb->begin()) {
// If mi is at the mbb beginning, get the prev index from the mbb.
prevEntry = &mbbRangeItr->second.first.entry();
} else {
// Otherwise get it from the previous instr.
MachineBasicBlock::iterator pItr(prior(miItr));
prevEntry = &getInstructionIndex(pItr).entry();
}
// Get next entry from previous entry.
IndexListEntry *nextEntry = prevEntry->getNext();
// Get a number for the new instr, or 0 if there's no room currently.
// In the latter case we'll force a renumber later.
unsigned dist = nextEntry->getIndex() - prevEntry->getIndex();
unsigned newNumber = dist > SlotIndex::NUM ?
prevEntry->getIndex() + ((dist >> 1) & ~3U) : 0;
if (newNumber == 0) {
needRenumber = true;
}
// Insert a new list entry for mi.
newEntry = createEntry(mi, newNumber);
insert(nextEntry, newEntry);
SlotIndex newIndex(newEntry, SlotIndex::LOAD);
mi2iMap.insert(std::make_pair(mi, newIndex));
if (miItr == mbb->end()) {
// If this is the last instr in the MBB then we need to fix up the bb
// range:
mbbRangeItr->second.second = SlotIndex(newEntry, SlotIndex::STORE);
}
// Renumber if we need to.
if (needRenumber) {
if (deferredRenumber == 0)
renumberIndexes();
else
*deferredRenumber = true;
}
return newIndex;
}
/// Add all instructions in the vector to the index list. This method will
/// defer renumbering until all instrs have been added, and should be
/// preferred when adding multiple instrs.
void insertMachineInstrsInMaps(SmallVectorImpl<MachineInstr*> &mis) {
bool renumber = false;
for (SmallVectorImpl<MachineInstr*>::iterator
miItr = mis.begin(), miEnd = mis.end();
miItr != miEnd; ++miItr) {
insertMachineInstrInMaps(*miItr, &renumber);
}
if (renumber)
renumberIndexes();
}
/// Remove the given machine instruction from the mapping.
void removeMachineInstrFromMaps(MachineInstr *mi) {
// remove index -> MachineInstr and
// MachineInstr -> index mappings
Mi2IndexMap::iterator mi2iItr = mi2iMap.find(mi);
if (mi2iItr != mi2iMap.end()) {
IndexListEntry *miEntry(&mi2iItr->second.entry());
assert(miEntry->getInstr() == mi && "Instruction indexes broken.");
// FIXME: Eventually we want to actually delete these indexes.
miEntry->setInstr(0);
mi2iMap.erase(mi2iItr);
}
}
/// ReplaceMachineInstrInMaps - Replacing a machine instr with a new one in
/// maps used by register allocator.
void replaceMachineInstrInMaps(MachineInstr *mi, MachineInstr *newMI) {
Mi2IndexMap::iterator mi2iItr = mi2iMap.find(mi);
if (mi2iItr == mi2iMap.end())
return;
SlotIndex replaceBaseIndex = mi2iItr->second;
IndexListEntry *miEntry(&replaceBaseIndex.entry());
assert(miEntry->getInstr() == mi &&
"Mismatched instruction in index tables.");
miEntry->setInstr(newMI);
mi2iMap.erase(mi2iItr);
mi2iMap.insert(std::make_pair(newMI, replaceBaseIndex));
}
};
}
#endif // LLVM_CODEGEN_LIVEINDEX_H
| 33.334635 | 82 | 0.63603 | [
"vector"
] |
65d8b67359abecaac79c2e485001c1ceed690634 | 2,929 | h | C | graphfilter/include/graphfilter/sqlitedatacache.h | intel/tsdv | 02409a1c23fd3c5c652c2d02a96ee190c12d5919 | [
"Apache-2.0"
] | 6 | 2016-04-20T23:23:42.000Z | 2018-03-06T02:47:40.000Z | graphfilter/include/graphfilter/sqlitedatacache.h | intel/tsdv | 02409a1c23fd3c5c652c2d02a96ee190c12d5919 | [
"Apache-2.0"
] | null | null | null | graphfilter/include/graphfilter/sqlitedatacache.h | intel/tsdv | 02409a1c23fd3c5c652c2d02a96ee190c12d5919 | [
"Apache-2.0"
] | 2 | 2019-11-02T04:55:28.000Z | 2021-02-20T10:59:48.000Z | /*
* Copyright (c) 2015, Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
#ifndef GRAPHFILTER_SQLITEDATACACHE_H
#define GRAPHFILTER_SQLITEDATACACHE_H
#include <graphfilter/datafilter.h>
#include <sqlite3.h>
#include <string>
#include <vector>
#include <map>
#include <mutex>
#include "datacache.h"
namespace intel { namespace poc {
class SQLiteDataCache : public DataCache {
public:
static DataCache& instance();
~SQLiteDataCache();
bool init(const Json::Value& cache_setup, const Json::Value& data_schema, bool clean);
void cacheData(const std::string& start_date, const std::string& end_date);
Json::Value getData(const Json::Value& params);
protected:
/// constructor
SQLiteDataCache():database_(NULL) {}
sqlite3 *database_;
static const std::string database_path_;
std::string table_name_;
std::map<std::string,std::string> data_schema_;
bool cache_raw_data_;
int fetch_ahead_;
int fetch_behind_;
DataFilter::FilterType downsampling_filter_;
std::vector<std::map<std::string,long>> cache_levels_;
std::string date_key_column_;
std::map<std::string,std::string> cache_data_bounds_;
std::mutex put_data_mutex_;
std::mutex cache_data_bounds_mutex_;
bool initialized_;
/// private API
void cacheDataAsync(const std::string& start_date, const std::string& end_date);
bool getAndPutData(const std::string& start_date, const std::string& end_date);
bool downsampleAndPutData(int level, const Json::Value& data_values);
bool putDataTable(const std::string& table_name, const Json::Value& points);
long timeStringToEpochSeconds(const std::string& time_string);
std::string updateTimeString(const std::string& time_string, long offset);
long getDurationNumPoints(const std::string& start_date, const std::string& end_date, int level);
bool clearDatabaseRange(const std::string& table_name, const std::string& start_date, const std::string& end_date);
std::string cacheContains(const std::string& startDate, const std::string& endDate, int num_of_points);
std::map<std::string,std::string> getCacheDifference(std::string start_date, std::string end_date);
bool openDatabase();
void createDatabase();
void executeQuery(const std::string& sql_query);
std::vector<std::string> executeSelectQuery(const std::string& sql_query, int num_of_col);
};
}}
#endif //GRAPHFILTER_SQLITEDATACACHE_H
| 33.284091 | 127 | 0.653807 | [
"vector"
] |
65dbeff1417be1fe80bafbc27053c043b2a06059 | 9,005 | c | C | samples/c-api/BodyReaderPoll/main.c | mucks/astra-sdk | 810fc9ad62167baee6326de2549c583d0d54d424 | [
"Apache-2.0"
] | 1 | 2019-11-22T05:36:21.000Z | 2019-11-22T05:36:21.000Z | samples/c-api/BodyReaderPoll/main.c | mucks/astra-sdk | 810fc9ad62167baee6326de2549c583d0d54d424 | [
"Apache-2.0"
] | null | null | null | samples/c-api/BodyReaderPoll/main.c | mucks/astra-sdk | 810fc9ad62167baee6326de2549c583d0d54d424 | [
"Apache-2.0"
] | 1 | 2021-02-04T05:18:23.000Z | 2021-02-04T05:18:23.000Z | // This file is part of the Orbbec Astra SDK [https://orbbec3d.com]
// Copyright (c) 2015-2017 Orbbec 3D
//
// 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.
//
// Be excellent to each other.
#include <astra/capi/astra.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <key_handler.h>
void output_floor(astra_bodyframe_t bodyFrame)
{
astra_floor_info_t floorInfo;
astra_status_t rc = astra_bodyframe_floor_info(bodyFrame, &floorInfo);
if (rc != ASTRA_STATUS_SUCCESS)
{
printf("Error %d in astra_bodyframe_floor_info()\n", rc);
return;
}
const astra_bool_t floorDetected = floorInfo.floorDetected;
const astra_plane_t* floorPlane = &floorInfo.floorPlane;
const astra_floormask_t* floorMask = &floorInfo.floorMask;
if (floorDetected != ASTRA_FALSE)
{
printf("Floor plane: [%f, %f, %f, %f]\n",
floorPlane->a,
floorPlane->b,
floorPlane->c,
floorPlane->d);
const int32_t bottomCenterIndex = floorMask->width / 2 + floorMask->width * (floorMask->height - 1);
printf("Floor mask: width: %d height: %d bottom center value: %d\n",
floorMask->width,
floorMask->height,
floorMask->data[bottomCenterIndex]);
}
}
void output_body_mask(astra_bodyframe_t bodyFrame)
{
astra_bodymask_t bodyMask;
const astra_status_t rc = astra_bodyframe_bodymask(bodyFrame, &bodyMask);
if (rc != ASTRA_STATUS_SUCCESS)
{
printf("Error %d in astra_bodyframe_bodymask()\n", rc);
return;
}
const int32_t centerIndex = bodyMask.width / 2 + bodyMask.width * bodyMask.height / 2;
printf("Body mask: width: %d height: %d center value: %d\n",
bodyMask.width,
bodyMask.height,
bodyMask.data[centerIndex]);
}
void output_bodyframe_info(astra_bodyframe_t bodyFrame)
{
astra_bodyframe_info_t info;
const astra_status_t rc = astra_bodyframe_info(bodyFrame, &info);
if (rc != ASTRA_STATUS_SUCCESS)
{
printf("Error %d in astra_bodyframe_info()\n", rc);
return;
}
// width and height of floor mask, body mask, and the size of depth image
// that joint depth position is relative to.
const int32_t width = info.width;
const int32_t height = info.height;
printf("BodyFrame info: Width: %d Height: %d\n",
width,
height);
}
void output_joint(const int32_t bodyId, const astra_joint_t* joint)
{
// jointType is one of ASTRA_JOINT_* which exists for each joint type
const astra_joint_type_t jointType = joint->type;
// jointStatus is one of:
// ASTRA_JOINT_STATUS_NOT_TRACKED = 0,
// ASTRA_JOINT_STATUS_LOW_CONFIDENCE = 1,
// ASTRA_JOINT_STATUS_TRACKED = 2,
const astra_joint_status_t jointStatus = joint->status;
const astra_vector3f_t* worldPos = &joint->worldPosition;
// depthPosition is in pixels from 0 to width and 0 to height
// where width and height are member of astra_bodyframe_info_t
// which is obtained from astra_bodyframe_info().
const astra_vector2f_t* depthPos = &joint->depthPosition;
printf("Body %u Joint %d status %d @ world (%.1f, %.1f, %.1f) depth (%.1f, %.1f)\n",
bodyId,
jointType,
jointStatus,
worldPos->x,
worldPos->y,
worldPos->z,
depthPos->x,
depthPos->y);
// orientation is a 3x3 rotation matrix where the column vectors also
// represent the orthogonal basis vectors for the x, y, and z axes.
const astra_matrix3x3_t* orientation = &joint->orientation;
const astra_vector3f_t* xAxis = &orientation->xAxis; // same as orientation->m00, m10, m20
const astra_vector3f_t* yAxis = &orientation->yAxis; // same as orientation->m01, m11, m21
const astra_vector3f_t* zAxis = &orientation->zAxis; // same as orientation->m02, m12, m22
printf("Head orientation x: [%f %f %f]\n", xAxis->x, xAxis->y, xAxis->z);
printf("Head orientation y: [%f %f %f]\n", yAxis->x, yAxis->y, yAxis->z);
printf("Head orientation z: [%f %f %f]\n", zAxis->x, zAxis->y, zAxis->z);
}
void output_hand_poses(const astra_body_t* body)
{
const astra_handpose_info_t* handPoses = &body->handPoses;
// astra_handpose_t is one of:
// ASTRA_HANDPOSE_UNKNOWN = 0
// ASTRA_HANDPOSE_GRIP = 1
const astra_handpose_t leftHandPose = handPoses->leftHand;
const astra_handpose_t rightHandPose = handPoses->rightHand;
printf("Body %d Left hand pose: %d Right hand pose: %d\n",
body->id,
leftHandPose,
rightHandPose);
}
void output_bodies(astra_bodyframe_t bodyFrame)
{
int i;
astra_body_list_t bodyList;
const astra_status_t rc = astra_bodyframe_body_list(bodyFrame, &bodyList);
if (rc != ASTRA_STATUS_SUCCESS)
{
printf("Error %d in astra_bodyframe_body_list()\n", rc);
return;
}
for(i = 0; i < bodyList.count; ++i)
{
astra_body_t* body = &bodyList.bodies[i];
// Pixels in the body mask with the same value as bodyId are
// from the same body.
astra_body_id_t bodyId = body->id;
// bodyStatus is one of:
// ASTRA_BODY_STATUS_NOT_TRACKING = 0,
// ASTRA_BODY_STATUS_LOST = 1,
// ASTRA_BODY_STATUS_TRACKING_STARTED = 2,
// ASTRA_BODY_STATUS_TRACKING = 3,
astra_body_status_t bodyStatus = body->status;
if (bodyStatus == ASTRA_BODY_STATUS_TRACKING_STARTED)
{
printf("Body Id: %d Status: Tracking started\n", bodyId);
}
if (bodyStatus == ASTRA_BODY_STATUS_TRACKING)
{
printf("Body Id: %d Status: Tracking\n", bodyId);
}
if (bodyStatus == ASTRA_BODY_STATUS_TRACKING_STARTED ||
bodyStatus == ASTRA_BODY_STATUS_TRACKING)
{
const astra_vector3f_t* centerOfMass = &body->centerOfMass;
const astra_body_tracking_feature_flags_t features = body->features;
const bool jointTrackingEnabled = (features & ASTRA_BODY_TRACKING_JOINTS) == ASTRA_BODY_TRACKING_JOINTS;
const bool handPoseRecognitionEnabled = (features & ASTRA_BODY_TRACKING_HAND_POSES) == ASTRA_BODY_TRACKING_HAND_POSES;
printf("Body %d CenterOfMass (%f, %f, %f) Joint Tracking Enabled: %s Hand Pose Recognition Enabled: %s\n",
bodyId,
centerOfMass->x, centerOfMass->y, centerOfMass->z,
jointTrackingEnabled ? "True" : "False",
handPoseRecognitionEnabled ? "True" : "False");
const astra_joint_t* joint = &body->joints[ASTRA_JOINT_HEAD];
output_joint(bodyId, joint);
output_hand_poses(body);
}
else if (bodyStatus == ASTRA_BODY_STATUS_LOST)
{
printf("Body %u Status: Tracking lost.\n", bodyId);
}
else // bodyStatus == ASTRA_BODY_STATUS_NOT_TRACKING
{
printf("Body Id: %d Status: Not Tracking\n", bodyId);
}
}
}
void output_bodyframe(astra_bodyframe_t bodyFrame)
{
output_floor(bodyFrame);
output_body_mask(bodyFrame);
output_bodyframe_info(bodyFrame);
output_bodies(bodyFrame);
}
int main(int argc, char* argv[])
{
set_key_handler();
astra_initialize();
const char* licenseString = "<INSERT LICENSE KEY HERE>";
orbbec_body_tracking_set_license(licenseString);
astra_streamsetconnection_t sensor;
astra_streamset_open("device/default", &sensor);
astra_reader_t reader;
astra_reader_create(sensor, &reader);
astra_bodystream_t bodyStream;
astra_reader_get_bodystream(reader, &bodyStream);
astra_stream_start(bodyStream);
do
{
astra_update();
astra_reader_frame_t frame;
astra_status_t rc = astra_reader_open_frame(reader, 0, &frame);
if (rc == ASTRA_STATUS_SUCCESS)
{
astra_bodyframe_t bodyFrame;
astra_frame_get_bodyframe(frame, &bodyFrame);
astra_frame_index_t frameIndex;
astra_bodyframe_get_frameindex(bodyFrame, &frameIndex);
printf("Frame index: %d\n", frameIndex);
output_bodyframe(bodyFrame);
printf("----------------------------\n");
astra_reader_close_frame(&frame);
}
} while (shouldContinue);
astra_reader_destroy(&reader);
astra_streamset_close(&sensor);
astra_terminate();
}
| 32.392086 | 130 | 0.651638 | [
"3d"
] |
65de3e3c0bc3e5a4391efc0fd61a6e1bc5ed8811 | 5,340 | h | C | include/common/type_utils.h | phantom9999/BaikalDB | 094a7fc457cb345d8e9834a052d7bc17e996999f | [
"Apache-2.0"
] | 1 | 2018-08-07T13:33:47.000Z | 2018-08-07T13:33:47.000Z | include/common/type_utils.h | MinHaoSun/BaikalDB | 191870058f1956d8b50258526aef92c24fc0262f | [
"Apache-2.0"
] | null | null | null | include/common/type_utils.h | MinHaoSun/BaikalDB | 191870058f1956d8b50258526aef92c24fc0262f | [
"Apache-2.0"
] | null | null | null | // Copyright (c) 2018 Baidu, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <stdint.h>
#include <string>
#include "proto/common.pb.h"
namespace baikaldb {
enum enum_field_types {
MYSQL_TYPE_DECIMAL,
MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT,
MYSQL_TYPE_LONG,
MYSQL_TYPE_FLOAT,
MYSQL_TYPE_DOUBLE,
MYSQL_TYPE_NULL,
MYSQL_TYPE_TIMESTAMP,
MYSQL_TYPE_LONGLONG,
MYSQL_TYPE_INT24,
MYSQL_TYPE_DATE,
MYSQL_TYPE_TIME,
MYSQL_TYPE_DATETIME,
MYSQL_TYPE_YEAR,
MYSQL_TYPE_NEWDATE,
MYSQL_TYPE_VARCHAR,
MYSQL_TYPE_BIT,
MYSQL_TYPE_NEWDECIMAL = 246,
MYSQL_TYPE_ENUM = 247,
MYSQL_TYPE_SET = 248,
MYSQL_TYPE_TINY_BLOB = 249,
MYSQL_TYPE_MEDIUM_BLOB = 250,
MYSQL_TYPE_LONG_BLOB = 251,
MYSQL_TYPE_BLOB = 252,
MYSQL_TYPE_VAR_STRING = 253,
MYSQL_TYPE_STRING = 254,
MYSQL_TYPE_GEOMETRY = 255
};
inline bool is_double(pb::PrimitiveType type) {
switch (type) {
case pb::FLOAT:
case pb::DOUBLE:
return true;
default:
return false;
}
}
inline bool has_double(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (is_double(type)) {
return true;
}
}
return false;
}
inline bool has_timestamp(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (type == pb::TIMESTAMP) {
return true;
}
}
return false;
}
inline bool has_datetime(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (type == pb::DATETIME) {
return true;
}
}
return false;
}
inline bool has_date(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (type == pb::DATE) {
return true;
}
}
return false;
}
inline bool is_int(pb::PrimitiveType type) {
switch (type) {
case pb::INT8:
case pb::INT16:
case pb::INT32:
case pb::INT64:
case pb::UINT8:
case pb::UINT16:
case pb::UINT32:
case pb::UINT64:
return true;
default:
return false;
}
}
inline bool is_uint(pb::PrimitiveType type) {
switch (type) {
case pb::UINT8:
case pb::UINT16:
case pb::UINT32:
case pb::UINT64:
return true;
default:
return false;
}
}
inline bool has_uint(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (is_uint(type)) {
return true;
}
}
return false;
}
inline bool has_int(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (is_int(type)) {
return true;
}
}
return false;
}
inline bool is_string(pb::PrimitiveType type) {
switch (type) {
case pb::STRING:
return true;
default:
return false;
}
}
inline bool has_string(std::vector<pb::PrimitiveType> types) {
for (auto type : types) {
if (is_string(type)) {
return true;
}
}
return false;
}
inline int32_t get_num_size(pb::PrimitiveType type) {
switch (type) {
case pb::BOOL:
return 1;
case pb::INT8:
case pb::UINT8:
return 1;
case pb::INT16:
case pb::UINT16:
return 2;
case pb::INT32:
case pb::UINT32:
case pb::DATE:
case pb::TIMESTAMP:
return 4;
case pb::INT64:
case pb::UINT64:
case pb::DATETIME:
return 8;
case pb::FLOAT:
return 4;
case pb::DOUBLE:
return 8;
default:
return -1;
}
}
inline int32_t to_mysql_type(pb::PrimitiveType type) {
switch (type) {
case pb::BOOL:
return MYSQL_TYPE_TINY;
case pb::INT8:
case pb::UINT8:
return MYSQL_TYPE_TINY;
case pb::INT16:
case pb::UINT16:
return MYSQL_TYPE_SHORT;
case pb::INT32:
case pb::UINT32:
return MYSQL_TYPE_LONG;
case pb::INT64:
case pb::UINT64:
return MYSQL_TYPE_LONGLONG;
case pb::FLOAT:
return MYSQL_TYPE_FLOAT;
case pb::DOUBLE:
return MYSQL_TYPE_DOUBLE;
case pb::STRING:
return MYSQL_TYPE_STRING;
case pb::DATETIME:
return MYSQL_TYPE_DATETIME;
case pb::DATE:
return MYSQL_TYPE_DATE;
case pb::TIMESTAMP:
return MYSQL_TYPE_TIMESTAMP;
case pb::HLL:
return MYSQL_TYPE_LONGLONG;
default:
return MYSQL_TYPE_BLOB;
}
}
}
/* vim: set ts=4 sw=4 sts=4 tw=100 */
| 23.318777 | 75 | 0.572472 | [
"vector"
] |
65e6e454e03a7c6e9754422e73270caefc8f4b1a | 1,294 | h | C | src/sst/core/env/envquery.h | umd-memsys/sst-core | 2a883268d2c9e26fb72872a69a46008fac863ea3 | [
"BSD-3-Clause"
] | null | null | null | src/sst/core/env/envquery.h | umd-memsys/sst-core | 2a883268d2c9e26fb72872a69a46008fac863ea3 | [
"BSD-3-Clause"
] | null | null | null | src/sst/core/env/envquery.h | umd-memsys/sst-core | 2a883268d2c9e26fb72872a69a46008fac863ea3 | [
"BSD-3-Clause"
] | null | null | null |
#ifndef _H_SST_CORE_ENV_QUERY_H
#define _H_SST_CORE_ENV_QUERY_H
#include <sst_config.h>
#include <sst/core/env/envconfig.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <string>
namespace SST {
namespace Core {
namespace Environment {
/**
Reads the next new-line delimited entry in a file and put
into the buffer provided. The user is responsible for ensuring
that the buffer is of an appropriate length.
*/
void configReadLine(FILE* theFile, char* lineBuffer);
/**
Opens a configuration file specified and populates an
EnvironmentConfiguration instance with the contents.
*/
void populateEnvironmentConfig(const std::string& path, EnvironmentConfiguration* cfg,
bool errorOnNotOpen);
/**
Uses an already open file, reads the contents and populates an instance
of an EnvironmentConfiguration with the contents
*/
void populateEnvironmentConfig(FILE* configFile, EnvironmentConfiguration* cfg,
bool errorOnNotOpen);
/**
Provides an SST-guaranteed precedence ordering loading of configuration
files. The user can supply an override list of file paths which should
take precedence over the default configuration locations.
*/
EnvironmentConfiguration* getSSTEnvironmentConfiguration(const std::vector<std::string>& overridePaths);
}
}
}
#endif
| 24.884615 | 104 | 0.799073 | [
"vector"
] |
65f71dac17b347ae9e597a1ee188acc187249d2e | 445,664 | c | C | ARCoreTest/Library/Il2cppBuildCache/iOS/il2cppOutput/Unity.XR.ARSubsystems_CodeGen.c | vraibae/ar-class | ea7663d32531bf2e6395cb218244a2a8430fa4c3 | [
"MIT"
] | null | null | null | ARCoreTest/Library/Il2cppBuildCache/iOS/il2cppOutput/Unity.XR.ARSubsystems_CodeGen.c | vraibae/ar-class | ea7663d32531bf2e6395cb218244a2a8430fa4c3 | [
"MIT"
] | null | null | null | ARCoreTest/Library/Il2cppBuildCache/iOS/il2cppOutput/Unity.XR.ARSubsystems_CodeGen.c | vraibae/ar-class | ea7663d32531bf2e6395cb218244a2a8430fa4c3 | [
"MIT"
] | null | null | null | #include "pch-c.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include "codegen/il2cpp-codegen-metadata.h"
extern const RuntimeMethod* XRCpuImage_OnAsyncConversionComplete_m60DC813F1A2B8A59F993D245683847D933D292A9_RuntimeMethod_var;
// 0x00000001 System.Void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor()
extern void EmbeddedAttribute__ctor_mB39F1C96BEB73438DE3FEDB828717EE136940697 (void);
// 0x00000002 System.Void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor()
extern void IsReadOnlyAttribute__ctor_m0510A708B114F4B975D24C5B7374CE116A974BF2 (void);
// 0x00000003 UnityEngine.XR.ARSubsystems.XRAnchor UnityEngine.XR.ARSubsystems.XRAnchor::get_defaultValue()
extern void XRAnchor_get_defaultValue_m4E0B24D0D2E64DE1B2BE81F781410CFB6031B6CF (void);
// 0x00000004 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRAnchor::get_trackableId()
extern void XRAnchor_get_trackableId_mE8C852BEAA9025FD1CB643F41836CA72C25E7B92 (void);
// 0x00000005 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRAnchor::get_pose()
extern void XRAnchor_get_pose_mD135777376B2898B0A151AD5AA8FD4BBD7C7C5FF (void);
// 0x00000006 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRAnchor::get_trackingState()
extern void XRAnchor_get_trackingState_m2B3E621BA332B1E74CF8EC94FA8B18EDAF68F462 (void);
// 0x00000007 System.IntPtr UnityEngine.XR.ARSubsystems.XRAnchor::get_nativePtr()
extern void XRAnchor_get_nativePtr_m47E36685E001BF3810BF6A45B8DF8128080DAEFB (void);
// 0x00000008 System.Guid UnityEngine.XR.ARSubsystems.XRAnchor::get_sessionId()
extern void XRAnchor_get_sessionId_m61DAD2C82C4D725E773BFAB2E8A8BE50EDEEC379 (void);
// 0x00000009 System.Int32 UnityEngine.XR.ARSubsystems.XRAnchor::GetHashCode()
extern void XRAnchor_GetHashCode_m3928C95D8DE59840CB82D9FD13EDEEAEA2A89376 (void);
// 0x0000000A System.Boolean UnityEngine.XR.ARSubsystems.XRAnchor::Equals(UnityEngine.XR.ARSubsystems.XRAnchor)
extern void XRAnchor_Equals_mE6AC873FF43B605D47F5AB76F0ADAD9A6EDEA25B (void);
// 0x0000000B System.Boolean UnityEngine.XR.ARSubsystems.XRAnchor::Equals(System.Object)
extern void XRAnchor_Equals_m8C35DEBDDAC21262E3344152D76539DF1AF7F060 (void);
// 0x0000000C System.Void UnityEngine.XR.ARSubsystems.XRAnchor::.cctor()
extern void XRAnchor__cctor_m101ABC03541DECF122E998C1C183D97FD34315F7 (void);
// 0x0000000D System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystem::.ctor()
extern void XRAnchorSubsystem__ctor_mB5F70C2E39B5EA531C05244611590F400365265A (void);
// 0x0000000E UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRAnchor> UnityEngine.XR.ARSubsystems.XRAnchorSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRAnchorSubsystem_GetChanges_mA9E2E9974DB9E35A550FEE38B33356141E3AE5F7 (void);
// 0x0000000F System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystem::TryAddAnchor(UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRAnchor&)
extern void XRAnchorSubsystem_TryAddAnchor_m203DDF7401C08C01A9EBB555FBE2544119A2B3B3 (void);
// 0x00000010 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystem::TryAttachAnchor(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRAnchor&)
extern void XRAnchorSubsystem_TryAttachAnchor_mC8678FEACC6D879F0156CEDE6E1FF69E8A1AAF55 (void);
// 0x00000011 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystem::TryRemoveAnchor(UnityEngine.XR.ARSubsystems.TrackableId)
extern void XRAnchorSubsystem_TryRemoveAnchor_mA418EEBB09F89CDF93888A61F1681DE2DBA69799 (void);
// 0x00000012 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRAnchor> UnityEngine.XR.ARSubsystems.XRAnchorSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRAnchor,Unity.Collections.Allocator)
// 0x00000013 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystem/Provider::TryAddAnchor(UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRAnchor&)
extern void Provider_TryAddAnchor_m8BAE08000E72193AE272504162CD3CAE9E2011D3 (void);
// 0x00000014 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystem/Provider::TryAttachAnchor(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRAnchor&)
extern void Provider_TryAttachAnchor_mAAFB29BF47A06D1B7B5EA30849047CFC2E91072A (void);
// 0x00000015 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystem/Provider::TryRemoveAnchor(UnityEngine.XR.ARSubsystems.TrackableId)
extern void Provider_TryRemoveAnchor_m21FBBF8C515908F05CF755B85B9643760E6BB2F7 (void);
// 0x00000016 System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystem/Provider::.ctor()
extern void Provider__ctor_mFE4941CFC3CA511BBD7C0A498BB2C74DE96FF498 (void);
// 0x00000017 System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor::set_supportsTrackableAttachments(System.Boolean)
extern void XRAnchorSubsystemDescriptor_set_supportsTrackableAttachments_m11271C1EBC306EB3FDA99D24D45D88DB31DCCC38 (void);
// 0x00000018 System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo)
extern void XRAnchorSubsystemDescriptor_Create_m32C16A0DDC60ED2D374EFB884CF807E62B37C0A8 (void);
// 0x00000019 System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo)
extern void XRAnchorSubsystemDescriptor__ctor_m5393EA2BCAFE2CB48EDD6DDCCD50C40FC7035331 (void);
// 0x0000001A System.String UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::get_id()
extern void Cinfo_get_id_m7C38252CE360F061914361192300AECA8CB5307B (void);
// 0x0000001B System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::set_id(System.String)
extern void Cinfo_set_id_mCB169DF169C36D9D12651785DCBF71ABCC10FD9D (void);
// 0x0000001C System.Type UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::get_providerType()
extern void Cinfo_get_providerType_m6A1DFCD062C95265E8E1C6502D44D6C464B50EED (void);
// 0x0000001D System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::set_providerType(System.Type)
extern void Cinfo_set_providerType_m9E012FF4CD325826F838F663BAEE045C452A3C26 (void);
// 0x0000001E System.Type UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::get_subsystemTypeOverride()
extern void Cinfo_get_subsystemTypeOverride_m169F49BB024275E13DF95C274191A675CC0F66B9 (void);
// 0x0000001F System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::set_subsystemTypeOverride(System.Type)
extern void Cinfo_set_subsystemTypeOverride_mC525A48B08F8F826275950FFB61C780C4AEA6A6B (void);
// 0x00000020 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::get_supportsTrackableAttachments()
extern void Cinfo_get_supportsTrackableAttachments_m13B6C9977641F3E284C69AA3554EBD19478538B8 (void);
// 0x00000021 System.Void UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::set_supportsTrackableAttachments(System.Boolean)
extern void Cinfo_set_supportsTrackableAttachments_m0B0516A50FFA22C3F60483E3498DC6BB1D460995 (void);
// 0x00000022 System.Int32 UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_mBBEF5C69D3B91763153EDE624C76AC428ECFABB1 (void);
// 0x00000023 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m8E52493318DDE5F675E85E0733F5F7CCDA3C8339 (void);
// 0x00000024 System.Boolean UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor/Cinfo)
extern void Cinfo_Equals_m07BCEC0FF4D8C2A43AE850689AC5AA4FC0603DE8 (void);
// 0x00000025 UnityEngine.XR.ARSubsystems.XRReferencePoint UnityEngine.XR.ARSubsystems.XRReferencePoint::get_defaultValue()
extern void XRReferencePoint_get_defaultValue_m9AF89D3F11BF14D60BDC4FB2F360911F56E17013 (void);
// 0x00000026 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRReferencePoint::get_trackableId()
extern void XRReferencePoint_get_trackableId_mEE1B3349EA8F19E94BF8B76CBB644822317D2758 (void);
// 0x00000027 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRReferencePoint::get_pose()
extern void XRReferencePoint_get_pose_mFDB2701C343707F0FA479C2C775B77BEC2092D61 (void);
// 0x00000028 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRReferencePoint::get_trackingState()
extern void XRReferencePoint_get_trackingState_m9C6DD336B0E91F39FA04F298B0543148433F11B2 (void);
// 0x00000029 System.IntPtr UnityEngine.XR.ARSubsystems.XRReferencePoint::get_nativePtr()
extern void XRReferencePoint_get_nativePtr_m80EFF4D6D345E7B7CC5687B506C410C84B09EFBA (void);
// 0x0000002A System.Guid UnityEngine.XR.ARSubsystems.XRReferencePoint::get_sessionId()
extern void XRReferencePoint_get_sessionId_mC498F0CAE614B4048B79742479252D923D4FED46 (void);
// 0x0000002B System.Int32 UnityEngine.XR.ARSubsystems.XRReferencePoint::GetHashCode()
extern void XRReferencePoint_GetHashCode_mD1C610489F910DB8AF23C5ED39B3930487B2F450 (void);
// 0x0000002C System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePoint::Equals(UnityEngine.XR.ARSubsystems.XRReferencePoint)
extern void XRReferencePoint_Equals_m139BA3698F72E149B33FB577B616A0043DBBB8E6 (void);
// 0x0000002D System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePoint::Equals(System.Object)
extern void XRReferencePoint_Equals_m464FBE4D3BF000716BC20737865CC263128FCF9B (void);
// 0x0000002E System.Void UnityEngine.XR.ARSubsystems.XRReferencePoint::.cctor()
extern void XRReferencePoint__cctor_m14BE01E3A1C266EC61D10C6C8AD23F89DFA7594C (void);
// 0x0000002F UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRReferencePoint> UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRReferencePointSubsystem_GetChanges_m9F0EC9E0522340CBD75626D185D848CFBFE3F456 (void);
// 0x00000030 System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem::TryAddReferencePoint(UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRReferencePoint&)
extern void XRReferencePointSubsystem_TryAddReferencePoint_m671606BA15B6A84BB3637C20C72387772A9CCF80 (void);
// 0x00000031 System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem::TryAttachReferencePoint(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRReferencePoint&)
extern void XRReferencePointSubsystem_TryAttachReferencePoint_m88BA8C12582778654F08A7906AB34C3AE89274BA (void);
// 0x00000032 System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem::TryRemoveReferencePoint(UnityEngine.XR.ARSubsystems.TrackableId)
extern void XRReferencePointSubsystem_TryRemoveReferencePoint_mE7F6B247F12026A9920896461914AE894E004346 (void);
// 0x00000033 System.Void UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem::.ctor()
extern void XRReferencePointSubsystem__ctor_m5D17ED57D2A7F6EDB8CD21F4E5027D096C9241B9 (void);
// 0x00000034 System.Void UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::Start()
extern void Provider_Start_m23A09DFBE9B001EA5716EF0D11FAB9878AEFA634 (void);
// 0x00000035 System.Void UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::Stop()
extern void Provider_Stop_mA1D84CAD4F173F45729BCCF7F9203317BC16E88C (void);
// 0x00000036 System.Void UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::Destroy()
extern void Provider_Destroy_m9C33B460B119788705D6CF145510A3CA3320CFCA (void);
// 0x00000037 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRReferencePoint> UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRReferencePoint,Unity.Collections.Allocator)
// 0x00000038 System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::TryAddReferencePoint(UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRReferencePoint&)
extern void Provider_TryAddReferencePoint_mEECEE05AE6CE36CC4DFC6B34EB2328203ABF74D2 (void);
// 0x00000039 System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::TryAttachReferencePoint(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRReferencePoint&)
extern void Provider_TryAttachReferencePoint_m6B37B8E188234F1B273B4CCCBA86C3369A9056EF (void);
// 0x0000003A System.Boolean UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem/Provider::TryRemoveReferencePoint(UnityEngine.XR.ARSubsystems.TrackableId)
extern void Provider_TryRemoveReferencePoint_m715A9000B06295D71581229BCCE534B5F1BDB5E2 (void);
// 0x0000003B System.Int32 UnityEngine.XR.ARSubsystems.XRCameraConfiguration::get_width()
extern void XRCameraConfiguration_get_width_m019869C624524B8C4EA0021D9331F2AD856A25C3 (void);
// 0x0000003C System.Int32 UnityEngine.XR.ARSubsystems.XRCameraConfiguration::get_height()
extern void XRCameraConfiguration_get_height_mAAC1B9AE539EF89D59585A6BFC8F925F94AA14D3 (void);
// 0x0000003D System.Nullable`1<System.Int32> UnityEngine.XR.ARSubsystems.XRCameraConfiguration::get_framerate()
extern void XRCameraConfiguration_get_framerate_m3DCC7B7F2FEAFDFB5ED0A580153FBAAA22B60B96 (void);
// 0x0000003E System.String UnityEngine.XR.ARSubsystems.XRCameraConfiguration::ToString()
extern void XRCameraConfiguration_ToString_m570541033A53E9657C809B420CEFDF63D944070B (void);
// 0x0000003F System.Int32 UnityEngine.XR.ARSubsystems.XRCameraConfiguration::GetHashCode()
extern void XRCameraConfiguration_GetHashCode_mBAD6720F670B108F1D17BAEBAF619989A011D63A (void);
// 0x00000040 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraConfiguration::Equals(System.Object)
extern void XRCameraConfiguration_Equals_mDC2D17183F91C897762D8F8B24D2CA2F96E1A48C (void);
// 0x00000041 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraConfiguration::Equals(UnityEngine.XR.ARSubsystems.XRCameraConfiguration)
extern void XRCameraConfiguration_Equals_m8CD36FE1F7DA4B3B3520877DC415D066B77FEFEB (void);
// 0x00000042 System.Int64 UnityEngine.XR.ARSubsystems.XRCameraFrame::get_timestampNs()
extern void XRCameraFrame_get_timestampNs_m8F3730A23C9FF6A729F8D1939581D88716438DF7 (void);
// 0x00000043 System.Single UnityEngine.XR.ARSubsystems.XRCameraFrame::get_averageBrightness()
extern void XRCameraFrame_get_averageBrightness_m34CB9F000CCBD2004F7E3CDBA987170A4B049F8E (void);
// 0x00000044 System.Single UnityEngine.XR.ARSubsystems.XRCameraFrame::get_averageColorTemperature()
extern void XRCameraFrame_get_averageColorTemperature_mD5EA9E87E76F7BCBFF709ABF309B142FB9D03DFC (void);
// 0x00000045 UnityEngine.Color UnityEngine.XR.ARSubsystems.XRCameraFrame::get_colorCorrection()
extern void XRCameraFrame_get_colorCorrection_mFB47669447DE0255EE2491929D9DF85CF7DF1B1A (void);
// 0x00000046 UnityEngine.Matrix4x4 UnityEngine.XR.ARSubsystems.XRCameraFrame::get_projectionMatrix()
extern void XRCameraFrame_get_projectionMatrix_mC489D4A0698634FDA99D0BBE0A93E42F5C82E985 (void);
// 0x00000047 UnityEngine.Matrix4x4 UnityEngine.XR.ARSubsystems.XRCameraFrame::get_displayMatrix()
extern void XRCameraFrame_get_displayMatrix_m7D157BB20E2863E0415A42140B6396C4D3E30E31 (void);
// 0x00000048 System.Single UnityEngine.XR.ARSubsystems.XRCameraFrame::get_averageIntensityInLumens()
extern void XRCameraFrame_get_averageIntensityInLumens_mC250C5B79A5B4C0F75D89BD1EC6FB07AB130B62F (void);
// 0x00000049 System.Double UnityEngine.XR.ARSubsystems.XRCameraFrame::get_exposureDuration()
extern void XRCameraFrame_get_exposureDuration_m7957768DDB0AE596767478A9F8239A98BFD23207 (void);
// 0x0000004A System.Single UnityEngine.XR.ARSubsystems.XRCameraFrame::get_exposureOffset()
extern void XRCameraFrame_get_exposureOffset_m276A794A6640F25AA7B1B0FB69C8296F7DDAAE53 (void);
// 0x0000004B System.Single UnityEngine.XR.ARSubsystems.XRCameraFrame::get_mainLightIntensityLumens()
extern void XRCameraFrame_get_mainLightIntensityLumens_mDBCBCEA85B23C484CAF7D66ED52681E4AE4C506B (void);
// 0x0000004C UnityEngine.Color UnityEngine.XR.ARSubsystems.XRCameraFrame::get_mainLightColor()
extern void XRCameraFrame_get_mainLightColor_m3696EC5D7104849121C9A6CF3524AAC7382BED03 (void);
// 0x0000004D UnityEngine.Vector3 UnityEngine.XR.ARSubsystems.XRCameraFrame::get_mainLightDirection()
extern void XRCameraFrame_get_mainLightDirection_mB7E086F4A8A89BD7404BB702DF980D7B5B124445 (void);
// 0x0000004E UnityEngine.Rendering.SphericalHarmonicsL2 UnityEngine.XR.ARSubsystems.XRCameraFrame::get_ambientSphericalHarmonics()
extern void XRCameraFrame_get_ambientSphericalHarmonics_m5859CDC5CE50F33C62EA59CE9BFC58C6F3CDB269 (void);
// 0x0000004F UnityEngine.XR.ARSubsystems.XRTextureDescriptor UnityEngine.XR.ARSubsystems.XRCameraFrame::get_cameraGrain()
extern void XRCameraFrame_get_cameraGrain_m7E8B37489D5380BE507656FFC9FE30B0333CED2A (void);
// 0x00000050 System.Single UnityEngine.XR.ARSubsystems.XRCameraFrame::get_noiseIntensity()
extern void XRCameraFrame_get_noiseIntensity_mA6150FB06579A1A6E637139C97E93304D6A83D3A (void);
// 0x00000051 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasTimestamp()
extern void XRCameraFrame_get_hasTimestamp_m2FBE2F396A15CC469756E3C876519B7FF3349897 (void);
// 0x00000052 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasAverageBrightness()
extern void XRCameraFrame_get_hasAverageBrightness_m3B006851943F915530A8628BF3311C946CC8FC68 (void);
// 0x00000053 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasAverageColorTemperature()
extern void XRCameraFrame_get_hasAverageColorTemperature_mEE8976398F8AE074090A1D3BE2DBB5F3484C04DF (void);
// 0x00000054 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasColorCorrection()
extern void XRCameraFrame_get_hasColorCorrection_m687F2028F9A79A04CC6CA75C0305134DAB4DB9FE (void);
// 0x00000055 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasProjectionMatrix()
extern void XRCameraFrame_get_hasProjectionMatrix_mA7A707C6E990D729C152E149063DE2BD0A456B4A (void);
// 0x00000056 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasDisplayMatrix()
extern void XRCameraFrame_get_hasDisplayMatrix_mB369CC19C7B3E2640E2C2747A1E117A5773E5052 (void);
// 0x00000057 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasAverageIntensityInLumens()
extern void XRCameraFrame_get_hasAverageIntensityInLumens_m2251DD714F7E6E9098DB738DF536FE191425379E (void);
// 0x00000058 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasExposureDuration()
extern void XRCameraFrame_get_hasExposureDuration_mDF9AC5D38E767A61439850FCEE55E7CC40592EDC (void);
// 0x00000059 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasExposureOffset()
extern void XRCameraFrame_get_hasExposureOffset_m6696D6E287E1FB413669FA175ACD45E8D6799A37 (void);
// 0x0000005A System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasMainLightIntensityLumens()
extern void XRCameraFrame_get_hasMainLightIntensityLumens_mE0C9564F7A24636366E063F9086ECA81FDB055BF (void);
// 0x0000005B System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasMainLightColor()
extern void XRCameraFrame_get_hasMainLightColor_m2B1D25F6224C098D66503F6768C6930D84451AB3 (void);
// 0x0000005C System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasMainLightDirection()
extern void XRCameraFrame_get_hasMainLightDirection_m75FB7306D3E483962E22DFB5DD2BB3A5398A7CC3 (void);
// 0x0000005D System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasAmbientSphericalHarmonics()
extern void XRCameraFrame_get_hasAmbientSphericalHarmonics_mA2B45AEE57B7DA5081B81C8483F1FBB90ABE3090 (void);
// 0x0000005E System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasCameraGrain()
extern void XRCameraFrame_get_hasCameraGrain_m14C3641296BF7BC49501E3D5E810A24A2D50922D (void);
// 0x0000005F System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::get_hasNoiseIntensity()
extern void XRCameraFrame_get_hasNoiseIntensity_mA5A08A29C34AC2AFFE5792725E4506F0B32EF75C (void);
// 0x00000060 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::Equals(UnityEngine.XR.ARSubsystems.XRCameraFrame)
extern void XRCameraFrame_Equals_mEF403AD303261AE21BFE6F482EB3EF728EB49DD6 (void);
// 0x00000061 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraFrame::Equals(System.Object)
extern void XRCameraFrame_Equals_m82C80589000BA2F428E4774763F668045BF085D6 (void);
// 0x00000062 System.Int32 UnityEngine.XR.ARSubsystems.XRCameraFrame::GetHashCode()
extern void XRCameraFrame_GetHashCode_mCEC92150EE3B5237ACB46471128479997F78185D (void);
// 0x00000063 System.String UnityEngine.XR.ARSubsystems.XRCameraFrame::ToString()
extern void XRCameraFrame_ToString_mE4A2FE2CA4AF1D844B950D0029023F98B189A6D8 (void);
// 0x00000064 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraIntrinsics::Equals(UnityEngine.XR.ARSubsystems.XRCameraIntrinsics)
extern void XRCameraIntrinsics_Equals_mA7D92292854DA38258811FDC946BA82E1D5E001D (void);
// 0x00000065 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraIntrinsics::Equals(System.Object)
extern void XRCameraIntrinsics_Equals_m037475660705484B0E8730157EA7A731998466AD (void);
// 0x00000066 System.Int32 UnityEngine.XR.ARSubsystems.XRCameraIntrinsics::GetHashCode()
extern void XRCameraIntrinsics_GetHashCode_mD1D3D0F34AA1723CC454040334B46D5CD7809377 (void);
// 0x00000067 System.String UnityEngine.XR.ARSubsystems.XRCameraIntrinsics::ToString()
extern void XRCameraIntrinsics_ToString_mFD230300DEC4F7FB2DCF30F4F02036D97213B2C9 (void);
// 0x00000068 System.Void UnityEngine.XR.ARSubsystems.XRCameraParams::set_zNear(System.Single)
extern void XRCameraParams_set_zNear_mE207AB998D78E35497B1E941A20C7864D454EE45 (void);
// 0x00000069 System.Void UnityEngine.XR.ARSubsystems.XRCameraParams::set_zFar(System.Single)
extern void XRCameraParams_set_zFar_m4ABC4E0271EE81FEA88B1608B19ED3CFDA8E523B (void);
// 0x0000006A System.Void UnityEngine.XR.ARSubsystems.XRCameraParams::set_screenWidth(System.Single)
extern void XRCameraParams_set_screenWidth_m4E9ABE5FEE32FB446FDF6EC5B00961ACC66B48FB (void);
// 0x0000006B System.Void UnityEngine.XR.ARSubsystems.XRCameraParams::set_screenHeight(System.Single)
extern void XRCameraParams_set_screenHeight_m31C5E67C7403556AFF8B72CC4BB09EA3C3AA05A3 (void);
// 0x0000006C System.Void UnityEngine.XR.ARSubsystems.XRCameraParams::set_screenOrientation(UnityEngine.ScreenOrientation)
extern void XRCameraParams_set_screenOrientation_mCF2AD6E975E790E5BE14E2A1EB71A73E8AA7E7D9 (void);
// 0x0000006D System.Boolean UnityEngine.XR.ARSubsystems.XRCameraParams::Equals(UnityEngine.XR.ARSubsystems.XRCameraParams)
extern void XRCameraParams_Equals_m392E8AB6ECAEA915E0E1C9A20831EBE24346E4C0 (void);
// 0x0000006E System.Boolean UnityEngine.XR.ARSubsystems.XRCameraParams::Equals(System.Object)
extern void XRCameraParams_Equals_mDE9A6E9D2127F369FA129FD19E73A790FF48E8F2 (void);
// 0x0000006F System.Int32 UnityEngine.XR.ARSubsystems.XRCameraParams::GetHashCode()
extern void XRCameraParams_GetHashCode_m5C9955238ED690EA6A338097DB818F37ECBFDC72 (void);
// 0x00000070 System.String UnityEngine.XR.ARSubsystems.XRCameraParams::ToString()
extern void XRCameraParams_ToString_m4CAB10F6C7424973F8A9E72F70283A53C384AF3F (void);
// 0x00000071 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::.ctor()
extern void XRCameraSubsystem__ctor_m9DB793A0291AEB063BE13955137FCF52B8A6E222 (void);
// 0x00000072 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_currentCamera()
extern void XRCameraSubsystem_get_currentCamera_mB3E27F8E8DD2E714AE2E714B69EB765A66F82CF0 (void);
// 0x00000073 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_requestedCamera()
extern void XRCameraSubsystem_get_requestedCamera_m3F7CE47E321AD0ADA777EC146B8A1174F2924CAF (void);
// 0x00000074 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::set_requestedCamera(UnityEngine.XR.ARSubsystems.Feature)
extern void XRCameraSubsystem_set_requestedCamera_m947B0B046798E375F7761A49948B6BB56CC92BED (void);
// 0x00000075 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_autoFocusEnabled()
extern void XRCameraSubsystem_get_autoFocusEnabled_mADFDC78EE330D8850DAC9ED5B2D2109302D6A115 (void);
// 0x00000076 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_autoFocusRequested()
extern void XRCameraSubsystem_get_autoFocusRequested_mE9FFCC3C727160F0009E4DE86900B04C2F27F18D (void);
// 0x00000077 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::set_autoFocusRequested(System.Boolean)
extern void XRCameraSubsystem_set_autoFocusRequested_mC296C345AAFDED318589BD639E9CCF076F09DD5E (void);
// 0x00000078 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_currentLightEstimation()
extern void XRCameraSubsystem_get_currentLightEstimation_m9A5F99B36DD0779E36EA40AC383ECA1270EB2035 (void);
// 0x00000079 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_requestedLightEstimation()
extern void XRCameraSubsystem_get_requestedLightEstimation_m3B23B765873E67D657FCCBBAC6C1631198345DA3 (void);
// 0x0000007A System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::set_requestedLightEstimation(UnityEngine.XR.ARSubsystems.Feature)
extern void XRCameraSubsystem_set_requestedLightEstimation_m4EF957265B8AA95985BEBA40F01EC2CD9F1FFA2C (void);
// 0x0000007B Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRTextureDescriptor> UnityEngine.XR.ARSubsystems.XRCameraSubsystem::GetTextureDescriptors(Unity.Collections.Allocator)
extern void XRCameraSubsystem_GetTextureDescriptors_m961437CFE5B36E5845F6752530668DC0673F9F0D (void);
// 0x0000007C UnityEngine.Material UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_cameraMaterial()
extern void XRCameraSubsystem_get_cameraMaterial_mDA4DBC2831E55D115436978A0D2113AAA17227E3 (void);
// 0x0000007D System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::OnBeforeBackgroundRender(System.Int32)
extern void XRCameraSubsystem_OnBeforeBackgroundRender_mC33251AA0F3D003991512D1EC8C15358ACC2EFD6 (void);
// 0x0000007E System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::TryGetIntrinsics(UnityEngine.XR.ARSubsystems.XRCameraIntrinsics&)
extern void XRCameraSubsystem_TryGetIntrinsics_m2C0875523610ECCF7832A4427CC40EE9BF4E83EB (void);
// 0x0000007F Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRCameraConfiguration> UnityEngine.XR.ARSubsystems.XRCameraSubsystem::GetConfigurations(Unity.Collections.Allocator)
extern void XRCameraSubsystem_GetConfigurations_mB60A927EEA207615D63A2CBF64654A07C8C76A5C (void);
// 0x00000080 System.Nullable`1<UnityEngine.XR.ARSubsystems.XRCameraConfiguration> UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_currentConfiguration()
extern void XRCameraSubsystem_get_currentConfiguration_m5A53BB5CE3AEC31C3652B41EC9DE72FEA342FFCB (void);
// 0x00000081 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::set_currentConfiguration(System.Nullable`1<UnityEngine.XR.ARSubsystems.XRCameraConfiguration>)
extern void XRCameraSubsystem_set_currentConfiguration_mC95F953BE80DD210302A590EBBF46216FDB0F32D (void);
// 0x00000082 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_invertCulling()
extern void XRCameraSubsystem_get_invertCulling_m16E9819EBE5D40798B6022B4FE63D10A228FB019 (void);
// 0x00000083 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::TryGetLatestFrame(UnityEngine.XR.ARSubsystems.XRCameraParams,UnityEngine.XR.ARSubsystems.XRCameraFrame&)
extern void XRCameraSubsystem_TryGetLatestFrame_m5ED10032B81B83B7A68305B2D6FE8DEA21852C86 (void);
// 0x00000084 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::get_permissionGranted()
extern void XRCameraSubsystem_get_permissionGranted_mD9B28FCEF7A1C3EB8465639F5A587C255108D4F1 (void);
// 0x00000085 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem::GetMaterialKeywords(System.Collections.Generic.List`1<System.String>&,System.Collections.Generic.List`1<System.String>&)
extern void XRCameraSubsystem_GetMaterialKeywords_mFA8D645BE9C8514542C48BBF628696FC816A4AF0 (void);
// 0x00000086 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::TryAcquireLatestCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage&)
extern void XRCameraSubsystem_TryAcquireLatestCpuImage_mEF24B1D7F9C32CC87E769905E61556566EBFA9DE (void);
// 0x00000087 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem::Register(UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo)
extern void XRCameraSubsystem_Register_m8E9CD378020A98CC1728A5C0A3324D25439921F4 (void);
// 0x00000088 UnityEngine.XR.ARSubsystems.XRCpuImage/Api UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_cpuImageApi()
extern void Provider_get_cpuImageApi_m663AFB0EB8E8ECF57CBC2F75EA732B154082EFFE (void);
// 0x00000089 UnityEngine.Material UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_cameraMaterial()
extern void Provider_get_cameraMaterial_mB2216E3065B59A4316FE44269B7F72452FC91CAF (void);
// 0x0000008A System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_permissionGranted()
extern void Provider_get_permissionGranted_m81B4D509343689A6B7E05DCE7DC4F23CDCBFFC06 (void);
// 0x0000008B System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_invertCulling()
extern void Provider_get_invertCulling_m1D0C3A5DE10FC21E76F36B206D36279B31DAAF59 (void);
// 0x0000008C UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_currentCamera()
extern void Provider_get_currentCamera_m102ED2EB903E9B0A233C5DD86F697A54BB07B84E (void);
// 0x0000008D UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_requestedCamera()
extern void Provider_get_requestedCamera_m9D75D7C883BE213F9B0750C7A50646BFC1691DD1 (void);
// 0x0000008E System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::set_requestedCamera(UnityEngine.XR.ARSubsystems.Feature)
extern void Provider_set_requestedCamera_mB7502C5875663E3FE9FA9C577D238CFD4FEF5E0A (void);
// 0x0000008F System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::Start()
extern void Provider_Start_m21B1CE84F39D9289CD6B0463FEFE123035A03595 (void);
// 0x00000090 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::Stop()
extern void Provider_Stop_mBC0382A741C3D457CE9306E73C78E31ABE428AC0 (void);
// 0x00000091 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::Destroy()
extern void Provider_Destroy_m811EEFB83BCE7A7F55B8126A0CA06F4A0081FF23 (void);
// 0x00000092 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::TryGetFrame(UnityEngine.XR.ARSubsystems.XRCameraParams,UnityEngine.XR.ARSubsystems.XRCameraFrame&)
extern void Provider_TryGetFrame_m9BDEADBA9AB8CA56E51906D409DADAE31634631E (void);
// 0x00000093 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_autoFocusEnabled()
extern void Provider_get_autoFocusEnabled_mE089188B6717EF34C0795BD4F2237ADC67C3CA64 (void);
// 0x00000094 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_autoFocusRequested()
extern void Provider_get_autoFocusRequested_m61B18E2A0EA9B643C04EBC6AD3E73B9B8E2FFE3F (void);
// 0x00000095 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::set_autoFocusRequested(System.Boolean)
extern void Provider_set_autoFocusRequested_m44CF6A0456BF6AEC21730BF6B09A231C4200F432 (void);
// 0x00000096 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_currentLightEstimation()
extern void Provider_get_currentLightEstimation_m3FC885BECFB5B757A5AFC5188B23433E81D89D65 (void);
// 0x00000097 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_requestedLightEstimation()
extern void Provider_get_requestedLightEstimation_mE06529A3562BE322D3899904DB9D37570AAF159A (void);
// 0x00000098 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::set_requestedLightEstimation(UnityEngine.XR.ARSubsystems.Feature)
extern void Provider_set_requestedLightEstimation_mAC9935863F31DFC2CAB242A1AC74AF9EAB56F977 (void);
// 0x00000099 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::TryGetIntrinsics(UnityEngine.XR.ARSubsystems.XRCameraIntrinsics&)
extern void Provider_TryGetIntrinsics_m173355798904E72FC3D80477AE5426A54ABC95BF (void);
// 0x0000009A Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRCameraConfiguration> UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::GetConfigurations(UnityEngine.XR.ARSubsystems.XRCameraConfiguration,Unity.Collections.Allocator)
extern void Provider_GetConfigurations_m528095C5BA179D1FD2CF679EE89B6B1C216E6834 (void);
// 0x0000009B System.Nullable`1<UnityEngine.XR.ARSubsystems.XRCameraConfiguration> UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::get_currentConfiguration()
extern void Provider_get_currentConfiguration_mD21D1EB06936263616664DB5D8A1698419E98AE2 (void);
// 0x0000009C System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::set_currentConfiguration(System.Nullable`1<UnityEngine.XR.ARSubsystems.XRCameraConfiguration>)
extern void Provider_set_currentConfiguration_m99D438CC1ABE5E92215CA7FA369BE61A7652ED66 (void);
// 0x0000009D Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRTextureDescriptor> UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::GetTextureDescriptors(UnityEngine.XR.ARSubsystems.XRTextureDescriptor,Unity.Collections.Allocator)
extern void Provider_GetTextureDescriptors_mB6ED5AD6E33BCFE3E70916A227CC81541307C68A (void);
// 0x0000009E System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::GetMaterialKeywords(System.Collections.Generic.List`1<System.String>&,System.Collections.Generic.List`1<System.String>&)
extern void Provider_GetMaterialKeywords_m160DF6037C4E84C194CC5D3564184D4DEE8A48E4 (void);
// 0x0000009F System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::TryAcquireLatestCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo&)
extern void Provider_TryAcquireLatestCpuImage_mAB2F3E8C6C6EE2C1DE5181FAF044999FCD6521CA (void);
// 0x000000A0 UnityEngine.Material UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::CreateCameraMaterial(System.String)
extern void Provider_CreateCameraMaterial_mE1F6AD1B1D9F9BA80FE1B8DB3138262545FC018C (void);
// 0x000000A1 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::OnBeforeBackgroundRender(System.Int32)
extern void Provider_OnBeforeBackgroundRender_mB0345F2E598C207A2C7A3C1FCD6AEB7080DF1D75 (void);
// 0x000000A2 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider::.ctor()
extern void Provider__ctor_mA61CB0610059584FC8190F2C54D845C7612D82BE (void);
// 0x000000A3 System.String UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_id()
extern void XRCameraSubsystemCinfo_get_id_m606888326128C053029E1B09A00F2CB97B214291 (void);
// 0x000000A4 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_id(System.String)
extern void XRCameraSubsystemCinfo_set_id_m768994793A205C7D5CE603B354D350A34D47720D (void);
// 0x000000A5 System.Type UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_providerType()
extern void XRCameraSubsystemCinfo_get_providerType_m181531F5B642DA8E3E10FC62879495B0A8D53110 (void);
// 0x000000A6 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_providerType(System.Type)
extern void XRCameraSubsystemCinfo_set_providerType_m78F56C5CEF9FF62F60DE6073B8AD0FB0AFD00730 (void);
// 0x000000A7 System.Type UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_subsystemTypeOverride()
extern void XRCameraSubsystemCinfo_get_subsystemTypeOverride_mED0FB455C8C39164EF2594FC9405B78C1E2EB809 (void);
// 0x000000A8 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_subsystemTypeOverride(System.Type)
extern void XRCameraSubsystemCinfo_set_subsystemTypeOverride_mD4D22BB1EC102CA40AF084B06DA3C957139EF2D4 (void);
// 0x000000A9 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsAverageBrightness()
extern void XRCameraSubsystemCinfo_get_supportsAverageBrightness_mF49B2D16DE8FBC5452C17D87672FBE1EB814145E (void);
// 0x000000AA System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsAverageBrightness(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsAverageBrightness_mC20A88BD3C8D137A1F34888C64DC5FFF37787759 (void);
// 0x000000AB System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsAverageColorTemperature()
extern void XRCameraSubsystemCinfo_get_supportsAverageColorTemperature_m789041AE11DC92E73ED6C228C5A5B55A87AE736B (void);
// 0x000000AC System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsAverageColorTemperature(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsAverageColorTemperature_m77727C8CBAB59D0D078B0A634EB0A56F1BF368E4 (void);
// 0x000000AD System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsColorCorrection()
extern void XRCameraSubsystemCinfo_get_supportsColorCorrection_m6910005DB05086FEBDBFFFE47BFFDBB96453E5C7 (void);
// 0x000000AE System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsColorCorrection(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsColorCorrection_m1CBB9181A21D2A964705AD5E22F78735DCFE2C01 (void);
// 0x000000AF System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsDisplayMatrix()
extern void XRCameraSubsystemCinfo_get_supportsDisplayMatrix_m2107BE8860B1A4D050A80801F6286F0E9798820D (void);
// 0x000000B0 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsDisplayMatrix(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsDisplayMatrix_m2E11C0B7442273252613BDB41BB8B6F02698FBEA (void);
// 0x000000B1 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsProjectionMatrix()
extern void XRCameraSubsystemCinfo_get_supportsProjectionMatrix_mAC44711CBD0AEF5600FAF7A65364692FE9FA9D9E (void);
// 0x000000B2 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsProjectionMatrix(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsProjectionMatrix_mFC886F8859FDF308D7980935474AA0E66ECF66B4 (void);
// 0x000000B3 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsTimestamp()
extern void XRCameraSubsystemCinfo_get_supportsTimestamp_m0B95FB498C6682EE15E2461F8A5C555B3E397543 (void);
// 0x000000B4 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsTimestamp(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsTimestamp_mAA6157EC368F6358F155571E257A578729D368D4 (void);
// 0x000000B5 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsCameraConfigurations()
extern void XRCameraSubsystemCinfo_get_supportsCameraConfigurations_mF0168147B6D556F8289DCE665D070EE427430CDD (void);
// 0x000000B6 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsCameraConfigurations(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsCameraConfigurations_mD0F431DDAB4F82DDC6E35AB7583572D25244E0F0 (void);
// 0x000000B7 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsCameraImage()
extern void XRCameraSubsystemCinfo_get_supportsCameraImage_m404883CC80418B38CB13D3ED6DAAFE6D81978A6F (void);
// 0x000000B8 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsCameraImage(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsCameraImage_m2140EBB7ACEA9B1634F56DE2DCB85F26CB8C4D7D (void);
// 0x000000B9 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsAverageIntensityInLumens()
extern void XRCameraSubsystemCinfo_get_supportsAverageIntensityInLumens_m5B91C231C060B22D44F1579CF361500D7B54173E (void);
// 0x000000BA System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsAverageIntensityInLumens(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsAverageIntensityInLumens_m49462C178EF35B3E688EE6711FD3E41E9C1976AB (void);
// 0x000000BB System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsFaceTrackingAmbientIntensityLightEstimation()
extern void XRCameraSubsystemCinfo_get_supportsFaceTrackingAmbientIntensityLightEstimation_mBE329A85F8992A65715EC3F97AC0CEEE5B0DE9D8 (void);
// 0x000000BC System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsFaceTrackingAmbientIntensityLightEstimation(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsFaceTrackingAmbientIntensityLightEstimation_m93740733F66607C53F3928946A79CE732EAF9EF9 (void);
// 0x000000BD System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsFaceTrackingHDRLightEstimation()
extern void XRCameraSubsystemCinfo_get_supportsFaceTrackingHDRLightEstimation_mAA8871A8B5D8CDC9D7D5FEA47E72423BC02D969B (void);
// 0x000000BE System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsFaceTrackingHDRLightEstimation(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsFaceTrackingHDRLightEstimation_mD76A9A9A127118388FBD2E971246303BB2BE0F0C (void);
// 0x000000BF System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsWorldTrackingAmbientIntensityLightEstimation()
extern void XRCameraSubsystemCinfo_get_supportsWorldTrackingAmbientIntensityLightEstimation_mC5C8DDCB2DB3F82EA868AF171039DF6ECFF9C7EC (void);
// 0x000000C0 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsWorldTrackingAmbientIntensityLightEstimation(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsWorldTrackingAmbientIntensityLightEstimation_mE9B47A05DA11B6C6FFCB6FFED773ADB464130C5B (void);
// 0x000000C1 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsWorldTrackingHDRLightEstimation()
extern void XRCameraSubsystemCinfo_get_supportsWorldTrackingHDRLightEstimation_m96A9EF59A86DAFBA2A14AFAA79840480E8CDD01D (void);
// 0x000000C2 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsWorldTrackingHDRLightEstimation(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsWorldTrackingHDRLightEstimation_m92AC9270D4D5FA4C61ED353406511B3877E5D9D4 (void);
// 0x000000C3 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsFocusModes()
extern void XRCameraSubsystemCinfo_get_supportsFocusModes_mA2196338BFF377734A338E919D372089A98417D9 (void);
// 0x000000C4 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsFocusModes(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsFocusModes_m2F70E7EFC54E2F930DEA28DC4922125E01FE3026 (void);
// 0x000000C5 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::get_supportsCameraGrain()
extern void XRCameraSubsystemCinfo_get_supportsCameraGrain_mFC3B0475E51415F6BCDAB93671CD421826DA9B9B (void);
// 0x000000C6 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::set_supportsCameraGrain(System.Boolean)
extern void XRCameraSubsystemCinfo_set_supportsCameraGrain_m8BF26C263FED0D5106C436091BD8C25BFF8FD755 (void);
// 0x000000C7 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::Equals(UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo)
extern void XRCameraSubsystemCinfo_Equals_m8C071329439DF323FF57A936181A09F933886EAB (void);
// 0x000000C8 System.Boolean UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::Equals(System.Object)
extern void XRCameraSubsystemCinfo_Equals_m8DA28DF625D849C92AE0770EBB43184C2CE4FEE4 (void);
// 0x000000C9 System.Int32 UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo::GetHashCode()
extern void XRCameraSubsystemCinfo_GetHashCode_mA8D0D3E3ABB46889F31B045A1D6F8A06EC8701D0 (void);
// 0x000000CA System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo)
extern void XRCameraSubsystemDescriptor__ctor_m3279B88FEF25A569F67987BDC39A0678B72D1CB6 (void);
// 0x000000CB System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsAverageBrightness(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsAverageBrightness_m93E308790E7E9F9EB2D4A0AA12EF64F5ACF32275 (void);
// 0x000000CC System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsAverageColorTemperature(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsAverageColorTemperature_m79788019F8E730D1FC139530E9615FE5CBABDDCB (void);
// 0x000000CD System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsColorCorrection(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsColorCorrection_m3CD5EFDB6CBC26159DA439F9D83FDFD184AA5B71 (void);
// 0x000000CE System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsDisplayMatrix(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsDisplayMatrix_mE32DBA05CC497A4639E3BDA570E51244BD5E524A (void);
// 0x000000CF System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsProjectionMatrix(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsProjectionMatrix_mECDFAEA74911ED30529FDB70DE87AA3818AA285F (void);
// 0x000000D0 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsTimestamp(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsTimestamp_mDE3970574677648ED3EC4520657BED04613128D3 (void);
// 0x000000D1 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsCameraConfigurations(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsCameraConfigurations_mE49020DC68025F21123ACCCB96C0ACB0A99A923C (void);
// 0x000000D2 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsCameraImage(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsCameraImage_m3D2848F2DDBED1D1B613D6CF8E6055D8163EF3F7 (void);
// 0x000000D3 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsAverageIntensityInLumens(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsAverageIntensityInLumens_m65A10731DEF111F2BE9325DC6CC26E5B765D07C6 (void);
// 0x000000D4 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsFocusModes(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsFocusModes_mB7D094AE9379B0C31386397C907C1A1C1A4189BB (void);
// 0x000000D5 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsFaceTrackingAmbientIntensityLightEstimation(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsFaceTrackingAmbientIntensityLightEstimation_mA1E7039E19BAF3A62B025C1FD9E39112C92759BB (void);
// 0x000000D6 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsFaceTrackingHDRLightEstimation(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsFaceTrackingHDRLightEstimation_mE2E9D893DE652FC15DBD89A46E092957ED012565 (void);
// 0x000000D7 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsWorldTrackingAmbientIntensityLightEstimation(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsWorldTrackingAmbientIntensityLightEstimation_mB1C4D288FD5B48EC53B047348A3E25BE66C1F6BD (void);
// 0x000000D8 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsWorldTrackingHDRLightEstimation(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsWorldTrackingHDRLightEstimation_mA05D37FA61B46B9215CA459E52A84D398B19715E (void);
// 0x000000D9 System.Void UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::set_supportsCameraGrain(System.Boolean)
extern void XRCameraSubsystemDescriptor_set_supportsCameraGrain_m0DE607C6E20FA0A160E9421AD11B86DC267E3632 (void);
// 0x000000DA UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XRCameraSubsystemCinfo)
extern void XRCameraSubsystemDescriptor_Create_mEC826CD90D35D17847339952F5022081EF871033 (void);
// 0x000000DB UnityEngine.XR.ARSubsystems.ConfigurationDescriptor UnityEngine.XR.ARSubsystems.Configuration::get_descriptor()
extern void Configuration_get_descriptor_mD7539C193666CFFB9258CE40D88EB7DA3C48DDDA (void);
// 0x000000DC System.Void UnityEngine.XR.ARSubsystems.Configuration::set_descriptor(UnityEngine.XR.ARSubsystems.ConfigurationDescriptor)
extern void Configuration_set_descriptor_mC8DB7CFDB5C7E267B15CFD3DE2133A1B482020E9 (void);
// 0x000000DD UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.Configuration::get_features()
extern void Configuration_get_features_m8F2353DC080AF51D657C4CBD8E9DB4DAEAB72B5A (void);
// 0x000000DE System.Void UnityEngine.XR.ARSubsystems.Configuration::set_features(UnityEngine.XR.ARSubsystems.Feature)
extern void Configuration_set_features_m778B95140CCFD2CF143489375C8B15258B5CA149 (void);
// 0x000000DF System.Void UnityEngine.XR.ARSubsystems.Configuration::.ctor(UnityEngine.XR.ARSubsystems.ConfigurationDescriptor,UnityEngine.XR.ARSubsystems.Feature)
extern void Configuration__ctor_m5A3F2286F33BA303B4C8A8E0E34ED6DA993A43BB (void);
// 0x000000E0 System.Int32 UnityEngine.XR.ARSubsystems.Configuration::GetHashCode()
extern void Configuration_GetHashCode_m1714C8505EE74B796DB7AF17A409448C385A83F2 (void);
// 0x000000E1 System.Boolean UnityEngine.XR.ARSubsystems.Configuration::Equals(UnityEngine.XR.ARSubsystems.Configuration)
extern void Configuration_Equals_m3EABF1A712E3AB8B1BCB70F71A4DA0B29BD3AB23 (void);
// 0x000000E2 System.Boolean UnityEngine.XR.ARSubsystems.Configuration::Equals(System.Object)
extern void Configuration_Equals_m7C598F62999ABC2566CDCD656FF0ACA11DBC9807 (void);
// 0x000000E3 System.Boolean UnityEngine.XR.ARSubsystems.Configuration::op_Inequality(UnityEngine.XR.ARSubsystems.Configuration,UnityEngine.XR.ARSubsystems.Configuration)
extern void Configuration_op_Inequality_mC645E4B53C25B460EF3C567C2709C586C5156AE3 (void);
// 0x000000E4 UnityEngine.XR.ARSubsystems.Configuration UnityEngine.XR.ARSubsystems.ConfigurationChooser::ChooseConfiguration(Unity.Collections.NativeSlice`1<UnityEngine.XR.ARSubsystems.ConfigurationDescriptor>,UnityEngine.XR.ARSubsystems.Feature)
// 0x000000E5 System.Void UnityEngine.XR.ARSubsystems.ConfigurationChooser::.ctor()
extern void ConfigurationChooser__ctor_mDD8DB2D97E4DD5B6CC29809BBFDDDEA149A1150A (void);
// 0x000000E6 System.IntPtr UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::get_identifier()
extern void ConfigurationDescriptor_get_identifier_m829E6611B4E4B0E33E8E87902FDFCDAEC0F2B8A0 (void);
// 0x000000E7 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::get_capabilities()
extern void ConfigurationDescriptor_get_capabilities_mD48908AE629D6E78D84F355B59CF742ABFD7C649 (void);
// 0x000000E8 System.Int32 UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::get_rank()
extern void ConfigurationDescriptor_get_rank_mF775801AAD4BC8E980682B569F676BD536BA78B8 (void);
// 0x000000E9 System.String UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::HexString(System.IntPtr)
extern void ConfigurationDescriptor_HexString_m06E793AFE575A13CBC943EBFDCAB4BA290AAF8F3 (void);
// 0x000000EA System.String UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::ToString()
extern void ConfigurationDescriptor_ToString_mF67E92AE3930DFD749F7186D49FFC600E2B197EE (void);
// 0x000000EB System.Int32 UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::GetHashCode()
extern void ConfigurationDescriptor_GetHashCode_m1B74FC9C9B33BBED2192C1A47570C13A40008091 (void);
// 0x000000EC System.Boolean UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::Equals(UnityEngine.XR.ARSubsystems.ConfigurationDescriptor)
extern void ConfigurationDescriptor_Equals_m6908A703D5C6F693555FCC9A616D85E430012363 (void);
// 0x000000ED System.Boolean UnityEngine.XR.ARSubsystems.ConfigurationDescriptor::Equals(System.Object)
extern void ConfigurationDescriptor_Equals_m4123FDB2B2A6BDDCA3979394FD76CEEFAE534EDB (void);
// 0x000000EE UnityEngine.XR.ARSubsystems.Configuration UnityEngine.XR.ARSubsystems.DefaultConfigurationChooser::ChooseConfiguration(Unity.Collections.NativeSlice`1<UnityEngine.XR.ARSubsystems.ConfigurationDescriptor>,UnityEngine.XR.ARSubsystems.Feature)
extern void DefaultConfigurationChooser_ChooseConfiguration_m4CA6F2A0B77732D4EACCA7D6FD3B1B1407ECBBD1 (void);
// 0x000000EF System.Void UnityEngine.XR.ARSubsystems.DefaultConfigurationChooser::.ctor()
extern void DefaultConfigurationChooser__ctor_m01D5B274BA5A7C81A20C94A920681CAE8466A4BC (void);
// 0x000000F0 System.Boolean UnityEngine.XR.ARSubsystems.FeatureExtensions::Any(UnityEngine.XR.ARSubsystems.Feature,UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_Any_mE55A6DE2870496D907915F6C117FC22D107B54A9 (void);
// 0x000000F1 System.Boolean UnityEngine.XR.ARSubsystems.FeatureExtensions::All(UnityEngine.XR.ARSubsystems.Feature,UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_All_mE045F59D960EB11FE1A7B31076D0132109B28160 (void);
// 0x000000F2 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.FeatureExtensions::Intersection(UnityEngine.XR.ARSubsystems.Feature,UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_Intersection_m2CA900F610313CDD88F981646EBE46B1AD8AC5E9 (void);
// 0x000000F3 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.FeatureExtensions::SetDifference(UnityEngine.XR.ARSubsystems.Feature,UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_SetDifference_m9699D6212D9BD79EE52C44EF08FF7461E7F2C1C5 (void);
// 0x000000F4 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.FeatureExtensions::Cameras(UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_Cameras_m3814978160FF343F4B295277B62A10A90BE46F7F (void);
// 0x000000F5 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.FeatureExtensions::TrackingModes(UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_TrackingModes_m42E19D4C37D0B9A70CACE5810FBE94B8A517D127 (void);
// 0x000000F6 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.FeatureExtensions::LightEstimation(UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_LightEstimation_m7FF62D53AE0E08C1B8923FAB371C228B7DF190C5 (void);
// 0x000000F7 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.FeatureExtensions::LowestBit(UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_LowestBit_mD88FDDA9224F7FB3B74A3EC59BB76C86B4923267 (void);
// 0x000000F8 System.String UnityEngine.XR.ARSubsystems.FeatureExtensions::ToStringList(UnityEngine.XR.ARSubsystems.Feature,System.String)
extern void FeatureExtensions_ToStringList_m1B8E6CA945AE2E060DB1D4DFA60CCD72AADC082D (void);
// 0x000000F9 System.Int32 UnityEngine.XR.ARSubsystems.FeatureExtensions::Count(UnityEngine.XR.ARSubsystems.Feature)
extern void FeatureExtensions_Count_m5EF2EFA14A36261D35A95A6D5A39A107D223F6B6 (void);
// 0x000000FA UnityEngine.Vector2Int UnityEngine.XR.ARSubsystems.XRCpuImage::get_dimensions()
extern void XRCpuImage_get_dimensions_m1A176BDB3319F09F3AF628AB17C126B62929A2A5 (void);
// 0x000000FB System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::set_dimensions(UnityEngine.Vector2Int)
extern void XRCpuImage_set_dimensions_m8672F4307A096265FA73685BDDA6D605B9C10ED5 (void);
// 0x000000FC System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage::get_width()
extern void XRCpuImage_get_width_m8DE20D99BCFA242F105F3B39AD68D398F3C2B4CE (void);
// 0x000000FD System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage::get_height()
extern void XRCpuImage_get_height_m7BB3967EC96DB5EEF99E0935E5AA1DFB991D7ADD (void);
// 0x000000FE System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage::get_planeCount()
extern void XRCpuImage_get_planeCount_m5F63BAD93F18A9D85D74377CFE1891860740D750 (void);
// 0x000000FF System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::set_planeCount(System.Int32)
extern void XRCpuImage_set_planeCount_mC261323C60A65DD0EBA30325554C5F92F13149EA (void);
// 0x00000100 UnityEngine.XR.ARSubsystems.XRCpuImage/Format UnityEngine.XR.ARSubsystems.XRCpuImage::get_format()
extern void XRCpuImage_get_format_m80FEE2CEC6A37A417D5B86294C1ECA50A49FDEAB (void);
// 0x00000101 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::set_format(UnityEngine.XR.ARSubsystems.XRCpuImage/Format)
extern void XRCpuImage_set_format_m02654636810F940049F1A57FEA7987F71FA47DF6 (void);
// 0x00000102 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::set_timestamp(System.Double)
extern void XRCpuImage_set_timestamp_m6FAE47FB68497C3757580D1FD94D0A4B7C2C783E (void);
// 0x00000103 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::.ctor(UnityEngine.XR.ARSubsystems.XRCpuImage/Api,UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo)
extern void XRCpuImage__ctor_mA44BE98BA315639462481743B96A650B89F7C26E (void);
// 0x00000104 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::OnAsyncConversionComplete(UnityEngine.XR.ARSubsystems.XRCpuImage/AsyncConversionStatus,UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams,System.IntPtr,System.Int32,System.IntPtr)
extern void XRCpuImage_OnAsyncConversionComplete_m60DC813F1A2B8A59F993D245683847D933D292A9 (void);
// 0x00000105 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::Dispose()
extern void XRCpuImage_Dispose_m462B3360E99D206E1151C7B8ED30420BF4A91B7A (void);
// 0x00000106 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage::GetHashCode()
extern void XRCpuImage_GetHashCode_m5A2490A4F9DD6A4BE95B6E43C2E4DFA67057DD29 (void);
// 0x00000107 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage::Equals(System.Object)
extern void XRCpuImage_Equals_m6ADCC3C2CDB259DD1D6BB1648CBA3722AD129441 (void);
// 0x00000108 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage::Equals(UnityEngine.XR.ARSubsystems.XRCpuImage)
extern void XRCpuImage_Equals_mE183B37EE7FA276B21EC0CE087BEFCDE540C8D24 (void);
// 0x00000109 System.String UnityEngine.XR.ARSubsystems.XRCpuImage::ToString()
extern void XRCpuImage_ToString_mE31499DDD8365EC75336BFF9C7393BCA2C1B2E5A (void);
// 0x0000010A System.Void UnityEngine.XR.ARSubsystems.XRCpuImage::.cctor()
extern void XRCpuImage__cctor_m29EB7C261680FA4A1CD196510620C5D72E83626A (void);
// 0x0000010B System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Api::TryGetPlane(System.Int32,System.Int32,UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo&)
extern void Api_TryGetPlane_m9EDAE9347615522A0C95F387DF4D274D655090A8 (void);
// 0x0000010C System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Api::TryGetConvertedDataSize(System.Int32,UnityEngine.Vector2Int,UnityEngine.TextureFormat,System.Int32&)
extern void Api_TryGetConvertedDataSize_m50DDC92171F520516E21205E3817BEE0D51A9A51 (void);
// 0x0000010D System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Api::TryConvert(System.Int32,UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams,System.IntPtr,System.Int32)
extern void Api_TryConvert_m2FB4CAC6639BE6EDDD65D74A3C296C9A72C1E6FD (void);
// 0x0000010E System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Api::ConvertAsync(System.Int32,UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams)
extern void Api_ConvertAsync_m7D88B9B493A448A03FBED33FE2C675805A2417F0 (void);
// 0x0000010F System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Api::NativeHandleValid(System.Int32)
extern void Api_NativeHandleValid_m25628942A0D2320EAB96887219972ED8257FC858 (void);
// 0x00000110 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Api::TryGetAsyncRequestData(System.Int32,System.IntPtr&,System.Int32&)
extern void Api_TryGetAsyncRequestData_mCEB60B8F55366677F05AAF1651F46C4B28AFAEA3 (void);
// 0x00000111 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage/Api::ConvertAsync(System.Int32,UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams,UnityEngine.XR.ARSubsystems.XRCpuImage/Api/OnImageRequestCompleteDelegate,System.IntPtr)
extern void Api_ConvertAsync_mE9BFD28B9BC1C3A063FC0B84B014B3538A155E99 (void);
// 0x00000112 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage/Api::DisposeImage(System.Int32)
extern void Api_DisposeImage_m6AEAAF9EF11D19294B441CF6DBB8FEDD58933989 (void);
// 0x00000113 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage/Api::DisposeAsyncRequest(System.Int32)
extern void Api_DisposeAsyncRequest_m06C972C865763DF2DE877124295F4A48B0574ABE (void);
// 0x00000114 UnityEngine.XR.ARSubsystems.XRCpuImage/AsyncConversionStatus UnityEngine.XR.ARSubsystems.XRCpuImage/Api::GetAsyncRequestStatus(System.Int32)
extern void Api_GetAsyncRequestStatus_m920A8C2BA437BF3581A737DE8AF350094577300B (void);
// 0x00000115 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Api::FormatSupported(UnityEngine.XR.ARSubsystems.XRCpuImage,UnityEngine.TextureFormat)
extern void Api_FormatSupported_mD53B1C7B2A9D9D49ADDCE94794198C5A0FB64828 (void);
// 0x00000116 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage/Api::.ctor()
extern void Api__ctor_mEC96F88C341E160F9DDE41F5FA275DFAFF8522BA (void);
// 0x00000117 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage/Api/OnImageRequestCompleteDelegate::.ctor(System.Object,System.IntPtr)
extern void OnImageRequestCompleteDelegate__ctor_mB4E3DC02E880D5890B499CFD8BC47B4C47CCD2BC (void);
// 0x00000118 System.Void UnityEngine.XR.ARSubsystems.XRCpuImage/Api/OnImageRequestCompleteDelegate::Invoke(UnityEngine.XR.ARSubsystems.XRCpuImage/AsyncConversionStatus,UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams,System.IntPtr,System.Int32,System.IntPtr)
extern void OnImageRequestCompleteDelegate_Invoke_mA88CBFF9DDB699B0AB6804612450DA27A2070081 (void);
// 0x00000119 UnityEngine.RectInt UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::get_inputRect()
extern void ConversionParams_get_inputRect_mE75F22AF739DFB5506127DF164E0AEF851702756 (void);
// 0x0000011A UnityEngine.Vector2Int UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::get_outputDimensions()
extern void ConversionParams_get_outputDimensions_m83C9D960C805CA2748AA9AAAC2A2986A397B7033 (void);
// 0x0000011B UnityEngine.TextureFormat UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::get_outputFormat()
extern void ConversionParams_get_outputFormat_m727E479981BF00635D645C88D4D987EB598A0E5F (void);
// 0x0000011C UnityEngine.XR.ARSubsystems.XRCpuImage/Transformation UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::get_transformation()
extern void ConversionParams_get_transformation_mFB57F05831CF417808A6C41F170768D9F66A7EF3 (void);
// 0x0000011D System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::GetHashCode()
extern void ConversionParams_GetHashCode_m317F3CF69F015FD4012B668A3195A50E8C18F436 (void);
// 0x0000011E System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::Equals(UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams)
extern void ConversionParams_Equals_m428ABCB343F2D25BEC8C48C064A607C19D4C6B4F (void);
// 0x0000011F System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::Equals(System.Object)
extern void ConversionParams_Equals_m9170E22223AA2514E0EAA66A74375460210EC11B (void);
// 0x00000120 System.String UnityEngine.XR.ARSubsystems.XRCpuImage/ConversionParams::ToString()
extern void ConversionParams_ToString_mB2F109D1B691D862EC98C1C9058F78C58CE832D3 (void);
// 0x00000121 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::get_rowStride()
extern void Plane_get_rowStride_mE6385B9F7D9D040FC613D16D859435F492CB213A (void);
// 0x00000122 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::get_pixelStride()
extern void Plane_get_pixelStride_m33EEE46027B124683ABAF3BC627812F963F29665 (void);
// 0x00000123 Unity.Collections.NativeArray`1<System.Byte> UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::get_data()
extern void Plane_get_data_mBA1EB2437E816B19D7A68440AE188F4E8543E108 (void);
// 0x00000124 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::GetHashCode()
extern void Plane_GetHashCode_mE6FB9627754D042BCE94DA2672023FE03BE24C81 (void);
// 0x00000125 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::Equals(System.Object)
extern void Plane_Equals_mAAF552DA4142C484FFEBA4C30EC7F14111523D68 (void);
// 0x00000126 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::Equals(UnityEngine.XR.ARSubsystems.XRCpuImage/Plane)
extern void Plane_Equals_mE56ABB7E1AE23CED9290A64F4B80D2FDC95AA7F6 (void);
// 0x00000127 System.String UnityEngine.XR.ARSubsystems.XRCpuImage/Plane::ToString()
extern void Plane_ToString_mDCB0EECF9BB9652F5E5BA2B36F51F1E4CF334238 (void);
// 0x00000128 System.IntPtr UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::get_dataPtr()
extern void Cinfo_get_dataPtr_m72B8A6BDAA98FA3CF92A9E03807130E4B6341B35 (void);
// 0x00000129 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::get_dataLength()
extern void Cinfo_get_dataLength_mBF9DA90E69A88EF50923C839B5CE8A03264EAB9A (void);
// 0x0000012A System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::get_rowStride()
extern void Cinfo_get_rowStride_m67E7894AA413F614310BF6A667BDEA1950165492 (void);
// 0x0000012B System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::get_pixelStride()
extern void Cinfo_get_pixelStride_m2595FA36CA7479B00D3EFD507C3C9439CC5DBDE0 (void);
// 0x0000012C System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo)
extern void Cinfo_Equals_m5B7C627F1C89E10A0CE713A46B283219E35F6365 (void);
// 0x0000012D System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m3D18D26EAA0FED30423B3C8B38961816A1472F62 (void);
// 0x0000012E System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_mC3F4D4AA0494F15A8E0B0F765FA005C1A574CCCF (void);
// 0x0000012F System.String UnityEngine.XR.ARSubsystems.XRCpuImage/Plane/Cinfo::ToString()
extern void Cinfo_ToString_m4D93FD001F1E9EC984CBFB7997FE480E212F83DF (void);
// 0x00000130 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::get_nativeHandle()
extern void Cinfo_get_nativeHandle_mAB50E5453B3ED928372EC45DF5E0F4E2ADF341BC (void);
// 0x00000131 UnityEngine.Vector2Int UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::get_dimensions()
extern void Cinfo_get_dimensions_mA8AFF01543915A325187A41369F6DA11231A3E50 (void);
// 0x00000132 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::get_planeCount()
extern void Cinfo_get_planeCount_m88E3C67F9E06017A46B7FF90368B24A6F48E1271 (void);
// 0x00000133 System.Double UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::get_timestamp()
extern void Cinfo_get_timestamp_mAF782E097B2324BD673D8D98C68CA2D6CA4891EF (void);
// 0x00000134 UnityEngine.XR.ARSubsystems.XRCpuImage/Format UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::get_format()
extern void Cinfo_get_format_m42CBF60A496CB04541CC04C97E1745AFBC7259BD (void);
// 0x00000135 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo)
extern void Cinfo_Equals_m52B0C058E8FB2AB4089B91E1EDD0DFD2F9F22642 (void);
// 0x00000136 System.Boolean UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m8140023C141235A77C2153E9A8B54E5356EC6C6F (void);
// 0x00000137 System.Int32 UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_m7AB2284B6770F059F37B7A7EB61C075F472BAE65 (void);
// 0x00000138 System.String UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo::ToString()
extern void Cinfo_ToString_m4923B9CB2748C5E7CCAA6C817F47976B1E4B2FE1 (void);
// 0x00000139 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRPointCloud> UnityEngine.XR.ARSubsystems.XRDepthSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRDepthSubsystem_GetChanges_m5EDDB48B96701CE5D087B4BDAE51DD0213BF663A (void);
// 0x0000013A UnityEngine.XR.ARSubsystems.XRPointCloudData UnityEngine.XR.ARSubsystems.XRDepthSubsystem::GetPointCloudData(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator)
extern void XRDepthSubsystem_GetPointCloudData_mC82CC38D5B56703EE808D9BD61D19B908C2C2364 (void);
// 0x0000013B System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystem::.ctor()
extern void XRDepthSubsystem__ctor_mCD27ED98C0FCF9538A67023E02DDD4AFB3B04D86 (void);
// 0x0000013C System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystem/Provider::Start()
extern void Provider_Start_mCFBE8FADD9A70911E16A985BA4CFE55A5D305F97 (void);
// 0x0000013D System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystem/Provider::Stop()
extern void Provider_Stop_mE83290B18BBF745A739EFBB8985EE8F6F9ACEF79 (void);
// 0x0000013E System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystem/Provider::Destroy()
extern void Provider_Destroy_m4594AD5BE5A869ECEDF56161272A18E5182B4E58 (void);
// 0x0000013F UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRPointCloud> UnityEngine.XR.ARSubsystems.XRDepthSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRPointCloud,Unity.Collections.Allocator)
// 0x00000140 UnityEngine.XR.ARSubsystems.XRPointCloudData UnityEngine.XR.ARSubsystems.XRDepthSubsystem/Provider::GetPointCloudData(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator)
// 0x00000141 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystem/Provider::.ctor()
extern void Provider__ctor_m1A368071CFCB91BC39B9760441A777FE20F86A57 (void);
// 0x00000142 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo)
extern void XRDepthSubsystemDescriptor__ctor_m8107883A37944FA3C8451BA4F8CF88B902BB56DD (void);
// 0x00000143 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor::set_supportsFeaturePoints(System.Boolean)
extern void XRDepthSubsystemDescriptor_set_supportsFeaturePoints_mA0C105DA50CA07BC488A7E1BDDB3CD72225BE00C (void);
// 0x00000144 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor::set_supportsUniqueIds(System.Boolean)
extern void XRDepthSubsystemDescriptor_set_supportsUniqueIds_m0BBF2BAA5E4E1A704B29F62FE895F5A29A5D93CD (void);
// 0x00000145 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor::set_supportsConfidence(System.Boolean)
extern void XRDepthSubsystemDescriptor_set_supportsConfidence_m877945BE2EB06E5FB0699BEDA781CDC7E88DBC9A (void);
// 0x00000146 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor::RegisterDescriptor(UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo)
extern void XRDepthSubsystemDescriptor_RegisterDescriptor_mB5908D568E8943B143747EDA81FF550FE2BB3A33 (void);
// 0x00000147 System.Type UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::get_providerType()
extern void Cinfo_get_providerType_m7168F2BEAB1E7D53C4A1308A0BE686CB6ACAC37D (void);
// 0x00000148 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::set_providerType(System.Type)
extern void Cinfo_set_providerType_m79B371C14F188233806BAB677302143650CD9A29 (void);
// 0x00000149 System.Type UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::get_subsystemTypeOverride()
extern void Cinfo_get_subsystemTypeOverride_mA17A612B4FB9125843E254DB825177C3B1834235 (void);
// 0x0000014A System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::set_subsystemTypeOverride(System.Type)
extern void Cinfo_set_subsystemTypeOverride_mEF323B6CBB63FB7E5ECB4A6849F06C57BFDF8120 (void);
// 0x0000014B System.Boolean UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::get_supportsFeaturePoints()
extern void Cinfo_get_supportsFeaturePoints_mAE8F24562D2A19594A5AB98BDA0FC1C35730B5BA (void);
// 0x0000014C System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::set_supportsFeaturePoints(System.Boolean)
extern void Cinfo_set_supportsFeaturePoints_mD44DBE0A79D63D3234369E573653A81DC7FB8E1D (void);
// 0x0000014D System.Boolean UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::get_supportsConfidence()
extern void Cinfo_get_supportsConfidence_m483E36BDB283478D5E1F6F6F3C96A279EB6DE01A (void);
// 0x0000014E System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::set_supportsConfidence(System.Boolean)
extern void Cinfo_set_supportsConfidence_m78F76CAAFD5D667ADBED1580E1F8A1286B59C46D (void);
// 0x0000014F System.Boolean UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::get_supportsUniqueIds()
extern void Cinfo_get_supportsUniqueIds_m6A1B72F6B917B3B001388027A7324A84146E5B7F (void);
// 0x00000150 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::set_supportsUniqueIds(System.Boolean)
extern void Cinfo_set_supportsUniqueIds_mFF68A678A13F7C1BD9E157690649255A27369514 (void);
// 0x00000151 UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Capabilities UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::get_capabilities()
extern void Cinfo_get_capabilities_m09C807B048E192438A9B0D0C17808FF5BFF81A8A (void);
// 0x00000152 System.Void UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::set_capabilities(UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Capabilities)
extern void Cinfo_set_capabilities_mB2A17E458179A44C2EACB82699FBC5B5611C7580 (void);
// 0x00000153 System.Boolean UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo)
extern void Cinfo_Equals_m560240A9ABB2B3E0C71D2EF694812209060F7781 (void);
// 0x00000154 System.Boolean UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m1FFC7731C8021381A825E2D56189CDCD1BC39FD1 (void);
// 0x00000155 System.Int32 UnityEngine.XR.ARSubsystems.XRDepthSubsystemDescriptor/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_m93DAAACF242CBA5B8EE758CE4E04BCCF51639860 (void);
// 0x00000156 UnityEngine.XR.ARSubsystems.XRPointCloud UnityEngine.XR.ARSubsystems.XRPointCloud::get_defaultValue()
extern void XRPointCloud_get_defaultValue_m484986BE6FCCFD493B66A7BC4895B0AC49F043E2 (void);
// 0x00000157 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRPointCloud::get_trackableId()
extern void XRPointCloud_get_trackableId_m45E06C0C6CD525985ED5FF3A0DC9D1F41A845889 (void);
// 0x00000158 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRPointCloud::get_pose()
extern void XRPointCloud_get_pose_m4291F970BA7E4F2DE67BB6666D365FF510B8AC39 (void);
// 0x00000159 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRPointCloud::get_trackingState()
extern void XRPointCloud_get_trackingState_mE90A4EE69C3F5EA084CB0BF1B3D128160C719242 (void);
// 0x0000015A System.Int32 UnityEngine.XR.ARSubsystems.XRPointCloud::GetHashCode()
extern void XRPointCloud_GetHashCode_m27CF26ED9655FD5EF9E3F83986059017A37E6778 (void);
// 0x0000015B System.Boolean UnityEngine.XR.ARSubsystems.XRPointCloud::Equals(UnityEngine.XR.ARSubsystems.XRPointCloud)
extern void XRPointCloud_Equals_mFB272AE1F45D6A70C7E5C18D49E2ED7E2375AC0C (void);
// 0x0000015C System.Boolean UnityEngine.XR.ARSubsystems.XRPointCloud::Equals(System.Object)
extern void XRPointCloud_Equals_m7123CA7CBF03D2DDAEAFD63768A78A559B70D34A (void);
// 0x0000015D System.Void UnityEngine.XR.ARSubsystems.XRPointCloud::.cctor()
extern void XRPointCloud__cctor_m2491726ECECF7EBAD790AD20F7AAF000215186DB (void);
// 0x0000015E Unity.Collections.NativeArray`1<UnityEngine.Vector3> UnityEngine.XR.ARSubsystems.XRPointCloudData::get_positions()
extern void XRPointCloudData_get_positions_mD0152EB78841C8D8CB83101868169887235C6BD3 (void);
// 0x0000015F System.Void UnityEngine.XR.ARSubsystems.XRPointCloudData::set_positions(Unity.Collections.NativeArray`1<UnityEngine.Vector3>)
extern void XRPointCloudData_set_positions_m5B37C4E8FCCE5AF8E16D83D4BAE520F45971CCD7 (void);
// 0x00000160 Unity.Collections.NativeArray`1<System.Single> UnityEngine.XR.ARSubsystems.XRPointCloudData::get_confidenceValues()
extern void XRPointCloudData_get_confidenceValues_mA510FDF9A0F8B21FEA6905400EA6F3A709F8DD82 (void);
// 0x00000161 Unity.Collections.NativeArray`1<System.UInt64> UnityEngine.XR.ARSubsystems.XRPointCloudData::get_identifiers()
extern void XRPointCloudData_get_identifiers_mF1A688282A3DBD819C5F43EE4A1B44B6548787D3 (void);
// 0x00000162 System.Void UnityEngine.XR.ARSubsystems.XRPointCloudData::set_identifiers(Unity.Collections.NativeArray`1<System.UInt64>)
extern void XRPointCloudData_set_identifiers_mBA475172386D8F500AE9F2D50D4B009FD8D26319 (void);
// 0x00000163 System.Void UnityEngine.XR.ARSubsystems.XRPointCloudData::Dispose()
extern void XRPointCloudData_Dispose_m600FFE0CF6B2D3D7B31B7F51406C4818159C5120 (void);
// 0x00000164 System.Int32 UnityEngine.XR.ARSubsystems.XRPointCloudData::GetHashCode()
extern void XRPointCloudData_GetHashCode_mC10886AFDA538D306F9E455166BB6D2F81071912 (void);
// 0x00000165 System.Boolean UnityEngine.XR.ARSubsystems.XRPointCloudData::Equals(System.Object)
extern void XRPointCloudData_Equals_m5553859ECF1F500F0153472EA6D6E547D251936D (void);
// 0x00000166 System.String UnityEngine.XR.ARSubsystems.XRPointCloudData::ToString()
extern void XRPointCloudData_ToString_m9712C0206584CBD90DF2A44CE36DDC78141E607A (void);
// 0x00000167 System.Boolean UnityEngine.XR.ARSubsystems.XRPointCloudData::Equals(UnityEngine.XR.ARSubsystems.XRPointCloudData)
extern void XRPointCloudData_Equals_m6655FF22F1E7FE07B0A71ACE455A742E8DF7DAEA (void);
// 0x00000168 UnityEngine.XR.ARSubsystems.XREnvironmentProbe UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_defaultValue()
extern void XREnvironmentProbe_get_defaultValue_m150C4FBAC331EF916AABC17F68BDC6243D5B5EB8 (void);
// 0x00000169 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_trackableId()
extern void XREnvironmentProbe_get_trackableId_m3C275681C5223EDD967B1F37E2A0FAFF03A80066 (void);
// 0x0000016A System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbe::set_trackableId(UnityEngine.XR.ARSubsystems.TrackableId)
extern void XREnvironmentProbe_set_trackableId_m2FAAA910E6D06256C1ECCCCF8C6D3E72A056199D (void);
// 0x0000016B UnityEngine.Vector3 UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_scale()
extern void XREnvironmentProbe_get_scale_m73AF4CF41515A2EDAD35FFBA598D23207F9D2BD3 (void);
// 0x0000016C UnityEngine.Pose UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_pose()
extern void XREnvironmentProbe_get_pose_m03ABF5D0F413C9892349CF3891D5214147DD4C09 (void);
// 0x0000016D System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbe::set_pose(UnityEngine.Pose)
extern void XREnvironmentProbe_set_pose_mAC84C3A2D8788D587F0503EA1CE051294A8A87E9 (void);
// 0x0000016E UnityEngine.Vector3 UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_size()
extern void XREnvironmentProbe_get_size_mC31926635D53201B3C0E7E76B3ADBE2883374135 (void);
// 0x0000016F UnityEngine.XR.ARSubsystems.XRTextureDescriptor UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_textureDescriptor()
extern void XREnvironmentProbe_get_textureDescriptor_mDA5B2F0E63647BBC038FB4E476F609625109FA13 (void);
// 0x00000170 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_trackingState()
extern void XREnvironmentProbe_get_trackingState_m47E2E959CA905F4498489EEFF1C1DCEC4958582C (void);
// 0x00000171 System.IntPtr UnityEngine.XR.ARSubsystems.XREnvironmentProbe::get_nativePtr()
extern void XREnvironmentProbe_get_nativePtr_m00FA5612D1CB3AB7F8F11B1ECBD7AA139FEE60F4 (void);
// 0x00000172 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbe::Equals(UnityEngine.XR.ARSubsystems.XREnvironmentProbe)
extern void XREnvironmentProbe_Equals_mAB858DCB46B0A972BE91B46AE6BA4C2AB6B8479B (void);
// 0x00000173 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbe::Equals(System.Object)
extern void XREnvironmentProbe_Equals_m940DA5EE99C70171A86520CA30C33C0E778A15E7 (void);
// 0x00000174 System.Int32 UnityEngine.XR.ARSubsystems.XREnvironmentProbe::GetHashCode()
extern void XREnvironmentProbe_GetHashCode_mE6E401BB29C7F44E680E6561A8AB7CD92B3F2472 (void);
// 0x00000175 System.String UnityEngine.XR.ARSubsystems.XREnvironmentProbe::ToString()
extern void XREnvironmentProbe_ToString_mBF2604257F8CA6CE56C5D389E8D08339725B8B93 (void);
// 0x00000176 System.String UnityEngine.XR.ARSubsystems.XREnvironmentProbe::ToString(System.String)
extern void XREnvironmentProbe_ToString_m68F8E47BA9E4040BF7352D68F61FB17177000009 (void);
// 0x00000177 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbe::.cctor()
extern void XREnvironmentProbe__cctor_m44E1286FA9D3E1AD04BCE96FA2DDF5A808B5F0D7 (void);
// 0x00000178 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::.ctor()
extern void XREnvironmentProbeSubsystem__ctor_m72F971761AF7B66CBABFF9ABC8468A52406001A2 (void);
// 0x00000179 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::get_automaticPlacementRequested()
extern void XREnvironmentProbeSubsystem_get_automaticPlacementRequested_m4C5B5CD6CED27204FE6C024CCCA28AE5411D181A (void);
// 0x0000017A System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::set_automaticPlacementRequested(System.Boolean)
extern void XREnvironmentProbeSubsystem_set_automaticPlacementRequested_m15DAC8989A0BBE60B0594548EBDE2640D2878E69 (void);
// 0x0000017B System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::get_automaticPlacementEnabled()
extern void XREnvironmentProbeSubsystem_get_automaticPlacementEnabled_mA6656AB97766C21A341BEAF6DC55C73DFD97FF38 (void);
// 0x0000017C System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::get_environmentTextureHDRRequested()
extern void XREnvironmentProbeSubsystem_get_environmentTextureHDRRequested_m166D0FBAAAD5ECCE03B7A797A4657D44FF0DE3E5 (void);
// 0x0000017D System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::set_environmentTextureHDRRequested(System.Boolean)
extern void XREnvironmentProbeSubsystem_set_environmentTextureHDRRequested_m74F6F5A55A456FD0607184D851B506CA1E9C2014 (void);
// 0x0000017E System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::get_environmentTextureHDREnabled()
extern void XREnvironmentProbeSubsystem_get_environmentTextureHDREnabled_mB79DCA9DCC1C7A0CD1A5029FF9373CC7C30B56D6 (void);
// 0x0000017F UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XREnvironmentProbe> UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XREnvironmentProbeSubsystem_GetChanges_mB70866DF4F3022F457ADE2EA6A9A342416E55208 (void);
// 0x00000180 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::TryAddEnvironmentProbe(UnityEngine.Pose,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.XR.ARSubsystems.XREnvironmentProbe&)
extern void XREnvironmentProbeSubsystem_TryAddEnvironmentProbe_mDA385F973061D7FFCDF6EBFE9EE0C478D557F8A4 (void);
// 0x00000181 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::RemoveEnvironmentProbe(UnityEngine.XR.ARSubsystems.TrackableId)
extern void XREnvironmentProbeSubsystem_RemoveEnvironmentProbe_m3D02CCF782150963FBE6FB1E67EBB3C6054BA422 (void);
// 0x00000182 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem::Register(UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo)
extern void XREnvironmentProbeSubsystem_Register_m20EFD30E3B31DD3ED37EA42B6E465AFAE132EA37 (void);
// 0x00000183 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::get_automaticPlacementRequested()
extern void Provider_get_automaticPlacementRequested_m1E459E6FEB7533E372078FCF8E37E1FE7A1F42FB (void);
// 0x00000184 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::set_automaticPlacementRequested(System.Boolean)
extern void Provider_set_automaticPlacementRequested_m247AC8CC05683266B38C937719C7B0E766C6337B (void);
// 0x00000185 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::get_automaticPlacementEnabled()
extern void Provider_get_automaticPlacementEnabled_mFF258987581EDD3975F41F7233FC4CEB8FCF7D1A (void);
// 0x00000186 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::get_environmentTextureHDRRequested()
extern void Provider_get_environmentTextureHDRRequested_m5D5984CEF09F49F5088F4568E9263BCC11A44366 (void);
// 0x00000187 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::set_environmentTextureHDRRequested(System.Boolean)
extern void Provider_set_environmentTextureHDRRequested_m82BAEA302C0714E7C0194EA11A8FE890E7409A8B (void);
// 0x00000188 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::get_environmentTextureHDREnabled()
extern void Provider_get_environmentTextureHDREnabled_m852187628E4A0FAD999C1E679EDC532659BC4675 (void);
// 0x00000189 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::TryAddEnvironmentProbe(UnityEngine.Pose,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.XR.ARSubsystems.XREnvironmentProbe&)
extern void Provider_TryAddEnvironmentProbe_m3290B8D160B758811040A94F335843B1665618D5 (void);
// 0x0000018A System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::RemoveEnvironmentProbe(UnityEngine.XR.ARSubsystems.TrackableId)
extern void Provider_RemoveEnvironmentProbe_m1C8E9F616E2D1F98ECF86A3D6101B9A7ACB949D8 (void);
// 0x0000018B UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XREnvironmentProbe> UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XREnvironmentProbe,Unity.Collections.Allocator)
// 0x0000018C System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystem/Provider::.ctor()
extern void Provider__ctor_m82E278812C6826F3F89A708912491AB72058B700 (void);
// 0x0000018D System.String UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_id()
extern void XREnvironmentProbeSubsystemCinfo_get_id_mBEA40C4012D8253E65C525083E3454C93BC6F3BE (void);
// 0x0000018E System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_id(System.String)
extern void XREnvironmentProbeSubsystemCinfo_set_id_m5C48BD3E879410D5C622BE7DC74D5C798E151731 (void);
// 0x0000018F System.Type UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_providerType()
extern void XREnvironmentProbeSubsystemCinfo_get_providerType_m3A3572178EED86B4F98254B4FAB73016B4459AA1 (void);
// 0x00000190 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_providerType(System.Type)
extern void XREnvironmentProbeSubsystemCinfo_set_providerType_m70C42D1F210DE19AB5E7D82F2D0BDB467E94FC2F (void);
// 0x00000191 System.Type UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_subsystemTypeOverride()
extern void XREnvironmentProbeSubsystemCinfo_get_subsystemTypeOverride_m258F6355EE3F5ED52ADF4A79777AD092AD9B2F22 (void);
// 0x00000192 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_subsystemTypeOverride(System.Type)
extern void XREnvironmentProbeSubsystemCinfo_set_subsystemTypeOverride_mB35BB7FC1C0C42E0A7773365C147F539E7AC27EE (void);
// 0x00000193 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_supportsManualPlacement()
extern void XREnvironmentProbeSubsystemCinfo_get_supportsManualPlacement_m194C593950367B1C7EFB50D6F00E5705597065BF (void);
// 0x00000194 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_supportsManualPlacement(System.Boolean)
extern void XREnvironmentProbeSubsystemCinfo_set_supportsManualPlacement_m2D1156DE760E47CBDDC345AD5CAE5D23AC23E524 (void);
// 0x00000195 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_supportsRemovalOfManual()
extern void XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfManual_m7B2DFDB097FAD2FC7FE6AE7F7A8172FA7B34D406 (void);
// 0x00000196 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_supportsRemovalOfManual(System.Boolean)
extern void XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfManual_m01CE117FEA37EE9BEF79903754E396C35B859419 (void);
// 0x00000197 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_supportsAutomaticPlacement()
extern void XREnvironmentProbeSubsystemCinfo_get_supportsAutomaticPlacement_m2EAA567973D53F9FFCF91AAD4233F91957281B11 (void);
// 0x00000198 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_supportsAutomaticPlacement(System.Boolean)
extern void XREnvironmentProbeSubsystemCinfo_set_supportsAutomaticPlacement_mC4DBFBBD4DBB44D6B1154C4759A3175F9AC33D46 (void);
// 0x00000199 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_supportsRemovalOfAutomatic()
extern void XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfAutomatic_mFC9AA46EA023D8A0968ED80B1F88F10AA50F549F (void);
// 0x0000019A System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_supportsRemovalOfAutomatic(System.Boolean)
extern void XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfAutomatic_m6FCC1E3ACDC01E4447E385A1B89C96DEE16B7EF2 (void);
// 0x0000019B System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_supportsEnvironmentTexture()
extern void XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTexture_m3593704263A383A9EC79E765CCC01632707E4A48 (void);
// 0x0000019C System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_supportsEnvironmentTexture(System.Boolean)
extern void XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTexture_mE30B73C6AC37C6DF8F5B7DBDBC90A975A498D3E4 (void);
// 0x0000019D System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::get_supportsEnvironmentTextureHDR()
extern void XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTextureHDR_mDD0F30AB731A6010F6F96DBA660415B55FCD580A (void);
// 0x0000019E System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::set_supportsEnvironmentTextureHDR(System.Boolean)
extern void XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTextureHDR_mA465A23A4DC052895F8F634892B7C8E3A49F4777 (void);
// 0x0000019F System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::Equals(UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo)
extern void XREnvironmentProbeSubsystemCinfo_Equals_mECAF625FF6A6D6CB7652827D34BCF4228243102C (void);
// 0x000001A0 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::Equals(System.Object)
extern void XREnvironmentProbeSubsystemCinfo_Equals_mE09A9486010D3E88E94AE06CF3BF499D3A2FC6EF (void);
// 0x000001A1 System.Int32 UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo::GetHashCode()
extern void XREnvironmentProbeSubsystemCinfo_GetHashCode_mADDFE56D58883EC3832D901FF566989CB00B5D02 (void);
// 0x000001A2 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo)
extern void XREnvironmentProbeSubsystemDescriptor__ctor_m759C9A99C0F48E2422698CABD21C05A9F9E2ACB6 (void);
// 0x000001A3 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::get_supportsManualPlacement()
extern void XREnvironmentProbeSubsystemDescriptor_get_supportsManualPlacement_m08BC8571DB49533D3940CC743179F8F94A203CC8 (void);
// 0x000001A4 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::set_supportsManualPlacement(System.Boolean)
extern void XREnvironmentProbeSubsystemDescriptor_set_supportsManualPlacement_mCE20C35437C72E053599F9F900EFE7D5A1B0ECF3 (void);
// 0x000001A5 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::get_supportsRemovalOfManual()
extern void XREnvironmentProbeSubsystemDescriptor_get_supportsRemovalOfManual_m1A720014B0B9CF7ADBC6E5FBD3D2AA8FA6EA01AE (void);
// 0x000001A6 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::set_supportsRemovalOfManual(System.Boolean)
extern void XREnvironmentProbeSubsystemDescriptor_set_supportsRemovalOfManual_m148569DAD1997E9EFC75977FD58B2E2A0E6A3A29 (void);
// 0x000001A7 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::get_supportsAutomaticPlacement()
extern void XREnvironmentProbeSubsystemDescriptor_get_supportsAutomaticPlacement_m12205A40FBD5214E81576F99E35D9996F0E20509 (void);
// 0x000001A8 System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::set_supportsAutomaticPlacement(System.Boolean)
extern void XREnvironmentProbeSubsystemDescriptor_set_supportsAutomaticPlacement_mE62CB20894AB742E406F1762C9B8C2CE1DA1B359 (void);
// 0x000001A9 System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::get_supportsRemovalOfAutomatic()
extern void XREnvironmentProbeSubsystemDescriptor_get_supportsRemovalOfAutomatic_m777AF395AF64569B1FCCC6E32973620DC9636C54 (void);
// 0x000001AA System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::set_supportsRemovalOfAutomatic(System.Boolean)
extern void XREnvironmentProbeSubsystemDescriptor_set_supportsRemovalOfAutomatic_m3210C35AC07979BAFDFA3EA0F6A3677285D6E282 (void);
// 0x000001AB System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::set_supportsEnvironmentTexture(System.Boolean)
extern void XREnvironmentProbeSubsystemDescriptor_set_supportsEnvironmentTexture_m67C606821F3D139A11628F487EFE764A2A562CC4 (void);
// 0x000001AC System.Boolean UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::get_supportsEnvironmentTextureHDR()
extern void XREnvironmentProbeSubsystemDescriptor_get_supportsEnvironmentTextureHDR_m7F5545CCA7B538B4399B9C697D24031E89C348AD (void);
// 0x000001AD System.Void UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::set_supportsEnvironmentTextureHDR(System.Boolean)
extern void XREnvironmentProbeSubsystemDescriptor_set_supportsEnvironmentTextureHDR_m813F1381535676A236CE05D522515683E6CA795A (void);
// 0x000001AE UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XREnvironmentProbeSubsystemCinfo)
extern void XREnvironmentProbeSubsystemDescriptor_Create_m64B177418E0330A718E4461D29A11FE8518BB09E (void);
// 0x000001AF UnityEngine.XR.ARSubsystems.XRFace UnityEngine.XR.ARSubsystems.XRFace::get_defaultValue()
extern void XRFace_get_defaultValue_m747D549873462D18EA28AA56D1A0870F6DE4F2D4 (void);
// 0x000001B0 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRFace::get_trackableId()
extern void XRFace_get_trackableId_m997871151FF642B1908F7E352C952A44AB4DD17C (void);
// 0x000001B1 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRFace::get_pose()
extern void XRFace_get_pose_m482AC4907DC02C0B5D67B84320DA7F9D12A43A75 (void);
// 0x000001B2 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRFace::get_trackingState()
extern void XRFace_get_trackingState_m8953B01AB6213402157B69083B318D3F2CDCF26A (void);
// 0x000001B3 System.IntPtr UnityEngine.XR.ARSubsystems.XRFace::get_nativePtr()
extern void XRFace_get_nativePtr_mCE6C767CB9DBBCDE7B289D8EBDE1DFC86707BC95 (void);
// 0x000001B4 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRFace::get_leftEyePose()
extern void XRFace_get_leftEyePose_mEAF86B00D307A5D96D671A85EA1BBF88D82586BF (void);
// 0x000001B5 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRFace::get_rightEyePose()
extern void XRFace_get_rightEyePose_m3FA7FDE9C2D9841FB7496B691FCAB1F35475F2B1 (void);
// 0x000001B6 UnityEngine.Vector3 UnityEngine.XR.ARSubsystems.XRFace::get_fixationPoint()
extern void XRFace_get_fixationPoint_mAEA40B8C8F2C0D0A3B777ACFDE327017C9DF294D (void);
// 0x000001B7 System.Boolean UnityEngine.XR.ARSubsystems.XRFace::Equals(System.Object)
extern void XRFace_Equals_mC8676C7F35F0FF582368E8114BDB981C83C82A88 (void);
// 0x000001B8 System.Int32 UnityEngine.XR.ARSubsystems.XRFace::GetHashCode()
extern void XRFace_GetHashCode_mDFFE26F3662B1DF33124A0393FA9FDE444167CEC (void);
// 0x000001B9 System.Boolean UnityEngine.XR.ARSubsystems.XRFace::Equals(UnityEngine.XR.ARSubsystems.XRFace)
extern void XRFace_Equals_mF05C24C98D5E1ED344943307E03FE4776CCB4217 (void);
// 0x000001BA System.Void UnityEngine.XR.ARSubsystems.XRFace::.cctor()
extern void XRFace__cctor_mB148EA0217E4B6CAF9C7B40813197BE6AF917BA9 (void);
// 0x000001BB System.Void UnityEngine.XR.ARSubsystems.XRFaceMesh::Resize(System.Int32,System.Int32,UnityEngine.XR.ARSubsystems.XRFaceMesh/Attributes,Unity.Collections.Allocator)
extern void XRFaceMesh_Resize_m15BF7254A68B9910F518990A33CF037F310ED1E6 (void);
// 0x000001BC Unity.Collections.NativeArray`1<UnityEngine.Vector3> UnityEngine.XR.ARSubsystems.XRFaceMesh::get_vertices()
extern void XRFaceMesh_get_vertices_m19DE0A4E73ED17C8B6427BE86071E10DB65740DD (void);
// 0x000001BD Unity.Collections.NativeArray`1<UnityEngine.Vector3> UnityEngine.XR.ARSubsystems.XRFaceMesh::get_normals()
extern void XRFaceMesh_get_normals_m82DE916E7AE8A9BF4768D289E01CD0C65E1001ED (void);
// 0x000001BE Unity.Collections.NativeArray`1<System.Int32> UnityEngine.XR.ARSubsystems.XRFaceMesh::get_indices()
extern void XRFaceMesh_get_indices_m93B77F79BB4C67AF1AFFAD29ED8D8F48AF4616FE (void);
// 0x000001BF Unity.Collections.NativeArray`1<UnityEngine.Vector2> UnityEngine.XR.ARSubsystems.XRFaceMesh::get_uvs()
extern void XRFaceMesh_get_uvs_m89943E9CD34232EF09B81F13EF259C33F1183B49 (void);
// 0x000001C0 System.Void UnityEngine.XR.ARSubsystems.XRFaceMesh::Dispose()
extern void XRFaceMesh_Dispose_m84478F08EEB3D131E0E7785CF4195D424B94543E (void);
// 0x000001C1 System.Int32 UnityEngine.XR.ARSubsystems.XRFaceMesh::GetHashCode()
extern void XRFaceMesh_GetHashCode_mC53C827B010796E1A20690766F1A2A1F70DB614D (void);
// 0x000001C2 System.Boolean UnityEngine.XR.ARSubsystems.XRFaceMesh::Equals(System.Object)
extern void XRFaceMesh_Equals_mCAC3BFCE776A814088BA4D5361CB771BCC4BE87A (void);
// 0x000001C3 System.String UnityEngine.XR.ARSubsystems.XRFaceMesh::ToString()
extern void XRFaceMesh_ToString_m1997FC173A5BB7E5EFC51893E3BDD26D34F27897 (void);
// 0x000001C4 System.Boolean UnityEngine.XR.ARSubsystems.XRFaceMesh::Equals(UnityEngine.XR.ARSubsystems.XRFaceMesh)
extern void XRFaceMesh_Equals_m2BB9E69AD22C8521466B981BA077007536189F0C (void);
// 0x000001C5 System.Void UnityEngine.XR.ARSubsystems.XRFaceMesh::Resize(System.Int32,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<T>&,System.Boolean)
// 0x000001C6 System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystem::.ctor()
extern void XRFaceSubsystem__ctor_m25AB673DD168E2B5CDF6C90C8CD022AB8AA11D2A (void);
// 0x000001C7 System.Int32 UnityEngine.XR.ARSubsystems.XRFaceSubsystem::get_requestedMaximumFaceCount()
extern void XRFaceSubsystem_get_requestedMaximumFaceCount_m00EDD38267D87867256888B1BCB623DDA97E8ACD (void);
// 0x000001C8 System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystem::set_requestedMaximumFaceCount(System.Int32)
extern void XRFaceSubsystem_set_requestedMaximumFaceCount_mBA732F461FFA6C2B68CFECBBEB6E478F8ABB0DBB (void);
// 0x000001C9 System.Int32 UnityEngine.XR.ARSubsystems.XRFaceSubsystem::get_currentMaximumFaceCount()
extern void XRFaceSubsystem_get_currentMaximumFaceCount_m76FA130393463C6589D5CB03092661E7D05A86B9 (void);
// 0x000001CA System.Int32 UnityEngine.XR.ARSubsystems.XRFaceSubsystem::get_supportedFaceCount()
extern void XRFaceSubsystem_get_supportedFaceCount_m2A8A061F62963829A197C0C11383E4225B42EFC0 (void);
// 0x000001CB UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRFace> UnityEngine.XR.ARSubsystems.XRFaceSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRFaceSubsystem_GetChanges_mD7AEFDD237DD174A519AF11E8363BCCFC4C48953 (void);
// 0x000001CC System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystem::GetFaceMesh(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,UnityEngine.XR.ARSubsystems.XRFaceMesh&)
extern void XRFaceSubsystem_GetFaceMesh_m9D239EC1EE36EFC8CC755F469A2470FF5C856BD8 (void);
// 0x000001CD System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::GetFaceMesh(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,UnityEngine.XR.ARSubsystems.XRFaceMesh&)
extern void Provider_GetFaceMesh_m24F6E73C1A2C77979653AB19C8EE8EF939D80182 (void);
// 0x000001CE UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRFace> UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRFace,Unity.Collections.Allocator)
// 0x000001CF System.Int32 UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::get_supportedFaceCount()
extern void Provider_get_supportedFaceCount_m65269094A72BB234E7EF96ADEBF1EDB903FF5DEC (void);
// 0x000001D0 System.Int32 UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::get_requestedMaximumFaceCount()
extern void Provider_get_requestedMaximumFaceCount_m82A60F24B04B17866F4702686901B3D929FB47A0 (void);
// 0x000001D1 System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::set_requestedMaximumFaceCount(System.Int32)
extern void Provider_set_requestedMaximumFaceCount_mE8E2FDFE803518BBDB015E0CF8CA03E30E64169D (void);
// 0x000001D2 System.Int32 UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::get_currentMaximumFaceCount()
extern void Provider_get_currentMaximumFaceCount_m1BB7800FD410EA2FCE98AD32F0AA8A854749F1A5 (void);
// 0x000001D3 System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystem/Provider::.ctor()
extern void Provider__ctor_mD36F52D0D0CF48E1C950DAE67246AB8C42498DE5 (void);
// 0x000001D4 System.String UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_id()
extern void FaceSubsystemParams_get_id_mE2ED204CE1D85C4ADCFB4436EACF3BF8B6893DEB (void);
// 0x000001D5 System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_id(System.String)
extern void FaceSubsystemParams_set_id_m89149E2175F86663FDFEB008B36BDAF40EA1585A (void);
// 0x000001D6 System.Type UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_providerType()
extern void FaceSubsystemParams_get_providerType_m8984786E19DCC5F9B87060A9BC29F25A4A4A4B3A (void);
// 0x000001D7 System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_providerType(System.Type)
extern void FaceSubsystemParams_set_providerType_m5D660A72F34CA0D1C887F5BA68045B1D3973C7B3 (void);
// 0x000001D8 System.Type UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_subsystemTypeOverride()
extern void FaceSubsystemParams_get_subsystemTypeOverride_m1B3FD6EA4014688FC34533C9729176AA668C8321 (void);
// 0x000001D9 System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_subsystemTypeOverride(System.Type)
extern void FaceSubsystemParams_set_subsystemTypeOverride_mAC64FBAE73E16ACDA48708A4FFB77626437F8306 (void);
// 0x000001DA System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_supportsFacePose()
extern void FaceSubsystemParams_get_supportsFacePose_m59079DE37AD698A2132CFEA0EDA5FD4585FC6161 (void);
// 0x000001DB System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_supportsFacePose(System.Boolean)
extern void FaceSubsystemParams_set_supportsFacePose_mD799A27D00AC28F2E8228E7A3E38464B643BC99A (void);
// 0x000001DC System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_supportsFaceMeshVerticesAndIndices()
extern void FaceSubsystemParams_get_supportsFaceMeshVerticesAndIndices_mCC93952A6D71E81739E596CEB86A242CD6C9A8AF (void);
// 0x000001DD System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_supportsFaceMeshVerticesAndIndices(System.Boolean)
extern void FaceSubsystemParams_set_supportsFaceMeshVerticesAndIndices_mD137C1594ADBC51EC3017FDFAE248043C4CCBC75 (void);
// 0x000001DE System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_supportsFaceMeshUVs()
extern void FaceSubsystemParams_get_supportsFaceMeshUVs_m86C9DD63849FC891FE62F75B87E7BA894B506BBC (void);
// 0x000001DF System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_supportsFaceMeshUVs(System.Boolean)
extern void FaceSubsystemParams_set_supportsFaceMeshUVs_m9FFBE6EF8118BB7F4A0BA3B50249DA55ED52B39E (void);
// 0x000001E0 System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_supportsFaceMeshNormals()
extern void FaceSubsystemParams_get_supportsFaceMeshNormals_mB5897C36478E2B76A4491DA2C70C89B54AAB92DC (void);
// 0x000001E1 System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::get_supportsEyeTracking()
extern void FaceSubsystemParams_get_supportsEyeTracking_mC02E124E7C88BBE8BE1D6ABBBFD3C2C68DF2109F (void);
// 0x000001E2 System.Void UnityEngine.XR.ARSubsystems.FaceSubsystemParams::set_supportsEyeTracking(System.Boolean)
extern void FaceSubsystemParams_set_supportsEyeTracking_m52CC3ABEBE97C53ECBB91C0E4A86F388176C3645 (void);
// 0x000001E3 System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::Equals(UnityEngine.XR.ARSubsystems.FaceSubsystemParams)
extern void FaceSubsystemParams_Equals_mAC3B0F001EB7DC4968B350FCE682D21D3C10A4DC (void);
// 0x000001E4 System.Boolean UnityEngine.XR.ARSubsystems.FaceSubsystemParams::Equals(System.Object)
extern void FaceSubsystemParams_Equals_mFD36A65AEE79AE0A2C08525BB4AE5B99801CEE2A (void);
// 0x000001E5 System.Int32 UnityEngine.XR.ARSubsystems.FaceSubsystemParams::GetHashCode()
extern void FaceSubsystemParams_GetHashCode_m83F03C046AA998C73A317CAFBA4C97E2BA468786 (void);
// 0x000001E6 System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.FaceSubsystemParams)
extern void XRFaceSubsystemDescriptor__ctor_m1B6850C5017E4E5709D0D0A44B4605429C21DB5A (void);
// 0x000001E7 System.Boolean UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor::get_supportsEyeTracking()
extern void XRFaceSubsystemDescriptor_get_supportsEyeTracking_m509A2CDA04DA198E368A777CABF42B419D30017F (void);
// 0x000001E8 System.Void UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.FaceSubsystemParams)
extern void XRFaceSubsystemDescriptor_Create_mF8B2B433C3625242D3AEACDE1CD7F091BE8775BA (void);
// 0x000001E9 System.Guid UnityEngine.XR.ARSubsystems.GuidUtil::Compose(System.UInt64,System.UInt64)
extern void GuidUtil_Compose_m0EE004B20CD802F981C34180EFA91C39A9400DCB (void);
// 0x000001EA System.Int32 UnityEngine.XR.ARSubsystems.HashCode::Combine(System.Int32,System.Int32)
extern void HashCode_Combine_m23C951F115303C9E040D18947821969B602863FC (void);
// 0x000001EB System.Int32 UnityEngine.XR.ARSubsystems.HashCode::ReferenceHash(System.Object)
extern void HashCode_ReferenceHash_mE6CC6EA3C87D9F040876D66CF582D6FF68FC359C (void);
// 0x000001EC System.Int32 UnityEngine.XR.ARSubsystems.HashCode::Combine(System.Int32,System.Int32,System.Int32)
extern void HashCode_Combine_m18C3D10955CD71D976A5200FB0F5531F2F1F6BE1 (void);
// 0x000001ED System.Int32 UnityEngine.XR.ARSubsystems.HashCode::Combine(System.Int32,System.Int32,System.Int32,System.Int32)
extern void HashCode_Combine_mCF5A2D8E169AE770B379DCD8DE5229296453BD82 (void);
// 0x000001EE System.Int32 UnityEngine.XR.ARSubsystems.HashCode::Combine(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
extern void HashCode_Combine_m02E9A65274F198CF9266FDB496C74880155F9B94 (void);
// 0x000001EF System.Int32 UnityEngine.XR.ARSubsystems.HashCode::Combine(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
extern void HashCode_Combine_m11604D056548DE17CE3E26439850FA96C2ED1FBA (void);
// 0x000001F0 System.Int32 UnityEngine.XR.ARSubsystems.HashCode::Combine(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
extern void HashCode_Combine_m23E4B1C1DC69FC295EAA04B5AC0ABB8BE40ABC9F (void);
// 0x000001F1 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRHumanBody::get_trackableId()
extern void XRHumanBody_get_trackableId_m1132E7F157E2F1649C9849D0CCCFCCAE12659035 (void);
// 0x000001F2 System.Void UnityEngine.XR.ARSubsystems.XRHumanBody::set_trackableId(UnityEngine.XR.ARSubsystems.TrackableId)
extern void XRHumanBody_set_trackableId_mD3C8385C017B211CB843FBE09F865FCFF6736AD5 (void);
// 0x000001F3 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRHumanBody::get_pose()
extern void XRHumanBody_get_pose_m5F377842C281F643E6205DF173FAD26A71FD85CB (void);
// 0x000001F4 System.Void UnityEngine.XR.ARSubsystems.XRHumanBody::set_pose(UnityEngine.Pose)
extern void XRHumanBody_set_pose_m041B85CE78A0EEF68E9D04C79D5E896481521F13 (void);
// 0x000001F5 System.Single UnityEngine.XR.ARSubsystems.XRHumanBody::get_estimatedHeightScaleFactor()
extern void XRHumanBody_get_estimatedHeightScaleFactor_mCCF772B1264F243207D413D87F9DEB51BAA66625 (void);
// 0x000001F6 System.Void UnityEngine.XR.ARSubsystems.XRHumanBody::set_estimatedHeightScaleFactor(System.Single)
extern void XRHumanBody_set_estimatedHeightScaleFactor_m08C6119D250F4EC14458EF86245F41DE6480928B (void);
// 0x000001F7 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRHumanBody::get_trackingState()
extern void XRHumanBody_get_trackingState_m1F6F709DD208442C6E3B253BF1E6F5448B0D7913 (void);
// 0x000001F8 UnityEngine.XR.ARSubsystems.XRHumanBody UnityEngine.XR.ARSubsystems.XRHumanBody::get_defaultValue()
extern void XRHumanBody_get_defaultValue_m0A3A0C5BAFB5C20A12014597FA6690AE6470ACA4 (void);
// 0x000001F9 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBody::Equals(UnityEngine.XR.ARSubsystems.XRHumanBody)
extern void XRHumanBody_Equals_mF1FC1064B3CE595A1D798D2BC6A0A4441E06FEA0 (void);
// 0x000001FA System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBody::Equals(System.Object)
extern void XRHumanBody_Equals_mEF4C0F409A971526C9B7E8098F41FCF1B53B7F41 (void);
// 0x000001FB System.Int32 UnityEngine.XR.ARSubsystems.XRHumanBody::GetHashCode()
extern void XRHumanBody_GetHashCode_m6FBB44640B5771F3C0F07996B0391578ADA3ED29 (void);
// 0x000001FC System.Void UnityEngine.XR.ARSubsystems.XRHumanBody::.cctor()
extern void XRHumanBody__cctor_m4FFC7049EBDF2DF56F6B5A76B62B50467F8919BC (void);
// 0x000001FD System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodyJoint::get_tracked()
extern void XRHumanBodyJoint_get_tracked_mFE794D3F10CC9FE8B3BBA7EA3DAA2EAD43265030 (void);
// 0x000001FE System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodyJoint::Equals(UnityEngine.XR.ARSubsystems.XRHumanBodyJoint)
extern void XRHumanBodyJoint_Equals_mF61C132B282799A4A8591EEDFD1C93A5ACB5D690 (void);
// 0x000001FF System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodyJoint::Equals(System.Object)
extern void XRHumanBodyJoint_Equals_m4FC5F349868C29B492300324ECEA4327199724B5 (void);
// 0x00000200 System.Int32 UnityEngine.XR.ARSubsystems.XRHumanBodyJoint::GetHashCode()
extern void XRHumanBodyJoint_GetHashCode_mB2B4313B997EB976CF9A0621A8B0B41988F41FEC (void);
// 0x00000201 System.String UnityEngine.XR.ARSubsystems.XRHumanBodyJoint::ToString()
extern void XRHumanBodyJoint_ToString_m4A5CA8FD181EF51596129156F8B5D1714B23A0B8 (void);
// 0x00000202 System.String UnityEngine.XR.ARSubsystems.XRHumanBodyJoint::ToString(System.String)
extern void XRHumanBodyJoint_ToString_m9615CDC8865E5F53A0C1EFC11ED448D8E10517BA (void);
// 0x00000203 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint::get_tracked()
extern void XRHumanBodyPose2DJoint_get_tracked_m2482827731EF34E90A03BE36B02CD58DC4ED27BA (void);
// 0x00000204 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint::Equals(UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint)
extern void XRHumanBodyPose2DJoint_Equals_m13D561FB80FAB3235153ECAA81CDF0A1AB61EBE0 (void);
// 0x00000205 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint::Equals(System.Object)
extern void XRHumanBodyPose2DJoint_Equals_mFD1372A220FB78E1834F741C3C866AA7068614FA (void);
// 0x00000206 System.Int32 UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint::GetHashCode()
extern void XRHumanBodyPose2DJoint_GetHashCode_mA55B9AAABC7536E6C93C93F59F4DB417E95F721A (void);
// 0x00000207 System.String UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint::ToString()
extern void XRHumanBodyPose2DJoint_ToString_m0776D12ECE559F6F987CB879DC6578E4B69630F8 (void);
// 0x00000208 System.String UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint::ToString(System.String)
extern void XRHumanBodyPose2DJoint_ToString_m0AE3FBFE9BF812C8589AE2F567A79D756700256E (void);
// 0x00000209 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::get_pose2DRequested()
extern void XRHumanBodySubsystem_get_pose2DRequested_m73E73A18E279804D2F9CDDD368E57C60022D755D (void);
// 0x0000020A System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::set_pose2DRequested(System.Boolean)
extern void XRHumanBodySubsystem_set_pose2DRequested_mB49D7CDEFBAF72E3CF431020DE7DB129929DD36E (void);
// 0x0000020B System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::get_pose2DEnabled()
extern void XRHumanBodySubsystem_get_pose2DEnabled_m6E19D5A53F2E784D48041A5D5281067517517AF3 (void);
// 0x0000020C System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::get_pose3DRequested()
extern void XRHumanBodySubsystem_get_pose3DRequested_m1AE5F8B40EF1EF97520855EEE79375B3E588EF57 (void);
// 0x0000020D System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::set_pose3DRequested(System.Boolean)
extern void XRHumanBodySubsystem_set_pose3DRequested_m2AC0E39C301D9E6660395E8F295AE7A42779FA12 (void);
// 0x0000020E System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::get_pose3DEnabled()
extern void XRHumanBodySubsystem_get_pose3DEnabled_m887A68F14FEB4DC19008AC02FB16DC61FF55810A (void);
// 0x0000020F System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::get_pose3DScaleEstimationRequested()
extern void XRHumanBodySubsystem_get_pose3DScaleEstimationRequested_m9A5F9C0B857BDAE5C9D22A5E435DAFB436B2B00E (void);
// 0x00000210 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::set_pose3DScaleEstimationRequested(System.Boolean)
extern void XRHumanBodySubsystem_set_pose3DScaleEstimationRequested_mDA2701A18C56A380D9165719CD01D9F3B67FDD24 (void);
// 0x00000211 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::get_pose3DScaleEstimationEnabled()
extern void XRHumanBodySubsystem_get_pose3DScaleEstimationEnabled_mB8C1AB325556413A272D7A9C4E8E621F6946BD45 (void);
// 0x00000212 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::.ctor()
extern void XRHumanBodySubsystem__ctor_mF3C86058EA4CFF10DFE59744ACC2DB437B3F8E84 (void);
// 0x00000213 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRHumanBody> UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRHumanBodySubsystem_GetChanges_mED95DFB0CF28F2C75BF89565FD42C51FD22EB9F4 (void);
// 0x00000214 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::GetSkeleton(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRHumanBodyJoint>&)
extern void XRHumanBodySubsystem_GetSkeleton_m32DBE0ACF71FC569BDEE1E9E7CD2EF044757B4E8 (void);
// 0x00000215 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint> UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::GetHumanBodyPose2DJoints(Unity.Collections.Allocator)
extern void XRHumanBodySubsystem_GetHumanBodyPose2DJoints_m9A954E4080DBDEEAF5BA651E2F9837D091F05312 (void);
// 0x00000216 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem::Register(UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo)
extern void XRHumanBodySubsystem_Register_m6BB9F0962D03E5A76F3D7434D1F4161A51E7485B (void);
// 0x00000217 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::get_pose2DRequested()
extern void Provider_get_pose2DRequested_mE53D821039F6398BA705AE07E4A41F556436D25D (void);
// 0x00000218 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::set_pose2DRequested(System.Boolean)
extern void Provider_set_pose2DRequested_m27B9A484B65FE56A642599F71769CECD31F21B55 (void);
// 0x00000219 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::get_pose2DEnabled()
extern void Provider_get_pose2DEnabled_m918E7176255D12999485651F781725610C60EA67 (void);
// 0x0000021A System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::get_pose3DRequested()
extern void Provider_get_pose3DRequested_m8E70D9B91BE79C906E0AE63E3CCD17A163B0BD59 (void);
// 0x0000021B System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::set_pose3DRequested(System.Boolean)
extern void Provider_set_pose3DRequested_mCF7E233FEE430CE3B888B8E65D36E7EB8475697B (void);
// 0x0000021C System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::get_pose3DEnabled()
extern void Provider_get_pose3DEnabled_m50FF0EE2441930D442B21BDC740F759D37BB08BC (void);
// 0x0000021D System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::get_pose3DScaleEstimationRequested()
extern void Provider_get_pose3DScaleEstimationRequested_m16F65694B28BBC00084732C08C2DC484FEBEBB41 (void);
// 0x0000021E System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::set_pose3DScaleEstimationRequested(System.Boolean)
extern void Provider_set_pose3DScaleEstimationRequested_m33837BA93C947D63865DFCA7A83288498EAA8200 (void);
// 0x0000021F System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::get_pose3DScaleEstimationEnabled()
extern void Provider_get_pose3DScaleEstimationEnabled_mD6EDC5A88C7BBE729512E1F009785DA1E6ACE5E0 (void);
// 0x00000220 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRHumanBody> UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRHumanBody,Unity.Collections.Allocator)
// 0x00000221 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::GetSkeleton(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRHumanBodyJoint>&)
extern void Provider_GetSkeleton_mFFD5F2C114C2B8C3A8B54C10CFCF82F2D5C57868 (void);
// 0x00000222 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint> UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::GetHumanBodyPose2DJoints(UnityEngine.XR.ARSubsystems.XRHumanBodyPose2DJoint,System.Int32,System.Int32,UnityEngine.ScreenOrientation,Unity.Collections.Allocator)
extern void Provider_GetHumanBodyPose2DJoints_m9CBC5A20BCA6FEC12F844AEBCE285D978C859E00 (void);
// 0x00000223 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem/Provider::.ctor()
extern void Provider__ctor_mA98EFA82A2BD0B6E60094A95912A2CFF487D0252 (void);
// 0x00000224 System.String UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::get_id()
extern void XRHumanBodySubsystemCinfo_get_id_m6ECD1B43CC3A0BF83286383CA417ECAFB750CB74 (void);
// 0x00000225 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::set_id(System.String)
extern void XRHumanBodySubsystemCinfo_set_id_m379B96A2CE563FFD6CAC41112068975C8875B3A7 (void);
// 0x00000226 System.Type UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::get_providerType()
extern void XRHumanBodySubsystemCinfo_get_providerType_m9FEA7CEFDEEACC1D13C859C31A2325E50A6132DD (void);
// 0x00000227 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::set_providerType(System.Type)
extern void XRHumanBodySubsystemCinfo_set_providerType_mA34C98EF6EDDFADFF83C4062C0AF33F3C7BA61A5 (void);
// 0x00000228 System.Type UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::get_subsystemTypeOverride()
extern void XRHumanBodySubsystemCinfo_get_subsystemTypeOverride_mB03C7A5BC048D86AAE6334A221E1DF2FEE059754 (void);
// 0x00000229 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::set_subsystemTypeOverride(System.Type)
extern void XRHumanBodySubsystemCinfo_set_subsystemTypeOverride_m73A633BECC2393CEB62B95FCF9CD7B32BFDB19FF (void);
// 0x0000022A System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::get_supportsHumanBody2D()
extern void XRHumanBodySubsystemCinfo_get_supportsHumanBody2D_m26CC2FAAFF325E448010E9DFFDC2CF78C5118E71 (void);
// 0x0000022B System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::set_supportsHumanBody2D(System.Boolean)
extern void XRHumanBodySubsystemCinfo_set_supportsHumanBody2D_m33B2A01C8E5F61DFE604BDCD2D438EC0B3C45551 (void);
// 0x0000022C System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::get_supportsHumanBody3D()
extern void XRHumanBodySubsystemCinfo_get_supportsHumanBody3D_m43BFDC9F4E92ECDE599A826C24D951AF90D76331 (void);
// 0x0000022D System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::set_supportsHumanBody3D(System.Boolean)
extern void XRHumanBodySubsystemCinfo_set_supportsHumanBody3D_mE30720F10B501314868ABDBE2EDCE11D0A333D24 (void);
// 0x0000022E System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::get_supportsHumanBody3DScaleEstimation()
extern void XRHumanBodySubsystemCinfo_get_supportsHumanBody3DScaleEstimation_mDC1321982924ADE85F14D4AA959D2B593D378380 (void);
// 0x0000022F System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::set_supportsHumanBody3DScaleEstimation(System.Boolean)
extern void XRHumanBodySubsystemCinfo_set_supportsHumanBody3DScaleEstimation_m72411E882EB28AB5BD33F4D266918FA3DB355782 (void);
// 0x00000230 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::Equals(UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo)
extern void XRHumanBodySubsystemCinfo_Equals_m0109935097AF2BEE70F4AABB3B8701C50D300F2A (void);
// 0x00000231 System.Boolean UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::Equals(System.Object)
extern void XRHumanBodySubsystemCinfo_Equals_mC6D157C1801D45FFAA926C64D9C7AFFE6EDAC698 (void);
// 0x00000232 System.Int32 UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo::GetHashCode()
extern void XRHumanBodySubsystemCinfo_GetHashCode_m24E654BBE6D31E8A07F1B139BDEFF49BF4D77BAF (void);
// 0x00000233 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo)
extern void XRHumanBodySubsystemDescriptor__ctor_m9E59594DCE6AD50BFD4F71DCF1E5C2178EB0F6B6 (void);
// 0x00000234 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor::set_supportsHumanBody2D(System.Boolean)
extern void XRHumanBodySubsystemDescriptor_set_supportsHumanBody2D_m69569A3382D7FB0F2E2FE8DCEA0B0132F2746024 (void);
// 0x00000235 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor::set_supportsHumanBody3D(System.Boolean)
extern void XRHumanBodySubsystemDescriptor_set_supportsHumanBody3D_m379699D5A666066DDDFBEAA9BCC983EB81BC8AC6 (void);
// 0x00000236 System.Void UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor::set_supportsHumanBody3DScaleEstimation(System.Boolean)
extern void XRHumanBodySubsystemDescriptor_set_supportsHumanBody3DScaleEstimation_m1AA010D35D673EFBB060AEED35E04E6141453E81 (void);
// 0x00000237 UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemCinfo)
extern void XRHumanBodySubsystemDescriptor_Create_m2B95524971D41DDAC90B9E194A727C814BAB32C6 (void);
// 0x00000238 System.Void UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::.ctor(System.IntPtr,Unity.Jobs.JobHandle,UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary)
extern void AddReferenceImageJobState__ctor_mAFC8E35811BAF9292B00B7D06EF4C6895AFDD74C (void);
// 0x00000239 Unity.Jobs.JobHandle UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::get_jobHandle()
extern void AddReferenceImageJobState_get_jobHandle_mD67B6C7B795C0EAAF2B27C2C23A0CDF0597DDD41 (void);
// 0x0000023A System.IntPtr UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::AsIntPtr()
extern void AddReferenceImageJobState_AsIntPtr_m3918B9BEE2FA6B991CFA1BE13F1B211656B8A78B (void);
// 0x0000023B System.IntPtr UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::op_Explicit(UnityEngine.XR.ARSubsystems.AddReferenceImageJobState)
extern void AddReferenceImageJobState_op_Explicit_m5B74AEF81E3819FFD5FA03BA1A125DA19CFF32D0 (void);
// 0x0000023C UnityEngine.XR.ARSubsystems.AddReferenceImageJobStatus UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::get_status()
extern void AddReferenceImageJobState_get_status_mEB3B5CAB4B567D06A94B438A171D4F21F335D850 (void);
// 0x0000023D System.String UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::ToString()
extern void AddReferenceImageJobState_ToString_mF0C9F0307F13953D372C0BA03F3DFFAC3DE6E912 (void);
// 0x0000023E System.Int32 UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::GetHashCode()
extern void AddReferenceImageJobState_GetHashCode_m7A9EFB3628AFD98DE738E0766DD6267C90303E47 (void);
// 0x0000023F System.Boolean UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::Equals(System.Object)
extern void AddReferenceImageJobState_Equals_m2B2E0068F7BDF4DB619306E672D9B4FDF1AAD495 (void);
// 0x00000240 System.Boolean UnityEngine.XR.ARSubsystems.AddReferenceImageJobState::Equals(UnityEngine.XR.ARSubsystems.AddReferenceImageJobState)
extern void AddReferenceImageJobState_Equals_mDF37DF091DA56B8CFD7EF4AE078984D7A4072AB5 (void);
// 0x00000241 Unity.Jobs.JobHandle UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::ScheduleAddImageJobImpl(Unity.Collections.NativeSlice`1<System.Byte>,UnityEngine.Vector2Int,UnityEngine.TextureFormat,UnityEngine.XR.ARSubsystems.XRReferenceImage,Unity.Jobs.JobHandle)
// 0x00000242 UnityEngine.XR.ARSubsystems.AddReferenceImageJobState UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::CreateAddJobState(System.IntPtr,Unity.Jobs.JobHandle)
extern void MutableRuntimeReferenceImageLibrary_CreateAddJobState_m27F387722EE946B2B1555C1384B6659E2D884481 (void);
// 0x00000243 UnityEngine.XR.ARSubsystems.AddReferenceImageJobStatus UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::GetAddReferenceImageJobStatus(UnityEngine.XR.ARSubsystems.AddReferenceImageJobState)
extern void MutableRuntimeReferenceImageLibrary_GetAddReferenceImageJobStatus_mEE3EB04E40A6295FAD73C3FD08F622A629915315 (void);
// 0x00000244 System.Boolean UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::get_supportsValidation()
extern void MutableRuntimeReferenceImageLibrary_get_supportsValidation_m7C3934A7F0CD1947D9E6129372DBC3E4B6030618 (void);
// 0x00000245 UnityEngine.XR.ARSubsystems.AddReferenceImageJobState UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::ScheduleAddImageWithValidationJobImpl(Unity.Collections.NativeSlice`1<System.Byte>,UnityEngine.Vector2Int,UnityEngine.TextureFormat,UnityEngine.XR.ARSubsystems.XRReferenceImage,Unity.Jobs.JobHandle)
extern void MutableRuntimeReferenceImageLibrary_ScheduleAddImageWithValidationJobImpl_m781DB083DCFA8F856F48773BC38086A6DBBA55DF (void);
// 0x00000246 UnityEngine.XR.ARSubsystems.AddReferenceImageJobState UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::ScheduleAddImageWithValidationJob(Unity.Collections.NativeSlice`1<System.Byte>,UnityEngine.Vector2Int,UnityEngine.TextureFormat,UnityEngine.XR.ARSubsystems.XRReferenceImage,Unity.Jobs.JobHandle)
extern void MutableRuntimeReferenceImageLibrary_ScheduleAddImageWithValidationJob_mB3FBB676D62AA027A7041ECA0434857986F94473 (void);
// 0x00000247 System.Void UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::ValidateAndThrow(Unity.Collections.NativeSlice`1<System.Byte>,UnityEngine.Vector2Int,UnityEngine.TextureFormat,UnityEngine.XR.ARSubsystems.XRReferenceImage&)
extern void MutableRuntimeReferenceImageLibrary_ValidateAndThrow_mF2EB8580B66B035A33F2F8E61957EC1BFD16B1C6 (void);
// 0x00000248 System.Int32 UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::get_supportedTextureFormatCount()
// 0x00000249 UnityEngine.TextureFormat UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::GetSupportedTextureFormatAtImpl(System.Int32)
// 0x0000024A System.Boolean UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::IsTextureFormatSupported(UnityEngine.TextureFormat)
extern void MutableRuntimeReferenceImageLibrary_IsTextureFormatSupported_m487AD78AC89C314E106AB9D84E702FD5310F76B9 (void);
// 0x0000024B UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::GetEnumerator()
extern void MutableRuntimeReferenceImageLibrary_GetEnumerator_m75BBAD1CD5A618626AFFD2BA789BACC9B912729D (void);
// 0x0000024C UnityEngine.XR.ARSubsystems.SerializableGuid UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::GenerateNewGuid()
extern void MutableRuntimeReferenceImageLibrary_GenerateNewGuid_m860BB18E71B6B1DC40530F33333AE0477097E7E0 (void);
// 0x0000024D System.Void UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary::.ctor()
extern void MutableRuntimeReferenceImageLibrary__ctor_m9555E1EE4D2E8D6F7C120329D1937B0C91D99969 (void);
// 0x0000024E System.Void UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator::.ctor(UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary)
extern void Enumerator__ctor_m614C5DEAACB06ED98FFE5BBE716D9F16124A4F81 (void);
// 0x0000024F System.Boolean UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator::MoveNext()
extern void Enumerator_MoveNext_m2B35A4EE1CF9A5E1EA6B97AEDFAED2CC7F99D3C5 (void);
// 0x00000250 UnityEngine.XR.ARSubsystems.XRReferenceImage UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator::get_Current()
extern void Enumerator_get_Current_m5C9F6233409C9A2321C6CB831457C55C4FCB4570 (void);
// 0x00000251 System.Int32 UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator::GetHashCode()
extern void Enumerator_GetHashCode_mB41365E33A4AC2A52659D36571BBCE9BC93C2546 (void);
// 0x00000252 System.Boolean UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator::Equals(System.Object)
extern void Enumerator_Equals_m5A39AA8617AA067134152ED2D95037C914B42AF4 (void);
// 0x00000253 System.Boolean UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator::Equals(UnityEngine.XR.ARSubsystems.MutableRuntimeReferenceImageLibrary/Enumerator)
extern void Enumerator_Equals_mCBAAE58B6FD7DBD90F3C98F10F06C777E5781A98 (void);
// 0x00000254 UnityEngine.XR.ARSubsystems.XRReferenceImage UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary::get_Item(System.Int32)
extern void RuntimeReferenceImageLibrary_get_Item_mEB525ED69F54BD63CE3942B99521D4D1E04B6CBB (void);
// 0x00000255 System.Int32 UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary::get_count()
// 0x00000256 UnityEngine.XR.ARSubsystems.XRReferenceImage UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary::GetReferenceImageAt(System.Int32)
// 0x00000257 System.Void UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary::.ctor()
extern void RuntimeReferenceImageLibrary__ctor_m24529C1F2AF8B3A8358098F220E770116883A299 (void);
// 0x00000258 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::.ctor()
extern void XRImageTrackingSubsystem__ctor_m411C7B39B354BFB6468A5450B91D63A46CAC3A52 (void);
// 0x00000259 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::OnStart()
extern void XRImageTrackingSubsystem_OnStart_mAF567D3768F78146ED8BAC36632AC093E6BF80A2 (void);
// 0x0000025A System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::OnStop()
extern void XRImageTrackingSubsystem_OnStop_mDC92A8E24CDCBA4AAF645A364450805AA2CAFFC1 (void);
// 0x0000025B UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::get_imageLibrary()
extern void XRImageTrackingSubsystem_get_imageLibrary_mAD310B2D70021A61FCD0BA2C75359BABD31EF8B0 (void);
// 0x0000025C System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::set_imageLibrary(UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary)
extern void XRImageTrackingSubsystem_set_imageLibrary_m59E1F17C158BF96B79D15189DBA63B89A4C796A6 (void);
// 0x0000025D UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::CreateRuntimeLibrary(UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary)
extern void XRImageTrackingSubsystem_CreateRuntimeLibrary_mB44F6478C6920F919C856084AC89E96ED5A543CC (void);
// 0x0000025E UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRTrackedImage> UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRImageTrackingSubsystem_GetChanges_m9C289E6EF04C2D66CD8FCF6D9B594995899991DB (void);
// 0x0000025F System.Int32 UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::get_requestedMaxNumberOfMovingImages()
extern void XRImageTrackingSubsystem_get_requestedMaxNumberOfMovingImages_mFAD0E8FF06634759EE07E7986DB6130CE44FD1F8 (void);
// 0x00000260 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::set_requestedMaxNumberOfMovingImages(System.Int32)
extern void XRImageTrackingSubsystem_set_requestedMaxNumberOfMovingImages_m3A2C00B07693B0445E82F2DD9CACCD2395B258AB (void);
// 0x00000261 System.Int32 UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem::get_currentMaxNumberOfMovingImages()
extern void XRImageTrackingSubsystem_get_currentMaxNumberOfMovingImages_mEB66351CADBB5E4765485A91654E3789E6087E53 (void);
// 0x00000262 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRTrackedImage> UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRTrackedImage,Unity.Collections.Allocator)
// 0x00000263 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::set_imageLibrary(UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary)
// 0x00000264 UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::CreateRuntimeLibrary(UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary)
// 0x00000265 System.Int32 UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::get_requestedMaxNumberOfMovingImages()
extern void Provider_get_requestedMaxNumberOfMovingImages_m2D611F3D46EFE004FA5A5466FEED0501CBAF2E0A (void);
// 0x00000266 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::set_requestedMaxNumberOfMovingImages(System.Int32)
extern void Provider_set_requestedMaxNumberOfMovingImages_mCEC5839726AA69CAD5ED6F831170D2B7EDD7567F (void);
// 0x00000267 System.Int32 UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::get_currentMaxNumberOfMovingImages()
extern void Provider_get_currentMaxNumberOfMovingImages_mFFDD62A1C522FD69A89FD71E2CCA909B265B4AF7 (void);
// 0x00000268 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem/Provider::.ctor()
extern void Provider__ctor_mE0C779A245EE703B26578F529ABFD6F18E002AC0 (void);
// 0x00000269 System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor::get_supportsMovingImages()
extern void XRImageTrackingSubsystemDescriptor_get_supportsMovingImages_m7100D7317E24CAC9D353C4FBDEAE2C3BCE6E6D4F (void);
// 0x0000026A System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo)
extern void XRImageTrackingSubsystemDescriptor_Create_m3B9A00008CACA91AEC367F5D5EC19E57EA3D22A1 (void);
// 0x0000026B System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo)
extern void XRImageTrackingSubsystemDescriptor__ctor_m2A19512EFC73A1237D84A4DFAB41683FB03D6D55 (void);
// 0x0000026C System.String UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_id()
extern void Cinfo_get_id_m7ACB39F94D161A19473B51245A60F0FE3380E9C6 (void);
// 0x0000026D System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_id(System.String)
extern void Cinfo_set_id_m57970CF355AB638BAD860B9673F0E76B42126C1A (void);
// 0x0000026E System.Type UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_providerType()
extern void Cinfo_get_providerType_m865B26BBCBE9E542D09269A2CA6BD1FC47976AF2 (void);
// 0x0000026F System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_providerType(System.Type)
extern void Cinfo_set_providerType_mCACA6EC48AB4B305E1515A312B32DC196AD9B92C (void);
// 0x00000270 System.Type UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_subsystemTypeOverride()
extern void Cinfo_get_subsystemTypeOverride_m0008239CE298C4881102FED287EC52224601A3A5 (void);
// 0x00000271 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_subsystemTypeOverride(System.Type)
extern void Cinfo_set_subsystemTypeOverride_m167DE9461D1FE4E4D8AB0EE25A7A4B0A947151D8 (void);
// 0x00000272 System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_supportsMovingImages()
extern void Cinfo_get_supportsMovingImages_m7B1E2171F1304A73339266B64548CF305EFEEA91 (void);
// 0x00000273 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_supportsMovingImages(System.Boolean)
extern void Cinfo_set_supportsMovingImages_m04BB57385FC0A2025414437DB1BEFBE97372E579 (void);
// 0x00000274 System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_requiresPhysicalImageDimensions()
extern void Cinfo_get_requiresPhysicalImageDimensions_mEED8602BF9D390F19582D3F706A9C93333AFB0C7 (void);
// 0x00000275 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_requiresPhysicalImageDimensions(System.Boolean)
extern void Cinfo_set_requiresPhysicalImageDimensions_mC794914720C62ACB74173F165B3015ED9B5CA2A6 (void);
// 0x00000276 System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_supportsMutableLibrary()
extern void Cinfo_get_supportsMutableLibrary_mCD0988DBB5810975CB97BEDD9B2E6B6C168D6E19 (void);
// 0x00000277 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_supportsMutableLibrary(System.Boolean)
extern void Cinfo_set_supportsMutableLibrary_m434D9A05D0025989AA711BA50139FD348D127661 (void);
// 0x00000278 System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::get_supportsImageValidation()
extern void Cinfo_get_supportsImageValidation_m417DC16FCA795DB24C8CAA2C81A5E84855D077BD (void);
// 0x00000279 System.Void UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::set_supportsImageValidation(System.Boolean)
extern void Cinfo_set_supportsImageValidation_m9CA1173736665E4DC3B594EE3357416A8A20B266 (void);
// 0x0000027A System.Int32 UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_m8DB95DB86F786705B32382E014B3A5B96F81F4B0 (void);
// 0x0000027B System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo)
extern void Cinfo_Equals_m2D882FB6E58A034244EC05B2701C303C0763C3C1 (void);
// 0x0000027C System.Boolean UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystemDescriptor/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m7D227238D404DAA7ED5C72A9C3843FE6CB852ED4 (void);
// 0x0000027D System.Void UnityEngine.XR.ARSubsystems.XRReferenceImage::.ctor(UnityEngine.XR.ARSubsystems.SerializableGuid,UnityEngine.XR.ARSubsystems.SerializableGuid,System.Nullable`1<UnityEngine.Vector2>,System.String,UnityEngine.Texture2D)
extern void XRReferenceImage__ctor_m6D6343387F201C296D5D28E2A90D4BB1E83CDBDF (void);
// 0x0000027E System.Guid UnityEngine.XR.ARSubsystems.XRReferenceImage::get_guid()
extern void XRReferenceImage_get_guid_m1C4FCDF5CE4DB41074E50AB2B3D8B4A20CE290BE (void);
// 0x0000027F System.Guid UnityEngine.XR.ARSubsystems.XRReferenceImage::get_textureGuid()
extern void XRReferenceImage_get_textureGuid_mDABB849D0FAF44F4FD86B6D794706DC6667A732F (void);
// 0x00000280 System.Boolean UnityEngine.XR.ARSubsystems.XRReferenceImage::get_specifySize()
extern void XRReferenceImage_get_specifySize_mAC02B5D0DBF9D66C2668206B7603C58149EE7D8B (void);
// 0x00000281 UnityEngine.Vector2 UnityEngine.XR.ARSubsystems.XRReferenceImage::get_size()
extern void XRReferenceImage_get_size_m135B7EF1ED61FE27A8793503E8FC84543642C166 (void);
// 0x00000282 System.String UnityEngine.XR.ARSubsystems.XRReferenceImage::get_name()
extern void XRReferenceImage_get_name_mE8F3368C2587552333AB78EA72A02E5B73E355C7 (void);
// 0x00000283 UnityEngine.Texture2D UnityEngine.XR.ARSubsystems.XRReferenceImage::get_texture()
extern void XRReferenceImage_get_texture_mA66A0D26E463C232CA008D5F44A23F9D0AA838B1 (void);
// 0x00000284 System.String UnityEngine.XR.ARSubsystems.XRReferenceImage::ToString()
extern void XRReferenceImage_ToString_mF01AB8377D55DC49917B09F0C12A6B02BD5BEE78 (void);
// 0x00000285 System.Int32 UnityEngine.XR.ARSubsystems.XRReferenceImage::GetHashCode()
extern void XRReferenceImage_GetHashCode_m04CE90A2F730C6030216560645C2FD3A81C42985 (void);
// 0x00000286 System.Boolean UnityEngine.XR.ARSubsystems.XRReferenceImage::Equals(System.Object)
extern void XRReferenceImage_Equals_m85D0F3511051929A1F06F75CE015DA98934BC211 (void);
// 0x00000287 System.Boolean UnityEngine.XR.ARSubsystems.XRReferenceImage::Equals(UnityEngine.XR.ARSubsystems.XRReferenceImage)
extern void XRReferenceImage_Equals_m8F01D42083D0F6155DEDA29D457A0EDA600629AB (void);
// 0x00000288 System.Int32 UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary::get_count()
extern void XRReferenceImageLibrary_get_count_m23E1EA6C92988B7A11A51D532F4630CB7DE513BD (void);
// 0x00000289 System.Collections.Generic.List`1/Enumerator<UnityEngine.XR.ARSubsystems.XRReferenceImage> UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary::GetEnumerator()
extern void XRReferenceImageLibrary_GetEnumerator_m95EFD96B0750E15CF00C4B47B7DF3E2961F2183C (void);
// 0x0000028A UnityEngine.XR.ARSubsystems.XRReferenceImage UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary::get_Item(System.Int32)
extern void XRReferenceImageLibrary_get_Item_mBA540DAACBCA13289FA41DD2291435CBFE2F00F9 (void);
// 0x0000028B System.Int32 UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary::indexOf(UnityEngine.XR.ARSubsystems.XRReferenceImage)
extern void XRReferenceImageLibrary_indexOf_m1E9DB6343C72280F3837B3F41C1D7C455EAFA4D4 (void);
// 0x0000028C System.Guid UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary::get_guid()
extern void XRReferenceImageLibrary_get_guid_m1B80F372AE1175A697DBA4C7F48F2E010DE0670C (void);
// 0x0000028D System.Void UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary::.ctor()
extern void XRReferenceImageLibrary__ctor_m165A9ED1DC448CA4413E2055E7A8BA325FB9FF4C (void);
// 0x0000028E UnityEngine.XR.ARSubsystems.XRTrackedImage UnityEngine.XR.ARSubsystems.XRTrackedImage::get_defaultValue()
extern void XRTrackedImage_get_defaultValue_mF1D23DA4557C85FAEB70039F5D14156F1176E84E (void);
// 0x0000028F UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRTrackedImage::get_trackableId()
extern void XRTrackedImage_get_trackableId_m908642D8D46876C10767B693C55A4076AA0230D6 (void);
// 0x00000290 System.Guid UnityEngine.XR.ARSubsystems.XRTrackedImage::get_sourceImageId()
extern void XRTrackedImage_get_sourceImageId_m7840008F6FBB7242723DBA7ADB29411BF199B063 (void);
// 0x00000291 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRTrackedImage::get_pose()
extern void XRTrackedImage_get_pose_m2DA4B57E9B5317F353B2766538088CFF8991DAB1 (void);
// 0x00000292 UnityEngine.Vector2 UnityEngine.XR.ARSubsystems.XRTrackedImage::get_size()
extern void XRTrackedImage_get_size_mBDB5B8715E7C74B9459198230517668BD215E75F (void);
// 0x00000293 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRTrackedImage::get_trackingState()
extern void XRTrackedImage_get_trackingState_m7ADAE68E0B5A3D253B1E086276EE5BC5D9768E71 (void);
// 0x00000294 System.IntPtr UnityEngine.XR.ARSubsystems.XRTrackedImage::get_nativePtr()
extern void XRTrackedImage_get_nativePtr_mF92D042188F2FF5DADA33AB61235DC6CD874B202 (void);
// 0x00000295 System.Int32 UnityEngine.XR.ARSubsystems.XRTrackedImage::GetHashCode()
extern void XRTrackedImage_GetHashCode_m312EB4C09316425C0F30B8988A915F647035846B (void);
// 0x00000296 System.Boolean UnityEngine.XR.ARSubsystems.XRTrackedImage::Equals(UnityEngine.XR.ARSubsystems.XRTrackedImage)
extern void XRTrackedImage_Equals_mFE06306D9BB3EBD3C7CCDD555A2F193ED4FE7D65 (void);
// 0x00000297 System.Boolean UnityEngine.XR.ARSubsystems.XRTrackedImage::Equals(System.Object)
extern void XRTrackedImage_Equals_m953C1CFB9A3879975873D13E24071F51C772635A (void);
// 0x00000298 System.Void UnityEngine.XR.ARSubsystems.XRTrackedImage::.cctor()
extern void XRTrackedImage__cctor_mE7FFB610B77B6A729504D17C98C52C09522FDDEA (void);
// 0x00000299 Unity.Collections.NativeArray`1<T> UnityEngine.XR.ARSubsystems.NativeCopyUtility::PtrToNativeArrayWithDefault(T,System.Void*,System.Int32,System.Int32,Unity.Collections.Allocator)
// 0x0000029A System.Void UnityEngine.XR.ARSubsystems.NativeCopyUtility::FillArrayWithValue(Unity.Collections.NativeArray`1<T>,T)
// 0x0000029B Unity.Collections.NativeArray`1<T> UnityEngine.XR.ARSubsystems.NativeCopyUtility::CreateArrayFilledWithValue(T,System.Int32,Unity.Collections.Allocator)
// 0x0000029C System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem::.ctor()
extern void XRObjectTrackingSubsystem__ctor_m75C4A1A4820B9795DEF1CAED15ACC38796F76BDD (void);
// 0x0000029D System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem::OnStart()
extern void XRObjectTrackingSubsystem_OnStart_mB77ED7DD295528980E011D223BC257725DF63FB5 (void);
// 0x0000029E System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem::set_library(UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary)
extern void XRObjectTrackingSubsystem_set_library_m79D43E82F0D5AD3B58B152275B3375100D40C32C (void);
// 0x0000029F System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem::OnStop()
extern void XRObjectTrackingSubsystem_OnStop_m4E912083A59608102AA2C7B1A3A2695395575A2C (void);
// 0x000002A0 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRTrackedObject> UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRObjectTrackingSubsystem_GetChanges_m3223798AE3E84E31C63CFCB01E719FFE734EB7E8 (void);
// 0x000002A1 System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem::Register(System.String,UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities)
// 0x000002A2 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRTrackedObject> UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRTrackedObject,Unity.Collections.Allocator)
// 0x000002A3 System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem/Provider::set_library(UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary)
extern void Provider_set_library_mD6AF0A985F82F44B04BCA8C9BF3D053E8FF0CD86 (void);
// 0x000002A4 System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem/Provider::.ctor()
extern void Provider__ctor_m8E2A200EE478D4971BDAE03A8E40C9A0C7DBF576 (void);
// 0x000002A5 System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor::set_capabilities(UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities)
extern void XRObjectTrackingSubsystemDescriptor_set_capabilities_m0ACF0721272F505AC624521AF7FA03C87033D759 (void);
// 0x000002A6 System.Void UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor::.ctor(System.String,System.Type,System.Type,UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities)
extern void XRObjectTrackingSubsystemDescriptor__ctor_mE44B346A0A5A035B7DFC7430336DDADED7A4F6A5 (void);
// 0x000002A7 System.Boolean UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities::Equals(UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities)
extern void Capabilities_Equals_m921C39E9F8B9A589D30635AF4D55428F9A48E9F7 (void);
// 0x000002A8 System.Boolean UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities::Equals(System.Object)
extern void Capabilities_Equals_mBC54D72E0218CDA4D42F66F1B93C98E3FCC6F509 (void);
// 0x000002A9 System.Int32 UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystemDescriptor/Capabilities::GetHashCode()
extern void Capabilities_GetHashCode_m2CC9C750B6796CBBC10A34C6E42040FCF9626FBF (void);
// 0x000002AA System.Guid UnityEngine.XR.ARSubsystems.XRReferenceObject::get_guid()
extern void XRReferenceObject_get_guid_m5D1CC7D28AEF760CC4C8E7AEAE550549C879E204 (void);
// 0x000002AB System.Boolean UnityEngine.XR.ARSubsystems.XRReferenceObject::Equals(UnityEngine.XR.ARSubsystems.XRReferenceObject)
extern void XRReferenceObject_Equals_mE5200369D784FC38ACF7C16EAAC303D845B5F1B4 (void);
// 0x000002AC System.Int32 UnityEngine.XR.ARSubsystems.XRReferenceObject::GetHashCode()
extern void XRReferenceObject_GetHashCode_m088BCD3E046B562DDD8CBFB25AEBF9C5747E2A7C (void);
// 0x000002AD System.Boolean UnityEngine.XR.ARSubsystems.XRReferenceObject::Equals(System.Object)
extern void XRReferenceObject_Equals_m63933178BE0E783B54B6A983BD3B5ADDF0817ADA (void);
// 0x000002AE System.Void UnityEngine.XR.ARSubsystems.XRReferenceObjectEntry::.ctor()
extern void XRReferenceObjectEntry__ctor_m83901C9E2F4E96DE96A5B2C1940A4A26FA1D54CB (void);
// 0x000002AF System.Int32 UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary::get_count()
extern void XRReferenceObjectLibrary_get_count_mEF484EA0E2C038259FE773DC915B3EF49B4F1C1A (void);
// 0x000002B0 System.Collections.Generic.List`1/Enumerator<UnityEngine.XR.ARSubsystems.XRReferenceObject> UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary::GetEnumerator()
extern void XRReferenceObjectLibrary_GetEnumerator_mCCCCFBD0A4F304D789401FD7EF3938193190B4AF (void);
// 0x000002B1 UnityEngine.XR.ARSubsystems.XRReferenceObject UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary::get_Item(System.Int32)
extern void XRReferenceObjectLibrary_get_Item_m08D1081C37C23D5ECAD98FD63A5E6B4363D3B96D (void);
// 0x000002B2 System.Guid UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary::get_guid()
extern void XRReferenceObjectLibrary_get_guid_m47C1EC317BB367A2C7B631E20D0755C617F23728 (void);
// 0x000002B3 System.Int32 UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary::indexOf(UnityEngine.XR.ARSubsystems.XRReferenceObject)
extern void XRReferenceObjectLibrary_indexOf_m723FA9F0217C8122BDA75AAFB36EB622FA46DABD (void);
// 0x000002B4 System.Void UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary::.ctor()
extern void XRReferenceObjectLibrary__ctor_m4FA11F97BB6F008011D76A38C1DFD1DD76CA616D (void);
// 0x000002B5 UnityEngine.XR.ARSubsystems.XRTrackedObject UnityEngine.XR.ARSubsystems.XRTrackedObject::get_defaultValue()
extern void XRTrackedObject_get_defaultValue_m3AC573CBE63C302081874718C743040E3A8C3F89 (void);
// 0x000002B6 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRTrackedObject::get_trackableId()
extern void XRTrackedObject_get_trackableId_mB62A1367121F404E7E641459F7A2DE4A35801E72 (void);
// 0x000002B7 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRTrackedObject::get_pose()
extern void XRTrackedObject_get_pose_mCF3749FD97A427BF58737E1F72C958B688BF4B14 (void);
// 0x000002B8 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRTrackedObject::get_trackingState()
extern void XRTrackedObject_get_trackingState_m33C9F81469B2E6174337D76F6109B79B03975349 (void);
// 0x000002B9 System.IntPtr UnityEngine.XR.ARSubsystems.XRTrackedObject::get_nativePtr()
extern void XRTrackedObject_get_nativePtr_m13B4B110BB339AF7AF03B1219247112B4ABB38D8 (void);
// 0x000002BA System.Guid UnityEngine.XR.ARSubsystems.XRTrackedObject::get_referenceObjectGuid()
extern void XRTrackedObject_get_referenceObjectGuid_m277B42932D6C8D42820F47A888407FBE9B0A7436 (void);
// 0x000002BB System.Boolean UnityEngine.XR.ARSubsystems.XRTrackedObject::Equals(System.Object)
extern void XRTrackedObject_Equals_m20B63BFBF61F3D819390A5A574B9916CCE0A7F8B (void);
// 0x000002BC System.Int32 UnityEngine.XR.ARSubsystems.XRTrackedObject::GetHashCode()
extern void XRTrackedObject_GetHashCode_m0456DF4A009ED3B00F2036F603881D9DB74EDAF9 (void);
// 0x000002BD System.Boolean UnityEngine.XR.ARSubsystems.XRTrackedObject::Equals(UnityEngine.XR.ARSubsystems.XRTrackedObject)
extern void XRTrackedObject_Equals_mAA87562E27ABE20500A8537F56A551B584A551C5 (void);
// 0x000002BE System.Void UnityEngine.XR.ARSubsystems.XRTrackedObject::.cctor()
extern void XRTrackedObject__cctor_m814A8B4D6D86DE23C211495A7B14F2F8CE172886 (void);
// 0x000002BF System.Boolean UnityEngine.XR.ARSubsystems.EnvironmentDepthModeExtension::Enabled(UnityEngine.XR.ARSubsystems.EnvironmentDepthMode)
extern void EnvironmentDepthModeExtension_Enabled_m0EDEFDC74670F5F0B499BD2E315715C424077C12 (void);
// 0x000002C0 System.Boolean UnityEngine.XR.ARSubsystems.SegmentationDepthModeExtension::Enabled(UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode)
extern void SegmentationDepthModeExtension_Enabled_m3934709EF5C4CCD661E0188C103280BD96F1D9C6 (void);
// 0x000002C1 System.Boolean UnityEngine.XR.ARSubsystems.SegmentationStencilModeExtension::Enabled(UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode)
extern void SegmentationStencilModeExtension_Enabled_m8C420BAE2C6604ADCAD803BA36C2C78954B5F71E (void);
// 0x000002C2 UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_requestedHumanStencilMode()
extern void XROcclusionSubsystem_get_requestedHumanStencilMode_mC9DCDE40A92C5EE7B7A31B8B9232F5B0BDE514E2 (void);
// 0x000002C3 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::set_requestedHumanStencilMode(UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode)
extern void XROcclusionSubsystem_set_requestedHumanStencilMode_mF67D59B3C057AF7E9FA335280AB8EFDBA2F8F18F (void);
// 0x000002C4 UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_currentHumanStencilMode()
extern void XROcclusionSubsystem_get_currentHumanStencilMode_m3F1F5440848EEEBFF72F66B6D526845A62DBC057 (void);
// 0x000002C5 UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_requestedHumanDepthMode()
extern void XROcclusionSubsystem_get_requestedHumanDepthMode_m0F6A88E6DC1CD2498CACAAD4D47345C35763B1BE (void);
// 0x000002C6 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::set_requestedHumanDepthMode(UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode)
extern void XROcclusionSubsystem_set_requestedHumanDepthMode_m98BC4A743EF49123DAA52F0969F8542B7DB47026 (void);
// 0x000002C7 UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_currentHumanDepthMode()
extern void XROcclusionSubsystem_get_currentHumanDepthMode_mE04B8DE686090CCE3E783C832EB6DE97FA224A17 (void);
// 0x000002C8 UnityEngine.XR.ARSubsystems.EnvironmentDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_requestedEnvironmentDepthMode()
extern void XROcclusionSubsystem_get_requestedEnvironmentDepthMode_m85FD96A6A87B4BFFA51F5AFE482442FACBEF01C1 (void);
// 0x000002C9 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::set_requestedEnvironmentDepthMode(UnityEngine.XR.ARSubsystems.EnvironmentDepthMode)
extern void XROcclusionSubsystem_set_requestedEnvironmentDepthMode_m98D933939F4684B4258C233C385D756AF6B4C8F2 (void);
// 0x000002CA UnityEngine.XR.ARSubsystems.EnvironmentDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_currentEnvironmentDepthMode()
extern void XROcclusionSubsystem_get_currentEnvironmentDepthMode_mB34A8639579D93BA74493C29C44BCAD24C5DDA5E (void);
// 0x000002CB UnityEngine.XR.ARSubsystems.OcclusionPreferenceMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_requestedOcclusionPreferenceMode()
extern void XROcclusionSubsystem_get_requestedOcclusionPreferenceMode_m701CF4535F7E170997551B7E010A339D92338F20 (void);
// 0x000002CC System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::set_requestedOcclusionPreferenceMode(UnityEngine.XR.ARSubsystems.OcclusionPreferenceMode)
extern void XROcclusionSubsystem_set_requestedOcclusionPreferenceMode_mC3EABD62187C7EC1B2FA6B1D5CF06BFA553F7D6D (void);
// 0x000002CD UnityEngine.XR.ARSubsystems.OcclusionPreferenceMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::get_currentOcclusionPreferenceMode()
extern void XROcclusionSubsystem_get_currentOcclusionPreferenceMode_m53AA761C841959F77C03CBF95E08653A32FC52A9 (void);
// 0x000002CE System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::.ctor()
extern void XROcclusionSubsystem__ctor_m9EA3B861371659A5607CA2D36A77EAF9023696DD (void);
// 0x000002CF System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryGetHumanStencil(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void XROcclusionSubsystem_TryGetHumanStencil_mB1EC0C01F2EB597A84AF8C2E661C23E057ECDD98 (void);
// 0x000002D0 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryAcquireHumanStencilCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage&)
extern void XROcclusionSubsystem_TryAcquireHumanStencilCpuImage_m95A23BC97400E2E56BF8D0CAF5B5B100CF40A02A (void);
// 0x000002D1 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryGetHumanDepth(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void XROcclusionSubsystem_TryGetHumanDepth_m84470C4EE9A481989D03BC78307236B8DD2E3C19 (void);
// 0x000002D2 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryAcquireHumanDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage&)
extern void XROcclusionSubsystem_TryAcquireHumanDepthCpuImage_m8F88E371C22800DE4C7F0FB8AA4E3731D1F79C39 (void);
// 0x000002D3 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryGetEnvironmentDepth(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void XROcclusionSubsystem_TryGetEnvironmentDepth_m3250960687DA0BCD02C6C933B8F27824DEF9186E (void);
// 0x000002D4 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryAcquireEnvironmentDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage&)
extern void XROcclusionSubsystem_TryAcquireEnvironmentDepthCpuImage_m325D766B287246E7D0A4E80A6CB099AC2D303EEA (void);
// 0x000002D5 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryGetEnvironmentDepthConfidence(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void XROcclusionSubsystem_TryGetEnvironmentDepthConfidence_m7ADE5E051A906BA8C42DE40EFD5151663033002A (void);
// 0x000002D6 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::TryAcquireEnvironmentDepthConfidenceCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage&)
extern void XROcclusionSubsystem_TryAcquireEnvironmentDepthConfidenceCpuImage_m1DE682066BB3A73A81945750A7324F28FBAD80DB (void);
// 0x000002D7 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRTextureDescriptor> UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::GetTextureDescriptors(Unity.Collections.Allocator)
extern void XROcclusionSubsystem_GetTextureDescriptors_mAFD50E268CDFFAAC07B14246FC620DFCE7D8371F (void);
// 0x000002D8 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::GetMaterialKeywords(System.Collections.Generic.List`1<System.String>&,System.Collections.Generic.List`1<System.String>&)
extern void XROcclusionSubsystem_GetMaterialKeywords_mEE0AF1514718B811FCD728CFF19906F1233A4962 (void);
// 0x000002D9 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem::Register(UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo)
extern void XROcclusionSubsystem_Register_mC754EFF602648A08D654B4CAFF0906CBFEFB9EB0 (void);
// 0x000002DA UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_requestedHumanStencilMode()
extern void Provider_get_requestedHumanStencilMode_m89B83DF30D15B0BE8670A55F2681B0EB8A739026 (void);
// 0x000002DB System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::set_requestedHumanStencilMode(UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode)
extern void Provider_set_requestedHumanStencilMode_m17A4B7518A1749DEEF6E432E290D03D66AAB1004 (void);
// 0x000002DC UnityEngine.XR.ARSubsystems.HumanSegmentationStencilMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_currentHumanStencilMode()
extern void Provider_get_currentHumanStencilMode_m9DF9A52AA77E4B7E0A3ACD89887322493F53FC45 (void);
// 0x000002DD UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_requestedHumanDepthMode()
extern void Provider_get_requestedHumanDepthMode_m9DE747D3680A70BC6BCCC5D6FFD4F171EEB0899B (void);
// 0x000002DE System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::set_requestedHumanDepthMode(UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode)
extern void Provider_set_requestedHumanDepthMode_m90E3350AB1E861DDA9B1254B5601665484690258 (void);
// 0x000002DF UnityEngine.XR.ARSubsystems.HumanSegmentationDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_currentHumanDepthMode()
extern void Provider_get_currentHumanDepthMode_mC677BD11CFB177BD210B8F059CD169D49D8FB431 (void);
// 0x000002E0 UnityEngine.XR.ARSubsystems.EnvironmentDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_requestedEnvironmentDepthMode()
extern void Provider_get_requestedEnvironmentDepthMode_mB27FC4801CC4846867255F73260835F0CAD41CA6 (void);
// 0x000002E1 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::set_requestedEnvironmentDepthMode(UnityEngine.XR.ARSubsystems.EnvironmentDepthMode)
extern void Provider_set_requestedEnvironmentDepthMode_mBA1103C34AA535C754E2AD417868496FA18928B5 (void);
// 0x000002E2 UnityEngine.XR.ARSubsystems.EnvironmentDepthMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_currentEnvironmentDepthMode()
extern void Provider_get_currentEnvironmentDepthMode_m3664B08405157169A39218B4AD96286C2F089B2A (void);
// 0x000002E3 UnityEngine.XR.ARSubsystems.OcclusionPreferenceMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_requestedOcclusionPreferenceMode()
extern void Provider_get_requestedOcclusionPreferenceMode_m0FF0C84504EAB9D5F2A016EBB2ACC4BDBECCF19C (void);
// 0x000002E4 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::set_requestedOcclusionPreferenceMode(UnityEngine.XR.ARSubsystems.OcclusionPreferenceMode)
extern void Provider_set_requestedOcclusionPreferenceMode_mE5DF2A581164905E51A0BC02AC1DA0D0E03D77E2 (void);
// 0x000002E5 UnityEngine.XR.ARSubsystems.OcclusionPreferenceMode UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_currentOcclusionPreferenceMode()
extern void Provider_get_currentOcclusionPreferenceMode_m216AA7572FF205318FD726F0BF8DE48715987F9E (void);
// 0x000002E6 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryGetHumanStencil(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void Provider_TryGetHumanStencil_m8231857EC5143647F85BB79A29BAC18430821D36 (void);
// 0x000002E7 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryAcquireHumanStencilCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo&)
extern void Provider_TryAcquireHumanStencilCpuImage_mC6011EC7798D37065264EE243943E90D1E6B71FD (void);
// 0x000002E8 UnityEngine.XR.ARSubsystems.XRCpuImage/Api UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_humanStencilCpuImageApi()
extern void Provider_get_humanStencilCpuImageApi_m4CCDB03AAC405F55F90907E1AAB9328D86C740F2 (void);
// 0x000002E9 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryGetHumanDepth(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void Provider_TryGetHumanDepth_m4F902130B0B684322ACE0F2D7F72F412F5D42844 (void);
// 0x000002EA System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryAcquireHumanDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo&)
extern void Provider_TryAcquireHumanDepthCpuImage_mD9C2C05795A09F724FA8FCCE18C32CD2F5B66F0F (void);
// 0x000002EB UnityEngine.XR.ARSubsystems.XRCpuImage/Api UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_humanDepthCpuImageApi()
extern void Provider_get_humanDepthCpuImageApi_mF6C1BB545272C0EB05D995FE27A499C887F46BA9 (void);
// 0x000002EC System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryGetEnvironmentDepth(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void Provider_TryGetEnvironmentDepth_m39AA20EFA2DB7D68364B4D677731911BB9B95987 (void);
// 0x000002ED System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryAcquireEnvironmentDepthCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo&)
extern void Provider_TryAcquireEnvironmentDepthCpuImage_m038A771570F8067187EA5602FE6287D7F32A8BA4 (void);
// 0x000002EE UnityEngine.XR.ARSubsystems.XRCpuImage/Api UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_environmentDepthCpuImageApi()
extern void Provider_get_environmentDepthCpuImageApi_mF69078CBA7922A4F92C7D8B9359511DA16BB7117 (void);
// 0x000002EF System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryGetEnvironmentDepthConfidence(UnityEngine.XR.ARSubsystems.XRTextureDescriptor&)
extern void Provider_TryGetEnvironmentDepthConfidence_mB12E08E4B93E1272976BE1F0C09592133B93848F (void);
// 0x000002F0 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::TryAcquireEnvironmentDepthConfidenceCpuImage(UnityEngine.XR.ARSubsystems.XRCpuImage/Cinfo&)
extern void Provider_TryAcquireEnvironmentDepthConfidenceCpuImage_mC0A1389DBA1C968C2E998C406852881E0F6089FE (void);
// 0x000002F1 UnityEngine.XR.ARSubsystems.XRCpuImage/Api UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::get_environmentDepthConfidenceCpuImageApi()
extern void Provider_get_environmentDepthConfidenceCpuImageApi_mEBEAA0B71D94E7A69392061521D045FCE2750CE6 (void);
// 0x000002F2 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRTextureDescriptor> UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::GetTextureDescriptors(UnityEngine.XR.ARSubsystems.XRTextureDescriptor,Unity.Collections.Allocator)
extern void Provider_GetTextureDescriptors_mE2329867DDA41B3F1110DAF5081D3FD427191C85 (void);
// 0x000002F3 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::GetMaterialKeywords(System.Collections.Generic.List`1<System.String>&,System.Collections.Generic.List`1<System.String>&)
extern void Provider_GetMaterialKeywords_mF75D36CB409D853AD7AF66D9E8E0665C63E1AA8D (void);
// 0x000002F4 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystem/Provider::.ctor()
extern void Provider__ctor_m4B36FAF10D278F373035E446EFFC7C4C5B32C4FD (void);
// 0x000002F5 System.String UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_id()
extern void XROcclusionSubsystemCinfo_get_id_m52AA71D202632FA1607B0FEF64946642B6C3608C (void);
// 0x000002F6 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_id(System.String)
extern void XROcclusionSubsystemCinfo_set_id_m19076B4B5E6D6AA32BE751C1F2611CB7C3C152A0 (void);
// 0x000002F7 System.Type UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_providerType()
extern void XROcclusionSubsystemCinfo_get_providerType_m8D7C8F76AE3FAEEC4952D6FF75134CE4DADFFA22 (void);
// 0x000002F8 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_providerType(System.Type)
extern void XROcclusionSubsystemCinfo_set_providerType_mA9E2685FC29652BBF41CD7398D8A434B72B68556 (void);
// 0x000002F9 System.Type UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_subsystemTypeOverride()
extern void XROcclusionSubsystemCinfo_get_subsystemTypeOverride_m60945479B5A62376EEA5633F4FF21D4BD137C125 (void);
// 0x000002FA System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_subsystemTypeOverride(System.Type)
extern void XROcclusionSubsystemCinfo_set_subsystemTypeOverride_mC5D9DB3F2CDC007F826FC2AB790F1622DFBA0F63 (void);
// 0x000002FB System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_supportsHumanSegmentationStencilImage()
extern void XROcclusionSubsystemCinfo_get_supportsHumanSegmentationStencilImage_m3F2F9B49E2326FE8A773C655848F6497A5F8A797 (void);
// 0x000002FC System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_supportsHumanSegmentationStencilImage(System.Boolean)
extern void XROcclusionSubsystemCinfo_set_supportsHumanSegmentationStencilImage_mEC6C58C95DF515008316ED9A33A37ABBFBFD88BD (void);
// 0x000002FD System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_supportsHumanSegmentationDepthImage()
extern void XROcclusionSubsystemCinfo_get_supportsHumanSegmentationDepthImage_mBFFC1F3611B38652EEFD21E2D7433B71F36A172D (void);
// 0x000002FE System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_supportsHumanSegmentationDepthImage(System.Boolean)
extern void XROcclusionSubsystemCinfo_set_supportsHumanSegmentationDepthImage_mF08FD3863AEB93D47CCF50BD197780D2AB6F0705 (void);
// 0x000002FF System.Func`1<System.Boolean> UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_queryForSupportsEnvironmentDepthImage()
extern void XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthImage_m7E021A482EB4D3F52CA43ABEF71FD654304330AC (void);
// 0x00000300 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_queryForSupportsEnvironmentDepthImage(System.Func`1<System.Boolean>)
extern void XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthImage_m51449A6122E2D967180669F6C0425F5D1E038F7E (void);
// 0x00000301 System.Func`1<System.Boolean> UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::get_queryForSupportsEnvironmentDepthConfidenceImage()
extern void XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthConfidenceImage_m3A9518505C78739C2476A7E64F6942D83C582DD5 (void);
// 0x00000302 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::set_queryForSupportsEnvironmentDepthConfidenceImage(System.Func`1<System.Boolean>)
extern void XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthConfidenceImage_m24C48D100ECEEC534C92273C21C18FBCCD98C740 (void);
// 0x00000303 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::Equals(UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo)
extern void XROcclusionSubsystemCinfo_Equals_mBF75B2160741AC5D0F43480949D690FE94ECCE18 (void);
// 0x00000304 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::Equals(System.Object)
extern void XROcclusionSubsystemCinfo_Equals_m046DEDAFD67F305D51E59636AF310702B5152EEB (void);
// 0x00000305 System.Int32 UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo::GetHashCode()
extern void XROcclusionSubsystemCinfo_GetHashCode_m8A26E07DD1C840DFEC9373E26990B3DA40F1D8A1 (void);
// 0x00000306 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo)
extern void XROcclusionSubsystemDescriptor__ctor_mC7893752CE0EB8F9130E7127BFC306B11BE4AA42 (void);
// 0x00000307 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::get_supportsHumanSegmentationStencilImage()
extern void XROcclusionSubsystemDescriptor_get_supportsHumanSegmentationStencilImage_m568E947E892CB4927549EF2E47BD0A40D85124A3 (void);
// 0x00000308 System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::set_supportsHumanSegmentationStencilImage(System.Boolean)
extern void XROcclusionSubsystemDescriptor_set_supportsHumanSegmentationStencilImage_m8D7F47CF55EE1F758A1CF9A53700B78FAAD3A9DE (void);
// 0x00000309 System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::get_supportsHumanSegmentationDepthImage()
extern void XROcclusionSubsystemDescriptor_get_supportsHumanSegmentationDepthImage_m2A660F032C38F34D2ACE3A927214C17895FB7530 (void);
// 0x0000030A System.Void UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::set_supportsHumanSegmentationDepthImage(System.Boolean)
extern void XROcclusionSubsystemDescriptor_set_supportsHumanSegmentationDepthImage_mD48BEC8C3460FA7B6BC492D70DF7E70C468DB38F (void);
// 0x0000030B System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::get_supportsEnvironmentDepthImage()
extern void XROcclusionSubsystemDescriptor_get_supportsEnvironmentDepthImage_mBC659B981990D4BBD0E0D52290351CFDB8947ECA (void);
// 0x0000030C System.Boolean UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::get_supportsEnvironmentDepthConfidenceImage()
extern void XROcclusionSubsystemDescriptor_get_supportsEnvironmentDepthConfidenceImage_m80B81280456C3215266FF98FEF89C2CC23C2D6D3 (void);
// 0x0000030D UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor UnityEngine.XR.ARSubsystems.XROcclusionSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XROcclusionSubsystemCinfo)
extern void XROcclusionSubsystemDescriptor_Create_m31FA1D0EDAF351742A97C9E655F069AF8544C852 (void);
// 0x0000030E UnityEngine.XR.ARSubsystems.XRParticipant UnityEngine.XR.ARSubsystems.XRParticipant::get_defaultParticipant()
extern void XRParticipant_get_defaultParticipant_mD2641CE602FDDA1E32641A60101077BF5E10B49D (void);
// 0x0000030F UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRParticipant::get_trackableId()
extern void XRParticipant_get_trackableId_mFE20FF09B28F44F916FD7175C9D1B50658DB8D13 (void);
// 0x00000310 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRParticipant::get_pose()
extern void XRParticipant_get_pose_m8BC5243C4975CE29D2E98B803908FE7B0B2A1D1B (void);
// 0x00000311 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRParticipant::get_trackingState()
extern void XRParticipant_get_trackingState_m0510505F8AE642CCCEBD2D784CB898CEDD59A08F (void);
// 0x00000312 System.IntPtr UnityEngine.XR.ARSubsystems.XRParticipant::get_nativePtr()
extern void XRParticipant_get_nativePtr_mF4BBE0CC8C5CFA70984EAAD24CFF13E9BCFE0FE4 (void);
// 0x00000313 System.Guid UnityEngine.XR.ARSubsystems.XRParticipant::get_sessionId()
extern void XRParticipant_get_sessionId_m25D8BC6B31A8216FF6959B2C4792CCC7040A2300 (void);
// 0x00000314 System.Int32 UnityEngine.XR.ARSubsystems.XRParticipant::GetHashCode()
extern void XRParticipant_GetHashCode_mF04382E10454D77B4F1AA3AF615488B98D9D62EC (void);
// 0x00000315 System.Boolean UnityEngine.XR.ARSubsystems.XRParticipant::Equals(UnityEngine.XR.ARSubsystems.XRParticipant)
extern void XRParticipant_Equals_mE1679D0AAFE2566EA4CE5AF7992F1ADD3D2AFEDA (void);
// 0x00000316 System.Boolean UnityEngine.XR.ARSubsystems.XRParticipant::Equals(System.Object)
extern void XRParticipant_Equals_mBA488A840ABD4DBB6432E2D03126062EC1A6768C (void);
// 0x00000317 System.Void UnityEngine.XR.ARSubsystems.XRParticipant::.cctor()
extern void XRParticipant__cctor_mBD235B2B36E92A66051E85204403C005DFAF9C96 (void);
// 0x00000318 System.Void UnityEngine.XR.ARSubsystems.XRParticipantSubsystem::.ctor()
extern void XRParticipantSubsystem__ctor_mC7EB236E3A4BBC45C055B94C26493FBB19DF4056 (void);
// 0x00000319 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRParticipant> UnityEngine.XR.ARSubsystems.XRParticipantSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRParticipantSubsystem_GetChanges_mFC86BCBEF9E0E318E661D36AC316B6D01A068AA8 (void);
// 0x0000031A UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRParticipant> UnityEngine.XR.ARSubsystems.XRParticipantSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRParticipant,Unity.Collections.Allocator)
// 0x0000031B System.Void UnityEngine.XR.ARSubsystems.XRParticipantSubsystem/Provider::.ctor()
extern void Provider__ctor_m29C158581A2B8BF6DE3F03DDACC1A2F8FFB1F875 (void);
// 0x0000031C System.Void UnityEngine.XR.ARSubsystems.XRParticipantSubsystemDescriptor::set_capabilities(UnityEngine.XR.ARSubsystems.XRParticipantSubsystemDescriptor/Capabilities)
extern void XRParticipantSubsystemDescriptor_set_capabilities_m3CDF9EDC1BF57F513846DE87A9E4996ED543759A (void);
// 0x0000031D System.Void UnityEngine.XR.ARSubsystems.XRParticipantSubsystemDescriptor::Register(System.String,UnityEngine.XR.ARSubsystems.XRParticipantSubsystemDescriptor/Capabilities)
// 0x0000031E System.Void UnityEngine.XR.ARSubsystems.XRParticipantSubsystemDescriptor::.ctor(System.String,System.Type,System.Type,UnityEngine.XR.ARSubsystems.XRParticipantSubsystemDescriptor/Capabilities)
extern void XRParticipantSubsystemDescriptor__ctor_m83A6821A71C68D58354ACE8289E8F621F2E183DC (void);
// 0x0000031F UnityEngine.XR.ARSubsystems.BoundedPlane UnityEngine.XR.ARSubsystems.BoundedPlane::get_defaultValue()
extern void BoundedPlane_get_defaultValue_m0C1F8EA6D681C3333CF429425254F63E1BE99003 (void);
// 0x00000320 System.Void UnityEngine.XR.ARSubsystems.BoundedPlane::.ctor(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.XR.ARSubsystems.PlaneAlignment,UnityEngine.XR.ARSubsystems.TrackingState,System.IntPtr,UnityEngine.XR.ARSubsystems.PlaneClassification)
extern void BoundedPlane__ctor_mDCFBC1B53B86B650BBB103C9FC25E7872CBF804B (void);
// 0x00000321 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.BoundedPlane::get_trackableId()
extern void BoundedPlane_get_trackableId_m32943441D74DC226DC907A05B5B6C6EBBC70F95B (void);
// 0x00000322 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.BoundedPlane::get_subsumedById()
extern void BoundedPlane_get_subsumedById_mD61EFD7A91B5F290F63A1AE59153B75BB33B89CF (void);
// 0x00000323 UnityEngine.Pose UnityEngine.XR.ARSubsystems.BoundedPlane::get_pose()
extern void BoundedPlane_get_pose_m8302E13809156362584FA0AE137DD911D30665BA (void);
// 0x00000324 UnityEngine.Vector2 UnityEngine.XR.ARSubsystems.BoundedPlane::get_center()
extern void BoundedPlane_get_center_mA4667303D86B331F7EC5F278910145E7633EA973 (void);
// 0x00000325 UnityEngine.Vector2 UnityEngine.XR.ARSubsystems.BoundedPlane::get_extents()
extern void BoundedPlane_get_extents_mEED7F74BBACA8EA90D43ED12EC9D10C9059118CD (void);
// 0x00000326 UnityEngine.Vector2 UnityEngine.XR.ARSubsystems.BoundedPlane::get_size()
extern void BoundedPlane_get_size_m204F4F37C0FB6F7294682D961B53F4F9639E3882 (void);
// 0x00000327 UnityEngine.XR.ARSubsystems.PlaneAlignment UnityEngine.XR.ARSubsystems.BoundedPlane::get_alignment()
extern void BoundedPlane_get_alignment_m72B849B54224B1493DFF448BCF2AB8634751DC71 (void);
// 0x00000328 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.BoundedPlane::get_trackingState()
extern void BoundedPlane_get_trackingState_mBF10ADD6DD969A0DA7FCC8299FFA56AEB9B837CA (void);
// 0x00000329 System.IntPtr UnityEngine.XR.ARSubsystems.BoundedPlane::get_nativePtr()
extern void BoundedPlane_get_nativePtr_m626921F0179BF37BC5F06C2587D298FB40F31FE9 (void);
// 0x0000032A UnityEngine.XR.ARSubsystems.PlaneClassification UnityEngine.XR.ARSubsystems.BoundedPlane::get_classification()
extern void BoundedPlane_get_classification_m842651162BFE9633C414B16CD1D86FBBE86589A3 (void);
// 0x0000032B System.String UnityEngine.XR.ARSubsystems.BoundedPlane::ToString()
extern void BoundedPlane_ToString_m0A542F5D2CB72755643184989BE3B9E6899D731A (void);
// 0x0000032C System.Boolean UnityEngine.XR.ARSubsystems.BoundedPlane::Equals(System.Object)
extern void BoundedPlane_Equals_m5B2E8A0932BC0242B51091CDDFED85901156A005 (void);
// 0x0000032D System.Int32 UnityEngine.XR.ARSubsystems.BoundedPlane::GetHashCode()
extern void BoundedPlane_GetHashCode_m99D4D46A432C2E00A182A86788A750522BFBCAEF (void);
// 0x0000032E System.Boolean UnityEngine.XR.ARSubsystems.BoundedPlane::Equals(UnityEngine.XR.ARSubsystems.BoundedPlane)
extern void BoundedPlane_Equals_m3A984C969EC0ACE7B83F661C80AA82C54D455D1A (void);
// 0x0000032F System.Void UnityEngine.XR.ARSubsystems.BoundedPlane::.cctor()
extern void BoundedPlane__cctor_m8E99A66F7A4052C7C0C7CE3077F4172F3E196E17 (void);
// 0x00000330 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem::.ctor()
extern void XRPlaneSubsystem__ctor_mDD4F1B44F90E2F50D3C78601413F01D05990B20C (void);
// 0x00000331 UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.ARSubsystems.XRPlaneSubsystem::get_requestedPlaneDetectionMode()
extern void XRPlaneSubsystem_get_requestedPlaneDetectionMode_m51078C58B303EDA9CF614D48CE5E66F5A7136671 (void);
// 0x00000332 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem::set_requestedPlaneDetectionMode(UnityEngine.XR.ARSubsystems.PlaneDetectionMode)
extern void XRPlaneSubsystem_set_requestedPlaneDetectionMode_m5417F9F8388C4FFEF240FDA59C658C7BC7BE31E6 (void);
// 0x00000333 UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.ARSubsystems.XRPlaneSubsystem::get_currentPlaneDetectionMode()
extern void XRPlaneSubsystem_get_currentPlaneDetectionMode_m118C25A13FE903AA0811ADC0DBEFEED9E6527FA1 (void);
// 0x00000334 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.BoundedPlane> UnityEngine.XR.ARSubsystems.XRPlaneSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRPlaneSubsystem_GetChanges_m041C14703F9160E7C1A0C740F534D4881D9BA4EA (void);
// 0x00000335 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem::GetBoundary(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void XRPlaneSubsystem_GetBoundary_mE3A06B4C37DB403DC6E5DD45A7E30700C73B3CA3 (void);
// 0x00000336 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::CreateOrResizeNativeArrayIfNecessary(System.Int32,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<T>&)
// 0x00000337 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::GetBoundary(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void Provider_GetBoundary_mFEC076BA5F9EAEFB5CFD36A8A690CD6B9449A45A (void);
// 0x00000338 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.BoundedPlane> UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.BoundedPlane,Unity.Collections.Allocator)
// 0x00000339 UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::get_requestedPlaneDetectionMode()
extern void Provider_get_requestedPlaneDetectionMode_mBE4A83FB233470D747D0F6E6435062F0B076D787 (void);
// 0x0000033A System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::set_requestedPlaneDetectionMode(UnityEngine.XR.ARSubsystems.PlaneDetectionMode)
extern void Provider_set_requestedPlaneDetectionMode_m6F76C54F3DDC0811336F80D6CF40CBC64147DAD9 (void);
// 0x0000033B UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::get_currentPlaneDetectionMode()
extern void Provider_get_currentPlaneDetectionMode_m6409F5A32746AC3BAB7876DEDF7A9CA5C27CDFF2 (void);
// 0x0000033C System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystem/Provider::.ctor()
extern void Provider__ctor_mDEDB208301BBA3CC96FFF2DA6AC90F5D241CE524 (void);
// 0x0000033D System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::set_supportsHorizontalPlaneDetection(System.Boolean)
extern void XRPlaneSubsystemDescriptor_set_supportsHorizontalPlaneDetection_m2BB45C7A44E14368A0FAEADA130A6F6158B1042D (void);
// 0x0000033E System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::set_supportsVerticalPlaneDetection(System.Boolean)
extern void XRPlaneSubsystemDescriptor_set_supportsVerticalPlaneDetection_m050259C60036A9B08459ED7BDFC06D24270927B2 (void);
// 0x0000033F System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::set_supportsArbitraryPlaneDetection(System.Boolean)
extern void XRPlaneSubsystemDescriptor_set_supportsArbitraryPlaneDetection_m2A4804EC8ED1137CB21F6589FBAE85CF01B1A5A0 (void);
// 0x00000340 System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::get_supportsBoundaryVertices()
extern void XRPlaneSubsystemDescriptor_get_supportsBoundaryVertices_m4345B5F3CA73C685A3F741C4EDFF6B69EEEB8431 (void);
// 0x00000341 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::set_supportsBoundaryVertices(System.Boolean)
extern void XRPlaneSubsystemDescriptor_set_supportsBoundaryVertices_mDF9E00121A6509790D704D77FF0B863A99436747 (void);
// 0x00000342 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::set_supportsClassification(System.Boolean)
extern void XRPlaneSubsystemDescriptor_set_supportsClassification_mA74FCEFD28F8CC7E1BB2E97E69DFA8E20BD0904A (void);
// 0x00000343 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::Create(UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo)
extern void XRPlaneSubsystemDescriptor_Create_mB69A44F54AB64DF4361D3C16AE48C2F1B474EA32 (void);
// 0x00000344 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo)
extern void XRPlaneSubsystemDescriptor__ctor_mC8788AC7F6940BA1E88AE0277C1D099DD0EEB935 (void);
// 0x00000345 System.String UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_id()
extern void Cinfo_get_id_m62022D2EE6912F0B1BDBCA687A4FC63321DE3F86 (void);
// 0x00000346 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_id(System.String)
extern void Cinfo_set_id_m940361693A3C925B2180733D87611B5FDF0357D7 (void);
// 0x00000347 System.Type UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_providerType()
extern void Cinfo_get_providerType_m496CFFD5CAAF878266582DECEC5CDFB92A9C0A55 (void);
// 0x00000348 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_providerType(System.Type)
extern void Cinfo_set_providerType_m8B6A7EE025CCB9B5B5E26E6F4C779DFE09955744 (void);
// 0x00000349 System.Type UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_subsystemTypeOverride()
extern void Cinfo_get_subsystemTypeOverride_m67ACD12818B5C91D42707639EA205E13BB15171A (void);
// 0x0000034A System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_subsystemTypeOverride(System.Type)
extern void Cinfo_set_subsystemTypeOverride_mBC4F1CC20B4DF3D551BAFC1C38245F457E262A58 (void);
// 0x0000034B System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_supportsHorizontalPlaneDetection()
extern void Cinfo_get_supportsHorizontalPlaneDetection_mBC3012C667106D47D9429F9C8001774038A38216 (void);
// 0x0000034C System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_supportsHorizontalPlaneDetection(System.Boolean)
extern void Cinfo_set_supportsHorizontalPlaneDetection_mBC9B4572592B71328A96AF58DEB047528470C440 (void);
// 0x0000034D System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_supportsVerticalPlaneDetection()
extern void Cinfo_get_supportsVerticalPlaneDetection_m4E3BE200E11784D049B94A054F15E4C76D29D7C6 (void);
// 0x0000034E System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_supportsVerticalPlaneDetection(System.Boolean)
extern void Cinfo_set_supportsVerticalPlaneDetection_mFF310EF7B9F8D9C9F9689CF9D1D2BEDDFF93F9F0 (void);
// 0x0000034F System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_supportsArbitraryPlaneDetection()
extern void Cinfo_get_supportsArbitraryPlaneDetection_mF6CB379C9781FE8B8473949DA99196508EF91DB5 (void);
// 0x00000350 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_supportsArbitraryPlaneDetection(System.Boolean)
extern void Cinfo_set_supportsArbitraryPlaneDetection_m70B1D6D27946FB12BF0D3D3AF8C6DC8DC3F399B9 (void);
// 0x00000351 System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_supportsBoundaryVertices()
extern void Cinfo_get_supportsBoundaryVertices_m5BA762B342FCF81EAE6E3645D3BAF04C1E8EAAD9 (void);
// 0x00000352 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_supportsBoundaryVertices(System.Boolean)
extern void Cinfo_set_supportsBoundaryVertices_mC6F86EB28D38CC483AD8F9FD161013BDE3F4AFEF (void);
// 0x00000353 System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::get_supportsClassification()
extern void Cinfo_get_supportsClassification_m0396A2A62F840D9E283402BFB3681A5CC19C810E (void);
// 0x00000354 System.Void UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::set_supportsClassification(System.Boolean)
extern void Cinfo_set_supportsClassification_mA3B11D7CA4F960C89E729E5161AD7CC3211B933C (void);
// 0x00000355 System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo)
extern void Cinfo_Equals_m997D9E2FAF1A57953B2A2C95A4221C9EB82843BC (void);
// 0x00000356 System.Boolean UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m38EB24520E9273465E918F9F14D72FCE8EE4EB8B (void);
// 0x00000357 System.Int32 UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_m219A4B64FB8A60D947BA345FBD65292065581378 (void);
// 0x00000358 System.Boolean UnityEngine.XR.ARSubsystems.Promise`1::get_keepWaiting()
// 0x00000359 T UnityEngine.XR.ARSubsystems.Promise`1::get_result()
// 0x0000035A System.Void UnityEngine.XR.ARSubsystems.Promise`1::set_result(T)
// 0x0000035B UnityEngine.XR.ARSubsystems.Promise`1<T> UnityEngine.XR.ARSubsystems.Promise`1::CreateResolvedPromise(T)
// 0x0000035C System.Void UnityEngine.XR.ARSubsystems.Promise`1::Resolve(T)
// 0x0000035D System.Void UnityEngine.XR.ARSubsystems.Promise`1::OnKeepWaiting()
// 0x0000035E System.Void UnityEngine.XR.ARSubsystems.Promise`1::.ctor()
// 0x0000035F System.Void UnityEngine.XR.ARSubsystems.Promise`1/ImmediatePromise::OnKeepWaiting()
// 0x00000360 System.Void UnityEngine.XR.ARSubsystems.Promise`1/ImmediatePromise::.ctor(T)
// 0x00000361 UnityEngine.XR.ARSubsystems.XRRaycast UnityEngine.XR.ARSubsystems.XRRaycast::get_defaultValue()
extern void XRRaycast_get_defaultValue_mC4E3CDC7E9F4C17F3708B82DCDA95FFD395C2BE0 (void);
// 0x00000362 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRRaycast::get_trackableId()
extern void XRRaycast_get_trackableId_m58733DD621FACDF9F32633AA0247FDDE4B6F4EBE (void);
// 0x00000363 UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRRaycast::get_pose()
extern void XRRaycast_get_pose_m62D623D6E37AE82B0E223804F034E604037E24E1 (void);
// 0x00000364 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRRaycast::get_trackingState()
extern void XRRaycast_get_trackingState_m8A926660A7D03F72E558198E760AE01936FB8DF0 (void);
// 0x00000365 System.IntPtr UnityEngine.XR.ARSubsystems.XRRaycast::get_nativePtr()
extern void XRRaycast_get_nativePtr_m079CE750F279F664A8D524ACA2D070056143389D (void);
// 0x00000366 System.Single UnityEngine.XR.ARSubsystems.XRRaycast::get_distance()
extern void XRRaycast_get_distance_m4D3B928473544B72D50CF70503B18DBC75951263 (void);
// 0x00000367 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRRaycast::get_hitTrackableId()
extern void XRRaycast_get_hitTrackableId_mA4EE855CDEE8AC2D109FDE58A7EF4AED262CBFFE (void);
// 0x00000368 System.Void UnityEngine.XR.ARSubsystems.XRRaycast::.ctor(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,UnityEngine.XR.ARSubsystems.TrackingState,System.IntPtr,System.Single,UnityEngine.XR.ARSubsystems.TrackableId)
extern void XRRaycast__ctor_mCB8C71860ADB4EEEAECBB9D2FD6373FA7EE13A48 (void);
// 0x00000369 System.Int32 UnityEngine.XR.ARSubsystems.XRRaycast::GetHashCode()
extern void XRRaycast_GetHashCode_m68040849E5282B2DAEE10DEC5F13B22E69A9EA36 (void);
// 0x0000036A System.Boolean UnityEngine.XR.ARSubsystems.XRRaycast::Equals(System.Object)
extern void XRRaycast_Equals_m808F58AFF56D3598C410DBB759CD48CBEBFBE553 (void);
// 0x0000036B System.Boolean UnityEngine.XR.ARSubsystems.XRRaycast::Equals(UnityEngine.XR.ARSubsystems.XRRaycast)
extern void XRRaycast_Equals_m155EE0BDA8E10977C499A22B2EE32D252A960535 (void);
// 0x0000036C System.Void UnityEngine.XR.ARSubsystems.XRRaycast::.cctor()
extern void XRRaycast__cctor_mF4E28BD54EAB27ED12CEBC7643C8A599E7D93562 (void);
// 0x0000036D UnityEngine.XR.ARSubsystems.XRRaycastHit UnityEngine.XR.ARSubsystems.XRRaycastHit::get_defaultValue()
extern void XRRaycastHit_get_defaultValue_m23C7AB55A53165C8E2F13CC8F1B70104C37B833A (void);
// 0x0000036E UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.XRRaycastHit::get_trackableId()
extern void XRRaycastHit_get_trackableId_m39A90CBBE6D03C7C726715BEE8404A5411ACECBA (void);
// 0x0000036F UnityEngine.Pose UnityEngine.XR.ARSubsystems.XRRaycastHit::get_pose()
extern void XRRaycastHit_get_pose_m7374236222252D08D08C85145B88AF698FAA77F4 (void);
// 0x00000370 System.Single UnityEngine.XR.ARSubsystems.XRRaycastHit::get_distance()
extern void XRRaycastHit_get_distance_m51570C654B1EED732C9EE7C73D51B13B9CF8262B (void);
// 0x00000371 UnityEngine.XR.ARSubsystems.TrackableType UnityEngine.XR.ARSubsystems.XRRaycastHit::get_hitType()
extern void XRRaycastHit_get_hitType_m14A0398215ED8B10A1E505427C7584100189C222 (void);
// 0x00000372 System.Void UnityEngine.XR.ARSubsystems.XRRaycastHit::.ctor(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.Pose,System.Single,UnityEngine.XR.ARSubsystems.TrackableType)
extern void XRRaycastHit__ctor_mF47DE3277FA881FCB8E74A5ADEC8E9624F00900F (void);
// 0x00000373 System.Int32 UnityEngine.XR.ARSubsystems.XRRaycastHit::GetHashCode()
extern void XRRaycastHit_GetHashCode_m3BA94B911CC05BEC9FB3D5BB2D37142929AF3F33 (void);
// 0x00000374 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastHit::Equals(System.Object)
extern void XRRaycastHit_Equals_m227F3BD461F3EDA16E3AAF42E40B32607C58F8BB (void);
// 0x00000375 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastHit::Equals(UnityEngine.XR.ARSubsystems.XRRaycastHit)
extern void XRRaycastHit_Equals_m84983BF79308ADA4ED84E210840E2F950B549FA0 (void);
// 0x00000376 System.Void UnityEngine.XR.ARSubsystems.XRRaycastHit::.cctor()
extern void XRRaycastHit__cctor_m192CB55E4570D447209605B30A0546AC65D70601 (void);
// 0x00000377 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::.ctor()
extern void XRRaycastSubsystem__ctor_m73E44C9109F84F8DFB603F6E480200EF0A62A15B (void);
// 0x00000378 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRRaycast> UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::GetChanges(Unity.Collections.Allocator)
extern void XRRaycastSubsystem_GetChanges_m6200FBDEEF32324D55A39BABCFDA4485152158D7 (void);
// 0x00000379 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::TryAddRaycast(UnityEngine.Vector2,System.Single,UnityEngine.XR.ARSubsystems.XRRaycast&)
extern void XRRaycastSubsystem_TryAddRaycast_mADDC2D2907EA853D5772BDBDF5515C6BEE5273E6 (void);
// 0x0000037A System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::TryAddRaycast(UnityEngine.Ray,System.Single,UnityEngine.XR.ARSubsystems.XRRaycast&)
extern void XRRaycastSubsystem_TryAddRaycast_m0E3CB340F43243817F58EAFF05AD30B5926AB888 (void);
// 0x0000037B System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::RemoveRaycast(UnityEngine.XR.ARSubsystems.TrackableId)
extern void XRRaycastSubsystem_RemoveRaycast_mD6B80384ECD82726C5A8BD098684FEDF708E8F7B (void);
// 0x0000037C Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRRaycastHit> UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::Raycast(UnityEngine.Ray,UnityEngine.XR.ARSubsystems.TrackableType,Unity.Collections.Allocator)
extern void XRRaycastSubsystem_Raycast_m888778039168DBFBF958BF0E82674CD370DBC485 (void);
// 0x0000037D Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRRaycastHit> UnityEngine.XR.ARSubsystems.XRRaycastSubsystem::Raycast(UnityEngine.Vector2,UnityEngine.XR.ARSubsystems.TrackableType,Unity.Collections.Allocator)
extern void XRRaycastSubsystem_Raycast_m6EF56F1AD3C1A4385729B9FBEFC05ED91DEEA4C7 (void);
// 0x0000037E System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::Start()
extern void Provider_Start_m005AB31948BB907D11D7E64C051F6C08D2B4BFF2 (void);
// 0x0000037F System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::Stop()
extern void Provider_Stop_m1C036AD27F8B1E3EA9AFB22880B84637CC6693B8 (void);
// 0x00000380 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::Destroy()
extern void Provider_Destroy_m0A7220BD30B6E87681E5D63B89FA177E24A93FD5 (void);
// 0x00000381 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::TryAddRaycast(UnityEngine.Vector2,System.Single,UnityEngine.XR.ARSubsystems.XRRaycast&)
extern void Provider_TryAddRaycast_m4EEED029510C7B0273678827530C882EDA5B314F (void);
// 0x00000382 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::TryAddRaycast(UnityEngine.Ray,System.Single,UnityEngine.XR.ARSubsystems.XRRaycast&)
extern void Provider_TryAddRaycast_m3C4F9E15B1849B074BEFF8426DBE71F3F1E93564 (void);
// 0x00000383 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::RemoveRaycast(UnityEngine.XR.ARSubsystems.TrackableId)
extern void Provider_RemoveRaycast_m1C8BC761375BCA3E3F4077690EB8719DDDC2B71E (void);
// 0x00000384 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRRaycast> UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::GetChanges(UnityEngine.XR.ARSubsystems.XRRaycast,Unity.Collections.Allocator)
extern void Provider_GetChanges_m7F79213AA617C8206739FFE806E196E7D5A4BDAF (void);
// 0x00000385 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRRaycastHit> UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::Raycast(UnityEngine.XR.ARSubsystems.XRRaycastHit,UnityEngine.Ray,UnityEngine.XR.ARSubsystems.TrackableType,Unity.Collections.Allocator)
extern void Provider_Raycast_mBEE3804BA51E701D3775CC4AC1AFD16FEB97FB72 (void);
// 0x00000386 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRRaycastHit> UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::Raycast(UnityEngine.XR.ARSubsystems.XRRaycastHit,UnityEngine.Vector2,UnityEngine.XR.ARSubsystems.TrackableType,Unity.Collections.Allocator)
extern void Provider_Raycast_m848F042E5613BB90E3A933E19E8229D7C94914C0 (void);
// 0x00000387 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider::.ctor()
extern void Provider__ctor_m58E4226B4157880E60C02C82B5FB24D9760EA94F (void);
// 0x00000388 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::get_supportsViewportBasedRaycast()
extern void XRRaycastSubsystemDescriptor_get_supportsViewportBasedRaycast_mB431E0A243FBE6F37AEAB566B124E502FEEC267B (void);
// 0x00000389 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::set_supportsViewportBasedRaycast(System.Boolean)
extern void XRRaycastSubsystemDescriptor_set_supportsViewportBasedRaycast_m573D624059387ECB8EAB5386DDA18F04A8B74A29 (void);
// 0x0000038A System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::get_supportsWorldBasedRaycast()
extern void XRRaycastSubsystemDescriptor_get_supportsWorldBasedRaycast_m242C4F2136709274DAF885FCC520546E682AD0DF (void);
// 0x0000038B System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::set_supportsWorldBasedRaycast(System.Boolean)
extern void XRRaycastSubsystemDescriptor_set_supportsWorldBasedRaycast_mA63CC456D0FD28CD57DD2D0C3DEB3AC0DEA60C8B (void);
// 0x0000038C System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::set_supportedTrackableTypes(UnityEngine.XR.ARSubsystems.TrackableType)
extern void XRRaycastSubsystemDescriptor_set_supportedTrackableTypes_mAFC6D42C7EFE47219C8461162392E994364BBD53 (void);
// 0x0000038D System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::set_supportsTrackedRaycasts(System.Boolean)
extern void XRRaycastSubsystemDescriptor_set_supportsTrackedRaycasts_mD10EA0CD0E6F8FB9D499544B0DE27A5EBCED30C9 (void);
// 0x0000038E System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::RegisterDescriptor(UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo)
extern void XRRaycastSubsystemDescriptor_RegisterDescriptor_mD9A0FD5846AA09D7D7D32A1093566607D0082ABA (void);
// 0x0000038F System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo)
extern void XRRaycastSubsystemDescriptor__ctor_m2185C8C50AB138A0C3B5165A92534E2E0D7D57A7 (void);
// 0x00000390 System.String UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_id()
extern void Cinfo_get_id_m9A34BB7AAEFCB43E1627AA047A68C058D730EDC4 (void);
// 0x00000391 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_id(System.String)
extern void Cinfo_set_id_m0CB4DA3E552ED7940FBA88D8EE3BB6379EA255D6 (void);
// 0x00000392 System.Type UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_providerType()
extern void Cinfo_get_providerType_m6AFB0E29047AF8A34F780EBACFC0CDDA44AAF50C (void);
// 0x00000393 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_providerType(System.Type)
extern void Cinfo_set_providerType_m20992869A706183D7180A2030C84B5445DCF0BE3 (void);
// 0x00000394 System.Type UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_subsystemTypeOverride()
extern void Cinfo_get_subsystemTypeOverride_mCFC851E4227172E1E01130E60CC64F4B2FFC8C63 (void);
// 0x00000395 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_subsystemTypeOverride(System.Type)
extern void Cinfo_set_subsystemTypeOverride_mD5425E55455A21B7361B847FD6B78998AC70CD5B (void);
// 0x00000396 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_supportsViewportBasedRaycast()
extern void Cinfo_get_supportsViewportBasedRaycast_m76E31D4FF84E88050FE4E8B6C44FB6E4E71A5A3A (void);
// 0x00000397 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_supportsViewportBasedRaycast(System.Boolean)
extern void Cinfo_set_supportsViewportBasedRaycast_mCF77DEFDDC3931682A33A063DF2F25FFBF07B807 (void);
// 0x00000398 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_supportsWorldBasedRaycast()
extern void Cinfo_get_supportsWorldBasedRaycast_m5242363FA90D64968F4ED236EC35973B7ABC180A (void);
// 0x00000399 System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_supportsWorldBasedRaycast(System.Boolean)
extern void Cinfo_set_supportsWorldBasedRaycast_m74BF70E612BCAFAD380C108700905E5B8C5425FA (void);
// 0x0000039A UnityEngine.XR.ARSubsystems.TrackableType UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_supportedTrackableTypes()
extern void Cinfo_get_supportedTrackableTypes_m0DA573866D46012B650151C7538796542A3E2C70 (void);
// 0x0000039B System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_supportedTrackableTypes(UnityEngine.XR.ARSubsystems.TrackableType)
extern void Cinfo_set_supportedTrackableTypes_mABC320F641164FC1DB2AB9DB3F1E075B6235A785 (void);
// 0x0000039C System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::get_supportsTrackedRaycasts()
extern void Cinfo_get_supportsTrackedRaycasts_mB923DE37AE981FB26768CFF11B34A63F481A261A (void);
// 0x0000039D System.Void UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::set_supportsTrackedRaycasts(System.Boolean)
extern void Cinfo_set_supportsTrackedRaycasts_mD7575B5CAA4BB3652786E2AE2C1B94CF8BEB423C (void);
// 0x0000039E System.Int32 UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_mE07F77F64788F12838A7D8A20E07DE366DDAEEEA (void);
// 0x0000039F System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_mFDD42918C99F796C9737C544D9858098C0241716 (void);
// 0x000003A0 System.String UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::ToString()
extern void Cinfo_ToString_m5E549199F8D40CF630BB8ED6B46EC5F51E580BEB (void);
// 0x000003A1 System.Boolean UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor/Cinfo)
extern void Cinfo_Equals_m96B4DD943D8AAA5D31B0B5BCD0EEC1F94E60F146 (void);
// 0x000003A2 System.Void UnityEngine.XR.ARSubsystems.ScopedProfiler::.ctor(System.String)
extern void ScopedProfiler__ctor_m3426FC301C7541283DA4382EFAFDBDFD08358DAD (void);
// 0x000003A3 System.Void UnityEngine.XR.ARSubsystems.ScopedProfiler::Dispose()
extern void ScopedProfiler_Dispose_mB6720C4212A51CBC86104AF46E081B1CB410BC1A (void);
// 0x000003A4 System.Void UnityEngine.XR.ARSubsystems.SerializableGuid::.ctor(System.UInt64,System.UInt64)
extern void SerializableGuid__ctor_m0A96C8F8254451C083274363A1C68E5FB5CDF107 (void);
// 0x000003A5 UnityEngine.XR.ARSubsystems.SerializableGuid UnityEngine.XR.ARSubsystems.SerializableGuid::get_empty()
extern void SerializableGuid_get_empty_mD053CE84CCEA69471972F0618E55DFDBC923D221 (void);
// 0x000003A6 System.Guid UnityEngine.XR.ARSubsystems.SerializableGuid::get_guid()
extern void SerializableGuid_get_guid_m54618233E4BD08410123A50B4E8DAC66FCE46032 (void);
// 0x000003A7 System.Int32 UnityEngine.XR.ARSubsystems.SerializableGuid::GetHashCode()
extern void SerializableGuid_GetHashCode_m200045FC79E206A9FD4B9A1578A3C66CCBF41481 (void);
// 0x000003A8 System.Boolean UnityEngine.XR.ARSubsystems.SerializableGuid::Equals(System.Object)
extern void SerializableGuid_Equals_m20C468F42E878759B4DB1703B99E3EF7FA0DE550 (void);
// 0x000003A9 System.String UnityEngine.XR.ARSubsystems.SerializableGuid::ToString()
extern void SerializableGuid_ToString_m593CC03163539B5043119F380A189EDCBF100D32 (void);
// 0x000003AA System.Boolean UnityEngine.XR.ARSubsystems.SerializableGuid::Equals(UnityEngine.XR.ARSubsystems.SerializableGuid)
extern void SerializableGuid_Equals_m1ADEE5CED29ED1D62E794F2CECCDEADF416878A6 (void);
// 0x000003AB System.Void UnityEngine.XR.ARSubsystems.SerializableGuid::.cctor()
extern void SerializableGuid__cctor_m7AE147A3690432A01E90F8785AAAA9724841CC44 (void);
// 0x000003AC System.Boolean UnityEngine.XR.ARSubsystems.SessionAvailabilityExtensions::IsSupported(UnityEngine.XR.ARSubsystems.SessionAvailability)
extern void SessionAvailabilityExtensions_IsSupported_mB38CD4C740F6E73FACB198DC2F491301EDB34401 (void);
// 0x000003AD System.Boolean UnityEngine.XR.ARSubsystems.SessionAvailabilityExtensions::IsInstalled(UnityEngine.XR.ARSubsystems.SessionAvailability)
extern void SessionAvailabilityExtensions_IsInstalled_mB8EBDA11F7560DAEF09C2A4BC566A5103CA47424 (void);
// 0x000003AE UnityEngine.XR.ARSubsystems.Promise`1<UnityEngine.XR.ARSubsystems.SessionAvailability> UnityEngine.XR.ARSubsystems.XRSessionSubsystem::GetAvailabilityAsync()
extern void XRSessionSubsystem_GetAvailabilityAsync_mA4038195D2F008EB5267493DB3CF19CCFC973047 (void);
// 0x000003AF UnityEngine.XR.ARSubsystems.Promise`1<UnityEngine.XR.ARSubsystems.SessionInstallationStatus> UnityEngine.XR.ARSubsystems.XRSessionSubsystem::InstallAsync()
extern void XRSessionSubsystem_InstallAsync_m173C37A6ED69160C9634E89383D515FC28EF59BF (void);
// 0x000003B0 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::.ctor()
extern void XRSessionSubsystem__ctor_m8485F39F339764D3FCA4FD0E1D77ADE16CAE1676 (void);
// 0x000003B1 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::Reset()
extern void XRSessionSubsystem_Reset_mFA88E84DCF6A271F853C9B52A28F0A34AFCAE74D (void);
// 0x000003B2 System.Nullable`1<UnityEngine.XR.ARSubsystems.Configuration> UnityEngine.XR.ARSubsystems.XRSessionSubsystem::DetermineConfiguration(UnityEngine.XR.ARSubsystems.Feature)
extern void XRSessionSubsystem_DetermineConfiguration_mC3CBA78160165C46FCB97DDA58E9B32A46B43770 (void);
// 0x000003B3 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::Update(UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)
extern void XRSessionSubsystem_Update_mB98D19BDD6613D1140C2FEDE5107B87DEE9960AC (void);
// 0x000003B4 System.Nullable`1<UnityEngine.XR.ARSubsystems.Configuration> UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_currentConfiguration()
extern void XRSessionSubsystem_get_currentConfiguration_m7B3DC4591DB239331BDEA94C32CA927E78C991CC (void);
// 0x000003B5 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::set_currentConfiguration(System.Nullable`1<UnityEngine.XR.ARSubsystems.Configuration>)
extern void XRSessionSubsystem_set_currentConfiguration_m676D72EA2E4E14328D3ADDF29C98D5397DE4A646 (void);
// 0x000003B6 System.String UnityEngine.XR.ARSubsystems.XRSessionSubsystem::HexString(System.IntPtr)
extern void XRSessionSubsystem_HexString_m4A3CB385B4E2878EB21BDADEBC2F6003A4D0E68C (void);
// 0x000003B7 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::DebugPrintConfigurationChange(UnityEngine.XR.ARSubsystems.Configuration,UnityEngine.XR.ARSubsystems.Feature)
extern void XRSessionSubsystem_DebugPrintConfigurationChange_m42A5DB0B450604B289BD68FDF8C2F68243643167 (void);
// 0x000003B8 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_requestedFeatures()
extern void XRSessionSubsystem_get_requestedFeatures_m3D5B22B790EC0E1CA2903F88DDC339ADC6E3805F (void);
// 0x000003B9 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.ConfigurationDescriptor> UnityEngine.XR.ARSubsystems.XRSessionSubsystem::GetConfigurationDescriptors(Unity.Collections.Allocator)
extern void XRSessionSubsystem_GetConfigurationDescriptors_m38E9B6B5B75399594BBF74FE3E1B685EBC7494A1 (void);
// 0x000003BA System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::OnApplicationPause()
extern void XRSessionSubsystem_OnApplicationPause_m863413E205047A9329A534A2955ABAF34953C136 (void);
// 0x000003BB System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::OnApplicationResume()
extern void XRSessionSubsystem_OnApplicationResume_m7CC922F44D20F20791E6DCDDB87682E7798A1160 (void);
// 0x000003BC UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_trackingState()
extern void XRSessionSubsystem_get_trackingState_m65EE2B0335117F7508AC8A82DB81421AC88AC687 (void);
// 0x000003BD UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_requestedTrackingMode()
extern void XRSessionSubsystem_get_requestedTrackingMode_m4F6519898E617E15D1F4CB2EF96057F6D38CBD1B (void);
// 0x000003BE System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::set_requestedTrackingMode(UnityEngine.XR.ARSubsystems.Feature)
extern void XRSessionSubsystem_set_requestedTrackingMode_m43499C22FDB4E328BBEA1992222DC348052992E1 (void);
// 0x000003BF UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_currentTrackingMode()
extern void XRSessionSubsystem_get_currentTrackingMode_m36511B6DC40F6363FEB7DD1222086522B54E26AE (void);
// 0x000003C0 UnityEngine.XR.ARSubsystems.NotTrackingReason UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_notTrackingReason()
extern void XRSessionSubsystem_get_notTrackingReason_m2FB94CC40A6732E380A9713537C13D1067EC8928 (void);
// 0x000003C1 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_matchFrameRateEnabled()
extern void XRSessionSubsystem_get_matchFrameRateEnabled_m8B5B88A363EC86DE2F5851CFC4D0D388ADF890A0 (void);
// 0x000003C2 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_matchFrameRateRequested()
extern void XRSessionSubsystem_get_matchFrameRateRequested_mCABF94E8C5BA04F7AE3A708360DFEE216A9BE97F (void);
// 0x000003C3 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem::set_matchFrameRateRequested(System.Boolean)
extern void XRSessionSubsystem_set_matchFrameRateRequested_m1059EAC1993A8F333B791C10C5B2173E171EB330 (void);
// 0x000003C4 System.Int32 UnityEngine.XR.ARSubsystems.XRSessionSubsystem::get_frameRate()
extern void XRSessionSubsystem_get_frameRate_mE5994F649324FE45138D7D5A56DE4CB6CDEA9784 (void);
// 0x000003C5 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::Start()
extern void Provider_Start_m2A20FC49495EFF34A01887ABF28338FD2511C97A (void);
// 0x000003C6 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::Stop()
extern void Provider_Stop_mC3937DB37B165BFDB925D51BDFB63DBAE14E5CE6 (void);
// 0x000003C7 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::Update(UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)
extern void Provider_Update_m44516D330A225A42401D9F850CAB45A1781656A7 (void);
// 0x000003C8 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::Update(UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration)
extern void Provider_Update_mC15A02B030984925D814C8CF68EB96D4BD268236 (void);
// 0x000003C9 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_requestedFeatures()
extern void Provider_get_requestedFeatures_mD37FD382547DA72EF30A32B33AB2660101B248D5 (void);
// 0x000003CA UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_requestedTrackingMode()
extern void Provider_get_requestedTrackingMode_mC88877D2BC7250D543457D640A20AE183EB9BFE5 (void);
// 0x000003CB System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::set_requestedTrackingMode(UnityEngine.XR.ARSubsystems.Feature)
extern void Provider_set_requestedTrackingMode_mE84B329D9C903D6D47CBA2D11DF144EADB1D2345 (void);
// 0x000003CC UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_currentTrackingMode()
extern void Provider_get_currentTrackingMode_m597AC294BE6020DFD42DAE027B2E62D5906ABD34 (void);
// 0x000003CD Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.ConfigurationDescriptor> UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::GetConfigurationDescriptors(Unity.Collections.Allocator)
extern void Provider_GetConfigurationDescriptors_mDBC0CC4E857D4C838349D32ED2FBDFE75C3A5A39 (void);
// 0x000003CE System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::Destroy()
extern void Provider_Destroy_m91FDA48A481008AB6F408823ACFA4E51B6710F17 (void);
// 0x000003CF System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::Reset()
extern void Provider_Reset_mC07FE81BB38D7C6F1123D477E078BCA98DD0007E (void);
// 0x000003D0 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::OnApplicationPause()
extern void Provider_OnApplicationPause_mDDA05F7C18D3B1E26F0B468CBC454557788D147B (void);
// 0x000003D1 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::OnApplicationResume()
extern void Provider_OnApplicationResume_m598667339799D80D929DEBBA5C197AC4C394C52A (void);
// 0x000003D2 System.IntPtr UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_nativePtr()
extern void Provider_get_nativePtr_m36BB948CA26F060AE9F9B5E77191B48605C5770B (void);
// 0x000003D3 UnityEngine.XR.ARSubsystems.Promise`1<UnityEngine.XR.ARSubsystems.SessionAvailability> UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::GetAvailabilityAsync()
extern void Provider_GetAvailabilityAsync_m0C73C4907A03BA2F018EA2C0CE66C9C17423C6DD (void);
// 0x000003D4 UnityEngine.XR.ARSubsystems.Promise`1<UnityEngine.XR.ARSubsystems.SessionInstallationStatus> UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::InstallAsync()
extern void Provider_InstallAsync_m17CAA895097CD78BC743DD1CA0CB4B6F5F7091D6 (void);
// 0x000003D5 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_trackingState()
extern void Provider_get_trackingState_m3E9021C49EADF2BE9853FD13A23650CE5237A2BF (void);
// 0x000003D6 UnityEngine.XR.ARSubsystems.NotTrackingReason UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_notTrackingReason()
extern void Provider_get_notTrackingReason_mD6C96A5620A1DD87BCB86710E9460A41C5B18F66 (void);
// 0x000003D7 System.Guid UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_sessionId()
extern void Provider_get_sessionId_m28A8F75715D7469B0F555CAC2E9B7D71B68CAFCE (void);
// 0x000003D8 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_matchFrameRateEnabled()
extern void Provider_get_matchFrameRateEnabled_m4EC0EF72F182CE2BBF27666D5750E46D54E797EB (void);
// 0x000003D9 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_matchFrameRateRequested()
extern void Provider_get_matchFrameRateRequested_m32C8D538076876248908EBA9F11F31D249894C37 (void);
// 0x000003DA System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::set_matchFrameRateRequested(System.Boolean)
extern void Provider_set_matchFrameRateRequested_m22D49ABF01EEF1D750FD86A7E6D67BE6A462E0DC (void);
// 0x000003DB System.Int32 UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::get_frameRate()
extern void Provider_get_frameRate_mC445B76B58305DB89474EBF4A1EAC3DFBB8268D0 (void);
// 0x000003DC System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystem/Provider::.ctor()
extern void Provider__ctor_m921D9E5D94AB32804689C972E36ECA2601BB2AAE (void);
// 0x000003DD System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor::get_supportsInstall()
extern void XRSessionSubsystemDescriptor_get_supportsInstall_mEBC6C00B6B07C4F0511E6CADEB7FD7F6099A27D3 (void);
// 0x000003DE System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor::set_supportsInstall(System.Boolean)
extern void XRSessionSubsystemDescriptor_set_supportsInstall_mE8D2939BADC8A5579685249EEA3C12617416CEF2 (void);
// 0x000003DF System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor::get_supportsMatchFrameRate()
extern void XRSessionSubsystemDescriptor_get_supportsMatchFrameRate_m5C032C3C19BA1C47856442A7290690061E41E87C (void);
// 0x000003E0 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor::set_supportsMatchFrameRate(System.Boolean)
extern void XRSessionSubsystemDescriptor_set_supportsMatchFrameRate_m9FB2B904E2E7E4EC51E2089C8DDE97463F4C031D (void);
// 0x000003E1 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor::RegisterDescriptor(UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo)
extern void XRSessionSubsystemDescriptor_RegisterDescriptor_m60DE0DD6782289BAD4D67D15E2361D1B7B71C262 (void);
// 0x000003E2 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor::.ctor(UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo)
extern void XRSessionSubsystemDescriptor__ctor_mC3487128AC53B5697213AFF8B2F98F1C3288B3A7 (void);
// 0x000003E3 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::get_supportsInstall()
extern void Cinfo_get_supportsInstall_m706A828C9AE61FF74DF4640D80E52148CDF4F3AD (void);
// 0x000003E4 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::set_supportsInstall(System.Boolean)
extern void Cinfo_set_supportsInstall_m05EE61C58E505A8F20DEA68862395341F1DAD3FD (void);
// 0x000003E5 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::get_supportsMatchFrameRate()
extern void Cinfo_get_supportsMatchFrameRate_m1E603F47BF0A28EE5E7377A28D9D2BB29BFD3B6F (void);
// 0x000003E6 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::set_supportsMatchFrameRate(System.Boolean)
extern void Cinfo_set_supportsMatchFrameRate_m9CB328CEF43BCE3E59F26A97D32AEE1D201F8787 (void);
// 0x000003E7 System.String UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::get_id()
extern void Cinfo_get_id_mA521F604882D1F4C6FD30262F3E2C3B0609BFC55 (void);
// 0x000003E8 System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::set_id(System.String)
extern void Cinfo_set_id_m6A2CAB13FAD54AB05458DC5DE1FAB5C651E9D656 (void);
// 0x000003E9 System.Type UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::get_providerType()
extern void Cinfo_get_providerType_mC64DDA0FD5E23FD53F7B9DAEAF4433487436835E (void);
// 0x000003EA System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::set_providerType(System.Type)
extern void Cinfo_set_providerType_m2BCF5FEFC25D812C3E7F00725B49AE02540B2F8E (void);
// 0x000003EB System.Type UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::get_subsystemTypeOverride()
extern void Cinfo_get_subsystemTypeOverride_mFB0EAD46EF91216924D0509C72DF82ADA526B99D (void);
// 0x000003EC System.Void UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::set_subsystemTypeOverride(System.Type)
extern void Cinfo_set_subsystemTypeOverride_m30FDD93193E0D694ABB33E184552AAF1A8AA36E6 (void);
// 0x000003ED System.Int32 UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::GetHashCode()
extern void Cinfo_GetHashCode_m52D192E832A52B87FB2F03DB84EB47EED7DCD48C (void);
// 0x000003EE System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::Equals(UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo)
extern void Cinfo_Equals_m1C37149A7375CC94768E18102A1CB1AED3E3FF77 (void);
// 0x000003EF System.Boolean UnityEngine.XR.ARSubsystems.XRSessionSubsystemDescriptor/Cinfo::Equals(System.Object)
extern void Cinfo_Equals_m515E1A8509A7C1472469FD535B7CBE5D58E45A78 (void);
// 0x000003F0 UnityEngine.ScreenOrientation UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::get_screenOrientation()
extern void XRSessionUpdateParams_get_screenOrientation_m3200C056D5EF350333CBEC08C5BADCB3F9B3588A (void);
// 0x000003F1 System.Void UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::set_screenOrientation(UnityEngine.ScreenOrientation)
extern void XRSessionUpdateParams_set_screenOrientation_m958168FC8048AE33DC4757F9A1184520B15FD341 (void);
// 0x000003F2 UnityEngine.Vector2Int UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::get_screenDimensions()
extern void XRSessionUpdateParams_get_screenDimensions_m68257DCBBAEB4090559AC18A180C8E54D02F5118 (void);
// 0x000003F3 System.Void UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::set_screenDimensions(UnityEngine.Vector2Int)
extern void XRSessionUpdateParams_set_screenDimensions_m3658D658C653B6ED72DB68F099A4512FE756D8F6 (void);
// 0x000003F4 System.Int32 UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::GetHashCode()
extern void XRSessionUpdateParams_GetHashCode_mCCE320FCC4DE7EEF2FC1778BB15E422BAC190908 (void);
// 0x000003F5 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::Equals(System.Object)
extern void XRSessionUpdateParams_Equals_m2501DC639F937DCBD2423619545AC556DE71F3B2 (void);
// 0x000003F6 System.String UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::ToString()
extern void XRSessionUpdateParams_ToString_m01D74BEF4A53B620271579234011D2F6D0522598 (void);
// 0x000003F7 System.Boolean UnityEngine.XR.ARSubsystems.XRSessionUpdateParams::Equals(UnityEngine.XR.ARSubsystems.XRSessionUpdateParams)
extern void XRSessionUpdateParams_Equals_m57475F3E7F97539B697A4DC77122F934C321ECD0 (void);
// 0x000003F8 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.TrackableId::get_invalidId()
extern void TrackableId_get_invalidId_m06B698EFFA7748E185299C72B5CEC1AA5B221F85 (void);
// 0x000003F9 System.UInt64 UnityEngine.XR.ARSubsystems.TrackableId::get_subId1()
extern void TrackableId_get_subId1_m219B741FAF6D36DB7B8CFDC588EA93677FCE174B (void);
// 0x000003FA System.UInt64 UnityEngine.XR.ARSubsystems.TrackableId::get_subId2()
extern void TrackableId_get_subId2_m136D4970BDCC7323020913A9B5303584AA105B34 (void);
// 0x000003FB System.Void UnityEngine.XR.ARSubsystems.TrackableId::.ctor(System.UInt64,System.UInt64)
extern void TrackableId__ctor_mB9B301A9CD03355A4E03A2B1A102B6B75F190792 (void);
// 0x000003FC System.String UnityEngine.XR.ARSubsystems.TrackableId::ToString()
extern void TrackableId_ToString_mCD45FD4FF5DF6DE30A38AD05D02CFA7B2B696BB1 (void);
// 0x000003FD System.Int32 UnityEngine.XR.ARSubsystems.TrackableId::GetHashCode()
extern void TrackableId_GetHashCode_mFD297FC6DB40FB5B28C6E9B7A2CF2785D75C4E86 (void);
// 0x000003FE System.Boolean UnityEngine.XR.ARSubsystems.TrackableId::Equals(System.Object)
extern void TrackableId_Equals_mA542615B3B7AAD52AEBBEFBCE7E6987B2DE3849D (void);
// 0x000003FF System.Boolean UnityEngine.XR.ARSubsystems.TrackableId::Equals(UnityEngine.XR.ARSubsystems.TrackableId)
extern void TrackableId_Equals_m1DF35616359175E3D66DE18250E8CDA1E6462B06 (void);
// 0x00000400 System.Boolean UnityEngine.XR.ARSubsystems.TrackableId::op_Equality(UnityEngine.XR.ARSubsystems.TrackableId,UnityEngine.XR.ARSubsystems.TrackableId)
extern void TrackableId_op_Equality_m0868EBB6BB9BA72B226D0717352604B3E8EA119B (void);
// 0x00000401 System.Void UnityEngine.XR.ARSubsystems.TrackableId::.cctor()
extern void TrackableId__cctor_m1B22B00F74C0C62B97D7EAB4E9B17F55B2DE94E7 (void);
// 0x00000402 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.ARSubsystems.ITrackable::get_trackableId()
// 0x00000403 UnityEngine.Pose UnityEngine.XR.ARSubsystems.ITrackable::get_pose()
// 0x00000404 UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.ARSubsystems.ITrackable::get_trackingState()
// 0x00000405 Unity.Collections.NativeArray`1<T> UnityEngine.XR.ARSubsystems.TrackableChanges`1::get_added()
// 0x00000406 Unity.Collections.NativeArray`1<T> UnityEngine.XR.ARSubsystems.TrackableChanges`1::get_updated()
// 0x00000407 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.TrackableId> UnityEngine.XR.ARSubsystems.TrackableChanges`1::get_removed()
// 0x00000408 System.Boolean UnityEngine.XR.ARSubsystems.TrackableChanges`1::get_isCreated()
// 0x00000409 System.Void UnityEngine.XR.ARSubsystems.TrackableChanges`1::set_isCreated(System.Boolean)
// 0x0000040A System.Void UnityEngine.XR.ARSubsystems.TrackableChanges`1::.ctor(System.Int32,System.Int32,System.Int32,Unity.Collections.Allocator,T)
// 0x0000040B System.Void UnityEngine.XR.ARSubsystems.TrackableChanges`1::.ctor(System.Void*,System.Int32,System.Void*,System.Int32,System.Void*,System.Int32,T,System.Int32,Unity.Collections.Allocator)
// 0x0000040C System.Void UnityEngine.XR.ARSubsystems.TrackableChanges`1::Dispose()
// 0x0000040D UnityEngine.XR.ARSubsystems.TrackableChanges`1<TTrackable> UnityEngine.XR.ARSubsystems.TrackingSubsystem`4::GetChanges(Unity.Collections.Allocator)
// 0x0000040E System.Void UnityEngine.XR.ARSubsystems.TrackingSubsystem`4::.ctor()
// 0x0000040F System.Void UnityEngine.XR.ARSubsystems.ValidationUtility`1::ValidateAndThrow(UnityEngine.XR.ARSubsystems.TrackableChanges`1<T>)
// 0x00000410 System.Void UnityEngine.XR.ARSubsystems.ValidationUtility`1::ValidateAndDisposeIfThrown(UnityEngine.XR.ARSubsystems.TrackableChanges`1<T>)
// 0x00000411 System.Void UnityEngine.XR.ARSubsystems.ValidationUtility`1::AddToSetAndThrowIfDuplicate(UnityEngine.XR.ARSubsystems.TrackableId,System.Boolean,System.String)
// 0x00000412 System.Void UnityEngine.XR.ARSubsystems.ValidationUtility`1::.ctor()
// 0x00000413 System.Void UnityEngine.XR.ARSubsystems.ValidationUtility`1::.cctor()
// 0x00000414 System.IntPtr UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_nativeTexture()
extern void XRTextureDescriptor_get_nativeTexture_mC7D28CAE1A948B378FF5966C85883508435C2B1A (void);
// 0x00000415 System.Int32 UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_width()
extern void XRTextureDescriptor_get_width_m16F58793E411A03BDB01C19D0BCDBA8DC52455DC (void);
// 0x00000416 System.Int32 UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_height()
extern void XRTextureDescriptor_get_height_mF20F82E1D3B8739A79F017147847B051FD33E554 (void);
// 0x00000417 System.Int32 UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_mipmapCount()
extern void XRTextureDescriptor_get_mipmapCount_mE8FD55B645419BA7DA6959B000B8218BE142B302 (void);
// 0x00000418 UnityEngine.TextureFormat UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_format()
extern void XRTextureDescriptor_get_format_mB5A486F3100EB333CF52F505ACB63E68C7CB511D (void);
// 0x00000419 System.Int32 UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_propertyNameId()
extern void XRTextureDescriptor_get_propertyNameId_mF90DF67F19E16118CB3D31EB44E643F4C48DE7C8 (void);
// 0x0000041A System.Boolean UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_valid()
extern void XRTextureDescriptor_get_valid_m921AF29648A562E6C6D2CA5F0E4A84109368A1E6 (void);
// 0x0000041B System.Int32 UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_depth()
extern void XRTextureDescriptor_get_depth_m27FA31D85456F65E706B03743250CB3858EBE0E3 (void);
// 0x0000041C UnityEngine.Rendering.TextureDimension UnityEngine.XR.ARSubsystems.XRTextureDescriptor::get_dimension()
extern void XRTextureDescriptor_get_dimension_mAB82596EFC83FBC3477D496E77FD9B0579922CCC (void);
// 0x0000041D System.Boolean UnityEngine.XR.ARSubsystems.XRTextureDescriptor::hasIdenticalTextureMetadata(UnityEngine.XR.ARSubsystems.XRTextureDescriptor)
extern void XRTextureDescriptor_hasIdenticalTextureMetadata_mEEAE086BC369920DB89D8E38BA6A1133436100F2 (void);
// 0x0000041E System.Void UnityEngine.XR.ARSubsystems.XRTextureDescriptor::Reset()
extern void XRTextureDescriptor_Reset_m7C4468143C7A9EA8B43068E809C8A392CCF31F09 (void);
// 0x0000041F System.Boolean UnityEngine.XR.ARSubsystems.XRTextureDescriptor::Equals(UnityEngine.XR.ARSubsystems.XRTextureDescriptor)
extern void XRTextureDescriptor_Equals_mD2A71E4A2D68686E74A648896FAC0FCDF02BE0B1 (void);
// 0x00000420 System.Boolean UnityEngine.XR.ARSubsystems.XRTextureDescriptor::Equals(System.Object)
extern void XRTextureDescriptor_Equals_m37D3AFD7E110F62E8977937DD66AC053B3F64C8D (void);
// 0x00000421 System.Int32 UnityEngine.XR.ARSubsystems.XRTextureDescriptor::GetHashCode()
extern void XRTextureDescriptor_GetHashCode_m8628ACEB1A4A6203BCD28B01D59B588715C83291 (void);
// 0x00000422 System.String UnityEngine.XR.ARSubsystems.XRTextureDescriptor::ToString()
extern void XRTextureDescriptor_ToString_m13E8A051346374949A95D217BBAAD298893A25EB (void);
static Il2CppMethodPointer s_methodPointers[1058] =
{
EmbeddedAttribute__ctor_mB39F1C96BEB73438DE3FEDB828717EE136940697,
IsReadOnlyAttribute__ctor_m0510A708B114F4B975D24C5B7374CE116A974BF2,
XRAnchor_get_defaultValue_m4E0B24D0D2E64DE1B2BE81F781410CFB6031B6CF,
XRAnchor_get_trackableId_mE8C852BEAA9025FD1CB643F41836CA72C25E7B92,
XRAnchor_get_pose_mD135777376B2898B0A151AD5AA8FD4BBD7C7C5FF,
XRAnchor_get_trackingState_m2B3E621BA332B1E74CF8EC94FA8B18EDAF68F462,
XRAnchor_get_nativePtr_m47E36685E001BF3810BF6A45B8DF8128080DAEFB,
XRAnchor_get_sessionId_m61DAD2C82C4D725E773BFAB2E8A8BE50EDEEC379,
XRAnchor_GetHashCode_m3928C95D8DE59840CB82D9FD13EDEEAEA2A89376,
XRAnchor_Equals_mE6AC873FF43B605D47F5AB76F0ADAD9A6EDEA25B,
XRAnchor_Equals_m8C35DEBDDAC21262E3344152D76539DF1AF7F060,
XRAnchor__cctor_m101ABC03541DECF122E998C1C183D97FD34315F7,
XRAnchorSubsystem__ctor_mB5F70C2E39B5EA531C05244611590F400365265A,
XRAnchorSubsystem_GetChanges_mA9E2E9974DB9E35A550FEE38B33356141E3AE5F7,
XRAnchorSubsystem_TryAddAnchor_m203DDF7401C08C01A9EBB555FBE2544119A2B3B3,
XRAnchorSubsystem_TryAttachAnchor_mC8678FEACC6D879F0156CEDE6E1FF69E8A1AAF55,
XRAnchorSubsystem_TryRemoveAnchor_mA418EEBB09F89CDF93888A61F1681DE2DBA69799,
NULL,
Provider_TryAddAnchor_m8BAE08000E72193AE272504162CD3CAE9E2011D3,
Provider_TryAttachAnchor_mAAFB29BF47A06D1B7B5EA30849047CFC2E91072A,
Provider_TryRemoveAnchor_m21FBBF8C515908F05CF755B85B9643760E6BB2F7,
Provider__ctor_mFE4941CFC3CA511BBD7C0A498BB2C74DE96FF498,
XRAnchorSubsystemDescriptor_set_supportsTrackableAttachments_m11271C1EBC306EB3FDA99D24D45D88DB31DCCC38,
XRAnchorSubsystemDescriptor_Create_m32C16A0DDC60ED2D374EFB884CF807E62B37C0A8,
XRAnchorSubsystemDescriptor__ctor_m5393EA2BCAFE2CB48EDD6DDCCD50C40FC7035331,
Cinfo_get_id_m7C38252CE360F061914361192300AECA8CB5307B,
Cinfo_set_id_mCB169DF169C36D9D12651785DCBF71ABCC10FD9D,
Cinfo_get_providerType_m6A1DFCD062C95265E8E1C6502D44D6C464B50EED,
Cinfo_set_providerType_m9E012FF4CD325826F838F663BAEE045C452A3C26,
Cinfo_get_subsystemTypeOverride_m169F49BB024275E13DF95C274191A675CC0F66B9,
Cinfo_set_subsystemTypeOverride_mC525A48B08F8F826275950FFB61C780C4AEA6A6B,
Cinfo_get_supportsTrackableAttachments_m13B6C9977641F3E284C69AA3554EBD19478538B8,
Cinfo_set_supportsTrackableAttachments_m0B0516A50FFA22C3F60483E3498DC6BB1D460995,
Cinfo_GetHashCode_mBBEF5C69D3B91763153EDE624C76AC428ECFABB1,
Cinfo_Equals_m8E52493318DDE5F675E85E0733F5F7CCDA3C8339,
Cinfo_Equals_m07BCEC0FF4D8C2A43AE850689AC5AA4FC0603DE8,
XRReferencePoint_get_defaultValue_m9AF89D3F11BF14D60BDC4FB2F360911F56E17013,
XRReferencePoint_get_trackableId_mEE1B3349EA8F19E94BF8B76CBB644822317D2758,
XRReferencePoint_get_pose_mFDB2701C343707F0FA479C2C775B77BEC2092D61,
XRReferencePoint_get_trackingState_m9C6DD336B0E91F39FA04F298B0543148433F11B2,
XRReferencePoint_get_nativePtr_m80EFF4D6D345E7B7CC5687B506C410C84B09EFBA,
XRReferencePoint_get_sessionId_mC498F0CAE614B4048B79742479252D923D4FED46,
XRReferencePoint_GetHashCode_mD1C610489F910DB8AF23C5ED39B3930487B2F450,
XRReferencePoint_Equals_m139BA3698F72E149B33FB577B616A0043DBBB8E6,
XRReferencePoint_Equals_m464FBE4D3BF000716BC20737865CC263128FCF9B,
XRReferencePoint__cctor_m14BE01E3A1C266EC61D10C6C8AD23F89DFA7594C,
XRReferencePointSubsystem_GetChanges_m9F0EC9E0522340CBD75626D185D848CFBFE3F456,
XRReferencePointSubsystem_TryAddReferencePoint_m671606BA15B6A84BB3637C20C72387772A9CCF80,
XRReferencePointSubsystem_TryAttachReferencePoint_m88BA8C12582778654F08A7906AB34C3AE89274BA,
XRReferencePointSubsystem_TryRemoveReferencePoint_mE7F6B247F12026A9920896461914AE894E004346,
XRReferencePointSubsystem__ctor_m5D17ED57D2A7F6EDB8CD21F4E5027D096C9241B9,
Provider_Start_m23A09DFBE9B001EA5716EF0D11FAB9878AEFA634,
Provider_Stop_mA1D84CAD4F173F45729BCCF7F9203317BC16E88C,
Provider_Destroy_m9C33B460B119788705D6CF145510A3CA3320CFCA,
NULL,
Provider_TryAddReferencePoint_mEECEE05AE6CE36CC4DFC6B34EB2328203ABF74D2,
Provider_TryAttachReferencePoint_m6B37B8E188234F1B273B4CCCBA86C3369A9056EF,
Provider_TryRemoveReferencePoint_m715A9000B06295D71581229BCCE534B5F1BDB5E2,
XRCameraConfiguration_get_width_m019869C624524B8C4EA0021D9331F2AD856A25C3,
XRCameraConfiguration_get_height_mAAC1B9AE539EF89D59585A6BFC8F925F94AA14D3,
XRCameraConfiguration_get_framerate_m3DCC7B7F2FEAFDFB5ED0A580153FBAAA22B60B96,
XRCameraConfiguration_ToString_m570541033A53E9657C809B420CEFDF63D944070B,
XRCameraConfiguration_GetHashCode_mBAD6720F670B108F1D17BAEBAF619989A011D63A,
XRCameraConfiguration_Equals_mDC2D17183F91C897762D8F8B24D2CA2F96E1A48C,
XRCameraConfiguration_Equals_m8CD36FE1F7DA4B3B3520877DC415D066B77FEFEB,
XRCameraFrame_get_timestampNs_m8F3730A23C9FF6A729F8D1939581D88716438DF7,
XRCameraFrame_get_averageBrightness_m34CB9F000CCBD2004F7E3CDBA987170A4B049F8E,
XRCameraFrame_get_averageColorTemperature_mD5EA9E87E76F7BCBFF709ABF309B142FB9D03DFC,
XRCameraFrame_get_colorCorrection_mFB47669447DE0255EE2491929D9DF85CF7DF1B1A,
XRCameraFrame_get_projectionMatrix_mC489D4A0698634FDA99D0BBE0A93E42F5C82E985,
XRCameraFrame_get_displayMatrix_m7D157BB20E2863E0415A42140B6396C4D3E30E31,
XRCameraFrame_get_averageIntensityInLumens_mC250C5B79A5B4C0F75D89BD1EC6FB07AB130B62F,
XRCameraFrame_get_exposureDuration_m7957768DDB0AE596767478A9F8239A98BFD23207,
XRCameraFrame_get_exposureOffset_m276A794A6640F25AA7B1B0FB69C8296F7DDAAE53,
XRCameraFrame_get_mainLightIntensityLumens_mDBCBCEA85B23C484CAF7D66ED52681E4AE4C506B,
XRCameraFrame_get_mainLightColor_m3696EC5D7104849121C9A6CF3524AAC7382BED03,
XRCameraFrame_get_mainLightDirection_mB7E086F4A8A89BD7404BB702DF980D7B5B124445,
XRCameraFrame_get_ambientSphericalHarmonics_m5859CDC5CE50F33C62EA59CE9BFC58C6F3CDB269,
XRCameraFrame_get_cameraGrain_m7E8B37489D5380BE507656FFC9FE30B0333CED2A,
XRCameraFrame_get_noiseIntensity_mA6150FB06579A1A6E637139C97E93304D6A83D3A,
XRCameraFrame_get_hasTimestamp_m2FBE2F396A15CC469756E3C876519B7FF3349897,
XRCameraFrame_get_hasAverageBrightness_m3B006851943F915530A8628BF3311C946CC8FC68,
XRCameraFrame_get_hasAverageColorTemperature_mEE8976398F8AE074090A1D3BE2DBB5F3484C04DF,
XRCameraFrame_get_hasColorCorrection_m687F2028F9A79A04CC6CA75C0305134DAB4DB9FE,
XRCameraFrame_get_hasProjectionMatrix_mA7A707C6E990D729C152E149063DE2BD0A456B4A,
XRCameraFrame_get_hasDisplayMatrix_mB369CC19C7B3E2640E2C2747A1E117A5773E5052,
XRCameraFrame_get_hasAverageIntensityInLumens_m2251DD714F7E6E9098DB738DF536FE191425379E,
XRCameraFrame_get_hasExposureDuration_mDF9AC5D38E767A61439850FCEE55E7CC40592EDC,
XRCameraFrame_get_hasExposureOffset_m6696D6E287E1FB413669FA175ACD45E8D6799A37,
XRCameraFrame_get_hasMainLightIntensityLumens_mE0C9564F7A24636366E063F9086ECA81FDB055BF,
XRCameraFrame_get_hasMainLightColor_m2B1D25F6224C098D66503F6768C6930D84451AB3,
XRCameraFrame_get_hasMainLightDirection_m75FB7306D3E483962E22DFB5DD2BB3A5398A7CC3,
XRCameraFrame_get_hasAmbientSphericalHarmonics_mA2B45AEE57B7DA5081B81C8483F1FBB90ABE3090,
XRCameraFrame_get_hasCameraGrain_m14C3641296BF7BC49501E3D5E810A24A2D50922D,
XRCameraFrame_get_hasNoiseIntensity_mA5A08A29C34AC2AFFE5792725E4506F0B32EF75C,
XRCameraFrame_Equals_mEF403AD303261AE21BFE6F482EB3EF728EB49DD6,
XRCameraFrame_Equals_m82C80589000BA2F428E4774763F668045BF085D6,
XRCameraFrame_GetHashCode_mCEC92150EE3B5237ACB46471128479997F78185D,
XRCameraFrame_ToString_mE4A2FE2CA4AF1D844B950D0029023F98B189A6D8,
XRCameraIntrinsics_Equals_mA7D92292854DA38258811FDC946BA82E1D5E001D,
XRCameraIntrinsics_Equals_m037475660705484B0E8730157EA7A731998466AD,
XRCameraIntrinsics_GetHashCode_mD1D3D0F34AA1723CC454040334B46D5CD7809377,
XRCameraIntrinsics_ToString_mFD230300DEC4F7FB2DCF30F4F02036D97213B2C9,
XRCameraParams_set_zNear_mE207AB998D78E35497B1E941A20C7864D454EE45,
XRCameraParams_set_zFar_m4ABC4E0271EE81FEA88B1608B19ED3CFDA8E523B,
XRCameraParams_set_screenWidth_m4E9ABE5FEE32FB446FDF6EC5B00961ACC66B48FB,
XRCameraParams_set_screenHeight_m31C5E67C7403556AFF8B72CC4BB09EA3C3AA05A3,
XRCameraParams_set_screenOrientation_mCF2AD6E975E790E5BE14E2A1EB71A73E8AA7E7D9,
XRCameraParams_Equals_m392E8AB6ECAEA915E0E1C9A20831EBE24346E4C0,
XRCameraParams_Equals_mDE9A6E9D2127F369FA129FD19E73A790FF48E8F2,
XRCameraParams_GetHashCode_m5C9955238ED690EA6A338097DB818F37ECBFDC72,
XRCameraParams_ToString_m4CAB10F6C7424973F8A9E72F70283A53C384AF3F,
XRCameraSubsystem__ctor_m9DB793A0291AEB063BE13955137FCF52B8A6E222,
XRCameraSubsystem_get_currentCamera_mB3E27F8E8DD2E714AE2E714B69EB765A66F82CF0,
XRCameraSubsystem_get_requestedCamera_m3F7CE47E321AD0ADA777EC146B8A1174F2924CAF,
XRCameraSubsystem_set_requestedCamera_m947B0B046798E375F7761A49948B6BB56CC92BED,
XRCameraSubsystem_get_autoFocusEnabled_mADFDC78EE330D8850DAC9ED5B2D2109302D6A115,
XRCameraSubsystem_get_autoFocusRequested_mE9FFCC3C727160F0009E4DE86900B04C2F27F18D,
XRCameraSubsystem_set_autoFocusRequested_mC296C345AAFDED318589BD639E9CCF076F09DD5E,
XRCameraSubsystem_get_currentLightEstimation_m9A5F99B36DD0779E36EA40AC383ECA1270EB2035,
XRCameraSubsystem_get_requestedLightEstimation_m3B23B765873E67D657FCCBBAC6C1631198345DA3,
XRCameraSubsystem_set_requestedLightEstimation_m4EF957265B8AA95985BEBA40F01EC2CD9F1FFA2C,
XRCameraSubsystem_GetTextureDescriptors_m961437CFE5B36E5845F6752530668DC0673F9F0D,
XRCameraSubsystem_get_cameraMaterial_mDA4DBC2831E55D115436978A0D2113AAA17227E3,
XRCameraSubsystem_OnBeforeBackgroundRender_mC33251AA0F3D003991512D1EC8C15358ACC2EFD6,
XRCameraSubsystem_TryGetIntrinsics_m2C0875523610ECCF7832A4427CC40EE9BF4E83EB,
XRCameraSubsystem_GetConfigurations_mB60A927EEA207615D63A2CBF64654A07C8C76A5C,
XRCameraSubsystem_get_currentConfiguration_m5A53BB5CE3AEC31C3652B41EC9DE72FEA342FFCB,
XRCameraSubsystem_set_currentConfiguration_mC95F953BE80DD210302A590EBBF46216FDB0F32D,
XRCameraSubsystem_get_invertCulling_m16E9819EBE5D40798B6022B4FE63D10A228FB019,
XRCameraSubsystem_TryGetLatestFrame_m5ED10032B81B83B7A68305B2D6FE8DEA21852C86,
XRCameraSubsystem_get_permissionGranted_mD9B28FCEF7A1C3EB8465639F5A587C255108D4F1,
XRCameraSubsystem_GetMaterialKeywords_mFA8D645BE9C8514542C48BBF628696FC816A4AF0,
XRCameraSubsystem_TryAcquireLatestCpuImage_mEF24B1D7F9C32CC87E769905E61556566EBFA9DE,
XRCameraSubsystem_Register_m8E9CD378020A98CC1728A5C0A3324D25439921F4,
Provider_get_cpuImageApi_m663AFB0EB8E8ECF57CBC2F75EA732B154082EFFE,
Provider_get_cameraMaterial_mB2216E3065B59A4316FE44269B7F72452FC91CAF,
Provider_get_permissionGranted_m81B4D509343689A6B7E05DCE7DC4F23CDCBFFC06,
Provider_get_invertCulling_m1D0C3A5DE10FC21E76F36B206D36279B31DAAF59,
Provider_get_currentCamera_m102ED2EB903E9B0A233C5DD86F697A54BB07B84E,
Provider_get_requestedCamera_m9D75D7C883BE213F9B0750C7A50646BFC1691DD1,
Provider_set_requestedCamera_mB7502C5875663E3FE9FA9C577D238CFD4FEF5E0A,
Provider_Start_m21B1CE84F39D9289CD6B0463FEFE123035A03595,
Provider_Stop_mBC0382A741C3D457CE9306E73C78E31ABE428AC0,
Provider_Destroy_m811EEFB83BCE7A7F55B8126A0CA06F4A0081FF23,
Provider_TryGetFrame_m9BDEADBA9AB8CA56E51906D409DADAE31634631E,
Provider_get_autoFocusEnabled_mE089188B6717EF34C0795BD4F2237ADC67C3CA64,
Provider_get_autoFocusRequested_m61B18E2A0EA9B643C04EBC6AD3E73B9B8E2FFE3F,
Provider_set_autoFocusRequested_m44CF6A0456BF6AEC21730BF6B09A231C4200F432,
Provider_get_currentLightEstimation_m3FC885BECFB5B757A5AFC5188B23433E81D89D65,
Provider_get_requestedLightEstimation_mE06529A3562BE322D3899904DB9D37570AAF159A,
Provider_set_requestedLightEstimation_mAC9935863F31DFC2CAB242A1AC74AF9EAB56F977,
Provider_TryGetIntrinsics_m173355798904E72FC3D80477AE5426A54ABC95BF,
Provider_GetConfigurations_m528095C5BA179D1FD2CF679EE89B6B1C216E6834,
Provider_get_currentConfiguration_mD21D1EB06936263616664DB5D8A1698419E98AE2,
Provider_set_currentConfiguration_m99D438CC1ABE5E92215CA7FA369BE61A7652ED66,
Provider_GetTextureDescriptors_mB6ED5AD6E33BCFE3E70916A227CC81541307C68A,
Provider_GetMaterialKeywords_m160DF6037C4E84C194CC5D3564184D4DEE8A48E4,
Provider_TryAcquireLatestCpuImage_mAB2F3E8C6C6EE2C1DE5181FAF044999FCD6521CA,
Provider_CreateCameraMaterial_mE1F6AD1B1D9F9BA80FE1B8DB3138262545FC018C,
Provider_OnBeforeBackgroundRender_mB0345F2E598C207A2C7A3C1FCD6AEB7080DF1D75,
Provider__ctor_mA61CB0610059584FC8190F2C54D845C7612D82BE,
XRCameraSubsystemCinfo_get_id_m606888326128C053029E1B09A00F2CB97B214291,
XRCameraSubsystemCinfo_set_id_m768994793A205C7D5CE603B354D350A34D47720D,
XRCameraSubsystemCinfo_get_providerType_m181531F5B642DA8E3E10FC62879495B0A8D53110,
XRCameraSubsystemCinfo_set_providerType_m78F56C5CEF9FF62F60DE6073B8AD0FB0AFD00730,
XRCameraSubsystemCinfo_get_subsystemTypeOverride_mED0FB455C8C39164EF2594FC9405B78C1E2EB809,
XRCameraSubsystemCinfo_set_subsystemTypeOverride_mD4D22BB1EC102CA40AF084B06DA3C957139EF2D4,
XRCameraSubsystemCinfo_get_supportsAverageBrightness_mF49B2D16DE8FBC5452C17D87672FBE1EB814145E,
XRCameraSubsystemCinfo_set_supportsAverageBrightness_mC20A88BD3C8D137A1F34888C64DC5FFF37787759,
XRCameraSubsystemCinfo_get_supportsAverageColorTemperature_m789041AE11DC92E73ED6C228C5A5B55A87AE736B,
XRCameraSubsystemCinfo_set_supportsAverageColorTemperature_m77727C8CBAB59D0D078B0A634EB0A56F1BF368E4,
XRCameraSubsystemCinfo_get_supportsColorCorrection_m6910005DB05086FEBDBFFFE47BFFDBB96453E5C7,
XRCameraSubsystemCinfo_set_supportsColorCorrection_m1CBB9181A21D2A964705AD5E22F78735DCFE2C01,
XRCameraSubsystemCinfo_get_supportsDisplayMatrix_m2107BE8860B1A4D050A80801F6286F0E9798820D,
XRCameraSubsystemCinfo_set_supportsDisplayMatrix_m2E11C0B7442273252613BDB41BB8B6F02698FBEA,
XRCameraSubsystemCinfo_get_supportsProjectionMatrix_mAC44711CBD0AEF5600FAF7A65364692FE9FA9D9E,
XRCameraSubsystemCinfo_set_supportsProjectionMatrix_mFC886F8859FDF308D7980935474AA0E66ECF66B4,
XRCameraSubsystemCinfo_get_supportsTimestamp_m0B95FB498C6682EE15E2461F8A5C555B3E397543,
XRCameraSubsystemCinfo_set_supportsTimestamp_mAA6157EC368F6358F155571E257A578729D368D4,
XRCameraSubsystemCinfo_get_supportsCameraConfigurations_mF0168147B6D556F8289DCE665D070EE427430CDD,
XRCameraSubsystemCinfo_set_supportsCameraConfigurations_mD0F431DDAB4F82DDC6E35AB7583572D25244E0F0,
XRCameraSubsystemCinfo_get_supportsCameraImage_m404883CC80418B38CB13D3ED6DAAFE6D81978A6F,
XRCameraSubsystemCinfo_set_supportsCameraImage_m2140EBB7ACEA9B1634F56DE2DCB85F26CB8C4D7D,
XRCameraSubsystemCinfo_get_supportsAverageIntensityInLumens_m5B91C231C060B22D44F1579CF361500D7B54173E,
XRCameraSubsystemCinfo_set_supportsAverageIntensityInLumens_m49462C178EF35B3E688EE6711FD3E41E9C1976AB,
XRCameraSubsystemCinfo_get_supportsFaceTrackingAmbientIntensityLightEstimation_mBE329A85F8992A65715EC3F97AC0CEEE5B0DE9D8,
XRCameraSubsystemCinfo_set_supportsFaceTrackingAmbientIntensityLightEstimation_m93740733F66607C53F3928946A79CE732EAF9EF9,
XRCameraSubsystemCinfo_get_supportsFaceTrackingHDRLightEstimation_mAA8871A8B5D8CDC9D7D5FEA47E72423BC02D969B,
XRCameraSubsystemCinfo_set_supportsFaceTrackingHDRLightEstimation_mD76A9A9A127118388FBD2E971246303BB2BE0F0C,
XRCameraSubsystemCinfo_get_supportsWorldTrackingAmbientIntensityLightEstimation_mC5C8DDCB2DB3F82EA868AF171039DF6ECFF9C7EC,
XRCameraSubsystemCinfo_set_supportsWorldTrackingAmbientIntensityLightEstimation_mE9B47A05DA11B6C6FFCB6FFED773ADB464130C5B,
XRCameraSubsystemCinfo_get_supportsWorldTrackingHDRLightEstimation_m96A9EF59A86DAFBA2A14AFAA79840480E8CDD01D,
XRCameraSubsystemCinfo_set_supportsWorldTrackingHDRLightEstimation_m92AC9270D4D5FA4C61ED353406511B3877E5D9D4,
XRCameraSubsystemCinfo_get_supportsFocusModes_mA2196338BFF377734A338E919D372089A98417D9,
XRCameraSubsystemCinfo_set_supportsFocusModes_m2F70E7EFC54E2F930DEA28DC4922125E01FE3026,
XRCameraSubsystemCinfo_get_supportsCameraGrain_mFC3B0475E51415F6BCDAB93671CD421826DA9B9B,
XRCameraSubsystemCinfo_set_supportsCameraGrain_m8BF26C263FED0D5106C436091BD8C25BFF8FD755,
XRCameraSubsystemCinfo_Equals_m8C071329439DF323FF57A936181A09F933886EAB,
XRCameraSubsystemCinfo_Equals_m8DA28DF625D849C92AE0770EBB43184C2CE4FEE4,
XRCameraSubsystemCinfo_GetHashCode_mA8D0D3E3ABB46889F31B045A1D6F8A06EC8701D0,
XRCameraSubsystemDescriptor__ctor_m3279B88FEF25A569F67987BDC39A0678B72D1CB6,
XRCameraSubsystemDescriptor_set_supportsAverageBrightness_m93E308790E7E9F9EB2D4A0AA12EF64F5ACF32275,
XRCameraSubsystemDescriptor_set_supportsAverageColorTemperature_m79788019F8E730D1FC139530E9615FE5CBABDDCB,
XRCameraSubsystemDescriptor_set_supportsColorCorrection_m3CD5EFDB6CBC26159DA439F9D83FDFD184AA5B71,
XRCameraSubsystemDescriptor_set_supportsDisplayMatrix_mE32DBA05CC497A4639E3BDA570E51244BD5E524A,
XRCameraSubsystemDescriptor_set_supportsProjectionMatrix_mECDFAEA74911ED30529FDB70DE87AA3818AA285F,
XRCameraSubsystemDescriptor_set_supportsTimestamp_mDE3970574677648ED3EC4520657BED04613128D3,
XRCameraSubsystemDescriptor_set_supportsCameraConfigurations_mE49020DC68025F21123ACCCB96C0ACB0A99A923C,
XRCameraSubsystemDescriptor_set_supportsCameraImage_m3D2848F2DDBED1D1B613D6CF8E6055D8163EF3F7,
XRCameraSubsystemDescriptor_set_supportsAverageIntensityInLumens_m65A10731DEF111F2BE9325DC6CC26E5B765D07C6,
XRCameraSubsystemDescriptor_set_supportsFocusModes_mB7D094AE9379B0C31386397C907C1A1C1A4189BB,
XRCameraSubsystemDescriptor_set_supportsFaceTrackingAmbientIntensityLightEstimation_mA1E7039E19BAF3A62B025C1FD9E39112C92759BB,
XRCameraSubsystemDescriptor_set_supportsFaceTrackingHDRLightEstimation_mE2E9D893DE652FC15DBD89A46E092957ED012565,
XRCameraSubsystemDescriptor_set_supportsWorldTrackingAmbientIntensityLightEstimation_mB1C4D288FD5B48EC53B047348A3E25BE66C1F6BD,
XRCameraSubsystemDescriptor_set_supportsWorldTrackingHDRLightEstimation_mA05D37FA61B46B9215CA459E52A84D398B19715E,
XRCameraSubsystemDescriptor_set_supportsCameraGrain_m0DE607C6E20FA0A160E9421AD11B86DC267E3632,
XRCameraSubsystemDescriptor_Create_mEC826CD90D35D17847339952F5022081EF871033,
Configuration_get_descriptor_mD7539C193666CFFB9258CE40D88EB7DA3C48DDDA,
Configuration_set_descriptor_mC8DB7CFDB5C7E267B15CFD3DE2133A1B482020E9,
Configuration_get_features_m8F2353DC080AF51D657C4CBD8E9DB4DAEAB72B5A,
Configuration_set_features_m778B95140CCFD2CF143489375C8B15258B5CA149,
Configuration__ctor_m5A3F2286F33BA303B4C8A8E0E34ED6DA993A43BB,
Configuration_GetHashCode_m1714C8505EE74B796DB7AF17A409448C385A83F2,
Configuration_Equals_m3EABF1A712E3AB8B1BCB70F71A4DA0B29BD3AB23,
Configuration_Equals_m7C598F62999ABC2566CDCD656FF0ACA11DBC9807,
Configuration_op_Inequality_mC645E4B53C25B460EF3C567C2709C586C5156AE3,
NULL,
ConfigurationChooser__ctor_mDD8DB2D97E4DD5B6CC29809BBFDDDEA149A1150A,
ConfigurationDescriptor_get_identifier_m829E6611B4E4B0E33E8E87902FDFCDAEC0F2B8A0,
ConfigurationDescriptor_get_capabilities_mD48908AE629D6E78D84F355B59CF742ABFD7C649,
ConfigurationDescriptor_get_rank_mF775801AAD4BC8E980682B569F676BD536BA78B8,
ConfigurationDescriptor_HexString_m06E793AFE575A13CBC943EBFDCAB4BA290AAF8F3,
ConfigurationDescriptor_ToString_mF67E92AE3930DFD749F7186D49FFC600E2B197EE,
ConfigurationDescriptor_GetHashCode_m1B74FC9C9B33BBED2192C1A47570C13A40008091,
ConfigurationDescriptor_Equals_m6908A703D5C6F693555FCC9A616D85E430012363,
ConfigurationDescriptor_Equals_m4123FDB2B2A6BDDCA3979394FD76CEEFAE534EDB,
DefaultConfigurationChooser_ChooseConfiguration_m4CA6F2A0B77732D4EACCA7D6FD3B1B1407ECBBD1,
DefaultConfigurationChooser__ctor_m01D5B274BA5A7C81A20C94A920681CAE8466A4BC,
FeatureExtensions_Any_mE55A6DE2870496D907915F6C117FC22D107B54A9,
FeatureExtensions_All_mE045F59D960EB11FE1A7B31076D0132109B28160,
FeatureExtensions_Intersection_m2CA900F610313CDD88F981646EBE46B1AD8AC5E9,
FeatureExtensions_SetDifference_m9699D6212D9BD79EE52C44EF08FF7461E7F2C1C5,
FeatureExtensions_Cameras_m3814978160FF343F4B295277B62A10A90BE46F7F,
FeatureExtensions_TrackingModes_m42E19D4C37D0B9A70CACE5810FBE94B8A517D127,
FeatureExtensions_LightEstimation_m7FF62D53AE0E08C1B8923FAB371C228B7DF190C5,
FeatureExtensions_LowestBit_mD88FDDA9224F7FB3B74A3EC59BB76C86B4923267,
FeatureExtensions_ToStringList_m1B8E6CA945AE2E060DB1D4DFA60CCD72AADC082D,
FeatureExtensions_Count_m5EF2EFA14A36261D35A95A6D5A39A107D223F6B6,
XRCpuImage_get_dimensions_m1A176BDB3319F09F3AF628AB17C126B62929A2A5,
XRCpuImage_set_dimensions_m8672F4307A096265FA73685BDDA6D605B9C10ED5,
XRCpuImage_get_width_m8DE20D99BCFA242F105F3B39AD68D398F3C2B4CE,
XRCpuImage_get_height_m7BB3967EC96DB5EEF99E0935E5AA1DFB991D7ADD,
XRCpuImage_get_planeCount_m5F63BAD93F18A9D85D74377CFE1891860740D750,
XRCpuImage_set_planeCount_mC261323C60A65DD0EBA30325554C5F92F13149EA,
XRCpuImage_get_format_m80FEE2CEC6A37A417D5B86294C1ECA50A49FDEAB,
XRCpuImage_set_format_m02654636810F940049F1A57FEA7987F71FA47DF6,
XRCpuImage_set_timestamp_m6FAE47FB68497C3757580D1FD94D0A4B7C2C783E,
XRCpuImage__ctor_mA44BE98BA315639462481743B96A650B89F7C26E,
XRCpuImage_OnAsyncConversionComplete_m60DC813F1A2B8A59F993D245683847D933D292A9,
XRCpuImage_Dispose_m462B3360E99D206E1151C7B8ED30420BF4A91B7A,
XRCpuImage_GetHashCode_m5A2490A4F9DD6A4BE95B6E43C2E4DFA67057DD29,
XRCpuImage_Equals_m6ADCC3C2CDB259DD1D6BB1648CBA3722AD129441,
XRCpuImage_Equals_mE183B37EE7FA276B21EC0CE087BEFCDE540C8D24,
XRCpuImage_ToString_mE31499DDD8365EC75336BFF9C7393BCA2C1B2E5A,
XRCpuImage__cctor_m29EB7C261680FA4A1CD196510620C5D72E83626A,
Api_TryGetPlane_m9EDAE9347615522A0C95F387DF4D274D655090A8,
Api_TryGetConvertedDataSize_m50DDC92171F520516E21205E3817BEE0D51A9A51,
Api_TryConvert_m2FB4CAC6639BE6EDDD65D74A3C296C9A72C1E6FD,
Api_ConvertAsync_m7D88B9B493A448A03FBED33FE2C675805A2417F0,
Api_NativeHandleValid_m25628942A0D2320EAB96887219972ED8257FC858,
Api_TryGetAsyncRequestData_mCEB60B8F55366677F05AAF1651F46C4B28AFAEA3,
Api_ConvertAsync_mE9BFD28B9BC1C3A063FC0B84B014B3538A155E99,
Api_DisposeImage_m6AEAAF9EF11D19294B441CF6DBB8FEDD58933989,
Api_DisposeAsyncRequest_m06C972C865763DF2DE877124295F4A48B0574ABE,
Api_GetAsyncRequestStatus_m920A8C2BA437BF3581A737DE8AF350094577300B,
Api_FormatSupported_mD53B1C7B2A9D9D49ADDCE94794198C5A0FB64828,
Api__ctor_mEC96F88C341E160F9DDE41F5FA275DFAFF8522BA,
OnImageRequestCompleteDelegate__ctor_mB4E3DC02E880D5890B499CFD8BC47B4C47CCD2BC,
OnImageRequestCompleteDelegate_Invoke_mA88CBFF9DDB699B0AB6804612450DA27A2070081,
ConversionParams_get_inputRect_mE75F22AF739DFB5506127DF164E0AEF851702756,
ConversionParams_get_outputDimensions_m83C9D960C805CA2748AA9AAAC2A2986A397B7033,
ConversionParams_get_outputFormat_m727E479981BF00635D645C88D4D987EB598A0E5F,
ConversionParams_get_transformation_mFB57F05831CF417808A6C41F170768D9F66A7EF3,
ConversionParams_GetHashCode_m317F3CF69F015FD4012B668A3195A50E8C18F436,
ConversionParams_Equals_m428ABCB343F2D25BEC8C48C064A607C19D4C6B4F,
ConversionParams_Equals_m9170E22223AA2514E0EAA66A74375460210EC11B,
ConversionParams_ToString_mB2F109D1B691D862EC98C1C9058F78C58CE832D3,
Plane_get_rowStride_mE6385B9F7D9D040FC613D16D859435F492CB213A,
Plane_get_pixelStride_m33EEE46027B124683ABAF3BC627812F963F29665,
Plane_get_data_mBA1EB2437E816B19D7A68440AE188F4E8543E108,
Plane_GetHashCode_mE6FB9627754D042BCE94DA2672023FE03BE24C81,
Plane_Equals_mAAF552DA4142C484FFEBA4C30EC7F14111523D68,
Plane_Equals_mE56ABB7E1AE23CED9290A64F4B80D2FDC95AA7F6,
Plane_ToString_mDCB0EECF9BB9652F5E5BA2B36F51F1E4CF334238,
Cinfo_get_dataPtr_m72B8A6BDAA98FA3CF92A9E03807130E4B6341B35,
Cinfo_get_dataLength_mBF9DA90E69A88EF50923C839B5CE8A03264EAB9A,
Cinfo_get_rowStride_m67E7894AA413F614310BF6A667BDEA1950165492,
Cinfo_get_pixelStride_m2595FA36CA7479B00D3EFD507C3C9439CC5DBDE0,
Cinfo_Equals_m5B7C627F1C89E10A0CE713A46B283219E35F6365,
Cinfo_Equals_m3D18D26EAA0FED30423B3C8B38961816A1472F62,
Cinfo_GetHashCode_mC3F4D4AA0494F15A8E0B0F765FA005C1A574CCCF,
Cinfo_ToString_m4D93FD001F1E9EC984CBFB7997FE480E212F83DF,
Cinfo_get_nativeHandle_mAB50E5453B3ED928372EC45DF5E0F4E2ADF341BC,
Cinfo_get_dimensions_mA8AFF01543915A325187A41369F6DA11231A3E50,
Cinfo_get_planeCount_m88E3C67F9E06017A46B7FF90368B24A6F48E1271,
Cinfo_get_timestamp_mAF782E097B2324BD673D8D98C68CA2D6CA4891EF,
Cinfo_get_format_m42CBF60A496CB04541CC04C97E1745AFBC7259BD,
Cinfo_Equals_m52B0C058E8FB2AB4089B91E1EDD0DFD2F9F22642,
Cinfo_Equals_m8140023C141235A77C2153E9A8B54E5356EC6C6F,
Cinfo_GetHashCode_m7AB2284B6770F059F37B7A7EB61C075F472BAE65,
Cinfo_ToString_m4923B9CB2748C5E7CCAA6C817F47976B1E4B2FE1,
XRDepthSubsystem_GetChanges_m5EDDB48B96701CE5D087B4BDAE51DD0213BF663A,
XRDepthSubsystem_GetPointCloudData_mC82CC38D5B56703EE808D9BD61D19B908C2C2364,
XRDepthSubsystem__ctor_mCD27ED98C0FCF9538A67023E02DDD4AFB3B04D86,
Provider_Start_mCFBE8FADD9A70911E16A985BA4CFE55A5D305F97,
Provider_Stop_mE83290B18BBF745A739EFBB8985EE8F6F9ACEF79,
Provider_Destroy_m4594AD5BE5A869ECEDF56161272A18E5182B4E58,
NULL,
NULL,
Provider__ctor_m1A368071CFCB91BC39B9760441A777FE20F86A57,
XRDepthSubsystemDescriptor__ctor_m8107883A37944FA3C8451BA4F8CF88B902BB56DD,
XRDepthSubsystemDescriptor_set_supportsFeaturePoints_mA0C105DA50CA07BC488A7E1BDDB3CD72225BE00C,
XRDepthSubsystemDescriptor_set_supportsUniqueIds_m0BBF2BAA5E4E1A704B29F62FE895F5A29A5D93CD,
XRDepthSubsystemDescriptor_set_supportsConfidence_m877945BE2EB06E5FB0699BEDA781CDC7E88DBC9A,
XRDepthSubsystemDescriptor_RegisterDescriptor_mB5908D568E8943B143747EDA81FF550FE2BB3A33,
Cinfo_get_providerType_m7168F2BEAB1E7D53C4A1308A0BE686CB6ACAC37D,
Cinfo_set_providerType_m79B371C14F188233806BAB677302143650CD9A29,
Cinfo_get_subsystemTypeOverride_mA17A612B4FB9125843E254DB825177C3B1834235,
Cinfo_set_subsystemTypeOverride_mEF323B6CBB63FB7E5ECB4A6849F06C57BFDF8120,
Cinfo_get_supportsFeaturePoints_mAE8F24562D2A19594A5AB98BDA0FC1C35730B5BA,
Cinfo_set_supportsFeaturePoints_mD44DBE0A79D63D3234369E573653A81DC7FB8E1D,
Cinfo_get_supportsConfidence_m483E36BDB283478D5E1F6F6F3C96A279EB6DE01A,
Cinfo_set_supportsConfidence_m78F76CAAFD5D667ADBED1580E1F8A1286B59C46D,
Cinfo_get_supportsUniqueIds_m6A1B72F6B917B3B001388027A7324A84146E5B7F,
Cinfo_set_supportsUniqueIds_mFF68A678A13F7C1BD9E157690649255A27369514,
Cinfo_get_capabilities_m09C807B048E192438A9B0D0C17808FF5BFF81A8A,
Cinfo_set_capabilities_mB2A17E458179A44C2EACB82699FBC5B5611C7580,
Cinfo_Equals_m560240A9ABB2B3E0C71D2EF694812209060F7781,
Cinfo_Equals_m1FFC7731C8021381A825E2D56189CDCD1BC39FD1,
Cinfo_GetHashCode_m93DAAACF242CBA5B8EE758CE4E04BCCF51639860,
XRPointCloud_get_defaultValue_m484986BE6FCCFD493B66A7BC4895B0AC49F043E2,
XRPointCloud_get_trackableId_m45E06C0C6CD525985ED5FF3A0DC9D1F41A845889,
XRPointCloud_get_pose_m4291F970BA7E4F2DE67BB6666D365FF510B8AC39,
XRPointCloud_get_trackingState_mE90A4EE69C3F5EA084CB0BF1B3D128160C719242,
XRPointCloud_GetHashCode_m27CF26ED9655FD5EF9E3F83986059017A37E6778,
XRPointCloud_Equals_mFB272AE1F45D6A70C7E5C18D49E2ED7E2375AC0C,
XRPointCloud_Equals_m7123CA7CBF03D2DDAEAFD63768A78A559B70D34A,
XRPointCloud__cctor_m2491726ECECF7EBAD790AD20F7AAF000215186DB,
XRPointCloudData_get_positions_mD0152EB78841C8D8CB83101868169887235C6BD3,
XRPointCloudData_set_positions_m5B37C4E8FCCE5AF8E16D83D4BAE520F45971CCD7,
XRPointCloudData_get_confidenceValues_mA510FDF9A0F8B21FEA6905400EA6F3A709F8DD82,
XRPointCloudData_get_identifiers_mF1A688282A3DBD819C5F43EE4A1B44B6548787D3,
XRPointCloudData_set_identifiers_mBA475172386D8F500AE9F2D50D4B009FD8D26319,
XRPointCloudData_Dispose_m600FFE0CF6B2D3D7B31B7F51406C4818159C5120,
XRPointCloudData_GetHashCode_mC10886AFDA538D306F9E455166BB6D2F81071912,
XRPointCloudData_Equals_m5553859ECF1F500F0153472EA6D6E547D251936D,
XRPointCloudData_ToString_m9712C0206584CBD90DF2A44CE36DDC78141E607A,
XRPointCloudData_Equals_m6655FF22F1E7FE07B0A71ACE455A742E8DF7DAEA,
XREnvironmentProbe_get_defaultValue_m150C4FBAC331EF916AABC17F68BDC6243D5B5EB8,
XREnvironmentProbe_get_trackableId_m3C275681C5223EDD967B1F37E2A0FAFF03A80066,
XREnvironmentProbe_set_trackableId_m2FAAA910E6D06256C1ECCCCF8C6D3E72A056199D,
XREnvironmentProbe_get_scale_m73AF4CF41515A2EDAD35FFBA598D23207F9D2BD3,
XREnvironmentProbe_get_pose_m03ABF5D0F413C9892349CF3891D5214147DD4C09,
XREnvironmentProbe_set_pose_mAC84C3A2D8788D587F0503EA1CE051294A8A87E9,
XREnvironmentProbe_get_size_mC31926635D53201B3C0E7E76B3ADBE2883374135,
XREnvironmentProbe_get_textureDescriptor_mDA5B2F0E63647BBC038FB4E476F609625109FA13,
XREnvironmentProbe_get_trackingState_m47E2E959CA905F4498489EEFF1C1DCEC4958582C,
XREnvironmentProbe_get_nativePtr_m00FA5612D1CB3AB7F8F11B1ECBD7AA139FEE60F4,
XREnvironmentProbe_Equals_mAB858DCB46B0A972BE91B46AE6BA4C2AB6B8479B,
XREnvironmentProbe_Equals_m940DA5EE99C70171A86520CA30C33C0E778A15E7,
XREnvironmentProbe_GetHashCode_mE6E401BB29C7F44E680E6561A8AB7CD92B3F2472,
XREnvironmentProbe_ToString_mBF2604257F8CA6CE56C5D389E8D08339725B8B93,
XREnvironmentProbe_ToString_m68F8E47BA9E4040BF7352D68F61FB17177000009,
XREnvironmentProbe__cctor_m44E1286FA9D3E1AD04BCE96FA2DDF5A808B5F0D7,
XREnvironmentProbeSubsystem__ctor_m72F971761AF7B66CBABFF9ABC8468A52406001A2,
XREnvironmentProbeSubsystem_get_automaticPlacementRequested_m4C5B5CD6CED27204FE6C024CCCA28AE5411D181A,
XREnvironmentProbeSubsystem_set_automaticPlacementRequested_m15DAC8989A0BBE60B0594548EBDE2640D2878E69,
XREnvironmentProbeSubsystem_get_automaticPlacementEnabled_mA6656AB97766C21A341BEAF6DC55C73DFD97FF38,
XREnvironmentProbeSubsystem_get_environmentTextureHDRRequested_m166D0FBAAAD5ECCE03B7A797A4657D44FF0DE3E5,
XREnvironmentProbeSubsystem_set_environmentTextureHDRRequested_m74F6F5A55A456FD0607184D851B506CA1E9C2014,
XREnvironmentProbeSubsystem_get_environmentTextureHDREnabled_mB79DCA9DCC1C7A0CD1A5029FF9373CC7C30B56D6,
XREnvironmentProbeSubsystem_GetChanges_mB70866DF4F3022F457ADE2EA6A9A342416E55208,
XREnvironmentProbeSubsystem_TryAddEnvironmentProbe_mDA385F973061D7FFCDF6EBFE9EE0C478D557F8A4,
XREnvironmentProbeSubsystem_RemoveEnvironmentProbe_m3D02CCF782150963FBE6FB1E67EBB3C6054BA422,
XREnvironmentProbeSubsystem_Register_m20EFD30E3B31DD3ED37EA42B6E465AFAE132EA37,
Provider_get_automaticPlacementRequested_m1E459E6FEB7533E372078FCF8E37E1FE7A1F42FB,
Provider_set_automaticPlacementRequested_m247AC8CC05683266B38C937719C7B0E766C6337B,
Provider_get_automaticPlacementEnabled_mFF258987581EDD3975F41F7233FC4CEB8FCF7D1A,
Provider_get_environmentTextureHDRRequested_m5D5984CEF09F49F5088F4568E9263BCC11A44366,
Provider_set_environmentTextureHDRRequested_m82BAEA302C0714E7C0194EA11A8FE890E7409A8B,
Provider_get_environmentTextureHDREnabled_m852187628E4A0FAD999C1E679EDC532659BC4675,
Provider_TryAddEnvironmentProbe_m3290B8D160B758811040A94F335843B1665618D5,
Provider_RemoveEnvironmentProbe_m1C8E9F616E2D1F98ECF86A3D6101B9A7ACB949D8,
NULL,
Provider__ctor_m82E278812C6826F3F89A708912491AB72058B700,
XREnvironmentProbeSubsystemCinfo_get_id_mBEA40C4012D8253E65C525083E3454C93BC6F3BE,
XREnvironmentProbeSubsystemCinfo_set_id_m5C48BD3E879410D5C622BE7DC74D5C798E151731,
XREnvironmentProbeSubsystemCinfo_get_providerType_m3A3572178EED86B4F98254B4FAB73016B4459AA1,
XREnvironmentProbeSubsystemCinfo_set_providerType_m70C42D1F210DE19AB5E7D82F2D0BDB467E94FC2F,
XREnvironmentProbeSubsystemCinfo_get_subsystemTypeOverride_m258F6355EE3F5ED52ADF4A79777AD092AD9B2F22,
XREnvironmentProbeSubsystemCinfo_set_subsystemTypeOverride_mB35BB7FC1C0C42E0A7773365C147F539E7AC27EE,
XREnvironmentProbeSubsystemCinfo_get_supportsManualPlacement_m194C593950367B1C7EFB50D6F00E5705597065BF,
XREnvironmentProbeSubsystemCinfo_set_supportsManualPlacement_m2D1156DE760E47CBDDC345AD5CAE5D23AC23E524,
XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfManual_m7B2DFDB097FAD2FC7FE6AE7F7A8172FA7B34D406,
XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfManual_m01CE117FEA37EE9BEF79903754E396C35B859419,
XREnvironmentProbeSubsystemCinfo_get_supportsAutomaticPlacement_m2EAA567973D53F9FFCF91AAD4233F91957281B11,
XREnvironmentProbeSubsystemCinfo_set_supportsAutomaticPlacement_mC4DBFBBD4DBB44D6B1154C4759A3175F9AC33D46,
XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfAutomatic_mFC9AA46EA023D8A0968ED80B1F88F10AA50F549F,
XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfAutomatic_m6FCC1E3ACDC01E4447E385A1B89C96DEE16B7EF2,
XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTexture_m3593704263A383A9EC79E765CCC01632707E4A48,
XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTexture_mE30B73C6AC37C6DF8F5B7DBDBC90A975A498D3E4,
XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTextureHDR_mDD0F30AB731A6010F6F96DBA660415B55FCD580A,
XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTextureHDR_mA465A23A4DC052895F8F634892B7C8E3A49F4777,
XREnvironmentProbeSubsystemCinfo_Equals_mECAF625FF6A6D6CB7652827D34BCF4228243102C,
XREnvironmentProbeSubsystemCinfo_Equals_mE09A9486010D3E88E94AE06CF3BF499D3A2FC6EF,
XREnvironmentProbeSubsystemCinfo_GetHashCode_mADDFE56D58883EC3832D901FF566989CB00B5D02,
XREnvironmentProbeSubsystemDescriptor__ctor_m759C9A99C0F48E2422698CABD21C05A9F9E2ACB6,
XREnvironmentProbeSubsystemDescriptor_get_supportsManualPlacement_m08BC8571DB49533D3940CC743179F8F94A203CC8,
XREnvironmentProbeSubsystemDescriptor_set_supportsManualPlacement_mCE20C35437C72E053599F9F900EFE7D5A1B0ECF3,
XREnvironmentProbeSubsystemDescriptor_get_supportsRemovalOfManual_m1A720014B0B9CF7ADBC6E5FBD3D2AA8FA6EA01AE,
XREnvironmentProbeSubsystemDescriptor_set_supportsRemovalOfManual_m148569DAD1997E9EFC75977FD58B2E2A0E6A3A29,
XREnvironmentProbeSubsystemDescriptor_get_supportsAutomaticPlacement_m12205A40FBD5214E81576F99E35D9996F0E20509,
XREnvironmentProbeSubsystemDescriptor_set_supportsAutomaticPlacement_mE62CB20894AB742E406F1762C9B8C2CE1DA1B359,
XREnvironmentProbeSubsystemDescriptor_get_supportsRemovalOfAutomatic_m777AF395AF64569B1FCCC6E32973620DC9636C54,
XREnvironmentProbeSubsystemDescriptor_set_supportsRemovalOfAutomatic_m3210C35AC07979BAFDFA3EA0F6A3677285D6E282,
XREnvironmentProbeSubsystemDescriptor_set_supportsEnvironmentTexture_m67C606821F3D139A11628F487EFE764A2A562CC4,
XREnvironmentProbeSubsystemDescriptor_get_supportsEnvironmentTextureHDR_m7F5545CCA7B538B4399B9C697D24031E89C348AD,
XREnvironmentProbeSubsystemDescriptor_set_supportsEnvironmentTextureHDR_m813F1381535676A236CE05D522515683E6CA795A,
XREnvironmentProbeSubsystemDescriptor_Create_m64B177418E0330A718E4461D29A11FE8518BB09E,
XRFace_get_defaultValue_m747D549873462D18EA28AA56D1A0870F6DE4F2D4,
XRFace_get_trackableId_m997871151FF642B1908F7E352C952A44AB4DD17C,
XRFace_get_pose_m482AC4907DC02C0B5D67B84320DA7F9D12A43A75,
XRFace_get_trackingState_m8953B01AB6213402157B69083B318D3F2CDCF26A,
XRFace_get_nativePtr_mCE6C767CB9DBBCDE7B289D8EBDE1DFC86707BC95,
XRFace_get_leftEyePose_mEAF86B00D307A5D96D671A85EA1BBF88D82586BF,
XRFace_get_rightEyePose_m3FA7FDE9C2D9841FB7496B691FCAB1F35475F2B1,
XRFace_get_fixationPoint_mAEA40B8C8F2C0D0A3B777ACFDE327017C9DF294D,
XRFace_Equals_mC8676C7F35F0FF582368E8114BDB981C83C82A88,
XRFace_GetHashCode_mDFFE26F3662B1DF33124A0393FA9FDE444167CEC,
XRFace_Equals_mF05C24C98D5E1ED344943307E03FE4776CCB4217,
XRFace__cctor_mB148EA0217E4B6CAF9C7B40813197BE6AF917BA9,
XRFaceMesh_Resize_m15BF7254A68B9910F518990A33CF037F310ED1E6,
XRFaceMesh_get_vertices_m19DE0A4E73ED17C8B6427BE86071E10DB65740DD,
XRFaceMesh_get_normals_m82DE916E7AE8A9BF4768D289E01CD0C65E1001ED,
XRFaceMesh_get_indices_m93B77F79BB4C67AF1AFFAD29ED8D8F48AF4616FE,
XRFaceMesh_get_uvs_m89943E9CD34232EF09B81F13EF259C33F1183B49,
XRFaceMesh_Dispose_m84478F08EEB3D131E0E7785CF4195D424B94543E,
XRFaceMesh_GetHashCode_mC53C827B010796E1A20690766F1A2A1F70DB614D,
XRFaceMesh_Equals_mCAC3BFCE776A814088BA4D5361CB771BCC4BE87A,
XRFaceMesh_ToString_m1997FC173A5BB7E5EFC51893E3BDD26D34F27897,
XRFaceMesh_Equals_m2BB9E69AD22C8521466B981BA077007536189F0C,
NULL,
XRFaceSubsystem__ctor_m25AB673DD168E2B5CDF6C90C8CD022AB8AA11D2A,
XRFaceSubsystem_get_requestedMaximumFaceCount_m00EDD38267D87867256888B1BCB623DDA97E8ACD,
XRFaceSubsystem_set_requestedMaximumFaceCount_mBA732F461FFA6C2B68CFECBBEB6E478F8ABB0DBB,
XRFaceSubsystem_get_currentMaximumFaceCount_m76FA130393463C6589D5CB03092661E7D05A86B9,
XRFaceSubsystem_get_supportedFaceCount_m2A8A061F62963829A197C0C11383E4225B42EFC0,
XRFaceSubsystem_GetChanges_mD7AEFDD237DD174A519AF11E8363BCCFC4C48953,
XRFaceSubsystem_GetFaceMesh_m9D239EC1EE36EFC8CC755F469A2470FF5C856BD8,
Provider_GetFaceMesh_m24F6E73C1A2C77979653AB19C8EE8EF939D80182,
NULL,
Provider_get_supportedFaceCount_m65269094A72BB234E7EF96ADEBF1EDB903FF5DEC,
Provider_get_requestedMaximumFaceCount_m82A60F24B04B17866F4702686901B3D929FB47A0,
Provider_set_requestedMaximumFaceCount_mE8E2FDFE803518BBDB015E0CF8CA03E30E64169D,
Provider_get_currentMaximumFaceCount_m1BB7800FD410EA2FCE98AD32F0AA8A854749F1A5,
Provider__ctor_mD36F52D0D0CF48E1C950DAE67246AB8C42498DE5,
FaceSubsystemParams_get_id_mE2ED204CE1D85C4ADCFB4436EACF3BF8B6893DEB,
FaceSubsystemParams_set_id_m89149E2175F86663FDFEB008B36BDAF40EA1585A,
FaceSubsystemParams_get_providerType_m8984786E19DCC5F9B87060A9BC29F25A4A4A4B3A,
FaceSubsystemParams_set_providerType_m5D660A72F34CA0D1C887F5BA68045B1D3973C7B3,
FaceSubsystemParams_get_subsystemTypeOverride_m1B3FD6EA4014688FC34533C9729176AA668C8321,
FaceSubsystemParams_set_subsystemTypeOverride_mAC64FBAE73E16ACDA48708A4FFB77626437F8306,
FaceSubsystemParams_get_supportsFacePose_m59079DE37AD698A2132CFEA0EDA5FD4585FC6161,
FaceSubsystemParams_set_supportsFacePose_mD799A27D00AC28F2E8228E7A3E38464B643BC99A,
FaceSubsystemParams_get_supportsFaceMeshVerticesAndIndices_mCC93952A6D71E81739E596CEB86A242CD6C9A8AF,
FaceSubsystemParams_set_supportsFaceMeshVerticesAndIndices_mD137C1594ADBC51EC3017FDFAE248043C4CCBC75,
FaceSubsystemParams_get_supportsFaceMeshUVs_m86C9DD63849FC891FE62F75B87E7BA894B506BBC,
FaceSubsystemParams_set_supportsFaceMeshUVs_m9FFBE6EF8118BB7F4A0BA3B50249DA55ED52B39E,
FaceSubsystemParams_get_supportsFaceMeshNormals_mB5897C36478E2B76A4491DA2C70C89B54AAB92DC,
FaceSubsystemParams_get_supportsEyeTracking_mC02E124E7C88BBE8BE1D6ABBBFD3C2C68DF2109F,
FaceSubsystemParams_set_supportsEyeTracking_m52CC3ABEBE97C53ECBB91C0E4A86F388176C3645,
FaceSubsystemParams_Equals_mAC3B0F001EB7DC4968B350FCE682D21D3C10A4DC,
FaceSubsystemParams_Equals_mFD36A65AEE79AE0A2C08525BB4AE5B99801CEE2A,
FaceSubsystemParams_GetHashCode_m83F03C046AA998C73A317CAFBA4C97E2BA468786,
XRFaceSubsystemDescriptor__ctor_m1B6850C5017E4E5709D0D0A44B4605429C21DB5A,
XRFaceSubsystemDescriptor_get_supportsEyeTracking_m509A2CDA04DA198E368A777CABF42B419D30017F,
XRFaceSubsystemDescriptor_Create_mF8B2B433C3625242D3AEACDE1CD7F091BE8775BA,
GuidUtil_Compose_m0EE004B20CD802F981C34180EFA91C39A9400DCB,
HashCode_Combine_m23C951F115303C9E040D18947821969B602863FC,
HashCode_ReferenceHash_mE6CC6EA3C87D9F040876D66CF582D6FF68FC359C,
HashCode_Combine_m18C3D10955CD71D976A5200FB0F5531F2F1F6BE1,
HashCode_Combine_mCF5A2D8E169AE770B379DCD8DE5229296453BD82,
HashCode_Combine_m02E9A65274F198CF9266FDB496C74880155F9B94,
HashCode_Combine_m11604D056548DE17CE3E26439850FA96C2ED1FBA,
HashCode_Combine_m23E4B1C1DC69FC295EAA04B5AC0ABB8BE40ABC9F,
XRHumanBody_get_trackableId_m1132E7F157E2F1649C9849D0CCCFCCAE12659035,
XRHumanBody_set_trackableId_mD3C8385C017B211CB843FBE09F865FCFF6736AD5,
XRHumanBody_get_pose_m5F377842C281F643E6205DF173FAD26A71FD85CB,
XRHumanBody_set_pose_m041B85CE78A0EEF68E9D04C79D5E896481521F13,
XRHumanBody_get_estimatedHeightScaleFactor_mCCF772B1264F243207D413D87F9DEB51BAA66625,
XRHumanBody_set_estimatedHeightScaleFactor_m08C6119D250F4EC14458EF86245F41DE6480928B,
XRHumanBody_get_trackingState_m1F6F709DD208442C6E3B253BF1E6F5448B0D7913,
XRHumanBody_get_defaultValue_m0A3A0C5BAFB5C20A12014597FA6690AE6470ACA4,
XRHumanBody_Equals_mF1FC1064B3CE595A1D798D2BC6A0A4441E06FEA0,
XRHumanBody_Equals_mEF4C0F409A971526C9B7E8098F41FCF1B53B7F41,
XRHumanBody_GetHashCode_m6FBB44640B5771F3C0F07996B0391578ADA3ED29,
XRHumanBody__cctor_m4FFC7049EBDF2DF56F6B5A76B62B50467F8919BC,
XRHumanBodyJoint_get_tracked_mFE794D3F10CC9FE8B3BBA7EA3DAA2EAD43265030,
XRHumanBodyJoint_Equals_mF61C132B282799A4A8591EEDFD1C93A5ACB5D690,
XRHumanBodyJoint_Equals_m4FC5F349868C29B492300324ECEA4327199724B5,
XRHumanBodyJoint_GetHashCode_mB2B4313B997EB976CF9A0621A8B0B41988F41FEC,
XRHumanBodyJoint_ToString_m4A5CA8FD181EF51596129156F8B5D1714B23A0B8,
XRHumanBodyJoint_ToString_m9615CDC8865E5F53A0C1EFC11ED448D8E10517BA,
XRHumanBodyPose2DJoint_get_tracked_m2482827731EF34E90A03BE36B02CD58DC4ED27BA,
XRHumanBodyPose2DJoint_Equals_m13D561FB80FAB3235153ECAA81CDF0A1AB61EBE0,
XRHumanBodyPose2DJoint_Equals_mFD1372A220FB78E1834F741C3C866AA7068614FA,
XRHumanBodyPose2DJoint_GetHashCode_mA55B9AAABC7536E6C93C93F59F4DB417E95F721A,
XRHumanBodyPose2DJoint_ToString_m0776D12ECE559F6F987CB879DC6578E4B69630F8,
XRHumanBodyPose2DJoint_ToString_m0AE3FBFE9BF812C8589AE2F567A79D756700256E,
XRHumanBodySubsystem_get_pose2DRequested_m73E73A18E279804D2F9CDDD368E57C60022D755D,
XRHumanBodySubsystem_set_pose2DRequested_mB49D7CDEFBAF72E3CF431020DE7DB129929DD36E,
XRHumanBodySubsystem_get_pose2DEnabled_m6E19D5A53F2E784D48041A5D5281067517517AF3,
XRHumanBodySubsystem_get_pose3DRequested_m1AE5F8B40EF1EF97520855EEE79375B3E588EF57,
XRHumanBodySubsystem_set_pose3DRequested_m2AC0E39C301D9E6660395E8F295AE7A42779FA12,
XRHumanBodySubsystem_get_pose3DEnabled_m887A68F14FEB4DC19008AC02FB16DC61FF55810A,
XRHumanBodySubsystem_get_pose3DScaleEstimationRequested_m9A5F9C0B857BDAE5C9D22A5E435DAFB436B2B00E,
XRHumanBodySubsystem_set_pose3DScaleEstimationRequested_mDA2701A18C56A380D9165719CD01D9F3B67FDD24,
XRHumanBodySubsystem_get_pose3DScaleEstimationEnabled_mB8C1AB325556413A272D7A9C4E8E621F6946BD45,
XRHumanBodySubsystem__ctor_mF3C86058EA4CFF10DFE59744ACC2DB437B3F8E84,
XRHumanBodySubsystem_GetChanges_mED95DFB0CF28F2C75BF89565FD42C51FD22EB9F4,
XRHumanBodySubsystem_GetSkeleton_m32DBE0ACF71FC569BDEE1E9E7CD2EF044757B4E8,
XRHumanBodySubsystem_GetHumanBodyPose2DJoints_m9A954E4080DBDEEAF5BA651E2F9837D091F05312,
XRHumanBodySubsystem_Register_m6BB9F0962D03E5A76F3D7434D1F4161A51E7485B,
Provider_get_pose2DRequested_mE53D821039F6398BA705AE07E4A41F556436D25D,
Provider_set_pose2DRequested_m27B9A484B65FE56A642599F71769CECD31F21B55,
Provider_get_pose2DEnabled_m918E7176255D12999485651F781725610C60EA67,
Provider_get_pose3DRequested_m8E70D9B91BE79C906E0AE63E3CCD17A163B0BD59,
Provider_set_pose3DRequested_mCF7E233FEE430CE3B888B8E65D36E7EB8475697B,
Provider_get_pose3DEnabled_m50FF0EE2441930D442B21BDC740F759D37BB08BC,
Provider_get_pose3DScaleEstimationRequested_m16F65694B28BBC00084732C08C2DC484FEBEBB41,
Provider_set_pose3DScaleEstimationRequested_m33837BA93C947D63865DFCA7A83288498EAA8200,
Provider_get_pose3DScaleEstimationEnabled_mD6EDC5A88C7BBE729512E1F009785DA1E6ACE5E0,
NULL,
Provider_GetSkeleton_mFFD5F2C114C2B8C3A8B54C10CFCF82F2D5C57868,
Provider_GetHumanBodyPose2DJoints_m9CBC5A20BCA6FEC12F844AEBCE285D978C859E00,
Provider__ctor_mA98EFA82A2BD0B6E60094A95912A2CFF487D0252,
XRHumanBodySubsystemCinfo_get_id_m6ECD1B43CC3A0BF83286383CA417ECAFB750CB74,
XRHumanBodySubsystemCinfo_set_id_m379B96A2CE563FFD6CAC41112068975C8875B3A7,
XRHumanBodySubsystemCinfo_get_providerType_m9FEA7CEFDEEACC1D13C859C31A2325E50A6132DD,
XRHumanBodySubsystemCinfo_set_providerType_mA34C98EF6EDDFADFF83C4062C0AF33F3C7BA61A5,
XRHumanBodySubsystemCinfo_get_subsystemTypeOverride_mB03C7A5BC048D86AAE6334A221E1DF2FEE059754,
XRHumanBodySubsystemCinfo_set_subsystemTypeOverride_m73A633BECC2393CEB62B95FCF9CD7B32BFDB19FF,
XRHumanBodySubsystemCinfo_get_supportsHumanBody2D_m26CC2FAAFF325E448010E9DFFDC2CF78C5118E71,
XRHumanBodySubsystemCinfo_set_supportsHumanBody2D_m33B2A01C8E5F61DFE604BDCD2D438EC0B3C45551,
XRHumanBodySubsystemCinfo_get_supportsHumanBody3D_m43BFDC9F4E92ECDE599A826C24D951AF90D76331,
XRHumanBodySubsystemCinfo_set_supportsHumanBody3D_mE30720F10B501314868ABDBE2EDCE11D0A333D24,
XRHumanBodySubsystemCinfo_get_supportsHumanBody3DScaleEstimation_mDC1321982924ADE85F14D4AA959D2B593D378380,
XRHumanBodySubsystemCinfo_set_supportsHumanBody3DScaleEstimation_m72411E882EB28AB5BD33F4D266918FA3DB355782,
XRHumanBodySubsystemCinfo_Equals_m0109935097AF2BEE70F4AABB3B8701C50D300F2A,
XRHumanBodySubsystemCinfo_Equals_mC6D157C1801D45FFAA926C64D9C7AFFE6EDAC698,
XRHumanBodySubsystemCinfo_GetHashCode_m24E654BBE6D31E8A07F1B139BDEFF49BF4D77BAF,
XRHumanBodySubsystemDescriptor__ctor_m9E59594DCE6AD50BFD4F71DCF1E5C2178EB0F6B6,
XRHumanBodySubsystemDescriptor_set_supportsHumanBody2D_m69569A3382D7FB0F2E2FE8DCEA0B0132F2746024,
XRHumanBodySubsystemDescriptor_set_supportsHumanBody3D_m379699D5A666066DDDFBEAA9BCC983EB81BC8AC6,
XRHumanBodySubsystemDescriptor_set_supportsHumanBody3DScaleEstimation_m1AA010D35D673EFBB060AEED35E04E6141453E81,
XRHumanBodySubsystemDescriptor_Create_m2B95524971D41DDAC90B9E194A727C814BAB32C6,
AddReferenceImageJobState__ctor_mAFC8E35811BAF9292B00B7D06EF4C6895AFDD74C,
AddReferenceImageJobState_get_jobHandle_mD67B6C7B795C0EAAF2B27C2C23A0CDF0597DDD41,
AddReferenceImageJobState_AsIntPtr_m3918B9BEE2FA6B991CFA1BE13F1B211656B8A78B,
AddReferenceImageJobState_op_Explicit_m5B74AEF81E3819FFD5FA03BA1A125DA19CFF32D0,
AddReferenceImageJobState_get_status_mEB3B5CAB4B567D06A94B438A171D4F21F335D850,
AddReferenceImageJobState_ToString_mF0C9F0307F13953D372C0BA03F3DFFAC3DE6E912,
AddReferenceImageJobState_GetHashCode_m7A9EFB3628AFD98DE738E0766DD6267C90303E47,
AddReferenceImageJobState_Equals_m2B2E0068F7BDF4DB619306E672D9B4FDF1AAD495,
AddReferenceImageJobState_Equals_mDF37DF091DA56B8CFD7EF4AE078984D7A4072AB5,
NULL,
MutableRuntimeReferenceImageLibrary_CreateAddJobState_m27F387722EE946B2B1555C1384B6659E2D884481,
MutableRuntimeReferenceImageLibrary_GetAddReferenceImageJobStatus_mEE3EB04E40A6295FAD73C3FD08F622A629915315,
MutableRuntimeReferenceImageLibrary_get_supportsValidation_m7C3934A7F0CD1947D9E6129372DBC3E4B6030618,
MutableRuntimeReferenceImageLibrary_ScheduleAddImageWithValidationJobImpl_m781DB083DCFA8F856F48773BC38086A6DBBA55DF,
MutableRuntimeReferenceImageLibrary_ScheduleAddImageWithValidationJob_mB3FBB676D62AA027A7041ECA0434857986F94473,
MutableRuntimeReferenceImageLibrary_ValidateAndThrow_mF2EB8580B66B035A33F2F8E61957EC1BFD16B1C6,
NULL,
NULL,
MutableRuntimeReferenceImageLibrary_IsTextureFormatSupported_m487AD78AC89C314E106AB9D84E702FD5310F76B9,
MutableRuntimeReferenceImageLibrary_GetEnumerator_m75BBAD1CD5A618626AFFD2BA789BACC9B912729D,
MutableRuntimeReferenceImageLibrary_GenerateNewGuid_m860BB18E71B6B1DC40530F33333AE0477097E7E0,
MutableRuntimeReferenceImageLibrary__ctor_m9555E1EE4D2E8D6F7C120329D1937B0C91D99969,
Enumerator__ctor_m614C5DEAACB06ED98FFE5BBE716D9F16124A4F81,
Enumerator_MoveNext_m2B35A4EE1CF9A5E1EA6B97AEDFAED2CC7F99D3C5,
Enumerator_get_Current_m5C9F6233409C9A2321C6CB831457C55C4FCB4570,
Enumerator_GetHashCode_mB41365E33A4AC2A52659D36571BBCE9BC93C2546,
Enumerator_Equals_m5A39AA8617AA067134152ED2D95037C914B42AF4,
Enumerator_Equals_mCBAAE58B6FD7DBD90F3C98F10F06C777E5781A98,
RuntimeReferenceImageLibrary_get_Item_mEB525ED69F54BD63CE3942B99521D4D1E04B6CBB,
NULL,
NULL,
RuntimeReferenceImageLibrary__ctor_m24529C1F2AF8B3A8358098F220E770116883A299,
XRImageTrackingSubsystem__ctor_m411C7B39B354BFB6468A5450B91D63A46CAC3A52,
XRImageTrackingSubsystem_OnStart_mAF567D3768F78146ED8BAC36632AC093E6BF80A2,
XRImageTrackingSubsystem_OnStop_mDC92A8E24CDCBA4AAF645A364450805AA2CAFFC1,
XRImageTrackingSubsystem_get_imageLibrary_mAD310B2D70021A61FCD0BA2C75359BABD31EF8B0,
XRImageTrackingSubsystem_set_imageLibrary_m59E1F17C158BF96B79D15189DBA63B89A4C796A6,
XRImageTrackingSubsystem_CreateRuntimeLibrary_mB44F6478C6920F919C856084AC89E96ED5A543CC,
XRImageTrackingSubsystem_GetChanges_m9C289E6EF04C2D66CD8FCF6D9B594995899991DB,
XRImageTrackingSubsystem_get_requestedMaxNumberOfMovingImages_mFAD0E8FF06634759EE07E7986DB6130CE44FD1F8,
XRImageTrackingSubsystem_set_requestedMaxNumberOfMovingImages_m3A2C00B07693B0445E82F2DD9CACCD2395B258AB,
XRImageTrackingSubsystem_get_currentMaxNumberOfMovingImages_mEB66351CADBB5E4765485A91654E3789E6087E53,
NULL,
NULL,
NULL,
Provider_get_requestedMaxNumberOfMovingImages_m2D611F3D46EFE004FA5A5466FEED0501CBAF2E0A,
Provider_set_requestedMaxNumberOfMovingImages_mCEC5839726AA69CAD5ED6F831170D2B7EDD7567F,
Provider_get_currentMaxNumberOfMovingImages_mFFDD62A1C522FD69A89FD71E2CCA909B265B4AF7,
Provider__ctor_mE0C779A245EE703B26578F529ABFD6F18E002AC0,
XRImageTrackingSubsystemDescriptor_get_supportsMovingImages_m7100D7317E24CAC9D353C4FBDEAE2C3BCE6E6D4F,
XRImageTrackingSubsystemDescriptor_Create_m3B9A00008CACA91AEC367F5D5EC19E57EA3D22A1,
XRImageTrackingSubsystemDescriptor__ctor_m2A19512EFC73A1237D84A4DFAB41683FB03D6D55,
Cinfo_get_id_m7ACB39F94D161A19473B51245A60F0FE3380E9C6,
Cinfo_set_id_m57970CF355AB638BAD860B9673F0E76B42126C1A,
Cinfo_get_providerType_m865B26BBCBE9E542D09269A2CA6BD1FC47976AF2,
Cinfo_set_providerType_mCACA6EC48AB4B305E1515A312B32DC196AD9B92C,
Cinfo_get_subsystemTypeOverride_m0008239CE298C4881102FED287EC52224601A3A5,
Cinfo_set_subsystemTypeOverride_m167DE9461D1FE4E4D8AB0EE25A7A4B0A947151D8,
Cinfo_get_supportsMovingImages_m7B1E2171F1304A73339266B64548CF305EFEEA91,
Cinfo_set_supportsMovingImages_m04BB57385FC0A2025414437DB1BEFBE97372E579,
Cinfo_get_requiresPhysicalImageDimensions_mEED8602BF9D390F19582D3F706A9C93333AFB0C7,
Cinfo_set_requiresPhysicalImageDimensions_mC794914720C62ACB74173F165B3015ED9B5CA2A6,
Cinfo_get_supportsMutableLibrary_mCD0988DBB5810975CB97BEDD9B2E6B6C168D6E19,
Cinfo_set_supportsMutableLibrary_m434D9A05D0025989AA711BA50139FD348D127661,
Cinfo_get_supportsImageValidation_m417DC16FCA795DB24C8CAA2C81A5E84855D077BD,
Cinfo_set_supportsImageValidation_m9CA1173736665E4DC3B594EE3357416A8A20B266,
Cinfo_GetHashCode_m8DB95DB86F786705B32382E014B3A5B96F81F4B0,
Cinfo_Equals_m2D882FB6E58A034244EC05B2701C303C0763C3C1,
Cinfo_Equals_m7D227238D404DAA7ED5C72A9C3843FE6CB852ED4,
XRReferenceImage__ctor_m6D6343387F201C296D5D28E2A90D4BB1E83CDBDF,
XRReferenceImage_get_guid_m1C4FCDF5CE4DB41074E50AB2B3D8B4A20CE290BE,
XRReferenceImage_get_textureGuid_mDABB849D0FAF44F4FD86B6D794706DC6667A732F,
XRReferenceImage_get_specifySize_mAC02B5D0DBF9D66C2668206B7603C58149EE7D8B,
XRReferenceImage_get_size_m135B7EF1ED61FE27A8793503E8FC84543642C166,
XRReferenceImage_get_name_mE8F3368C2587552333AB78EA72A02E5B73E355C7,
XRReferenceImage_get_texture_mA66A0D26E463C232CA008D5F44A23F9D0AA838B1,
XRReferenceImage_ToString_mF01AB8377D55DC49917B09F0C12A6B02BD5BEE78,
XRReferenceImage_GetHashCode_m04CE90A2F730C6030216560645C2FD3A81C42985,
XRReferenceImage_Equals_m85D0F3511051929A1F06F75CE015DA98934BC211,
XRReferenceImage_Equals_m8F01D42083D0F6155DEDA29D457A0EDA600629AB,
XRReferenceImageLibrary_get_count_m23E1EA6C92988B7A11A51D532F4630CB7DE513BD,
XRReferenceImageLibrary_GetEnumerator_m95EFD96B0750E15CF00C4B47B7DF3E2961F2183C,
XRReferenceImageLibrary_get_Item_mBA540DAACBCA13289FA41DD2291435CBFE2F00F9,
XRReferenceImageLibrary_indexOf_m1E9DB6343C72280F3837B3F41C1D7C455EAFA4D4,
XRReferenceImageLibrary_get_guid_m1B80F372AE1175A697DBA4C7F48F2E010DE0670C,
XRReferenceImageLibrary__ctor_m165A9ED1DC448CA4413E2055E7A8BA325FB9FF4C,
XRTrackedImage_get_defaultValue_mF1D23DA4557C85FAEB70039F5D14156F1176E84E,
XRTrackedImage_get_trackableId_m908642D8D46876C10767B693C55A4076AA0230D6,
XRTrackedImage_get_sourceImageId_m7840008F6FBB7242723DBA7ADB29411BF199B063,
XRTrackedImage_get_pose_m2DA4B57E9B5317F353B2766538088CFF8991DAB1,
XRTrackedImage_get_size_mBDB5B8715E7C74B9459198230517668BD215E75F,
XRTrackedImage_get_trackingState_m7ADAE68E0B5A3D253B1E086276EE5BC5D9768E71,
XRTrackedImage_get_nativePtr_mF92D042188F2FF5DADA33AB61235DC6CD874B202,
XRTrackedImage_GetHashCode_m312EB4C09316425C0F30B8988A915F647035846B,
XRTrackedImage_Equals_mFE06306D9BB3EBD3C7CCDD555A2F193ED4FE7D65,
XRTrackedImage_Equals_m953C1CFB9A3879975873D13E24071F51C772635A,
XRTrackedImage__cctor_mE7FFB610B77B6A729504D17C98C52C09522FDDEA,
NULL,
NULL,
NULL,
XRObjectTrackingSubsystem__ctor_m75C4A1A4820B9795DEF1CAED15ACC38796F76BDD,
XRObjectTrackingSubsystem_OnStart_mB77ED7DD295528980E011D223BC257725DF63FB5,
XRObjectTrackingSubsystem_set_library_m79D43E82F0D5AD3B58B152275B3375100D40C32C,
XRObjectTrackingSubsystem_OnStop_m4E912083A59608102AA2C7B1A3A2695395575A2C,
XRObjectTrackingSubsystem_GetChanges_m3223798AE3E84E31C63CFCB01E719FFE734EB7E8,
NULL,
NULL,
Provider_set_library_mD6AF0A985F82F44B04BCA8C9BF3D053E8FF0CD86,
Provider__ctor_m8E2A200EE478D4971BDAE03A8E40C9A0C7DBF576,
XRObjectTrackingSubsystemDescriptor_set_capabilities_m0ACF0721272F505AC624521AF7FA03C87033D759,
XRObjectTrackingSubsystemDescriptor__ctor_mE44B346A0A5A035B7DFC7430336DDADED7A4F6A5,
Capabilities_Equals_m921C39E9F8B9A589D30635AF4D55428F9A48E9F7,
Capabilities_Equals_mBC54D72E0218CDA4D42F66F1B93C98E3FCC6F509,
Capabilities_GetHashCode_m2CC9C750B6796CBBC10A34C6E42040FCF9626FBF,
XRReferenceObject_get_guid_m5D1CC7D28AEF760CC4C8E7AEAE550549C879E204,
XRReferenceObject_Equals_mE5200369D784FC38ACF7C16EAAC303D845B5F1B4,
XRReferenceObject_GetHashCode_m088BCD3E046B562DDD8CBFB25AEBF9C5747E2A7C,
XRReferenceObject_Equals_m63933178BE0E783B54B6A983BD3B5ADDF0817ADA,
XRReferenceObjectEntry__ctor_m83901C9E2F4E96DE96A5B2C1940A4A26FA1D54CB,
XRReferenceObjectLibrary_get_count_mEF484EA0E2C038259FE773DC915B3EF49B4F1C1A,
XRReferenceObjectLibrary_GetEnumerator_mCCCCFBD0A4F304D789401FD7EF3938193190B4AF,
XRReferenceObjectLibrary_get_Item_m08D1081C37C23D5ECAD98FD63A5E6B4363D3B96D,
XRReferenceObjectLibrary_get_guid_m47C1EC317BB367A2C7B631E20D0755C617F23728,
XRReferenceObjectLibrary_indexOf_m723FA9F0217C8122BDA75AAFB36EB622FA46DABD,
XRReferenceObjectLibrary__ctor_m4FA11F97BB6F008011D76A38C1DFD1DD76CA616D,
XRTrackedObject_get_defaultValue_m3AC573CBE63C302081874718C743040E3A8C3F89,
XRTrackedObject_get_trackableId_mB62A1367121F404E7E641459F7A2DE4A35801E72,
XRTrackedObject_get_pose_mCF3749FD97A427BF58737E1F72C958B688BF4B14,
XRTrackedObject_get_trackingState_m33C9F81469B2E6174337D76F6109B79B03975349,
XRTrackedObject_get_nativePtr_m13B4B110BB339AF7AF03B1219247112B4ABB38D8,
XRTrackedObject_get_referenceObjectGuid_m277B42932D6C8D42820F47A888407FBE9B0A7436,
XRTrackedObject_Equals_m20B63BFBF61F3D819390A5A574B9916CCE0A7F8B,
XRTrackedObject_GetHashCode_m0456DF4A009ED3B00F2036F603881D9DB74EDAF9,
XRTrackedObject_Equals_mAA87562E27ABE20500A8537F56A551B584A551C5,
XRTrackedObject__cctor_m814A8B4D6D86DE23C211495A7B14F2F8CE172886,
EnvironmentDepthModeExtension_Enabled_m0EDEFDC74670F5F0B499BD2E315715C424077C12,
SegmentationDepthModeExtension_Enabled_m3934709EF5C4CCD661E0188C103280BD96F1D9C6,
SegmentationStencilModeExtension_Enabled_m8C420BAE2C6604ADCAD803BA36C2C78954B5F71E,
XROcclusionSubsystem_get_requestedHumanStencilMode_mC9DCDE40A92C5EE7B7A31B8B9232F5B0BDE514E2,
XROcclusionSubsystem_set_requestedHumanStencilMode_mF67D59B3C057AF7E9FA335280AB8EFDBA2F8F18F,
XROcclusionSubsystem_get_currentHumanStencilMode_m3F1F5440848EEEBFF72F66B6D526845A62DBC057,
XROcclusionSubsystem_get_requestedHumanDepthMode_m0F6A88E6DC1CD2498CACAAD4D47345C35763B1BE,
XROcclusionSubsystem_set_requestedHumanDepthMode_m98BC4A743EF49123DAA52F0969F8542B7DB47026,
XROcclusionSubsystem_get_currentHumanDepthMode_mE04B8DE686090CCE3E783C832EB6DE97FA224A17,
XROcclusionSubsystem_get_requestedEnvironmentDepthMode_m85FD96A6A87B4BFFA51F5AFE482442FACBEF01C1,
XROcclusionSubsystem_set_requestedEnvironmentDepthMode_m98D933939F4684B4258C233C385D756AF6B4C8F2,
XROcclusionSubsystem_get_currentEnvironmentDepthMode_mB34A8639579D93BA74493C29C44BCAD24C5DDA5E,
XROcclusionSubsystem_get_requestedOcclusionPreferenceMode_m701CF4535F7E170997551B7E010A339D92338F20,
XROcclusionSubsystem_set_requestedOcclusionPreferenceMode_mC3EABD62187C7EC1B2FA6B1D5CF06BFA553F7D6D,
XROcclusionSubsystem_get_currentOcclusionPreferenceMode_m53AA761C841959F77C03CBF95E08653A32FC52A9,
XROcclusionSubsystem__ctor_m9EA3B861371659A5607CA2D36A77EAF9023696DD,
XROcclusionSubsystem_TryGetHumanStencil_mB1EC0C01F2EB597A84AF8C2E661C23E057ECDD98,
XROcclusionSubsystem_TryAcquireHumanStencilCpuImage_m95A23BC97400E2E56BF8D0CAF5B5B100CF40A02A,
XROcclusionSubsystem_TryGetHumanDepth_m84470C4EE9A481989D03BC78307236B8DD2E3C19,
XROcclusionSubsystem_TryAcquireHumanDepthCpuImage_m8F88E371C22800DE4C7F0FB8AA4E3731D1F79C39,
XROcclusionSubsystem_TryGetEnvironmentDepth_m3250960687DA0BCD02C6C933B8F27824DEF9186E,
XROcclusionSubsystem_TryAcquireEnvironmentDepthCpuImage_m325D766B287246E7D0A4E80A6CB099AC2D303EEA,
XROcclusionSubsystem_TryGetEnvironmentDepthConfidence_m7ADE5E051A906BA8C42DE40EFD5151663033002A,
XROcclusionSubsystem_TryAcquireEnvironmentDepthConfidenceCpuImage_m1DE682066BB3A73A81945750A7324F28FBAD80DB,
XROcclusionSubsystem_GetTextureDescriptors_mAFD50E268CDFFAAC07B14246FC620DFCE7D8371F,
XROcclusionSubsystem_GetMaterialKeywords_mEE0AF1514718B811FCD728CFF19906F1233A4962,
XROcclusionSubsystem_Register_mC754EFF602648A08D654B4CAFF0906CBFEFB9EB0,
Provider_get_requestedHumanStencilMode_m89B83DF30D15B0BE8670A55F2681B0EB8A739026,
Provider_set_requestedHumanStencilMode_m17A4B7518A1749DEEF6E432E290D03D66AAB1004,
Provider_get_currentHumanStencilMode_m9DF9A52AA77E4B7E0A3ACD89887322493F53FC45,
Provider_get_requestedHumanDepthMode_m9DE747D3680A70BC6BCCC5D6FFD4F171EEB0899B,
Provider_set_requestedHumanDepthMode_m90E3350AB1E861DDA9B1254B5601665484690258,
Provider_get_currentHumanDepthMode_mC677BD11CFB177BD210B8F059CD169D49D8FB431,
Provider_get_requestedEnvironmentDepthMode_mB27FC4801CC4846867255F73260835F0CAD41CA6,
Provider_set_requestedEnvironmentDepthMode_mBA1103C34AA535C754E2AD417868496FA18928B5,
Provider_get_currentEnvironmentDepthMode_m3664B08405157169A39218B4AD96286C2F089B2A,
Provider_get_requestedOcclusionPreferenceMode_m0FF0C84504EAB9D5F2A016EBB2ACC4BDBECCF19C,
Provider_set_requestedOcclusionPreferenceMode_mE5DF2A581164905E51A0BC02AC1DA0D0E03D77E2,
Provider_get_currentOcclusionPreferenceMode_m216AA7572FF205318FD726F0BF8DE48715987F9E,
Provider_TryGetHumanStencil_m8231857EC5143647F85BB79A29BAC18430821D36,
Provider_TryAcquireHumanStencilCpuImage_mC6011EC7798D37065264EE243943E90D1E6B71FD,
Provider_get_humanStencilCpuImageApi_m4CCDB03AAC405F55F90907E1AAB9328D86C740F2,
Provider_TryGetHumanDepth_m4F902130B0B684322ACE0F2D7F72F412F5D42844,
Provider_TryAcquireHumanDepthCpuImage_mD9C2C05795A09F724FA8FCCE18C32CD2F5B66F0F,
Provider_get_humanDepthCpuImageApi_mF6C1BB545272C0EB05D995FE27A499C887F46BA9,
Provider_TryGetEnvironmentDepth_m39AA20EFA2DB7D68364B4D677731911BB9B95987,
Provider_TryAcquireEnvironmentDepthCpuImage_m038A771570F8067187EA5602FE6287D7F32A8BA4,
Provider_get_environmentDepthCpuImageApi_mF69078CBA7922A4F92C7D8B9359511DA16BB7117,
Provider_TryGetEnvironmentDepthConfidence_mB12E08E4B93E1272976BE1F0C09592133B93848F,
Provider_TryAcquireEnvironmentDepthConfidenceCpuImage_mC0A1389DBA1C968C2E998C406852881E0F6089FE,
Provider_get_environmentDepthConfidenceCpuImageApi_mEBEAA0B71D94E7A69392061521D045FCE2750CE6,
Provider_GetTextureDescriptors_mE2329867DDA41B3F1110DAF5081D3FD427191C85,
Provider_GetMaterialKeywords_mF75D36CB409D853AD7AF66D9E8E0665C63E1AA8D,
Provider__ctor_m4B36FAF10D278F373035E446EFFC7C4C5B32C4FD,
XROcclusionSubsystemCinfo_get_id_m52AA71D202632FA1607B0FEF64946642B6C3608C,
XROcclusionSubsystemCinfo_set_id_m19076B4B5E6D6AA32BE751C1F2611CB7C3C152A0,
XROcclusionSubsystemCinfo_get_providerType_m8D7C8F76AE3FAEEC4952D6FF75134CE4DADFFA22,
XROcclusionSubsystemCinfo_set_providerType_mA9E2685FC29652BBF41CD7398D8A434B72B68556,
XROcclusionSubsystemCinfo_get_subsystemTypeOverride_m60945479B5A62376EEA5633F4FF21D4BD137C125,
XROcclusionSubsystemCinfo_set_subsystemTypeOverride_mC5D9DB3F2CDC007F826FC2AB790F1622DFBA0F63,
XROcclusionSubsystemCinfo_get_supportsHumanSegmentationStencilImage_m3F2F9B49E2326FE8A773C655848F6497A5F8A797,
XROcclusionSubsystemCinfo_set_supportsHumanSegmentationStencilImage_mEC6C58C95DF515008316ED9A33A37ABBFBFD88BD,
XROcclusionSubsystemCinfo_get_supportsHumanSegmentationDepthImage_mBFFC1F3611B38652EEFD21E2D7433B71F36A172D,
XROcclusionSubsystemCinfo_set_supportsHumanSegmentationDepthImage_mF08FD3863AEB93D47CCF50BD197780D2AB6F0705,
XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthImage_m7E021A482EB4D3F52CA43ABEF71FD654304330AC,
XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthImage_m51449A6122E2D967180669F6C0425F5D1E038F7E,
XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthConfidenceImage_m3A9518505C78739C2476A7E64F6942D83C582DD5,
XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthConfidenceImage_m24C48D100ECEEC534C92273C21C18FBCCD98C740,
XROcclusionSubsystemCinfo_Equals_mBF75B2160741AC5D0F43480949D690FE94ECCE18,
XROcclusionSubsystemCinfo_Equals_m046DEDAFD67F305D51E59636AF310702B5152EEB,
XROcclusionSubsystemCinfo_GetHashCode_m8A26E07DD1C840DFEC9373E26990B3DA40F1D8A1,
XROcclusionSubsystemDescriptor__ctor_mC7893752CE0EB8F9130E7127BFC306B11BE4AA42,
XROcclusionSubsystemDescriptor_get_supportsHumanSegmentationStencilImage_m568E947E892CB4927549EF2E47BD0A40D85124A3,
XROcclusionSubsystemDescriptor_set_supportsHumanSegmentationStencilImage_m8D7F47CF55EE1F758A1CF9A53700B78FAAD3A9DE,
XROcclusionSubsystemDescriptor_get_supportsHumanSegmentationDepthImage_m2A660F032C38F34D2ACE3A927214C17895FB7530,
XROcclusionSubsystemDescriptor_set_supportsHumanSegmentationDepthImage_mD48BEC8C3460FA7B6BC492D70DF7E70C468DB38F,
XROcclusionSubsystemDescriptor_get_supportsEnvironmentDepthImage_mBC659B981990D4BBD0E0D52290351CFDB8947ECA,
XROcclusionSubsystemDescriptor_get_supportsEnvironmentDepthConfidenceImage_m80B81280456C3215266FF98FEF89C2CC23C2D6D3,
XROcclusionSubsystemDescriptor_Create_m31FA1D0EDAF351742A97C9E655F069AF8544C852,
XRParticipant_get_defaultParticipant_mD2641CE602FDDA1E32641A60101077BF5E10B49D,
XRParticipant_get_trackableId_mFE20FF09B28F44F916FD7175C9D1B50658DB8D13,
XRParticipant_get_pose_m8BC5243C4975CE29D2E98B803908FE7B0B2A1D1B,
XRParticipant_get_trackingState_m0510505F8AE642CCCEBD2D784CB898CEDD59A08F,
XRParticipant_get_nativePtr_mF4BBE0CC8C5CFA70984EAAD24CFF13E9BCFE0FE4,
XRParticipant_get_sessionId_m25D8BC6B31A8216FF6959B2C4792CCC7040A2300,
XRParticipant_GetHashCode_mF04382E10454D77B4F1AA3AF615488B98D9D62EC,
XRParticipant_Equals_mE1679D0AAFE2566EA4CE5AF7992F1ADD3D2AFEDA,
XRParticipant_Equals_mBA488A840ABD4DBB6432E2D03126062EC1A6768C,
XRParticipant__cctor_mBD235B2B36E92A66051E85204403C005DFAF9C96,
XRParticipantSubsystem__ctor_mC7EB236E3A4BBC45C055B94C26493FBB19DF4056,
XRParticipantSubsystem_GetChanges_mFC86BCBEF9E0E318E661D36AC316B6D01A068AA8,
NULL,
Provider__ctor_m29C158581A2B8BF6DE3F03DDACC1A2F8FFB1F875,
XRParticipantSubsystemDescriptor_set_capabilities_m3CDF9EDC1BF57F513846DE87A9E4996ED543759A,
NULL,
XRParticipantSubsystemDescriptor__ctor_m83A6821A71C68D58354ACE8289E8F621F2E183DC,
BoundedPlane_get_defaultValue_m0C1F8EA6D681C3333CF429425254F63E1BE99003,
BoundedPlane__ctor_mDCFBC1B53B86B650BBB103C9FC25E7872CBF804B,
BoundedPlane_get_trackableId_m32943441D74DC226DC907A05B5B6C6EBBC70F95B,
BoundedPlane_get_subsumedById_mD61EFD7A91B5F290F63A1AE59153B75BB33B89CF,
BoundedPlane_get_pose_m8302E13809156362584FA0AE137DD911D30665BA,
BoundedPlane_get_center_mA4667303D86B331F7EC5F278910145E7633EA973,
BoundedPlane_get_extents_mEED7F74BBACA8EA90D43ED12EC9D10C9059118CD,
BoundedPlane_get_size_m204F4F37C0FB6F7294682D961B53F4F9639E3882,
BoundedPlane_get_alignment_m72B849B54224B1493DFF448BCF2AB8634751DC71,
BoundedPlane_get_trackingState_mBF10ADD6DD969A0DA7FCC8299FFA56AEB9B837CA,
BoundedPlane_get_nativePtr_m626921F0179BF37BC5F06C2587D298FB40F31FE9,
BoundedPlane_get_classification_m842651162BFE9633C414B16CD1D86FBBE86589A3,
BoundedPlane_ToString_m0A542F5D2CB72755643184989BE3B9E6899D731A,
BoundedPlane_Equals_m5B2E8A0932BC0242B51091CDDFED85901156A005,
BoundedPlane_GetHashCode_m99D4D46A432C2E00A182A86788A750522BFBCAEF,
BoundedPlane_Equals_m3A984C969EC0ACE7B83F661C80AA82C54D455D1A,
BoundedPlane__cctor_m8E99A66F7A4052C7C0C7CE3077F4172F3E196E17,
XRPlaneSubsystem__ctor_mDD4F1B44F90E2F50D3C78601413F01D05990B20C,
XRPlaneSubsystem_get_requestedPlaneDetectionMode_m51078C58B303EDA9CF614D48CE5E66F5A7136671,
XRPlaneSubsystem_set_requestedPlaneDetectionMode_m5417F9F8388C4FFEF240FDA59C658C7BC7BE31E6,
XRPlaneSubsystem_get_currentPlaneDetectionMode_m118C25A13FE903AA0811ADC0DBEFEED9E6527FA1,
XRPlaneSubsystem_GetChanges_m041C14703F9160E7C1A0C740F534D4881D9BA4EA,
XRPlaneSubsystem_GetBoundary_mE3A06B4C37DB403DC6E5DD45A7E30700C73B3CA3,
NULL,
Provider_GetBoundary_mFEC076BA5F9EAEFB5CFD36A8A690CD6B9449A45A,
NULL,
Provider_get_requestedPlaneDetectionMode_mBE4A83FB233470D747D0F6E6435062F0B076D787,
Provider_set_requestedPlaneDetectionMode_m6F76C54F3DDC0811336F80D6CF40CBC64147DAD9,
Provider_get_currentPlaneDetectionMode_m6409F5A32746AC3BAB7876DEDF7A9CA5C27CDFF2,
Provider__ctor_mDEDB208301BBA3CC96FFF2DA6AC90F5D241CE524,
XRPlaneSubsystemDescriptor_set_supportsHorizontalPlaneDetection_m2BB45C7A44E14368A0FAEADA130A6F6158B1042D,
XRPlaneSubsystemDescriptor_set_supportsVerticalPlaneDetection_m050259C60036A9B08459ED7BDFC06D24270927B2,
XRPlaneSubsystemDescriptor_set_supportsArbitraryPlaneDetection_m2A4804EC8ED1137CB21F6589FBAE85CF01B1A5A0,
XRPlaneSubsystemDescriptor_get_supportsBoundaryVertices_m4345B5F3CA73C685A3F741C4EDFF6B69EEEB8431,
XRPlaneSubsystemDescriptor_set_supportsBoundaryVertices_mDF9E00121A6509790D704D77FF0B863A99436747,
XRPlaneSubsystemDescriptor_set_supportsClassification_mA74FCEFD28F8CC7E1BB2E97E69DFA8E20BD0904A,
XRPlaneSubsystemDescriptor_Create_mB69A44F54AB64DF4361D3C16AE48C2F1B474EA32,
XRPlaneSubsystemDescriptor__ctor_mC8788AC7F6940BA1E88AE0277C1D099DD0EEB935,
Cinfo_get_id_m62022D2EE6912F0B1BDBCA687A4FC63321DE3F86,
Cinfo_set_id_m940361693A3C925B2180733D87611B5FDF0357D7,
Cinfo_get_providerType_m496CFFD5CAAF878266582DECEC5CDFB92A9C0A55,
Cinfo_set_providerType_m8B6A7EE025CCB9B5B5E26E6F4C779DFE09955744,
Cinfo_get_subsystemTypeOverride_m67ACD12818B5C91D42707639EA205E13BB15171A,
Cinfo_set_subsystemTypeOverride_mBC4F1CC20B4DF3D551BAFC1C38245F457E262A58,
Cinfo_get_supportsHorizontalPlaneDetection_mBC3012C667106D47D9429F9C8001774038A38216,
Cinfo_set_supportsHorizontalPlaneDetection_mBC9B4572592B71328A96AF58DEB047528470C440,
Cinfo_get_supportsVerticalPlaneDetection_m4E3BE200E11784D049B94A054F15E4C76D29D7C6,
Cinfo_set_supportsVerticalPlaneDetection_mFF310EF7B9F8D9C9F9689CF9D1D2BEDDFF93F9F0,
Cinfo_get_supportsArbitraryPlaneDetection_mF6CB379C9781FE8B8473949DA99196508EF91DB5,
Cinfo_set_supportsArbitraryPlaneDetection_m70B1D6D27946FB12BF0D3D3AF8C6DC8DC3F399B9,
Cinfo_get_supportsBoundaryVertices_m5BA762B342FCF81EAE6E3645D3BAF04C1E8EAAD9,
Cinfo_set_supportsBoundaryVertices_mC6F86EB28D38CC483AD8F9FD161013BDE3F4AFEF,
Cinfo_get_supportsClassification_m0396A2A62F840D9E283402BFB3681A5CC19C810E,
Cinfo_set_supportsClassification_mA3B11D7CA4F960C89E729E5161AD7CC3211B933C,
Cinfo_Equals_m997D9E2FAF1A57953B2A2C95A4221C9EB82843BC,
Cinfo_Equals_m38EB24520E9273465E918F9F14D72FCE8EE4EB8B,
Cinfo_GetHashCode_m219A4B64FB8A60D947BA345FBD65292065581378,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
XRRaycast_get_defaultValue_mC4E3CDC7E9F4C17F3708B82DCDA95FFD395C2BE0,
XRRaycast_get_trackableId_m58733DD621FACDF9F32633AA0247FDDE4B6F4EBE,
XRRaycast_get_pose_m62D623D6E37AE82B0E223804F034E604037E24E1,
XRRaycast_get_trackingState_m8A926660A7D03F72E558198E760AE01936FB8DF0,
XRRaycast_get_nativePtr_m079CE750F279F664A8D524ACA2D070056143389D,
XRRaycast_get_distance_m4D3B928473544B72D50CF70503B18DBC75951263,
XRRaycast_get_hitTrackableId_mA4EE855CDEE8AC2D109FDE58A7EF4AED262CBFFE,
XRRaycast__ctor_mCB8C71860ADB4EEEAECBB9D2FD6373FA7EE13A48,
XRRaycast_GetHashCode_m68040849E5282B2DAEE10DEC5F13B22E69A9EA36,
XRRaycast_Equals_m808F58AFF56D3598C410DBB759CD48CBEBFBE553,
XRRaycast_Equals_m155EE0BDA8E10977C499A22B2EE32D252A960535,
XRRaycast__cctor_mF4E28BD54EAB27ED12CEBC7643C8A599E7D93562,
XRRaycastHit_get_defaultValue_m23C7AB55A53165C8E2F13CC8F1B70104C37B833A,
XRRaycastHit_get_trackableId_m39A90CBBE6D03C7C726715BEE8404A5411ACECBA,
XRRaycastHit_get_pose_m7374236222252D08D08C85145B88AF698FAA77F4,
XRRaycastHit_get_distance_m51570C654B1EED732C9EE7C73D51B13B9CF8262B,
XRRaycastHit_get_hitType_m14A0398215ED8B10A1E505427C7584100189C222,
XRRaycastHit__ctor_mF47DE3277FA881FCB8E74A5ADEC8E9624F00900F,
XRRaycastHit_GetHashCode_m3BA94B911CC05BEC9FB3D5BB2D37142929AF3F33,
XRRaycastHit_Equals_m227F3BD461F3EDA16E3AAF42E40B32607C58F8BB,
XRRaycastHit_Equals_m84983BF79308ADA4ED84E210840E2F950B549FA0,
XRRaycastHit__cctor_m192CB55E4570D447209605B30A0546AC65D70601,
XRRaycastSubsystem__ctor_m73E44C9109F84F8DFB603F6E480200EF0A62A15B,
XRRaycastSubsystem_GetChanges_m6200FBDEEF32324D55A39BABCFDA4485152158D7,
XRRaycastSubsystem_TryAddRaycast_mADDC2D2907EA853D5772BDBDF5515C6BEE5273E6,
XRRaycastSubsystem_TryAddRaycast_m0E3CB340F43243817F58EAFF05AD30B5926AB888,
XRRaycastSubsystem_RemoveRaycast_mD6B80384ECD82726C5A8BD098684FEDF708E8F7B,
XRRaycastSubsystem_Raycast_m888778039168DBFBF958BF0E82674CD370DBC485,
XRRaycastSubsystem_Raycast_m6EF56F1AD3C1A4385729B9FBEFC05ED91DEEA4C7,
Provider_Start_m005AB31948BB907D11D7E64C051F6C08D2B4BFF2,
Provider_Stop_m1C036AD27F8B1E3EA9AFB22880B84637CC6693B8,
Provider_Destroy_m0A7220BD30B6E87681E5D63B89FA177E24A93FD5,
Provider_TryAddRaycast_m4EEED029510C7B0273678827530C882EDA5B314F,
Provider_TryAddRaycast_m3C4F9E15B1849B074BEFF8426DBE71F3F1E93564,
Provider_RemoveRaycast_m1C8BC761375BCA3E3F4077690EB8719DDDC2B71E,
Provider_GetChanges_m7F79213AA617C8206739FFE806E196E7D5A4BDAF,
Provider_Raycast_mBEE3804BA51E701D3775CC4AC1AFD16FEB97FB72,
Provider_Raycast_m848F042E5613BB90E3A933E19E8229D7C94914C0,
Provider__ctor_m58E4226B4157880E60C02C82B5FB24D9760EA94F,
XRRaycastSubsystemDescriptor_get_supportsViewportBasedRaycast_mB431E0A243FBE6F37AEAB566B124E502FEEC267B,
XRRaycastSubsystemDescriptor_set_supportsViewportBasedRaycast_m573D624059387ECB8EAB5386DDA18F04A8B74A29,
XRRaycastSubsystemDescriptor_get_supportsWorldBasedRaycast_m242C4F2136709274DAF885FCC520546E682AD0DF,
XRRaycastSubsystemDescriptor_set_supportsWorldBasedRaycast_mA63CC456D0FD28CD57DD2D0C3DEB3AC0DEA60C8B,
XRRaycastSubsystemDescriptor_set_supportedTrackableTypes_mAFC6D42C7EFE47219C8461162392E994364BBD53,
XRRaycastSubsystemDescriptor_set_supportsTrackedRaycasts_mD10EA0CD0E6F8FB9D499544B0DE27A5EBCED30C9,
XRRaycastSubsystemDescriptor_RegisterDescriptor_mD9A0FD5846AA09D7D7D32A1093566607D0082ABA,
XRRaycastSubsystemDescriptor__ctor_m2185C8C50AB138A0C3B5165A92534E2E0D7D57A7,
Cinfo_get_id_m9A34BB7AAEFCB43E1627AA047A68C058D730EDC4,
Cinfo_set_id_m0CB4DA3E552ED7940FBA88D8EE3BB6379EA255D6,
Cinfo_get_providerType_m6AFB0E29047AF8A34F780EBACFC0CDDA44AAF50C,
Cinfo_set_providerType_m20992869A706183D7180A2030C84B5445DCF0BE3,
Cinfo_get_subsystemTypeOverride_mCFC851E4227172E1E01130E60CC64F4B2FFC8C63,
Cinfo_set_subsystemTypeOverride_mD5425E55455A21B7361B847FD6B78998AC70CD5B,
Cinfo_get_supportsViewportBasedRaycast_m76E31D4FF84E88050FE4E8B6C44FB6E4E71A5A3A,
Cinfo_set_supportsViewportBasedRaycast_mCF77DEFDDC3931682A33A063DF2F25FFBF07B807,
Cinfo_get_supportsWorldBasedRaycast_m5242363FA90D64968F4ED236EC35973B7ABC180A,
Cinfo_set_supportsWorldBasedRaycast_m74BF70E612BCAFAD380C108700905E5B8C5425FA,
Cinfo_get_supportedTrackableTypes_m0DA573866D46012B650151C7538796542A3E2C70,
Cinfo_set_supportedTrackableTypes_mABC320F641164FC1DB2AB9DB3F1E075B6235A785,
Cinfo_get_supportsTrackedRaycasts_mB923DE37AE981FB26768CFF11B34A63F481A261A,
Cinfo_set_supportsTrackedRaycasts_mD7575B5CAA4BB3652786E2AE2C1B94CF8BEB423C,
Cinfo_GetHashCode_mE07F77F64788F12838A7D8A20E07DE366DDAEEEA,
Cinfo_Equals_mFDD42918C99F796C9737C544D9858098C0241716,
Cinfo_ToString_m5E549199F8D40CF630BB8ED6B46EC5F51E580BEB,
Cinfo_Equals_m96B4DD943D8AAA5D31B0B5BCD0EEC1F94E60F146,
ScopedProfiler__ctor_m3426FC301C7541283DA4382EFAFDBDFD08358DAD,
ScopedProfiler_Dispose_mB6720C4212A51CBC86104AF46E081B1CB410BC1A,
SerializableGuid__ctor_m0A96C8F8254451C083274363A1C68E5FB5CDF107,
SerializableGuid_get_empty_mD053CE84CCEA69471972F0618E55DFDBC923D221,
SerializableGuid_get_guid_m54618233E4BD08410123A50B4E8DAC66FCE46032,
SerializableGuid_GetHashCode_m200045FC79E206A9FD4B9A1578A3C66CCBF41481,
SerializableGuid_Equals_m20C468F42E878759B4DB1703B99E3EF7FA0DE550,
SerializableGuid_ToString_m593CC03163539B5043119F380A189EDCBF100D32,
SerializableGuid_Equals_m1ADEE5CED29ED1D62E794F2CECCDEADF416878A6,
SerializableGuid__cctor_m7AE147A3690432A01E90F8785AAAA9724841CC44,
SessionAvailabilityExtensions_IsSupported_mB38CD4C740F6E73FACB198DC2F491301EDB34401,
SessionAvailabilityExtensions_IsInstalled_mB8EBDA11F7560DAEF09C2A4BC566A5103CA47424,
XRSessionSubsystem_GetAvailabilityAsync_mA4038195D2F008EB5267493DB3CF19CCFC973047,
XRSessionSubsystem_InstallAsync_m173C37A6ED69160C9634E89383D515FC28EF59BF,
XRSessionSubsystem__ctor_m8485F39F339764D3FCA4FD0E1D77ADE16CAE1676,
XRSessionSubsystem_Reset_mFA88E84DCF6A271F853C9B52A28F0A34AFCAE74D,
XRSessionSubsystem_DetermineConfiguration_mC3CBA78160165C46FCB97DDA58E9B32A46B43770,
XRSessionSubsystem_Update_mB98D19BDD6613D1140C2FEDE5107B87DEE9960AC,
XRSessionSubsystem_get_currentConfiguration_m7B3DC4591DB239331BDEA94C32CA927E78C991CC,
XRSessionSubsystem_set_currentConfiguration_m676D72EA2E4E14328D3ADDF29C98D5397DE4A646,
XRSessionSubsystem_HexString_m4A3CB385B4E2878EB21BDADEBC2F6003A4D0E68C,
XRSessionSubsystem_DebugPrintConfigurationChange_m42A5DB0B450604B289BD68FDF8C2F68243643167,
XRSessionSubsystem_get_requestedFeatures_m3D5B22B790EC0E1CA2903F88DDC339ADC6E3805F,
XRSessionSubsystem_GetConfigurationDescriptors_m38E9B6B5B75399594BBF74FE3E1B685EBC7494A1,
XRSessionSubsystem_OnApplicationPause_m863413E205047A9329A534A2955ABAF34953C136,
XRSessionSubsystem_OnApplicationResume_m7CC922F44D20F20791E6DCDDB87682E7798A1160,
XRSessionSubsystem_get_trackingState_m65EE2B0335117F7508AC8A82DB81421AC88AC687,
XRSessionSubsystem_get_requestedTrackingMode_m4F6519898E617E15D1F4CB2EF96057F6D38CBD1B,
XRSessionSubsystem_set_requestedTrackingMode_m43499C22FDB4E328BBEA1992222DC348052992E1,
XRSessionSubsystem_get_currentTrackingMode_m36511B6DC40F6363FEB7DD1222086522B54E26AE,
XRSessionSubsystem_get_notTrackingReason_m2FB94CC40A6732E380A9713537C13D1067EC8928,
XRSessionSubsystem_get_matchFrameRateEnabled_m8B5B88A363EC86DE2F5851CFC4D0D388ADF890A0,
XRSessionSubsystem_get_matchFrameRateRequested_mCABF94E8C5BA04F7AE3A708360DFEE216A9BE97F,
XRSessionSubsystem_set_matchFrameRateRequested_m1059EAC1993A8F333B791C10C5B2173E171EB330,
XRSessionSubsystem_get_frameRate_mE5994F649324FE45138D7D5A56DE4CB6CDEA9784,
Provider_Start_m2A20FC49495EFF34A01887ABF28338FD2511C97A,
Provider_Stop_mC3937DB37B165BFDB925D51BDFB63DBAE14E5CE6,
Provider_Update_m44516D330A225A42401D9F850CAB45A1781656A7,
Provider_Update_mC15A02B030984925D814C8CF68EB96D4BD268236,
Provider_get_requestedFeatures_mD37FD382547DA72EF30A32B33AB2660101B248D5,
Provider_get_requestedTrackingMode_mC88877D2BC7250D543457D640A20AE183EB9BFE5,
Provider_set_requestedTrackingMode_mE84B329D9C903D6D47CBA2D11DF144EADB1D2345,
Provider_get_currentTrackingMode_m597AC294BE6020DFD42DAE027B2E62D5906ABD34,
Provider_GetConfigurationDescriptors_mDBC0CC4E857D4C838349D32ED2FBDFE75C3A5A39,
Provider_Destroy_m91FDA48A481008AB6F408823ACFA4E51B6710F17,
Provider_Reset_mC07FE81BB38D7C6F1123D477E078BCA98DD0007E,
Provider_OnApplicationPause_mDDA05F7C18D3B1E26F0B468CBC454557788D147B,
Provider_OnApplicationResume_m598667339799D80D929DEBBA5C197AC4C394C52A,
Provider_get_nativePtr_m36BB948CA26F060AE9F9B5E77191B48605C5770B,
Provider_GetAvailabilityAsync_m0C73C4907A03BA2F018EA2C0CE66C9C17423C6DD,
Provider_InstallAsync_m17CAA895097CD78BC743DD1CA0CB4B6F5F7091D6,
Provider_get_trackingState_m3E9021C49EADF2BE9853FD13A23650CE5237A2BF,
Provider_get_notTrackingReason_mD6C96A5620A1DD87BCB86710E9460A41C5B18F66,
Provider_get_sessionId_m28A8F75715D7469B0F555CAC2E9B7D71B68CAFCE,
Provider_get_matchFrameRateEnabled_m4EC0EF72F182CE2BBF27666D5750E46D54E797EB,
Provider_get_matchFrameRateRequested_m32C8D538076876248908EBA9F11F31D249894C37,
Provider_set_matchFrameRateRequested_m22D49ABF01EEF1D750FD86A7E6D67BE6A462E0DC,
Provider_get_frameRate_mC445B76B58305DB89474EBF4A1EAC3DFBB8268D0,
Provider__ctor_m921D9E5D94AB32804689C972E36ECA2601BB2AAE,
XRSessionSubsystemDescriptor_get_supportsInstall_mEBC6C00B6B07C4F0511E6CADEB7FD7F6099A27D3,
XRSessionSubsystemDescriptor_set_supportsInstall_mE8D2939BADC8A5579685249EEA3C12617416CEF2,
XRSessionSubsystemDescriptor_get_supportsMatchFrameRate_m5C032C3C19BA1C47856442A7290690061E41E87C,
XRSessionSubsystemDescriptor_set_supportsMatchFrameRate_m9FB2B904E2E7E4EC51E2089C8DDE97463F4C031D,
XRSessionSubsystemDescriptor_RegisterDescriptor_m60DE0DD6782289BAD4D67D15E2361D1B7B71C262,
XRSessionSubsystemDescriptor__ctor_mC3487128AC53B5697213AFF8B2F98F1C3288B3A7,
Cinfo_get_supportsInstall_m706A828C9AE61FF74DF4640D80E52148CDF4F3AD,
Cinfo_set_supportsInstall_m05EE61C58E505A8F20DEA68862395341F1DAD3FD,
Cinfo_get_supportsMatchFrameRate_m1E603F47BF0A28EE5E7377A28D9D2BB29BFD3B6F,
Cinfo_set_supportsMatchFrameRate_m9CB328CEF43BCE3E59F26A97D32AEE1D201F8787,
Cinfo_get_id_mA521F604882D1F4C6FD30262F3E2C3B0609BFC55,
Cinfo_set_id_m6A2CAB13FAD54AB05458DC5DE1FAB5C651E9D656,
Cinfo_get_providerType_mC64DDA0FD5E23FD53F7B9DAEAF4433487436835E,
Cinfo_set_providerType_m2BCF5FEFC25D812C3E7F00725B49AE02540B2F8E,
Cinfo_get_subsystemTypeOverride_mFB0EAD46EF91216924D0509C72DF82ADA526B99D,
Cinfo_set_subsystemTypeOverride_m30FDD93193E0D694ABB33E184552AAF1A8AA36E6,
Cinfo_GetHashCode_m52D192E832A52B87FB2F03DB84EB47EED7DCD48C,
Cinfo_Equals_m1C37149A7375CC94768E18102A1CB1AED3E3FF77,
Cinfo_Equals_m515E1A8509A7C1472469FD535B7CBE5D58E45A78,
XRSessionUpdateParams_get_screenOrientation_m3200C056D5EF350333CBEC08C5BADCB3F9B3588A,
XRSessionUpdateParams_set_screenOrientation_m958168FC8048AE33DC4757F9A1184520B15FD341,
XRSessionUpdateParams_get_screenDimensions_m68257DCBBAEB4090559AC18A180C8E54D02F5118,
XRSessionUpdateParams_set_screenDimensions_m3658D658C653B6ED72DB68F099A4512FE756D8F6,
XRSessionUpdateParams_GetHashCode_mCCE320FCC4DE7EEF2FC1778BB15E422BAC190908,
XRSessionUpdateParams_Equals_m2501DC639F937DCBD2423619545AC556DE71F3B2,
XRSessionUpdateParams_ToString_m01D74BEF4A53B620271579234011D2F6D0522598,
XRSessionUpdateParams_Equals_m57475F3E7F97539B697A4DC77122F934C321ECD0,
TrackableId_get_invalidId_m06B698EFFA7748E185299C72B5CEC1AA5B221F85,
TrackableId_get_subId1_m219B741FAF6D36DB7B8CFDC588EA93677FCE174B,
TrackableId_get_subId2_m136D4970BDCC7323020913A9B5303584AA105B34,
TrackableId__ctor_mB9B301A9CD03355A4E03A2B1A102B6B75F190792,
TrackableId_ToString_mCD45FD4FF5DF6DE30A38AD05D02CFA7B2B696BB1,
TrackableId_GetHashCode_mFD297FC6DB40FB5B28C6E9B7A2CF2785D75C4E86,
TrackableId_Equals_mA542615B3B7AAD52AEBBEFBCE7E6987B2DE3849D,
TrackableId_Equals_m1DF35616359175E3D66DE18250E8CDA1E6462B06,
TrackableId_op_Equality_m0868EBB6BB9BA72B226D0717352604B3E8EA119B,
TrackableId__cctor_m1B22B00F74C0C62B97D7EAB4E9B17F55B2DE94E7,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
XRTextureDescriptor_get_nativeTexture_mC7D28CAE1A948B378FF5966C85883508435C2B1A,
XRTextureDescriptor_get_width_m16F58793E411A03BDB01C19D0BCDBA8DC52455DC,
XRTextureDescriptor_get_height_mF20F82E1D3B8739A79F017147847B051FD33E554,
XRTextureDescriptor_get_mipmapCount_mE8FD55B645419BA7DA6959B000B8218BE142B302,
XRTextureDescriptor_get_format_mB5A486F3100EB333CF52F505ACB63E68C7CB511D,
XRTextureDescriptor_get_propertyNameId_mF90DF67F19E16118CB3D31EB44E643F4C48DE7C8,
XRTextureDescriptor_get_valid_m921AF29648A562E6C6D2CA5F0E4A84109368A1E6,
XRTextureDescriptor_get_depth_m27FA31D85456F65E706B03743250CB3858EBE0E3,
XRTextureDescriptor_get_dimension_mAB82596EFC83FBC3477D496E77FD9B0579922CCC,
XRTextureDescriptor_hasIdenticalTextureMetadata_mEEAE086BC369920DB89D8E38BA6A1133436100F2,
XRTextureDescriptor_Reset_m7C4468143C7A9EA8B43068E809C8A392CCF31F09,
XRTextureDescriptor_Equals_mD2A71E4A2D68686E74A648896FAC0FCDF02BE0B1,
XRTextureDescriptor_Equals_m37D3AFD7E110F62E8977937DD66AC053B3F64C8D,
XRTextureDescriptor_GetHashCode_m8628ACEB1A4A6203BCD28B01D59B588715C83291,
XRTextureDescriptor_ToString_m13E8A051346374949A95D217BBAAD298893A25EB,
};
extern void XRAnchor_get_trackableId_mE8C852BEAA9025FD1CB643F41836CA72C25E7B92_AdjustorThunk (void);
extern void XRAnchor_get_pose_mD135777376B2898B0A151AD5AA8FD4BBD7C7C5FF_AdjustorThunk (void);
extern void XRAnchor_get_trackingState_m2B3E621BA332B1E74CF8EC94FA8B18EDAF68F462_AdjustorThunk (void);
extern void XRAnchor_get_nativePtr_m47E36685E001BF3810BF6A45B8DF8128080DAEFB_AdjustorThunk (void);
extern void XRAnchor_get_sessionId_m61DAD2C82C4D725E773BFAB2E8A8BE50EDEEC379_AdjustorThunk (void);
extern void XRAnchor_GetHashCode_m3928C95D8DE59840CB82D9FD13EDEEAEA2A89376_AdjustorThunk (void);
extern void XRAnchor_Equals_mE6AC873FF43B605D47F5AB76F0ADAD9A6EDEA25B_AdjustorThunk (void);
extern void XRAnchor_Equals_m8C35DEBDDAC21262E3344152D76539DF1AF7F060_AdjustorThunk (void);
extern void Cinfo_get_id_m7C38252CE360F061914361192300AECA8CB5307B_AdjustorThunk (void);
extern void Cinfo_set_id_mCB169DF169C36D9D12651785DCBF71ABCC10FD9D_AdjustorThunk (void);
extern void Cinfo_get_providerType_m6A1DFCD062C95265E8E1C6502D44D6C464B50EED_AdjustorThunk (void);
extern void Cinfo_set_providerType_m9E012FF4CD325826F838F663BAEE045C452A3C26_AdjustorThunk (void);
extern void Cinfo_get_subsystemTypeOverride_m169F49BB024275E13DF95C274191A675CC0F66B9_AdjustorThunk (void);
extern void Cinfo_set_subsystemTypeOverride_mC525A48B08F8F826275950FFB61C780C4AEA6A6B_AdjustorThunk (void);
extern void Cinfo_get_supportsTrackableAttachments_m13B6C9977641F3E284C69AA3554EBD19478538B8_AdjustorThunk (void);
extern void Cinfo_set_supportsTrackableAttachments_m0B0516A50FFA22C3F60483E3498DC6BB1D460995_AdjustorThunk (void);
extern void Cinfo_GetHashCode_mBBEF5C69D3B91763153EDE624C76AC428ECFABB1_AdjustorThunk (void);
extern void Cinfo_Equals_m8E52493318DDE5F675E85E0733F5F7CCDA3C8339_AdjustorThunk (void);
extern void Cinfo_Equals_m07BCEC0FF4D8C2A43AE850689AC5AA4FC0603DE8_AdjustorThunk (void);
extern void XRReferencePoint_get_trackableId_mEE1B3349EA8F19E94BF8B76CBB644822317D2758_AdjustorThunk (void);
extern void XRReferencePoint_get_pose_mFDB2701C343707F0FA479C2C775B77BEC2092D61_AdjustorThunk (void);
extern void XRReferencePoint_get_trackingState_m9C6DD336B0E91F39FA04F298B0543148433F11B2_AdjustorThunk (void);
extern void XRReferencePoint_get_nativePtr_m80EFF4D6D345E7B7CC5687B506C410C84B09EFBA_AdjustorThunk (void);
extern void XRReferencePoint_get_sessionId_mC498F0CAE614B4048B79742479252D923D4FED46_AdjustorThunk (void);
extern void XRReferencePoint_GetHashCode_mD1C610489F910DB8AF23C5ED39B3930487B2F450_AdjustorThunk (void);
extern void XRReferencePoint_Equals_m139BA3698F72E149B33FB577B616A0043DBBB8E6_AdjustorThunk (void);
extern void XRReferencePoint_Equals_m464FBE4D3BF000716BC20737865CC263128FCF9B_AdjustorThunk (void);
extern void XRCameraConfiguration_get_width_m019869C624524B8C4EA0021D9331F2AD856A25C3_AdjustorThunk (void);
extern void XRCameraConfiguration_get_height_mAAC1B9AE539EF89D59585A6BFC8F925F94AA14D3_AdjustorThunk (void);
extern void XRCameraConfiguration_get_framerate_m3DCC7B7F2FEAFDFB5ED0A580153FBAAA22B60B96_AdjustorThunk (void);
extern void XRCameraConfiguration_ToString_m570541033A53E9657C809B420CEFDF63D944070B_AdjustorThunk (void);
extern void XRCameraConfiguration_GetHashCode_mBAD6720F670B108F1D17BAEBAF619989A011D63A_AdjustorThunk (void);
extern void XRCameraConfiguration_Equals_mDC2D17183F91C897762D8F8B24D2CA2F96E1A48C_AdjustorThunk (void);
extern void XRCameraConfiguration_Equals_m8CD36FE1F7DA4B3B3520877DC415D066B77FEFEB_AdjustorThunk (void);
extern void XRCameraFrame_get_timestampNs_m8F3730A23C9FF6A729F8D1939581D88716438DF7_AdjustorThunk (void);
extern void XRCameraFrame_get_averageBrightness_m34CB9F000CCBD2004F7E3CDBA987170A4B049F8E_AdjustorThunk (void);
extern void XRCameraFrame_get_averageColorTemperature_mD5EA9E87E76F7BCBFF709ABF309B142FB9D03DFC_AdjustorThunk (void);
extern void XRCameraFrame_get_colorCorrection_mFB47669447DE0255EE2491929D9DF85CF7DF1B1A_AdjustorThunk (void);
extern void XRCameraFrame_get_projectionMatrix_mC489D4A0698634FDA99D0BBE0A93E42F5C82E985_AdjustorThunk (void);
extern void XRCameraFrame_get_displayMatrix_m7D157BB20E2863E0415A42140B6396C4D3E30E31_AdjustorThunk (void);
extern void XRCameraFrame_get_averageIntensityInLumens_mC250C5B79A5B4C0F75D89BD1EC6FB07AB130B62F_AdjustorThunk (void);
extern void XRCameraFrame_get_exposureDuration_m7957768DDB0AE596767478A9F8239A98BFD23207_AdjustorThunk (void);
extern void XRCameraFrame_get_exposureOffset_m276A794A6640F25AA7B1B0FB69C8296F7DDAAE53_AdjustorThunk (void);
extern void XRCameraFrame_get_mainLightIntensityLumens_mDBCBCEA85B23C484CAF7D66ED52681E4AE4C506B_AdjustorThunk (void);
extern void XRCameraFrame_get_mainLightColor_m3696EC5D7104849121C9A6CF3524AAC7382BED03_AdjustorThunk (void);
extern void XRCameraFrame_get_mainLightDirection_mB7E086F4A8A89BD7404BB702DF980D7B5B124445_AdjustorThunk (void);
extern void XRCameraFrame_get_ambientSphericalHarmonics_m5859CDC5CE50F33C62EA59CE9BFC58C6F3CDB269_AdjustorThunk (void);
extern void XRCameraFrame_get_cameraGrain_m7E8B37489D5380BE507656FFC9FE30B0333CED2A_AdjustorThunk (void);
extern void XRCameraFrame_get_noiseIntensity_mA6150FB06579A1A6E637139C97E93304D6A83D3A_AdjustorThunk (void);
extern void XRCameraFrame_get_hasTimestamp_m2FBE2F396A15CC469756E3C876519B7FF3349897_AdjustorThunk (void);
extern void XRCameraFrame_get_hasAverageBrightness_m3B006851943F915530A8628BF3311C946CC8FC68_AdjustorThunk (void);
extern void XRCameraFrame_get_hasAverageColorTemperature_mEE8976398F8AE074090A1D3BE2DBB5F3484C04DF_AdjustorThunk (void);
extern void XRCameraFrame_get_hasColorCorrection_m687F2028F9A79A04CC6CA75C0305134DAB4DB9FE_AdjustorThunk (void);
extern void XRCameraFrame_get_hasProjectionMatrix_mA7A707C6E990D729C152E149063DE2BD0A456B4A_AdjustorThunk (void);
extern void XRCameraFrame_get_hasDisplayMatrix_mB369CC19C7B3E2640E2C2747A1E117A5773E5052_AdjustorThunk (void);
extern void XRCameraFrame_get_hasAverageIntensityInLumens_m2251DD714F7E6E9098DB738DF536FE191425379E_AdjustorThunk (void);
extern void XRCameraFrame_get_hasExposureDuration_mDF9AC5D38E767A61439850FCEE55E7CC40592EDC_AdjustorThunk (void);
extern void XRCameraFrame_get_hasExposureOffset_m6696D6E287E1FB413669FA175ACD45E8D6799A37_AdjustorThunk (void);
extern void XRCameraFrame_get_hasMainLightIntensityLumens_mE0C9564F7A24636366E063F9086ECA81FDB055BF_AdjustorThunk (void);
extern void XRCameraFrame_get_hasMainLightColor_m2B1D25F6224C098D66503F6768C6930D84451AB3_AdjustorThunk (void);
extern void XRCameraFrame_get_hasMainLightDirection_m75FB7306D3E483962E22DFB5DD2BB3A5398A7CC3_AdjustorThunk (void);
extern void XRCameraFrame_get_hasAmbientSphericalHarmonics_mA2B45AEE57B7DA5081B81C8483F1FBB90ABE3090_AdjustorThunk (void);
extern void XRCameraFrame_get_hasCameraGrain_m14C3641296BF7BC49501E3D5E810A24A2D50922D_AdjustorThunk (void);
extern void XRCameraFrame_get_hasNoiseIntensity_mA5A08A29C34AC2AFFE5792725E4506F0B32EF75C_AdjustorThunk (void);
extern void XRCameraFrame_Equals_mEF403AD303261AE21BFE6F482EB3EF728EB49DD6_AdjustorThunk (void);
extern void XRCameraFrame_Equals_m82C80589000BA2F428E4774763F668045BF085D6_AdjustorThunk (void);
extern void XRCameraFrame_GetHashCode_mCEC92150EE3B5237ACB46471128479997F78185D_AdjustorThunk (void);
extern void XRCameraFrame_ToString_mE4A2FE2CA4AF1D844B950D0029023F98B189A6D8_AdjustorThunk (void);
extern void XRCameraIntrinsics_Equals_mA7D92292854DA38258811FDC946BA82E1D5E001D_AdjustorThunk (void);
extern void XRCameraIntrinsics_Equals_m037475660705484B0E8730157EA7A731998466AD_AdjustorThunk (void);
extern void XRCameraIntrinsics_GetHashCode_mD1D3D0F34AA1723CC454040334B46D5CD7809377_AdjustorThunk (void);
extern void XRCameraIntrinsics_ToString_mFD230300DEC4F7FB2DCF30F4F02036D97213B2C9_AdjustorThunk (void);
extern void XRCameraParams_set_zNear_mE207AB998D78E35497B1E941A20C7864D454EE45_AdjustorThunk (void);
extern void XRCameraParams_set_zFar_m4ABC4E0271EE81FEA88B1608B19ED3CFDA8E523B_AdjustorThunk (void);
extern void XRCameraParams_set_screenWidth_m4E9ABE5FEE32FB446FDF6EC5B00961ACC66B48FB_AdjustorThunk (void);
extern void XRCameraParams_set_screenHeight_m31C5E67C7403556AFF8B72CC4BB09EA3C3AA05A3_AdjustorThunk (void);
extern void XRCameraParams_set_screenOrientation_mCF2AD6E975E790E5BE14E2A1EB71A73E8AA7E7D9_AdjustorThunk (void);
extern void XRCameraParams_Equals_m392E8AB6ECAEA915E0E1C9A20831EBE24346E4C0_AdjustorThunk (void);
extern void XRCameraParams_Equals_mDE9A6E9D2127F369FA129FD19E73A790FF48E8F2_AdjustorThunk (void);
extern void XRCameraParams_GetHashCode_m5C9955238ED690EA6A338097DB818F37ECBFDC72_AdjustorThunk (void);
extern void XRCameraParams_ToString_m4CAB10F6C7424973F8A9E72F70283A53C384AF3F_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_id_m606888326128C053029E1B09A00F2CB97B214291_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_id_m768994793A205C7D5CE603B354D350A34D47720D_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_providerType_m181531F5B642DA8E3E10FC62879495B0A8D53110_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_providerType_m78F56C5CEF9FF62F60DE6073B8AD0FB0AFD00730_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_subsystemTypeOverride_mED0FB455C8C39164EF2594FC9405B78C1E2EB809_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_subsystemTypeOverride_mD4D22BB1EC102CA40AF084B06DA3C957139EF2D4_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsAverageBrightness_mF49B2D16DE8FBC5452C17D87672FBE1EB814145E_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsAverageBrightness_mC20A88BD3C8D137A1F34888C64DC5FFF37787759_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsAverageColorTemperature_m789041AE11DC92E73ED6C228C5A5B55A87AE736B_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsAverageColorTemperature_m77727C8CBAB59D0D078B0A634EB0A56F1BF368E4_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsColorCorrection_m6910005DB05086FEBDBFFFE47BFFDBB96453E5C7_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsColorCorrection_m1CBB9181A21D2A964705AD5E22F78735DCFE2C01_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsDisplayMatrix_m2107BE8860B1A4D050A80801F6286F0E9798820D_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsDisplayMatrix_m2E11C0B7442273252613BDB41BB8B6F02698FBEA_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsProjectionMatrix_mAC44711CBD0AEF5600FAF7A65364692FE9FA9D9E_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsProjectionMatrix_mFC886F8859FDF308D7980935474AA0E66ECF66B4_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsTimestamp_m0B95FB498C6682EE15E2461F8A5C555B3E397543_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsTimestamp_mAA6157EC368F6358F155571E257A578729D368D4_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsCameraConfigurations_mF0168147B6D556F8289DCE665D070EE427430CDD_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsCameraConfigurations_mD0F431DDAB4F82DDC6E35AB7583572D25244E0F0_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsCameraImage_m404883CC80418B38CB13D3ED6DAAFE6D81978A6F_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsCameraImage_m2140EBB7ACEA9B1634F56DE2DCB85F26CB8C4D7D_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsAverageIntensityInLumens_m5B91C231C060B22D44F1579CF361500D7B54173E_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsAverageIntensityInLumens_m49462C178EF35B3E688EE6711FD3E41E9C1976AB_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsFaceTrackingAmbientIntensityLightEstimation_mBE329A85F8992A65715EC3F97AC0CEEE5B0DE9D8_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsFaceTrackingAmbientIntensityLightEstimation_m93740733F66607C53F3928946A79CE732EAF9EF9_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsFaceTrackingHDRLightEstimation_mAA8871A8B5D8CDC9D7D5FEA47E72423BC02D969B_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsFaceTrackingHDRLightEstimation_mD76A9A9A127118388FBD2E971246303BB2BE0F0C_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsWorldTrackingAmbientIntensityLightEstimation_mC5C8DDCB2DB3F82EA868AF171039DF6ECFF9C7EC_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsWorldTrackingAmbientIntensityLightEstimation_mE9B47A05DA11B6C6FFCB6FFED773ADB464130C5B_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsWorldTrackingHDRLightEstimation_m96A9EF59A86DAFBA2A14AFAA79840480E8CDD01D_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsWorldTrackingHDRLightEstimation_m92AC9270D4D5FA4C61ED353406511B3877E5D9D4_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsFocusModes_mA2196338BFF377734A338E919D372089A98417D9_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsFocusModes_m2F70E7EFC54E2F930DEA28DC4922125E01FE3026_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_get_supportsCameraGrain_mFC3B0475E51415F6BCDAB93671CD421826DA9B9B_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_set_supportsCameraGrain_m8BF26C263FED0D5106C436091BD8C25BFF8FD755_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_Equals_m8C071329439DF323FF57A936181A09F933886EAB_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_Equals_m8DA28DF625D849C92AE0770EBB43184C2CE4FEE4_AdjustorThunk (void);
extern void XRCameraSubsystemCinfo_GetHashCode_mA8D0D3E3ABB46889F31B045A1D6F8A06EC8701D0_AdjustorThunk (void);
extern void Configuration_get_descriptor_mD7539C193666CFFB9258CE40D88EB7DA3C48DDDA_AdjustorThunk (void);
extern void Configuration_set_descriptor_mC8DB7CFDB5C7E267B15CFD3DE2133A1B482020E9_AdjustorThunk (void);
extern void Configuration_get_features_m8F2353DC080AF51D657C4CBD8E9DB4DAEAB72B5A_AdjustorThunk (void);
extern void Configuration_set_features_m778B95140CCFD2CF143489375C8B15258B5CA149_AdjustorThunk (void);
extern void Configuration__ctor_m5A3F2286F33BA303B4C8A8E0E34ED6DA993A43BB_AdjustorThunk (void);
extern void Configuration_GetHashCode_m1714C8505EE74B796DB7AF17A409448C385A83F2_AdjustorThunk (void);
extern void Configuration_Equals_m3EABF1A712E3AB8B1BCB70F71A4DA0B29BD3AB23_AdjustorThunk (void);
extern void Configuration_Equals_m7C598F62999ABC2566CDCD656FF0ACA11DBC9807_AdjustorThunk (void);
extern void ConfigurationDescriptor_get_identifier_m829E6611B4E4B0E33E8E87902FDFCDAEC0F2B8A0_AdjustorThunk (void);
extern void ConfigurationDescriptor_get_capabilities_mD48908AE629D6E78D84F355B59CF742ABFD7C649_AdjustorThunk (void);
extern void ConfigurationDescriptor_get_rank_mF775801AAD4BC8E980682B569F676BD536BA78B8_AdjustorThunk (void);
extern void ConfigurationDescriptor_HexString_m06E793AFE575A13CBC943EBFDCAB4BA290AAF8F3_AdjustorThunk (void);
extern void ConfigurationDescriptor_ToString_mF67E92AE3930DFD749F7186D49FFC600E2B197EE_AdjustorThunk (void);
extern void ConfigurationDescriptor_GetHashCode_m1B74FC9C9B33BBED2192C1A47570C13A40008091_AdjustorThunk (void);
extern void ConfigurationDescriptor_Equals_m6908A703D5C6F693555FCC9A616D85E430012363_AdjustorThunk (void);
extern void ConfigurationDescriptor_Equals_m4123FDB2B2A6BDDCA3979394FD76CEEFAE534EDB_AdjustorThunk (void);
extern void XRCpuImage_get_dimensions_m1A176BDB3319F09F3AF628AB17C126B62929A2A5_AdjustorThunk (void);
extern void XRCpuImage_set_dimensions_m8672F4307A096265FA73685BDDA6D605B9C10ED5_AdjustorThunk (void);
extern void XRCpuImage_get_width_m8DE20D99BCFA242F105F3B39AD68D398F3C2B4CE_AdjustorThunk (void);
extern void XRCpuImage_get_height_m7BB3967EC96DB5EEF99E0935E5AA1DFB991D7ADD_AdjustorThunk (void);
extern void XRCpuImage_get_planeCount_m5F63BAD93F18A9D85D74377CFE1891860740D750_AdjustorThunk (void);
extern void XRCpuImage_set_planeCount_mC261323C60A65DD0EBA30325554C5F92F13149EA_AdjustorThunk (void);
extern void XRCpuImage_get_format_m80FEE2CEC6A37A417D5B86294C1ECA50A49FDEAB_AdjustorThunk (void);
extern void XRCpuImage_set_format_m02654636810F940049F1A57FEA7987F71FA47DF6_AdjustorThunk (void);
extern void XRCpuImage_set_timestamp_m6FAE47FB68497C3757580D1FD94D0A4B7C2C783E_AdjustorThunk (void);
extern void XRCpuImage__ctor_mA44BE98BA315639462481743B96A650B89F7C26E_AdjustorThunk (void);
extern void XRCpuImage_Dispose_m462B3360E99D206E1151C7B8ED30420BF4A91B7A_AdjustorThunk (void);
extern void XRCpuImage_GetHashCode_m5A2490A4F9DD6A4BE95B6E43C2E4DFA67057DD29_AdjustorThunk (void);
extern void XRCpuImage_Equals_m6ADCC3C2CDB259DD1D6BB1648CBA3722AD129441_AdjustorThunk (void);
extern void XRCpuImage_Equals_mE183B37EE7FA276B21EC0CE087BEFCDE540C8D24_AdjustorThunk (void);
extern void XRCpuImage_ToString_mE31499DDD8365EC75336BFF9C7393BCA2C1B2E5A_AdjustorThunk (void);
extern void ConversionParams_get_inputRect_mE75F22AF739DFB5506127DF164E0AEF851702756_AdjustorThunk (void);
extern void ConversionParams_get_outputDimensions_m83C9D960C805CA2748AA9AAAC2A2986A397B7033_AdjustorThunk (void);
extern void ConversionParams_get_outputFormat_m727E479981BF00635D645C88D4D987EB598A0E5F_AdjustorThunk (void);
extern void ConversionParams_get_transformation_mFB57F05831CF417808A6C41F170768D9F66A7EF3_AdjustorThunk (void);
extern void ConversionParams_GetHashCode_m317F3CF69F015FD4012B668A3195A50E8C18F436_AdjustorThunk (void);
extern void ConversionParams_Equals_m428ABCB343F2D25BEC8C48C064A607C19D4C6B4F_AdjustorThunk (void);
extern void ConversionParams_Equals_m9170E22223AA2514E0EAA66A74375460210EC11B_AdjustorThunk (void);
extern void ConversionParams_ToString_mB2F109D1B691D862EC98C1C9058F78C58CE832D3_AdjustorThunk (void);
extern void Plane_get_rowStride_mE6385B9F7D9D040FC613D16D859435F492CB213A_AdjustorThunk (void);
extern void Plane_get_pixelStride_m33EEE46027B124683ABAF3BC627812F963F29665_AdjustorThunk (void);
extern void Plane_get_data_mBA1EB2437E816B19D7A68440AE188F4E8543E108_AdjustorThunk (void);
extern void Plane_GetHashCode_mE6FB9627754D042BCE94DA2672023FE03BE24C81_AdjustorThunk (void);
extern void Plane_Equals_mAAF552DA4142C484FFEBA4C30EC7F14111523D68_AdjustorThunk (void);
extern void Plane_Equals_mE56ABB7E1AE23CED9290A64F4B80D2FDC95AA7F6_AdjustorThunk (void);
extern void Plane_ToString_mDCB0EECF9BB9652F5E5BA2B36F51F1E4CF334238_AdjustorThunk (void);
extern void Cinfo_get_dataPtr_m72B8A6BDAA98FA3CF92A9E03807130E4B6341B35_AdjustorThunk (void);
extern void Cinfo_get_dataLength_mBF9DA90E69A88EF50923C839B5CE8A03264EAB9A_AdjustorThunk (void);
extern void Cinfo_get_rowStride_m67E7894AA413F614310BF6A667BDEA1950165492_AdjustorThunk (void);
extern void Cinfo_get_pixelStride_m2595FA36CA7479B00D3EFD507C3C9439CC5DBDE0_AdjustorThunk (void);
extern void Cinfo_Equals_m5B7C627F1C89E10A0CE713A46B283219E35F6365_AdjustorThunk (void);
extern void Cinfo_Equals_m3D18D26EAA0FED30423B3C8B38961816A1472F62_AdjustorThunk (void);
extern void Cinfo_GetHashCode_mC3F4D4AA0494F15A8E0B0F765FA005C1A574CCCF_AdjustorThunk (void);
extern void Cinfo_ToString_m4D93FD001F1E9EC984CBFB7997FE480E212F83DF_AdjustorThunk (void);
extern void Cinfo_get_nativeHandle_mAB50E5453B3ED928372EC45DF5E0F4E2ADF341BC_AdjustorThunk (void);
extern void Cinfo_get_dimensions_mA8AFF01543915A325187A41369F6DA11231A3E50_AdjustorThunk (void);
extern void Cinfo_get_planeCount_m88E3C67F9E06017A46B7FF90368B24A6F48E1271_AdjustorThunk (void);
extern void Cinfo_get_timestamp_mAF782E097B2324BD673D8D98C68CA2D6CA4891EF_AdjustorThunk (void);
extern void Cinfo_get_format_m42CBF60A496CB04541CC04C97E1745AFBC7259BD_AdjustorThunk (void);
extern void Cinfo_Equals_m52B0C058E8FB2AB4089B91E1EDD0DFD2F9F22642_AdjustorThunk (void);
extern void Cinfo_Equals_m8140023C141235A77C2153E9A8B54E5356EC6C6F_AdjustorThunk (void);
extern void Cinfo_GetHashCode_m7AB2284B6770F059F37B7A7EB61C075F472BAE65_AdjustorThunk (void);
extern void Cinfo_ToString_m4923B9CB2748C5E7CCAA6C817F47976B1E4B2FE1_AdjustorThunk (void);
extern void Cinfo_get_providerType_m7168F2BEAB1E7D53C4A1308A0BE686CB6ACAC37D_AdjustorThunk (void);
extern void Cinfo_set_providerType_m79B371C14F188233806BAB677302143650CD9A29_AdjustorThunk (void);
extern void Cinfo_get_subsystemTypeOverride_mA17A612B4FB9125843E254DB825177C3B1834235_AdjustorThunk (void);
extern void Cinfo_set_subsystemTypeOverride_mEF323B6CBB63FB7E5ECB4A6849F06C57BFDF8120_AdjustorThunk (void);
extern void Cinfo_get_supportsFeaturePoints_mAE8F24562D2A19594A5AB98BDA0FC1C35730B5BA_AdjustorThunk (void);
extern void Cinfo_set_supportsFeaturePoints_mD44DBE0A79D63D3234369E573653A81DC7FB8E1D_AdjustorThunk (void);
extern void Cinfo_get_supportsConfidence_m483E36BDB283478D5E1F6F6F3C96A279EB6DE01A_AdjustorThunk (void);
extern void Cinfo_set_supportsConfidence_m78F76CAAFD5D667ADBED1580E1F8A1286B59C46D_AdjustorThunk (void);
extern void Cinfo_get_supportsUniqueIds_m6A1B72F6B917B3B001388027A7324A84146E5B7F_AdjustorThunk (void);
extern void Cinfo_set_supportsUniqueIds_mFF68A678A13F7C1BD9E157690649255A27369514_AdjustorThunk (void);
extern void Cinfo_get_capabilities_m09C807B048E192438A9B0D0C17808FF5BFF81A8A_AdjustorThunk (void);
extern void Cinfo_set_capabilities_mB2A17E458179A44C2EACB82699FBC5B5611C7580_AdjustorThunk (void);
extern void Cinfo_Equals_m560240A9ABB2B3E0C71D2EF694812209060F7781_AdjustorThunk (void);
extern void Cinfo_Equals_m1FFC7731C8021381A825E2D56189CDCD1BC39FD1_AdjustorThunk (void);
extern void Cinfo_GetHashCode_m93DAAACF242CBA5B8EE758CE4E04BCCF51639860_AdjustorThunk (void);
extern void XRPointCloud_get_trackableId_m45E06C0C6CD525985ED5FF3A0DC9D1F41A845889_AdjustorThunk (void);
extern void XRPointCloud_get_pose_m4291F970BA7E4F2DE67BB6666D365FF510B8AC39_AdjustorThunk (void);
extern void XRPointCloud_get_trackingState_mE90A4EE69C3F5EA084CB0BF1B3D128160C719242_AdjustorThunk (void);
extern void XRPointCloud_GetHashCode_m27CF26ED9655FD5EF9E3F83986059017A37E6778_AdjustorThunk (void);
extern void XRPointCloud_Equals_mFB272AE1F45D6A70C7E5C18D49E2ED7E2375AC0C_AdjustorThunk (void);
extern void XRPointCloud_Equals_m7123CA7CBF03D2DDAEAFD63768A78A559B70D34A_AdjustorThunk (void);
extern void XRPointCloudData_get_positions_mD0152EB78841C8D8CB83101868169887235C6BD3_AdjustorThunk (void);
extern void XRPointCloudData_set_positions_m5B37C4E8FCCE5AF8E16D83D4BAE520F45971CCD7_AdjustorThunk (void);
extern void XRPointCloudData_get_confidenceValues_mA510FDF9A0F8B21FEA6905400EA6F3A709F8DD82_AdjustorThunk (void);
extern void XRPointCloudData_get_identifiers_mF1A688282A3DBD819C5F43EE4A1B44B6548787D3_AdjustorThunk (void);
extern void XRPointCloudData_set_identifiers_mBA475172386D8F500AE9F2D50D4B009FD8D26319_AdjustorThunk (void);
extern void XRPointCloudData_Dispose_m600FFE0CF6B2D3D7B31B7F51406C4818159C5120_AdjustorThunk (void);
extern void XRPointCloudData_GetHashCode_mC10886AFDA538D306F9E455166BB6D2F81071912_AdjustorThunk (void);
extern void XRPointCloudData_Equals_m5553859ECF1F500F0153472EA6D6E547D251936D_AdjustorThunk (void);
extern void XRPointCloudData_ToString_m9712C0206584CBD90DF2A44CE36DDC78141E607A_AdjustorThunk (void);
extern void XRPointCloudData_Equals_m6655FF22F1E7FE07B0A71ACE455A742E8DF7DAEA_AdjustorThunk (void);
extern void XREnvironmentProbe_get_trackableId_m3C275681C5223EDD967B1F37E2A0FAFF03A80066_AdjustorThunk (void);
extern void XREnvironmentProbe_set_trackableId_m2FAAA910E6D06256C1ECCCCF8C6D3E72A056199D_AdjustorThunk (void);
extern void XREnvironmentProbe_get_scale_m73AF4CF41515A2EDAD35FFBA598D23207F9D2BD3_AdjustorThunk (void);
extern void XREnvironmentProbe_get_pose_m03ABF5D0F413C9892349CF3891D5214147DD4C09_AdjustorThunk (void);
extern void XREnvironmentProbe_set_pose_mAC84C3A2D8788D587F0503EA1CE051294A8A87E9_AdjustorThunk (void);
extern void XREnvironmentProbe_get_size_mC31926635D53201B3C0E7E76B3ADBE2883374135_AdjustorThunk (void);
extern void XREnvironmentProbe_get_textureDescriptor_mDA5B2F0E63647BBC038FB4E476F609625109FA13_AdjustorThunk (void);
extern void XREnvironmentProbe_get_trackingState_m47E2E959CA905F4498489EEFF1C1DCEC4958582C_AdjustorThunk (void);
extern void XREnvironmentProbe_get_nativePtr_m00FA5612D1CB3AB7F8F11B1ECBD7AA139FEE60F4_AdjustorThunk (void);
extern void XREnvironmentProbe_Equals_mAB858DCB46B0A972BE91B46AE6BA4C2AB6B8479B_AdjustorThunk (void);
extern void XREnvironmentProbe_Equals_m940DA5EE99C70171A86520CA30C33C0E778A15E7_AdjustorThunk (void);
extern void XREnvironmentProbe_GetHashCode_mE6E401BB29C7F44E680E6561A8AB7CD92B3F2472_AdjustorThunk (void);
extern void XREnvironmentProbe_ToString_mBF2604257F8CA6CE56C5D389E8D08339725B8B93_AdjustorThunk (void);
extern void XREnvironmentProbe_ToString_m68F8E47BA9E4040BF7352D68F61FB17177000009_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_id_mBEA40C4012D8253E65C525083E3454C93BC6F3BE_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_id_m5C48BD3E879410D5C622BE7DC74D5C798E151731_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_providerType_m3A3572178EED86B4F98254B4FAB73016B4459AA1_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_providerType_m70C42D1F210DE19AB5E7D82F2D0BDB467E94FC2F_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_subsystemTypeOverride_m258F6355EE3F5ED52ADF4A79777AD092AD9B2F22_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_subsystemTypeOverride_mB35BB7FC1C0C42E0A7773365C147F539E7AC27EE_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_supportsManualPlacement_m194C593950367B1C7EFB50D6F00E5705597065BF_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_supportsManualPlacement_m2D1156DE760E47CBDDC345AD5CAE5D23AC23E524_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfManual_m7B2DFDB097FAD2FC7FE6AE7F7A8172FA7B34D406_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfManual_m01CE117FEA37EE9BEF79903754E396C35B859419_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_supportsAutomaticPlacement_m2EAA567973D53F9FFCF91AAD4233F91957281B11_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_supportsAutomaticPlacement_mC4DBFBBD4DBB44D6B1154C4759A3175F9AC33D46_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfAutomatic_mFC9AA46EA023D8A0968ED80B1F88F10AA50F549F_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfAutomatic_m6FCC1E3ACDC01E4447E385A1B89C96DEE16B7EF2_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTexture_m3593704263A383A9EC79E765CCC01632707E4A48_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTexture_mE30B73C6AC37C6DF8F5B7DBDBC90A975A498D3E4_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTextureHDR_mDD0F30AB731A6010F6F96DBA660415B55FCD580A_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTextureHDR_mA465A23A4DC052895F8F634892B7C8E3A49F4777_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_Equals_mECAF625FF6A6D6CB7652827D34BCF4228243102C_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_Equals_mE09A9486010D3E88E94AE06CF3BF499D3A2FC6EF_AdjustorThunk (void);
extern void XREnvironmentProbeSubsystemCinfo_GetHashCode_mADDFE56D58883EC3832D901FF566989CB00B5D02_AdjustorThunk (void);
extern void XRFace_get_trackableId_m997871151FF642B1908F7E352C952A44AB4DD17C_AdjustorThunk (void);
extern void XRFace_get_pose_m482AC4907DC02C0B5D67B84320DA7F9D12A43A75_AdjustorThunk (void);
extern void XRFace_get_trackingState_m8953B01AB6213402157B69083B318D3F2CDCF26A_AdjustorThunk (void);
extern void XRFace_get_nativePtr_mCE6C767CB9DBBCDE7B289D8EBDE1DFC86707BC95_AdjustorThunk (void);
extern void XRFace_get_leftEyePose_mEAF86B00D307A5D96D671A85EA1BBF88D82586BF_AdjustorThunk (void);
extern void XRFace_get_rightEyePose_m3FA7FDE9C2D9841FB7496B691FCAB1F35475F2B1_AdjustorThunk (void);
extern void XRFace_get_fixationPoint_mAEA40B8C8F2C0D0A3B777ACFDE327017C9DF294D_AdjustorThunk (void);
extern void XRFace_Equals_mC8676C7F35F0FF582368E8114BDB981C83C82A88_AdjustorThunk (void);
extern void XRFace_GetHashCode_mDFFE26F3662B1DF33124A0393FA9FDE444167CEC_AdjustorThunk (void);
extern void XRFace_Equals_mF05C24C98D5E1ED344943307E03FE4776CCB4217_AdjustorThunk (void);
extern void XRFaceMesh_Resize_m15BF7254A68B9910F518990A33CF037F310ED1E6_AdjustorThunk (void);
extern void XRFaceMesh_get_vertices_m19DE0A4E73ED17C8B6427BE86071E10DB65740DD_AdjustorThunk (void);
extern void XRFaceMesh_get_normals_m82DE916E7AE8A9BF4768D289E01CD0C65E1001ED_AdjustorThunk (void);
extern void XRFaceMesh_get_indices_m93B77F79BB4C67AF1AFFAD29ED8D8F48AF4616FE_AdjustorThunk (void);
extern void XRFaceMesh_get_uvs_m89943E9CD34232EF09B81F13EF259C33F1183B49_AdjustorThunk (void);
extern void XRFaceMesh_Dispose_m84478F08EEB3D131E0E7785CF4195D424B94543E_AdjustorThunk (void);
extern void XRFaceMesh_GetHashCode_mC53C827B010796E1A20690766F1A2A1F70DB614D_AdjustorThunk (void);
extern void XRFaceMesh_Equals_mCAC3BFCE776A814088BA4D5361CB771BCC4BE87A_AdjustorThunk (void);
extern void XRFaceMesh_ToString_m1997FC173A5BB7E5EFC51893E3BDD26D34F27897_AdjustorThunk (void);
extern void XRFaceMesh_Equals_m2BB9E69AD22C8521466B981BA077007536189F0C_AdjustorThunk (void);
extern void FaceSubsystemParams_get_id_mE2ED204CE1D85C4ADCFB4436EACF3BF8B6893DEB_AdjustorThunk (void);
extern void FaceSubsystemParams_set_id_m89149E2175F86663FDFEB008B36BDAF40EA1585A_AdjustorThunk (void);
extern void FaceSubsystemParams_get_providerType_m8984786E19DCC5F9B87060A9BC29F25A4A4A4B3A_AdjustorThunk (void);
extern void FaceSubsystemParams_set_providerType_m5D660A72F34CA0D1C887F5BA68045B1D3973C7B3_AdjustorThunk (void);
extern void FaceSubsystemParams_get_subsystemTypeOverride_m1B3FD6EA4014688FC34533C9729176AA668C8321_AdjustorThunk (void);
extern void FaceSubsystemParams_set_subsystemTypeOverride_mAC64FBAE73E16ACDA48708A4FFB77626437F8306_AdjustorThunk (void);
extern void FaceSubsystemParams_get_supportsFacePose_m59079DE37AD698A2132CFEA0EDA5FD4585FC6161_AdjustorThunk (void);
extern void FaceSubsystemParams_set_supportsFacePose_mD799A27D00AC28F2E8228E7A3E38464B643BC99A_AdjustorThunk (void);
extern void FaceSubsystemParams_get_supportsFaceMeshVerticesAndIndices_mCC93952A6D71E81739E596CEB86A242CD6C9A8AF_AdjustorThunk (void);
extern void FaceSubsystemParams_set_supportsFaceMeshVerticesAndIndices_mD137C1594ADBC51EC3017FDFAE248043C4CCBC75_AdjustorThunk (void);
extern void FaceSubsystemParams_get_supportsFaceMeshUVs_m86C9DD63849FC891FE62F75B87E7BA894B506BBC_AdjustorThunk (void);
extern void FaceSubsystemParams_set_supportsFaceMeshUVs_m9FFBE6EF8118BB7F4A0BA3B50249DA55ED52B39E_AdjustorThunk (void);
extern void FaceSubsystemParams_get_supportsFaceMeshNormals_mB5897C36478E2B76A4491DA2C70C89B54AAB92DC_AdjustorThunk (void);
extern void FaceSubsystemParams_get_supportsEyeTracking_mC02E124E7C88BBE8BE1D6ABBBFD3C2C68DF2109F_AdjustorThunk (void);
extern void FaceSubsystemParams_set_supportsEyeTracking_m52CC3ABEBE97C53ECBB91C0E4A86F388176C3645_AdjustorThunk (void);
extern void FaceSubsystemParams_Equals_mAC3B0F001EB7DC4968B350FCE682D21D3C10A4DC_AdjustorThunk (void);
extern void FaceSubsystemParams_Equals_mFD36A65AEE79AE0A2C08525BB4AE5B99801CEE2A_AdjustorThunk (void);
extern void FaceSubsystemParams_GetHashCode_m83F03C046AA998C73A317CAFBA4C97E2BA468786_AdjustorThunk (void);
extern void XRHumanBody_get_trackableId_m1132E7F157E2F1649C9849D0CCCFCCAE12659035_AdjustorThunk (void);
extern void XRHumanBody_set_trackableId_mD3C8385C017B211CB843FBE09F865FCFF6736AD5_AdjustorThunk (void);
extern void XRHumanBody_get_pose_m5F377842C281F643E6205DF173FAD26A71FD85CB_AdjustorThunk (void);
extern void XRHumanBody_set_pose_m041B85CE78A0EEF68E9D04C79D5E896481521F13_AdjustorThunk (void);
extern void XRHumanBody_get_estimatedHeightScaleFactor_mCCF772B1264F243207D413D87F9DEB51BAA66625_AdjustorThunk (void);
extern void XRHumanBody_set_estimatedHeightScaleFactor_m08C6119D250F4EC14458EF86245F41DE6480928B_AdjustorThunk (void);
extern void XRHumanBody_get_trackingState_m1F6F709DD208442C6E3B253BF1E6F5448B0D7913_AdjustorThunk (void);
extern void XRHumanBody_Equals_mF1FC1064B3CE595A1D798D2BC6A0A4441E06FEA0_AdjustorThunk (void);
extern void XRHumanBody_Equals_mEF4C0F409A971526C9B7E8098F41FCF1B53B7F41_AdjustorThunk (void);
extern void XRHumanBody_GetHashCode_m6FBB44640B5771F3C0F07996B0391578ADA3ED29_AdjustorThunk (void);
extern void XRHumanBodyJoint_get_tracked_mFE794D3F10CC9FE8B3BBA7EA3DAA2EAD43265030_AdjustorThunk (void);
extern void XRHumanBodyJoint_Equals_mF61C132B282799A4A8591EEDFD1C93A5ACB5D690_AdjustorThunk (void);
extern void XRHumanBodyJoint_Equals_m4FC5F349868C29B492300324ECEA4327199724B5_AdjustorThunk (void);
extern void XRHumanBodyJoint_GetHashCode_mB2B4313B997EB976CF9A0621A8B0B41988F41FEC_AdjustorThunk (void);
extern void XRHumanBodyJoint_ToString_m4A5CA8FD181EF51596129156F8B5D1714B23A0B8_AdjustorThunk (void);
extern void XRHumanBodyJoint_ToString_m9615CDC8865E5F53A0C1EFC11ED448D8E10517BA_AdjustorThunk (void);
extern void XRHumanBodyPose2DJoint_get_tracked_m2482827731EF34E90A03BE36B02CD58DC4ED27BA_AdjustorThunk (void);
extern void XRHumanBodyPose2DJoint_Equals_m13D561FB80FAB3235153ECAA81CDF0A1AB61EBE0_AdjustorThunk (void);
extern void XRHumanBodyPose2DJoint_Equals_mFD1372A220FB78E1834F741C3C866AA7068614FA_AdjustorThunk (void);
extern void XRHumanBodyPose2DJoint_GetHashCode_mA55B9AAABC7536E6C93C93F59F4DB417E95F721A_AdjustorThunk (void);
extern void XRHumanBodyPose2DJoint_ToString_m0776D12ECE559F6F987CB879DC6578E4B69630F8_AdjustorThunk (void);
extern void XRHumanBodyPose2DJoint_ToString_m0AE3FBFE9BF812C8589AE2F567A79D756700256E_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_get_id_m6ECD1B43CC3A0BF83286383CA417ECAFB750CB74_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_set_id_m379B96A2CE563FFD6CAC41112068975C8875B3A7_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_get_providerType_m9FEA7CEFDEEACC1D13C859C31A2325E50A6132DD_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_set_providerType_mA34C98EF6EDDFADFF83C4062C0AF33F3C7BA61A5_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_get_subsystemTypeOverride_mB03C7A5BC048D86AAE6334A221E1DF2FEE059754_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_set_subsystemTypeOverride_m73A633BECC2393CEB62B95FCF9CD7B32BFDB19FF_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_get_supportsHumanBody2D_m26CC2FAAFF325E448010E9DFFDC2CF78C5118E71_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_set_supportsHumanBody2D_m33B2A01C8E5F61DFE604BDCD2D438EC0B3C45551_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_get_supportsHumanBody3D_m43BFDC9F4E92ECDE599A826C24D951AF90D76331_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_set_supportsHumanBody3D_mE30720F10B501314868ABDBE2EDCE11D0A333D24_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_get_supportsHumanBody3DScaleEstimation_mDC1321982924ADE85F14D4AA959D2B593D378380_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_set_supportsHumanBody3DScaleEstimation_m72411E882EB28AB5BD33F4D266918FA3DB355782_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_Equals_m0109935097AF2BEE70F4AABB3B8701C50D300F2A_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_Equals_mC6D157C1801D45FFAA926C64D9C7AFFE6EDAC698_AdjustorThunk (void);
extern void XRHumanBodySubsystemCinfo_GetHashCode_m24E654BBE6D31E8A07F1B139BDEFF49BF4D77BAF_AdjustorThunk (void);
extern void AddReferenceImageJobState__ctor_mAFC8E35811BAF9292B00B7D06EF4C6895AFDD74C_AdjustorThunk (void);
extern void AddReferenceImageJobState_get_jobHandle_mD67B6C7B795C0EAAF2B27C2C23A0CDF0597DDD41_AdjustorThunk (void);
extern void AddReferenceImageJobState_AsIntPtr_m3918B9BEE2FA6B991CFA1BE13F1B211656B8A78B_AdjustorThunk (void);
extern void AddReferenceImageJobState_get_status_mEB3B5CAB4B567D06A94B438A171D4F21F335D850_AdjustorThunk (void);
extern void AddReferenceImageJobState_ToString_mF0C9F0307F13953D372C0BA03F3DFFAC3DE6E912_AdjustorThunk (void);
extern void AddReferenceImageJobState_GetHashCode_m7A9EFB3628AFD98DE738E0766DD6267C90303E47_AdjustorThunk (void);
extern void AddReferenceImageJobState_Equals_m2B2E0068F7BDF4DB619306E672D9B4FDF1AAD495_AdjustorThunk (void);
extern void AddReferenceImageJobState_Equals_mDF37DF091DA56B8CFD7EF4AE078984D7A4072AB5_AdjustorThunk (void);
extern void Enumerator__ctor_m614C5DEAACB06ED98FFE5BBE716D9F16124A4F81_AdjustorThunk (void);
extern void Enumerator_MoveNext_m2B35A4EE1CF9A5E1EA6B97AEDFAED2CC7F99D3C5_AdjustorThunk (void);
extern void Enumerator_get_Current_m5C9F6233409C9A2321C6CB831457C55C4FCB4570_AdjustorThunk (void);
extern void Enumerator_GetHashCode_mB41365E33A4AC2A52659D36571BBCE9BC93C2546_AdjustorThunk (void);
extern void Enumerator_Equals_m5A39AA8617AA067134152ED2D95037C914B42AF4_AdjustorThunk (void);
extern void Enumerator_Equals_mCBAAE58B6FD7DBD90F3C98F10F06C777E5781A98_AdjustorThunk (void);
extern void Cinfo_get_id_m7ACB39F94D161A19473B51245A60F0FE3380E9C6_AdjustorThunk (void);
extern void Cinfo_set_id_m57970CF355AB638BAD860B9673F0E76B42126C1A_AdjustorThunk (void);
extern void Cinfo_get_providerType_m865B26BBCBE9E542D09269A2CA6BD1FC47976AF2_AdjustorThunk (void);
extern void Cinfo_set_providerType_mCACA6EC48AB4B305E1515A312B32DC196AD9B92C_AdjustorThunk (void);
extern void Cinfo_get_subsystemTypeOverride_m0008239CE298C4881102FED287EC52224601A3A5_AdjustorThunk (void);
extern void Cinfo_set_subsystemTypeOverride_m167DE9461D1FE4E4D8AB0EE25A7A4B0A947151D8_AdjustorThunk (void);
extern void Cinfo_get_supportsMovingImages_m7B1E2171F1304A73339266B64548CF305EFEEA91_AdjustorThunk (void);
extern void Cinfo_set_supportsMovingImages_m04BB57385FC0A2025414437DB1BEFBE97372E579_AdjustorThunk (void);
extern void Cinfo_get_requiresPhysicalImageDimensions_mEED8602BF9D390F19582D3F706A9C93333AFB0C7_AdjustorThunk (void);
extern void Cinfo_set_requiresPhysicalImageDimensions_mC794914720C62ACB74173F165B3015ED9B5CA2A6_AdjustorThunk (void);
extern void Cinfo_get_supportsMutableLibrary_mCD0988DBB5810975CB97BEDD9B2E6B6C168D6E19_AdjustorThunk (void);
extern void Cinfo_set_supportsMutableLibrary_m434D9A05D0025989AA711BA50139FD348D127661_AdjustorThunk (void);
extern void Cinfo_get_supportsImageValidation_m417DC16FCA795DB24C8CAA2C81A5E84855D077BD_AdjustorThunk (void);
extern void Cinfo_set_supportsImageValidation_m9CA1173736665E4DC3B594EE3357416A8A20B266_AdjustorThunk (void);
extern void Cinfo_GetHashCode_m8DB95DB86F786705B32382E014B3A5B96F81F4B0_AdjustorThunk (void);
extern void Cinfo_Equals_m2D882FB6E58A034244EC05B2701C303C0763C3C1_AdjustorThunk (void);
extern void Cinfo_Equals_m7D227238D404DAA7ED5C72A9C3843FE6CB852ED4_AdjustorThunk (void);
extern void XRReferenceImage__ctor_m6D6343387F201C296D5D28E2A90D4BB1E83CDBDF_AdjustorThunk (void);
extern void XRReferenceImage_get_guid_m1C4FCDF5CE4DB41074E50AB2B3D8B4A20CE290BE_AdjustorThunk (void);
extern void XRReferenceImage_get_textureGuid_mDABB849D0FAF44F4FD86B6D794706DC6667A732F_AdjustorThunk (void);
extern void XRReferenceImage_get_specifySize_mAC02B5D0DBF9D66C2668206B7603C58149EE7D8B_AdjustorThunk (void);
extern void XRReferenceImage_get_size_m135B7EF1ED61FE27A8793503E8FC84543642C166_AdjustorThunk (void);
extern void XRReferenceImage_get_name_mE8F3368C2587552333AB78EA72A02E5B73E355C7_AdjustorThunk (void);
extern void XRReferenceImage_get_texture_mA66A0D26E463C232CA008D5F44A23F9D0AA838B1_AdjustorThunk (void);
extern void XRReferenceImage_ToString_mF01AB8377D55DC49917B09F0C12A6B02BD5BEE78_AdjustorThunk (void);
extern void XRReferenceImage_GetHashCode_m04CE90A2F730C6030216560645C2FD3A81C42985_AdjustorThunk (void);
extern void XRReferenceImage_Equals_m85D0F3511051929A1F06F75CE015DA98934BC211_AdjustorThunk (void);
extern void XRReferenceImage_Equals_m8F01D42083D0F6155DEDA29D457A0EDA600629AB_AdjustorThunk (void);
extern void XRTrackedImage_get_trackableId_m908642D8D46876C10767B693C55A4076AA0230D6_AdjustorThunk (void);
extern void XRTrackedImage_get_sourceImageId_m7840008F6FBB7242723DBA7ADB29411BF199B063_AdjustorThunk (void);
extern void XRTrackedImage_get_pose_m2DA4B57E9B5317F353B2766538088CFF8991DAB1_AdjustorThunk (void);
extern void XRTrackedImage_get_size_mBDB5B8715E7C74B9459198230517668BD215E75F_AdjustorThunk (void);
extern void XRTrackedImage_get_trackingState_m7ADAE68E0B5A3D253B1E086276EE5BC5D9768E71_AdjustorThunk (void);
extern void XRTrackedImage_get_nativePtr_mF92D042188F2FF5DADA33AB61235DC6CD874B202_AdjustorThunk (void);
extern void XRTrackedImage_GetHashCode_m312EB4C09316425C0F30B8988A915F647035846B_AdjustorThunk (void);
extern void XRTrackedImage_Equals_mFE06306D9BB3EBD3C7CCDD555A2F193ED4FE7D65_AdjustorThunk (void);
extern void XRTrackedImage_Equals_m953C1CFB9A3879975873D13E24071F51C772635A_AdjustorThunk (void);
extern void Capabilities_Equals_m921C39E9F8B9A589D30635AF4D55428F9A48E9F7_AdjustorThunk (void);
extern void Capabilities_Equals_mBC54D72E0218CDA4D42F66F1B93C98E3FCC6F509_AdjustorThunk (void);
extern void Capabilities_GetHashCode_m2CC9C750B6796CBBC10A34C6E42040FCF9626FBF_AdjustorThunk (void);
extern void XRReferenceObject_get_guid_m5D1CC7D28AEF760CC4C8E7AEAE550549C879E204_AdjustorThunk (void);
extern void XRReferenceObject_Equals_mE5200369D784FC38ACF7C16EAAC303D845B5F1B4_AdjustorThunk (void);
extern void XRReferenceObject_GetHashCode_m088BCD3E046B562DDD8CBFB25AEBF9C5747E2A7C_AdjustorThunk (void);
extern void XRReferenceObject_Equals_m63933178BE0E783B54B6A983BD3B5ADDF0817ADA_AdjustorThunk (void);
extern void XRTrackedObject_get_trackableId_mB62A1367121F404E7E641459F7A2DE4A35801E72_AdjustorThunk (void);
extern void XRTrackedObject_get_pose_mCF3749FD97A427BF58737E1F72C958B688BF4B14_AdjustorThunk (void);
extern void XRTrackedObject_get_trackingState_m33C9F81469B2E6174337D76F6109B79B03975349_AdjustorThunk (void);
extern void XRTrackedObject_get_nativePtr_m13B4B110BB339AF7AF03B1219247112B4ABB38D8_AdjustorThunk (void);
extern void XRTrackedObject_get_referenceObjectGuid_m277B42932D6C8D42820F47A888407FBE9B0A7436_AdjustorThunk (void);
extern void XRTrackedObject_Equals_m20B63BFBF61F3D819390A5A574B9916CCE0A7F8B_AdjustorThunk (void);
extern void XRTrackedObject_GetHashCode_m0456DF4A009ED3B00F2036F603881D9DB74EDAF9_AdjustorThunk (void);
extern void XRTrackedObject_Equals_mAA87562E27ABE20500A8537F56A551B584A551C5_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_id_m52AA71D202632FA1607B0FEF64946642B6C3608C_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_id_m19076B4B5E6D6AA32BE751C1F2611CB7C3C152A0_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_providerType_m8D7C8F76AE3FAEEC4952D6FF75134CE4DADFFA22_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_providerType_mA9E2685FC29652BBF41CD7398D8A434B72B68556_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_subsystemTypeOverride_m60945479B5A62376EEA5633F4FF21D4BD137C125_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_subsystemTypeOverride_mC5D9DB3F2CDC007F826FC2AB790F1622DFBA0F63_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_supportsHumanSegmentationStencilImage_m3F2F9B49E2326FE8A773C655848F6497A5F8A797_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_supportsHumanSegmentationStencilImage_mEC6C58C95DF515008316ED9A33A37ABBFBFD88BD_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_supportsHumanSegmentationDepthImage_mBFFC1F3611B38652EEFD21E2D7433B71F36A172D_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_supportsHumanSegmentationDepthImage_mF08FD3863AEB93D47CCF50BD197780D2AB6F0705_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthImage_m7E021A482EB4D3F52CA43ABEF71FD654304330AC_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthImage_m51449A6122E2D967180669F6C0425F5D1E038F7E_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthConfidenceImage_m3A9518505C78739C2476A7E64F6942D83C582DD5_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthConfidenceImage_m24C48D100ECEEC534C92273C21C18FBCCD98C740_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_Equals_mBF75B2160741AC5D0F43480949D690FE94ECCE18_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_Equals_m046DEDAFD67F305D51E59636AF310702B5152EEB_AdjustorThunk (void);
extern void XROcclusionSubsystemCinfo_GetHashCode_m8A26E07DD1C840DFEC9373E26990B3DA40F1D8A1_AdjustorThunk (void);
extern void XRParticipant_get_trackableId_mFE20FF09B28F44F916FD7175C9D1B50658DB8D13_AdjustorThunk (void);
extern void XRParticipant_get_pose_m8BC5243C4975CE29D2E98B803908FE7B0B2A1D1B_AdjustorThunk (void);
extern void XRParticipant_get_trackingState_m0510505F8AE642CCCEBD2D784CB898CEDD59A08F_AdjustorThunk (void);
extern void XRParticipant_get_nativePtr_mF4BBE0CC8C5CFA70984EAAD24CFF13E9BCFE0FE4_AdjustorThunk (void);
extern void XRParticipant_get_sessionId_m25D8BC6B31A8216FF6959B2C4792CCC7040A2300_AdjustorThunk (void);
extern void XRParticipant_GetHashCode_mF04382E10454D77B4F1AA3AF615488B98D9D62EC_AdjustorThunk (void);
extern void XRParticipant_Equals_mE1679D0AAFE2566EA4CE5AF7992F1ADD3D2AFEDA_AdjustorThunk (void);
extern void XRParticipant_Equals_mBA488A840ABD4DBB6432E2D03126062EC1A6768C_AdjustorThunk (void);
extern void BoundedPlane__ctor_mDCFBC1B53B86B650BBB103C9FC25E7872CBF804B_AdjustorThunk (void);
extern void BoundedPlane_get_trackableId_m32943441D74DC226DC907A05B5B6C6EBBC70F95B_AdjustorThunk (void);
extern void BoundedPlane_get_subsumedById_mD61EFD7A91B5F290F63A1AE59153B75BB33B89CF_AdjustorThunk (void);
extern void BoundedPlane_get_pose_m8302E13809156362584FA0AE137DD911D30665BA_AdjustorThunk (void);
extern void BoundedPlane_get_center_mA4667303D86B331F7EC5F278910145E7633EA973_AdjustorThunk (void);
extern void BoundedPlane_get_extents_mEED7F74BBACA8EA90D43ED12EC9D10C9059118CD_AdjustorThunk (void);
extern void BoundedPlane_get_size_m204F4F37C0FB6F7294682D961B53F4F9639E3882_AdjustorThunk (void);
extern void BoundedPlane_get_alignment_m72B849B54224B1493DFF448BCF2AB8634751DC71_AdjustorThunk (void);
extern void BoundedPlane_get_trackingState_mBF10ADD6DD969A0DA7FCC8299FFA56AEB9B837CA_AdjustorThunk (void);
extern void BoundedPlane_get_nativePtr_m626921F0179BF37BC5F06C2587D298FB40F31FE9_AdjustorThunk (void);
extern void BoundedPlane_get_classification_m842651162BFE9633C414B16CD1D86FBBE86589A3_AdjustorThunk (void);
extern void BoundedPlane_ToString_m0A542F5D2CB72755643184989BE3B9E6899D731A_AdjustorThunk (void);
extern void BoundedPlane_Equals_m5B2E8A0932BC0242B51091CDDFED85901156A005_AdjustorThunk (void);
extern void BoundedPlane_GetHashCode_m99D4D46A432C2E00A182A86788A750522BFBCAEF_AdjustorThunk (void);
extern void BoundedPlane_Equals_m3A984C969EC0ACE7B83F661C80AA82C54D455D1A_AdjustorThunk (void);
extern void Cinfo_get_id_m62022D2EE6912F0B1BDBCA687A4FC63321DE3F86_AdjustorThunk (void);
extern void Cinfo_set_id_m940361693A3C925B2180733D87611B5FDF0357D7_AdjustorThunk (void);
extern void Cinfo_get_providerType_m496CFFD5CAAF878266582DECEC5CDFB92A9C0A55_AdjustorThunk (void);
extern void Cinfo_set_providerType_m8B6A7EE025CCB9B5B5E26E6F4C779DFE09955744_AdjustorThunk (void);
extern void Cinfo_get_subsystemTypeOverride_m67ACD12818B5C91D42707639EA205E13BB15171A_AdjustorThunk (void);
extern void Cinfo_set_subsystemTypeOverride_mBC4F1CC20B4DF3D551BAFC1C38245F457E262A58_AdjustorThunk (void);
extern void Cinfo_get_supportsHorizontalPlaneDetection_mBC3012C667106D47D9429F9C8001774038A38216_AdjustorThunk (void);
extern void Cinfo_set_supportsHorizontalPlaneDetection_mBC9B4572592B71328A96AF58DEB047528470C440_AdjustorThunk (void);
extern void Cinfo_get_supportsVerticalPlaneDetection_m4E3BE200E11784D049B94A054F15E4C76D29D7C6_AdjustorThunk (void);
extern void Cinfo_set_supportsVerticalPlaneDetection_mFF310EF7B9F8D9C9F9689CF9D1D2BEDDFF93F9F0_AdjustorThunk (void);
extern void Cinfo_get_supportsArbitraryPlaneDetection_mF6CB379C9781FE8B8473949DA99196508EF91DB5_AdjustorThunk (void);
extern void Cinfo_set_supportsArbitraryPlaneDetection_m70B1D6D27946FB12BF0D3D3AF8C6DC8DC3F399B9_AdjustorThunk (void);
extern void Cinfo_get_supportsBoundaryVertices_m5BA762B342FCF81EAE6E3645D3BAF04C1E8EAAD9_AdjustorThunk (void);
extern void Cinfo_set_supportsBoundaryVertices_mC6F86EB28D38CC483AD8F9FD161013BDE3F4AFEF_AdjustorThunk (void);
extern void Cinfo_get_supportsClassification_m0396A2A62F840D9E283402BFB3681A5CC19C810E_AdjustorThunk (void);
extern void Cinfo_set_supportsClassification_mA3B11D7CA4F960C89E729E5161AD7CC3211B933C_AdjustorThunk (void);
extern void Cinfo_Equals_m997D9E2FAF1A57953B2A2C95A4221C9EB82843BC_AdjustorThunk (void);
extern void Cinfo_Equals_m38EB24520E9273465E918F9F14D72FCE8EE4EB8B_AdjustorThunk (void);
extern void Cinfo_GetHashCode_m219A4B64FB8A60D947BA345FBD65292065581378_AdjustorThunk (void);
extern void XRRaycast_get_trackableId_m58733DD621FACDF9F32633AA0247FDDE4B6F4EBE_AdjustorThunk (void);
extern void XRRaycast_get_pose_m62D623D6E37AE82B0E223804F034E604037E24E1_AdjustorThunk (void);
extern void XRRaycast_get_trackingState_m8A926660A7D03F72E558198E760AE01936FB8DF0_AdjustorThunk (void);
extern void XRRaycast_get_nativePtr_m079CE750F279F664A8D524ACA2D070056143389D_AdjustorThunk (void);
extern void XRRaycast_get_distance_m4D3B928473544B72D50CF70503B18DBC75951263_AdjustorThunk (void);
extern void XRRaycast_get_hitTrackableId_mA4EE855CDEE8AC2D109FDE58A7EF4AED262CBFFE_AdjustorThunk (void);
extern void XRRaycast__ctor_mCB8C71860ADB4EEEAECBB9D2FD6373FA7EE13A48_AdjustorThunk (void);
extern void XRRaycast_GetHashCode_m68040849E5282B2DAEE10DEC5F13B22E69A9EA36_AdjustorThunk (void);
extern void XRRaycast_Equals_m808F58AFF56D3598C410DBB759CD48CBEBFBE553_AdjustorThunk (void);
extern void XRRaycast_Equals_m155EE0BDA8E10977C499A22B2EE32D252A960535_AdjustorThunk (void);
extern void XRRaycastHit_get_trackableId_m39A90CBBE6D03C7C726715BEE8404A5411ACECBA_AdjustorThunk (void);
extern void XRRaycastHit_get_pose_m7374236222252D08D08C85145B88AF698FAA77F4_AdjustorThunk (void);
extern void XRRaycastHit_get_distance_m51570C654B1EED732C9EE7C73D51B13B9CF8262B_AdjustorThunk (void);
extern void XRRaycastHit_get_hitType_m14A0398215ED8B10A1E505427C7584100189C222_AdjustorThunk (void);
extern void XRRaycastHit__ctor_mF47DE3277FA881FCB8E74A5ADEC8E9624F00900F_AdjustorThunk (void);
extern void XRRaycastHit_GetHashCode_m3BA94B911CC05BEC9FB3D5BB2D37142929AF3F33_AdjustorThunk (void);
extern void XRRaycastHit_Equals_m227F3BD461F3EDA16E3AAF42E40B32607C58F8BB_AdjustorThunk (void);
extern void XRRaycastHit_Equals_m84983BF79308ADA4ED84E210840E2F950B549FA0_AdjustorThunk (void);
extern void Cinfo_get_id_m9A34BB7AAEFCB43E1627AA047A68C058D730EDC4_AdjustorThunk (void);
extern void Cinfo_set_id_m0CB4DA3E552ED7940FBA88D8EE3BB6379EA255D6_AdjustorThunk (void);
extern void Cinfo_get_providerType_m6AFB0E29047AF8A34F780EBACFC0CDDA44AAF50C_AdjustorThunk (void);
extern void Cinfo_set_providerType_m20992869A706183D7180A2030C84B5445DCF0BE3_AdjustorThunk (void);
extern void Cinfo_get_subsystemTypeOverride_mCFC851E4227172E1E01130E60CC64F4B2FFC8C63_AdjustorThunk (void);
extern void Cinfo_set_subsystemTypeOverride_mD5425E55455A21B7361B847FD6B78998AC70CD5B_AdjustorThunk (void);
extern void Cinfo_get_supportsViewportBasedRaycast_m76E31D4FF84E88050FE4E8B6C44FB6E4E71A5A3A_AdjustorThunk (void);
extern void Cinfo_set_supportsViewportBasedRaycast_mCF77DEFDDC3931682A33A063DF2F25FFBF07B807_AdjustorThunk (void);
extern void Cinfo_get_supportsWorldBasedRaycast_m5242363FA90D64968F4ED236EC35973B7ABC180A_AdjustorThunk (void);
extern void Cinfo_set_supportsWorldBasedRaycast_m74BF70E612BCAFAD380C108700905E5B8C5425FA_AdjustorThunk (void);
extern void Cinfo_get_supportedTrackableTypes_m0DA573866D46012B650151C7538796542A3E2C70_AdjustorThunk (void);
extern void Cinfo_set_supportedTrackableTypes_mABC320F641164FC1DB2AB9DB3F1E075B6235A785_AdjustorThunk (void);
extern void Cinfo_get_supportsTrackedRaycasts_mB923DE37AE981FB26768CFF11B34A63F481A261A_AdjustorThunk (void);
extern void Cinfo_set_supportsTrackedRaycasts_mD7575B5CAA4BB3652786E2AE2C1B94CF8BEB423C_AdjustorThunk (void);
extern void Cinfo_GetHashCode_mE07F77F64788F12838A7D8A20E07DE366DDAEEEA_AdjustorThunk (void);
extern void Cinfo_Equals_mFDD42918C99F796C9737C544D9858098C0241716_AdjustorThunk (void);
extern void Cinfo_ToString_m5E549199F8D40CF630BB8ED6B46EC5F51E580BEB_AdjustorThunk (void);
extern void Cinfo_Equals_m96B4DD943D8AAA5D31B0B5BCD0EEC1F94E60F146_AdjustorThunk (void);
extern void ScopedProfiler__ctor_m3426FC301C7541283DA4382EFAFDBDFD08358DAD_AdjustorThunk (void);
extern void ScopedProfiler_Dispose_mB6720C4212A51CBC86104AF46E081B1CB410BC1A_AdjustorThunk (void);
extern void SerializableGuid__ctor_m0A96C8F8254451C083274363A1C68E5FB5CDF107_AdjustorThunk (void);
extern void SerializableGuid_get_guid_m54618233E4BD08410123A50B4E8DAC66FCE46032_AdjustorThunk (void);
extern void SerializableGuid_GetHashCode_m200045FC79E206A9FD4B9A1578A3C66CCBF41481_AdjustorThunk (void);
extern void SerializableGuid_Equals_m20C468F42E878759B4DB1703B99E3EF7FA0DE550_AdjustorThunk (void);
extern void SerializableGuid_ToString_m593CC03163539B5043119F380A189EDCBF100D32_AdjustorThunk (void);
extern void SerializableGuid_Equals_m1ADEE5CED29ED1D62E794F2CECCDEADF416878A6_AdjustorThunk (void);
extern void Cinfo_get_supportsInstall_m706A828C9AE61FF74DF4640D80E52148CDF4F3AD_AdjustorThunk (void);
extern void Cinfo_set_supportsInstall_m05EE61C58E505A8F20DEA68862395341F1DAD3FD_AdjustorThunk (void);
extern void Cinfo_get_supportsMatchFrameRate_m1E603F47BF0A28EE5E7377A28D9D2BB29BFD3B6F_AdjustorThunk (void);
extern void Cinfo_set_supportsMatchFrameRate_m9CB328CEF43BCE3E59F26A97D32AEE1D201F8787_AdjustorThunk (void);
extern void Cinfo_get_id_mA521F604882D1F4C6FD30262F3E2C3B0609BFC55_AdjustorThunk (void);
extern void Cinfo_set_id_m6A2CAB13FAD54AB05458DC5DE1FAB5C651E9D656_AdjustorThunk (void);
extern void Cinfo_get_providerType_mC64DDA0FD5E23FD53F7B9DAEAF4433487436835E_AdjustorThunk (void);
extern void Cinfo_set_providerType_m2BCF5FEFC25D812C3E7F00725B49AE02540B2F8E_AdjustorThunk (void);
extern void Cinfo_get_subsystemTypeOverride_mFB0EAD46EF91216924D0509C72DF82ADA526B99D_AdjustorThunk (void);
extern void Cinfo_set_subsystemTypeOverride_m30FDD93193E0D694ABB33E184552AAF1A8AA36E6_AdjustorThunk (void);
extern void Cinfo_GetHashCode_m52D192E832A52B87FB2F03DB84EB47EED7DCD48C_AdjustorThunk (void);
extern void Cinfo_Equals_m1C37149A7375CC94768E18102A1CB1AED3E3FF77_AdjustorThunk (void);
extern void Cinfo_Equals_m515E1A8509A7C1472469FD535B7CBE5D58E45A78_AdjustorThunk (void);
extern void XRSessionUpdateParams_get_screenOrientation_m3200C056D5EF350333CBEC08C5BADCB3F9B3588A_AdjustorThunk (void);
extern void XRSessionUpdateParams_set_screenOrientation_m958168FC8048AE33DC4757F9A1184520B15FD341_AdjustorThunk (void);
extern void XRSessionUpdateParams_get_screenDimensions_m68257DCBBAEB4090559AC18A180C8E54D02F5118_AdjustorThunk (void);
extern void XRSessionUpdateParams_set_screenDimensions_m3658D658C653B6ED72DB68F099A4512FE756D8F6_AdjustorThunk (void);
extern void XRSessionUpdateParams_GetHashCode_mCCE320FCC4DE7EEF2FC1778BB15E422BAC190908_AdjustorThunk (void);
extern void XRSessionUpdateParams_Equals_m2501DC639F937DCBD2423619545AC556DE71F3B2_AdjustorThunk (void);
extern void XRSessionUpdateParams_ToString_m01D74BEF4A53B620271579234011D2F6D0522598_AdjustorThunk (void);
extern void XRSessionUpdateParams_Equals_m57475F3E7F97539B697A4DC77122F934C321ECD0_AdjustorThunk (void);
extern void TrackableId_get_subId1_m219B741FAF6D36DB7B8CFDC588EA93677FCE174B_AdjustorThunk (void);
extern void TrackableId_get_subId2_m136D4970BDCC7323020913A9B5303584AA105B34_AdjustorThunk (void);
extern void TrackableId__ctor_mB9B301A9CD03355A4E03A2B1A102B6B75F190792_AdjustorThunk (void);
extern void TrackableId_ToString_mCD45FD4FF5DF6DE30A38AD05D02CFA7B2B696BB1_AdjustorThunk (void);
extern void TrackableId_GetHashCode_mFD297FC6DB40FB5B28C6E9B7A2CF2785D75C4E86_AdjustorThunk (void);
extern void TrackableId_Equals_mA542615B3B7AAD52AEBBEFBCE7E6987B2DE3849D_AdjustorThunk (void);
extern void TrackableId_Equals_m1DF35616359175E3D66DE18250E8CDA1E6462B06_AdjustorThunk (void);
extern void XRTextureDescriptor_get_nativeTexture_mC7D28CAE1A948B378FF5966C85883508435C2B1A_AdjustorThunk (void);
extern void XRTextureDescriptor_get_width_m16F58793E411A03BDB01C19D0BCDBA8DC52455DC_AdjustorThunk (void);
extern void XRTextureDescriptor_get_height_mF20F82E1D3B8739A79F017147847B051FD33E554_AdjustorThunk (void);
extern void XRTextureDescriptor_get_mipmapCount_mE8FD55B645419BA7DA6959B000B8218BE142B302_AdjustorThunk (void);
extern void XRTextureDescriptor_get_format_mB5A486F3100EB333CF52F505ACB63E68C7CB511D_AdjustorThunk (void);
extern void XRTextureDescriptor_get_propertyNameId_mF90DF67F19E16118CB3D31EB44E643F4C48DE7C8_AdjustorThunk (void);
extern void XRTextureDescriptor_get_valid_m921AF29648A562E6C6D2CA5F0E4A84109368A1E6_AdjustorThunk (void);
extern void XRTextureDescriptor_get_depth_m27FA31D85456F65E706B03743250CB3858EBE0E3_AdjustorThunk (void);
extern void XRTextureDescriptor_get_dimension_mAB82596EFC83FBC3477D496E77FD9B0579922CCC_AdjustorThunk (void);
extern void XRTextureDescriptor_hasIdenticalTextureMetadata_mEEAE086BC369920DB89D8E38BA6A1133436100F2_AdjustorThunk (void);
extern void XRTextureDescriptor_Reset_m7C4468143C7A9EA8B43068E809C8A392CCF31F09_AdjustorThunk (void);
extern void XRTextureDescriptor_Equals_mD2A71E4A2D68686E74A648896FAC0FCDF02BE0B1_AdjustorThunk (void);
extern void XRTextureDescriptor_Equals_m37D3AFD7E110F62E8977937DD66AC053B3F64C8D_AdjustorThunk (void);
extern void XRTextureDescriptor_GetHashCode_m8628ACEB1A4A6203BCD28B01D59B588715C83291_AdjustorThunk (void);
extern void XRTextureDescriptor_ToString_m13E8A051346374949A95D217BBAAD298893A25EB_AdjustorThunk (void);
static Il2CppTokenAdjustorThunkPair s_adjustorThunks[536] =
{
{ 0x06000004, XRAnchor_get_trackableId_mE8C852BEAA9025FD1CB643F41836CA72C25E7B92_AdjustorThunk },
{ 0x06000005, XRAnchor_get_pose_mD135777376B2898B0A151AD5AA8FD4BBD7C7C5FF_AdjustorThunk },
{ 0x06000006, XRAnchor_get_trackingState_m2B3E621BA332B1E74CF8EC94FA8B18EDAF68F462_AdjustorThunk },
{ 0x06000007, XRAnchor_get_nativePtr_m47E36685E001BF3810BF6A45B8DF8128080DAEFB_AdjustorThunk },
{ 0x06000008, XRAnchor_get_sessionId_m61DAD2C82C4D725E773BFAB2E8A8BE50EDEEC379_AdjustorThunk },
{ 0x06000009, XRAnchor_GetHashCode_m3928C95D8DE59840CB82D9FD13EDEEAEA2A89376_AdjustorThunk },
{ 0x0600000A, XRAnchor_Equals_mE6AC873FF43B605D47F5AB76F0ADAD9A6EDEA25B_AdjustorThunk },
{ 0x0600000B, XRAnchor_Equals_m8C35DEBDDAC21262E3344152D76539DF1AF7F060_AdjustorThunk },
{ 0x0600001A, Cinfo_get_id_m7C38252CE360F061914361192300AECA8CB5307B_AdjustorThunk },
{ 0x0600001B, Cinfo_set_id_mCB169DF169C36D9D12651785DCBF71ABCC10FD9D_AdjustorThunk },
{ 0x0600001C, Cinfo_get_providerType_m6A1DFCD062C95265E8E1C6502D44D6C464B50EED_AdjustorThunk },
{ 0x0600001D, Cinfo_set_providerType_m9E012FF4CD325826F838F663BAEE045C452A3C26_AdjustorThunk },
{ 0x0600001E, Cinfo_get_subsystemTypeOverride_m169F49BB024275E13DF95C274191A675CC0F66B9_AdjustorThunk },
{ 0x0600001F, Cinfo_set_subsystemTypeOverride_mC525A48B08F8F826275950FFB61C780C4AEA6A6B_AdjustorThunk },
{ 0x06000020, Cinfo_get_supportsTrackableAttachments_m13B6C9977641F3E284C69AA3554EBD19478538B8_AdjustorThunk },
{ 0x06000021, Cinfo_set_supportsTrackableAttachments_m0B0516A50FFA22C3F60483E3498DC6BB1D460995_AdjustorThunk },
{ 0x06000022, Cinfo_GetHashCode_mBBEF5C69D3B91763153EDE624C76AC428ECFABB1_AdjustorThunk },
{ 0x06000023, Cinfo_Equals_m8E52493318DDE5F675E85E0733F5F7CCDA3C8339_AdjustorThunk },
{ 0x06000024, Cinfo_Equals_m07BCEC0FF4D8C2A43AE850689AC5AA4FC0603DE8_AdjustorThunk },
{ 0x06000026, XRReferencePoint_get_trackableId_mEE1B3349EA8F19E94BF8B76CBB644822317D2758_AdjustorThunk },
{ 0x06000027, XRReferencePoint_get_pose_mFDB2701C343707F0FA479C2C775B77BEC2092D61_AdjustorThunk },
{ 0x06000028, XRReferencePoint_get_trackingState_m9C6DD336B0E91F39FA04F298B0543148433F11B2_AdjustorThunk },
{ 0x06000029, XRReferencePoint_get_nativePtr_m80EFF4D6D345E7B7CC5687B506C410C84B09EFBA_AdjustorThunk },
{ 0x0600002A, XRReferencePoint_get_sessionId_mC498F0CAE614B4048B79742479252D923D4FED46_AdjustorThunk },
{ 0x0600002B, XRReferencePoint_GetHashCode_mD1C610489F910DB8AF23C5ED39B3930487B2F450_AdjustorThunk },
{ 0x0600002C, XRReferencePoint_Equals_m139BA3698F72E149B33FB577B616A0043DBBB8E6_AdjustorThunk },
{ 0x0600002D, XRReferencePoint_Equals_m464FBE4D3BF000716BC20737865CC263128FCF9B_AdjustorThunk },
{ 0x0600003B, XRCameraConfiguration_get_width_m019869C624524B8C4EA0021D9331F2AD856A25C3_AdjustorThunk },
{ 0x0600003C, XRCameraConfiguration_get_height_mAAC1B9AE539EF89D59585A6BFC8F925F94AA14D3_AdjustorThunk },
{ 0x0600003D, XRCameraConfiguration_get_framerate_m3DCC7B7F2FEAFDFB5ED0A580153FBAAA22B60B96_AdjustorThunk },
{ 0x0600003E, XRCameraConfiguration_ToString_m570541033A53E9657C809B420CEFDF63D944070B_AdjustorThunk },
{ 0x0600003F, XRCameraConfiguration_GetHashCode_mBAD6720F670B108F1D17BAEBAF619989A011D63A_AdjustorThunk },
{ 0x06000040, XRCameraConfiguration_Equals_mDC2D17183F91C897762D8F8B24D2CA2F96E1A48C_AdjustorThunk },
{ 0x06000041, XRCameraConfiguration_Equals_m8CD36FE1F7DA4B3B3520877DC415D066B77FEFEB_AdjustorThunk },
{ 0x06000042, XRCameraFrame_get_timestampNs_m8F3730A23C9FF6A729F8D1939581D88716438DF7_AdjustorThunk },
{ 0x06000043, XRCameraFrame_get_averageBrightness_m34CB9F000CCBD2004F7E3CDBA987170A4B049F8E_AdjustorThunk },
{ 0x06000044, XRCameraFrame_get_averageColorTemperature_mD5EA9E87E76F7BCBFF709ABF309B142FB9D03DFC_AdjustorThunk },
{ 0x06000045, XRCameraFrame_get_colorCorrection_mFB47669447DE0255EE2491929D9DF85CF7DF1B1A_AdjustorThunk },
{ 0x06000046, XRCameraFrame_get_projectionMatrix_mC489D4A0698634FDA99D0BBE0A93E42F5C82E985_AdjustorThunk },
{ 0x06000047, XRCameraFrame_get_displayMatrix_m7D157BB20E2863E0415A42140B6396C4D3E30E31_AdjustorThunk },
{ 0x06000048, XRCameraFrame_get_averageIntensityInLumens_mC250C5B79A5B4C0F75D89BD1EC6FB07AB130B62F_AdjustorThunk },
{ 0x06000049, XRCameraFrame_get_exposureDuration_m7957768DDB0AE596767478A9F8239A98BFD23207_AdjustorThunk },
{ 0x0600004A, XRCameraFrame_get_exposureOffset_m276A794A6640F25AA7B1B0FB69C8296F7DDAAE53_AdjustorThunk },
{ 0x0600004B, XRCameraFrame_get_mainLightIntensityLumens_mDBCBCEA85B23C484CAF7D66ED52681E4AE4C506B_AdjustorThunk },
{ 0x0600004C, XRCameraFrame_get_mainLightColor_m3696EC5D7104849121C9A6CF3524AAC7382BED03_AdjustorThunk },
{ 0x0600004D, XRCameraFrame_get_mainLightDirection_mB7E086F4A8A89BD7404BB702DF980D7B5B124445_AdjustorThunk },
{ 0x0600004E, XRCameraFrame_get_ambientSphericalHarmonics_m5859CDC5CE50F33C62EA59CE9BFC58C6F3CDB269_AdjustorThunk },
{ 0x0600004F, XRCameraFrame_get_cameraGrain_m7E8B37489D5380BE507656FFC9FE30B0333CED2A_AdjustorThunk },
{ 0x06000050, XRCameraFrame_get_noiseIntensity_mA6150FB06579A1A6E637139C97E93304D6A83D3A_AdjustorThunk },
{ 0x06000051, XRCameraFrame_get_hasTimestamp_m2FBE2F396A15CC469756E3C876519B7FF3349897_AdjustorThunk },
{ 0x06000052, XRCameraFrame_get_hasAverageBrightness_m3B006851943F915530A8628BF3311C946CC8FC68_AdjustorThunk },
{ 0x06000053, XRCameraFrame_get_hasAverageColorTemperature_mEE8976398F8AE074090A1D3BE2DBB5F3484C04DF_AdjustorThunk },
{ 0x06000054, XRCameraFrame_get_hasColorCorrection_m687F2028F9A79A04CC6CA75C0305134DAB4DB9FE_AdjustorThunk },
{ 0x06000055, XRCameraFrame_get_hasProjectionMatrix_mA7A707C6E990D729C152E149063DE2BD0A456B4A_AdjustorThunk },
{ 0x06000056, XRCameraFrame_get_hasDisplayMatrix_mB369CC19C7B3E2640E2C2747A1E117A5773E5052_AdjustorThunk },
{ 0x06000057, XRCameraFrame_get_hasAverageIntensityInLumens_m2251DD714F7E6E9098DB738DF536FE191425379E_AdjustorThunk },
{ 0x06000058, XRCameraFrame_get_hasExposureDuration_mDF9AC5D38E767A61439850FCEE55E7CC40592EDC_AdjustorThunk },
{ 0x06000059, XRCameraFrame_get_hasExposureOffset_m6696D6E287E1FB413669FA175ACD45E8D6799A37_AdjustorThunk },
{ 0x0600005A, XRCameraFrame_get_hasMainLightIntensityLumens_mE0C9564F7A24636366E063F9086ECA81FDB055BF_AdjustorThunk },
{ 0x0600005B, XRCameraFrame_get_hasMainLightColor_m2B1D25F6224C098D66503F6768C6930D84451AB3_AdjustorThunk },
{ 0x0600005C, XRCameraFrame_get_hasMainLightDirection_m75FB7306D3E483962E22DFB5DD2BB3A5398A7CC3_AdjustorThunk },
{ 0x0600005D, XRCameraFrame_get_hasAmbientSphericalHarmonics_mA2B45AEE57B7DA5081B81C8483F1FBB90ABE3090_AdjustorThunk },
{ 0x0600005E, XRCameraFrame_get_hasCameraGrain_m14C3641296BF7BC49501E3D5E810A24A2D50922D_AdjustorThunk },
{ 0x0600005F, XRCameraFrame_get_hasNoiseIntensity_mA5A08A29C34AC2AFFE5792725E4506F0B32EF75C_AdjustorThunk },
{ 0x06000060, XRCameraFrame_Equals_mEF403AD303261AE21BFE6F482EB3EF728EB49DD6_AdjustorThunk },
{ 0x06000061, XRCameraFrame_Equals_m82C80589000BA2F428E4774763F668045BF085D6_AdjustorThunk },
{ 0x06000062, XRCameraFrame_GetHashCode_mCEC92150EE3B5237ACB46471128479997F78185D_AdjustorThunk },
{ 0x06000063, XRCameraFrame_ToString_mE4A2FE2CA4AF1D844B950D0029023F98B189A6D8_AdjustorThunk },
{ 0x06000064, XRCameraIntrinsics_Equals_mA7D92292854DA38258811FDC946BA82E1D5E001D_AdjustorThunk },
{ 0x06000065, XRCameraIntrinsics_Equals_m037475660705484B0E8730157EA7A731998466AD_AdjustorThunk },
{ 0x06000066, XRCameraIntrinsics_GetHashCode_mD1D3D0F34AA1723CC454040334B46D5CD7809377_AdjustorThunk },
{ 0x06000067, XRCameraIntrinsics_ToString_mFD230300DEC4F7FB2DCF30F4F02036D97213B2C9_AdjustorThunk },
{ 0x06000068, XRCameraParams_set_zNear_mE207AB998D78E35497B1E941A20C7864D454EE45_AdjustorThunk },
{ 0x06000069, XRCameraParams_set_zFar_m4ABC4E0271EE81FEA88B1608B19ED3CFDA8E523B_AdjustorThunk },
{ 0x0600006A, XRCameraParams_set_screenWidth_m4E9ABE5FEE32FB446FDF6EC5B00961ACC66B48FB_AdjustorThunk },
{ 0x0600006B, XRCameraParams_set_screenHeight_m31C5E67C7403556AFF8B72CC4BB09EA3C3AA05A3_AdjustorThunk },
{ 0x0600006C, XRCameraParams_set_screenOrientation_mCF2AD6E975E790E5BE14E2A1EB71A73E8AA7E7D9_AdjustorThunk },
{ 0x0600006D, XRCameraParams_Equals_m392E8AB6ECAEA915E0E1C9A20831EBE24346E4C0_AdjustorThunk },
{ 0x0600006E, XRCameraParams_Equals_mDE9A6E9D2127F369FA129FD19E73A790FF48E8F2_AdjustorThunk },
{ 0x0600006F, XRCameraParams_GetHashCode_m5C9955238ED690EA6A338097DB818F37ECBFDC72_AdjustorThunk },
{ 0x06000070, XRCameraParams_ToString_m4CAB10F6C7424973F8A9E72F70283A53C384AF3F_AdjustorThunk },
{ 0x060000A3, XRCameraSubsystemCinfo_get_id_m606888326128C053029E1B09A00F2CB97B214291_AdjustorThunk },
{ 0x060000A4, XRCameraSubsystemCinfo_set_id_m768994793A205C7D5CE603B354D350A34D47720D_AdjustorThunk },
{ 0x060000A5, XRCameraSubsystemCinfo_get_providerType_m181531F5B642DA8E3E10FC62879495B0A8D53110_AdjustorThunk },
{ 0x060000A6, XRCameraSubsystemCinfo_set_providerType_m78F56C5CEF9FF62F60DE6073B8AD0FB0AFD00730_AdjustorThunk },
{ 0x060000A7, XRCameraSubsystemCinfo_get_subsystemTypeOverride_mED0FB455C8C39164EF2594FC9405B78C1E2EB809_AdjustorThunk },
{ 0x060000A8, XRCameraSubsystemCinfo_set_subsystemTypeOverride_mD4D22BB1EC102CA40AF084B06DA3C957139EF2D4_AdjustorThunk },
{ 0x060000A9, XRCameraSubsystemCinfo_get_supportsAverageBrightness_mF49B2D16DE8FBC5452C17D87672FBE1EB814145E_AdjustorThunk },
{ 0x060000AA, XRCameraSubsystemCinfo_set_supportsAverageBrightness_mC20A88BD3C8D137A1F34888C64DC5FFF37787759_AdjustorThunk },
{ 0x060000AB, XRCameraSubsystemCinfo_get_supportsAverageColorTemperature_m789041AE11DC92E73ED6C228C5A5B55A87AE736B_AdjustorThunk },
{ 0x060000AC, XRCameraSubsystemCinfo_set_supportsAverageColorTemperature_m77727C8CBAB59D0D078B0A634EB0A56F1BF368E4_AdjustorThunk },
{ 0x060000AD, XRCameraSubsystemCinfo_get_supportsColorCorrection_m6910005DB05086FEBDBFFFE47BFFDBB96453E5C7_AdjustorThunk },
{ 0x060000AE, XRCameraSubsystemCinfo_set_supportsColorCorrection_m1CBB9181A21D2A964705AD5E22F78735DCFE2C01_AdjustorThunk },
{ 0x060000AF, XRCameraSubsystemCinfo_get_supportsDisplayMatrix_m2107BE8860B1A4D050A80801F6286F0E9798820D_AdjustorThunk },
{ 0x060000B0, XRCameraSubsystemCinfo_set_supportsDisplayMatrix_m2E11C0B7442273252613BDB41BB8B6F02698FBEA_AdjustorThunk },
{ 0x060000B1, XRCameraSubsystemCinfo_get_supportsProjectionMatrix_mAC44711CBD0AEF5600FAF7A65364692FE9FA9D9E_AdjustorThunk },
{ 0x060000B2, XRCameraSubsystemCinfo_set_supportsProjectionMatrix_mFC886F8859FDF308D7980935474AA0E66ECF66B4_AdjustorThunk },
{ 0x060000B3, XRCameraSubsystemCinfo_get_supportsTimestamp_m0B95FB498C6682EE15E2461F8A5C555B3E397543_AdjustorThunk },
{ 0x060000B4, XRCameraSubsystemCinfo_set_supportsTimestamp_mAA6157EC368F6358F155571E257A578729D368D4_AdjustorThunk },
{ 0x060000B5, XRCameraSubsystemCinfo_get_supportsCameraConfigurations_mF0168147B6D556F8289DCE665D070EE427430CDD_AdjustorThunk },
{ 0x060000B6, XRCameraSubsystemCinfo_set_supportsCameraConfigurations_mD0F431DDAB4F82DDC6E35AB7583572D25244E0F0_AdjustorThunk },
{ 0x060000B7, XRCameraSubsystemCinfo_get_supportsCameraImage_m404883CC80418B38CB13D3ED6DAAFE6D81978A6F_AdjustorThunk },
{ 0x060000B8, XRCameraSubsystemCinfo_set_supportsCameraImage_m2140EBB7ACEA9B1634F56DE2DCB85F26CB8C4D7D_AdjustorThunk },
{ 0x060000B9, XRCameraSubsystemCinfo_get_supportsAverageIntensityInLumens_m5B91C231C060B22D44F1579CF361500D7B54173E_AdjustorThunk },
{ 0x060000BA, XRCameraSubsystemCinfo_set_supportsAverageIntensityInLumens_m49462C178EF35B3E688EE6711FD3E41E9C1976AB_AdjustorThunk },
{ 0x060000BB, XRCameraSubsystemCinfo_get_supportsFaceTrackingAmbientIntensityLightEstimation_mBE329A85F8992A65715EC3F97AC0CEEE5B0DE9D8_AdjustorThunk },
{ 0x060000BC, XRCameraSubsystemCinfo_set_supportsFaceTrackingAmbientIntensityLightEstimation_m93740733F66607C53F3928946A79CE732EAF9EF9_AdjustorThunk },
{ 0x060000BD, XRCameraSubsystemCinfo_get_supportsFaceTrackingHDRLightEstimation_mAA8871A8B5D8CDC9D7D5FEA47E72423BC02D969B_AdjustorThunk },
{ 0x060000BE, XRCameraSubsystemCinfo_set_supportsFaceTrackingHDRLightEstimation_mD76A9A9A127118388FBD2E971246303BB2BE0F0C_AdjustorThunk },
{ 0x060000BF, XRCameraSubsystemCinfo_get_supportsWorldTrackingAmbientIntensityLightEstimation_mC5C8DDCB2DB3F82EA868AF171039DF6ECFF9C7EC_AdjustorThunk },
{ 0x060000C0, XRCameraSubsystemCinfo_set_supportsWorldTrackingAmbientIntensityLightEstimation_mE9B47A05DA11B6C6FFCB6FFED773ADB464130C5B_AdjustorThunk },
{ 0x060000C1, XRCameraSubsystemCinfo_get_supportsWorldTrackingHDRLightEstimation_m96A9EF59A86DAFBA2A14AFAA79840480E8CDD01D_AdjustorThunk },
{ 0x060000C2, XRCameraSubsystemCinfo_set_supportsWorldTrackingHDRLightEstimation_m92AC9270D4D5FA4C61ED353406511B3877E5D9D4_AdjustorThunk },
{ 0x060000C3, XRCameraSubsystemCinfo_get_supportsFocusModes_mA2196338BFF377734A338E919D372089A98417D9_AdjustorThunk },
{ 0x060000C4, XRCameraSubsystemCinfo_set_supportsFocusModes_m2F70E7EFC54E2F930DEA28DC4922125E01FE3026_AdjustorThunk },
{ 0x060000C5, XRCameraSubsystemCinfo_get_supportsCameraGrain_mFC3B0475E51415F6BCDAB93671CD421826DA9B9B_AdjustorThunk },
{ 0x060000C6, XRCameraSubsystemCinfo_set_supportsCameraGrain_m8BF26C263FED0D5106C436091BD8C25BFF8FD755_AdjustorThunk },
{ 0x060000C7, XRCameraSubsystemCinfo_Equals_m8C071329439DF323FF57A936181A09F933886EAB_AdjustorThunk },
{ 0x060000C8, XRCameraSubsystemCinfo_Equals_m8DA28DF625D849C92AE0770EBB43184C2CE4FEE4_AdjustorThunk },
{ 0x060000C9, XRCameraSubsystemCinfo_GetHashCode_mA8D0D3E3ABB46889F31B045A1D6F8A06EC8701D0_AdjustorThunk },
{ 0x060000DB, Configuration_get_descriptor_mD7539C193666CFFB9258CE40D88EB7DA3C48DDDA_AdjustorThunk },
{ 0x060000DC, Configuration_set_descriptor_mC8DB7CFDB5C7E267B15CFD3DE2133A1B482020E9_AdjustorThunk },
{ 0x060000DD, Configuration_get_features_m8F2353DC080AF51D657C4CBD8E9DB4DAEAB72B5A_AdjustorThunk },
{ 0x060000DE, Configuration_set_features_m778B95140CCFD2CF143489375C8B15258B5CA149_AdjustorThunk },
{ 0x060000DF, Configuration__ctor_m5A3F2286F33BA303B4C8A8E0E34ED6DA993A43BB_AdjustorThunk },
{ 0x060000E0, Configuration_GetHashCode_m1714C8505EE74B796DB7AF17A409448C385A83F2_AdjustorThunk },
{ 0x060000E1, Configuration_Equals_m3EABF1A712E3AB8B1BCB70F71A4DA0B29BD3AB23_AdjustorThunk },
{ 0x060000E2, Configuration_Equals_m7C598F62999ABC2566CDCD656FF0ACA11DBC9807_AdjustorThunk },
{ 0x060000E6, ConfigurationDescriptor_get_identifier_m829E6611B4E4B0E33E8E87902FDFCDAEC0F2B8A0_AdjustorThunk },
{ 0x060000E7, ConfigurationDescriptor_get_capabilities_mD48908AE629D6E78D84F355B59CF742ABFD7C649_AdjustorThunk },
{ 0x060000E8, ConfigurationDescriptor_get_rank_mF775801AAD4BC8E980682B569F676BD536BA78B8_AdjustorThunk },
{ 0x060000E9, ConfigurationDescriptor_HexString_m06E793AFE575A13CBC943EBFDCAB4BA290AAF8F3_AdjustorThunk },
{ 0x060000EA, ConfigurationDescriptor_ToString_mF67E92AE3930DFD749F7186D49FFC600E2B197EE_AdjustorThunk },
{ 0x060000EB, ConfigurationDescriptor_GetHashCode_m1B74FC9C9B33BBED2192C1A47570C13A40008091_AdjustorThunk },
{ 0x060000EC, ConfigurationDescriptor_Equals_m6908A703D5C6F693555FCC9A616D85E430012363_AdjustorThunk },
{ 0x060000ED, ConfigurationDescriptor_Equals_m4123FDB2B2A6BDDCA3979394FD76CEEFAE534EDB_AdjustorThunk },
{ 0x060000FA, XRCpuImage_get_dimensions_m1A176BDB3319F09F3AF628AB17C126B62929A2A5_AdjustorThunk },
{ 0x060000FB, XRCpuImage_set_dimensions_m8672F4307A096265FA73685BDDA6D605B9C10ED5_AdjustorThunk },
{ 0x060000FC, XRCpuImage_get_width_m8DE20D99BCFA242F105F3B39AD68D398F3C2B4CE_AdjustorThunk },
{ 0x060000FD, XRCpuImage_get_height_m7BB3967EC96DB5EEF99E0935E5AA1DFB991D7ADD_AdjustorThunk },
{ 0x060000FE, XRCpuImage_get_planeCount_m5F63BAD93F18A9D85D74377CFE1891860740D750_AdjustorThunk },
{ 0x060000FF, XRCpuImage_set_planeCount_mC261323C60A65DD0EBA30325554C5F92F13149EA_AdjustorThunk },
{ 0x06000100, XRCpuImage_get_format_m80FEE2CEC6A37A417D5B86294C1ECA50A49FDEAB_AdjustorThunk },
{ 0x06000101, XRCpuImage_set_format_m02654636810F940049F1A57FEA7987F71FA47DF6_AdjustorThunk },
{ 0x06000102, XRCpuImage_set_timestamp_m6FAE47FB68497C3757580D1FD94D0A4B7C2C783E_AdjustorThunk },
{ 0x06000103, XRCpuImage__ctor_mA44BE98BA315639462481743B96A650B89F7C26E_AdjustorThunk },
{ 0x06000105, XRCpuImage_Dispose_m462B3360E99D206E1151C7B8ED30420BF4A91B7A_AdjustorThunk },
{ 0x06000106, XRCpuImage_GetHashCode_m5A2490A4F9DD6A4BE95B6E43C2E4DFA67057DD29_AdjustorThunk },
{ 0x06000107, XRCpuImage_Equals_m6ADCC3C2CDB259DD1D6BB1648CBA3722AD129441_AdjustorThunk },
{ 0x06000108, XRCpuImage_Equals_mE183B37EE7FA276B21EC0CE087BEFCDE540C8D24_AdjustorThunk },
{ 0x06000109, XRCpuImage_ToString_mE31499DDD8365EC75336BFF9C7393BCA2C1B2E5A_AdjustorThunk },
{ 0x06000119, ConversionParams_get_inputRect_mE75F22AF739DFB5506127DF164E0AEF851702756_AdjustorThunk },
{ 0x0600011A, ConversionParams_get_outputDimensions_m83C9D960C805CA2748AA9AAAC2A2986A397B7033_AdjustorThunk },
{ 0x0600011B, ConversionParams_get_outputFormat_m727E479981BF00635D645C88D4D987EB598A0E5F_AdjustorThunk },
{ 0x0600011C, ConversionParams_get_transformation_mFB57F05831CF417808A6C41F170768D9F66A7EF3_AdjustorThunk },
{ 0x0600011D, ConversionParams_GetHashCode_m317F3CF69F015FD4012B668A3195A50E8C18F436_AdjustorThunk },
{ 0x0600011E, ConversionParams_Equals_m428ABCB343F2D25BEC8C48C064A607C19D4C6B4F_AdjustorThunk },
{ 0x0600011F, ConversionParams_Equals_m9170E22223AA2514E0EAA66A74375460210EC11B_AdjustorThunk },
{ 0x06000120, ConversionParams_ToString_mB2F109D1B691D862EC98C1C9058F78C58CE832D3_AdjustorThunk },
{ 0x06000121, Plane_get_rowStride_mE6385B9F7D9D040FC613D16D859435F492CB213A_AdjustorThunk },
{ 0x06000122, Plane_get_pixelStride_m33EEE46027B124683ABAF3BC627812F963F29665_AdjustorThunk },
{ 0x06000123, Plane_get_data_mBA1EB2437E816B19D7A68440AE188F4E8543E108_AdjustorThunk },
{ 0x06000124, Plane_GetHashCode_mE6FB9627754D042BCE94DA2672023FE03BE24C81_AdjustorThunk },
{ 0x06000125, Plane_Equals_mAAF552DA4142C484FFEBA4C30EC7F14111523D68_AdjustorThunk },
{ 0x06000126, Plane_Equals_mE56ABB7E1AE23CED9290A64F4B80D2FDC95AA7F6_AdjustorThunk },
{ 0x06000127, Plane_ToString_mDCB0EECF9BB9652F5E5BA2B36F51F1E4CF334238_AdjustorThunk },
{ 0x06000128, Cinfo_get_dataPtr_m72B8A6BDAA98FA3CF92A9E03807130E4B6341B35_AdjustorThunk },
{ 0x06000129, Cinfo_get_dataLength_mBF9DA90E69A88EF50923C839B5CE8A03264EAB9A_AdjustorThunk },
{ 0x0600012A, Cinfo_get_rowStride_m67E7894AA413F614310BF6A667BDEA1950165492_AdjustorThunk },
{ 0x0600012B, Cinfo_get_pixelStride_m2595FA36CA7479B00D3EFD507C3C9439CC5DBDE0_AdjustorThunk },
{ 0x0600012C, Cinfo_Equals_m5B7C627F1C89E10A0CE713A46B283219E35F6365_AdjustorThunk },
{ 0x0600012D, Cinfo_Equals_m3D18D26EAA0FED30423B3C8B38961816A1472F62_AdjustorThunk },
{ 0x0600012E, Cinfo_GetHashCode_mC3F4D4AA0494F15A8E0B0F765FA005C1A574CCCF_AdjustorThunk },
{ 0x0600012F, Cinfo_ToString_m4D93FD001F1E9EC984CBFB7997FE480E212F83DF_AdjustorThunk },
{ 0x06000130, Cinfo_get_nativeHandle_mAB50E5453B3ED928372EC45DF5E0F4E2ADF341BC_AdjustorThunk },
{ 0x06000131, Cinfo_get_dimensions_mA8AFF01543915A325187A41369F6DA11231A3E50_AdjustorThunk },
{ 0x06000132, Cinfo_get_planeCount_m88E3C67F9E06017A46B7FF90368B24A6F48E1271_AdjustorThunk },
{ 0x06000133, Cinfo_get_timestamp_mAF782E097B2324BD673D8D98C68CA2D6CA4891EF_AdjustorThunk },
{ 0x06000134, Cinfo_get_format_m42CBF60A496CB04541CC04C97E1745AFBC7259BD_AdjustorThunk },
{ 0x06000135, Cinfo_Equals_m52B0C058E8FB2AB4089B91E1EDD0DFD2F9F22642_AdjustorThunk },
{ 0x06000136, Cinfo_Equals_m8140023C141235A77C2153E9A8B54E5356EC6C6F_AdjustorThunk },
{ 0x06000137, Cinfo_GetHashCode_m7AB2284B6770F059F37B7A7EB61C075F472BAE65_AdjustorThunk },
{ 0x06000138, Cinfo_ToString_m4923B9CB2748C5E7CCAA6C817F47976B1E4B2FE1_AdjustorThunk },
{ 0x06000147, Cinfo_get_providerType_m7168F2BEAB1E7D53C4A1308A0BE686CB6ACAC37D_AdjustorThunk },
{ 0x06000148, Cinfo_set_providerType_m79B371C14F188233806BAB677302143650CD9A29_AdjustorThunk },
{ 0x06000149, Cinfo_get_subsystemTypeOverride_mA17A612B4FB9125843E254DB825177C3B1834235_AdjustorThunk },
{ 0x0600014A, Cinfo_set_subsystemTypeOverride_mEF323B6CBB63FB7E5ECB4A6849F06C57BFDF8120_AdjustorThunk },
{ 0x0600014B, Cinfo_get_supportsFeaturePoints_mAE8F24562D2A19594A5AB98BDA0FC1C35730B5BA_AdjustorThunk },
{ 0x0600014C, Cinfo_set_supportsFeaturePoints_mD44DBE0A79D63D3234369E573653A81DC7FB8E1D_AdjustorThunk },
{ 0x0600014D, Cinfo_get_supportsConfidence_m483E36BDB283478D5E1F6F6F3C96A279EB6DE01A_AdjustorThunk },
{ 0x0600014E, Cinfo_set_supportsConfidence_m78F76CAAFD5D667ADBED1580E1F8A1286B59C46D_AdjustorThunk },
{ 0x0600014F, Cinfo_get_supportsUniqueIds_m6A1B72F6B917B3B001388027A7324A84146E5B7F_AdjustorThunk },
{ 0x06000150, Cinfo_set_supportsUniqueIds_mFF68A678A13F7C1BD9E157690649255A27369514_AdjustorThunk },
{ 0x06000151, Cinfo_get_capabilities_m09C807B048E192438A9B0D0C17808FF5BFF81A8A_AdjustorThunk },
{ 0x06000152, Cinfo_set_capabilities_mB2A17E458179A44C2EACB82699FBC5B5611C7580_AdjustorThunk },
{ 0x06000153, Cinfo_Equals_m560240A9ABB2B3E0C71D2EF694812209060F7781_AdjustorThunk },
{ 0x06000154, Cinfo_Equals_m1FFC7731C8021381A825E2D56189CDCD1BC39FD1_AdjustorThunk },
{ 0x06000155, Cinfo_GetHashCode_m93DAAACF242CBA5B8EE758CE4E04BCCF51639860_AdjustorThunk },
{ 0x06000157, XRPointCloud_get_trackableId_m45E06C0C6CD525985ED5FF3A0DC9D1F41A845889_AdjustorThunk },
{ 0x06000158, XRPointCloud_get_pose_m4291F970BA7E4F2DE67BB6666D365FF510B8AC39_AdjustorThunk },
{ 0x06000159, XRPointCloud_get_trackingState_mE90A4EE69C3F5EA084CB0BF1B3D128160C719242_AdjustorThunk },
{ 0x0600015A, XRPointCloud_GetHashCode_m27CF26ED9655FD5EF9E3F83986059017A37E6778_AdjustorThunk },
{ 0x0600015B, XRPointCloud_Equals_mFB272AE1F45D6A70C7E5C18D49E2ED7E2375AC0C_AdjustorThunk },
{ 0x0600015C, XRPointCloud_Equals_m7123CA7CBF03D2DDAEAFD63768A78A559B70D34A_AdjustorThunk },
{ 0x0600015E, XRPointCloudData_get_positions_mD0152EB78841C8D8CB83101868169887235C6BD3_AdjustorThunk },
{ 0x0600015F, XRPointCloudData_set_positions_m5B37C4E8FCCE5AF8E16D83D4BAE520F45971CCD7_AdjustorThunk },
{ 0x06000160, XRPointCloudData_get_confidenceValues_mA510FDF9A0F8B21FEA6905400EA6F3A709F8DD82_AdjustorThunk },
{ 0x06000161, XRPointCloudData_get_identifiers_mF1A688282A3DBD819C5F43EE4A1B44B6548787D3_AdjustorThunk },
{ 0x06000162, XRPointCloudData_set_identifiers_mBA475172386D8F500AE9F2D50D4B009FD8D26319_AdjustorThunk },
{ 0x06000163, XRPointCloudData_Dispose_m600FFE0CF6B2D3D7B31B7F51406C4818159C5120_AdjustorThunk },
{ 0x06000164, XRPointCloudData_GetHashCode_mC10886AFDA538D306F9E455166BB6D2F81071912_AdjustorThunk },
{ 0x06000165, XRPointCloudData_Equals_m5553859ECF1F500F0153472EA6D6E547D251936D_AdjustorThunk },
{ 0x06000166, XRPointCloudData_ToString_m9712C0206584CBD90DF2A44CE36DDC78141E607A_AdjustorThunk },
{ 0x06000167, XRPointCloudData_Equals_m6655FF22F1E7FE07B0A71ACE455A742E8DF7DAEA_AdjustorThunk },
{ 0x06000169, XREnvironmentProbe_get_trackableId_m3C275681C5223EDD967B1F37E2A0FAFF03A80066_AdjustorThunk },
{ 0x0600016A, XREnvironmentProbe_set_trackableId_m2FAAA910E6D06256C1ECCCCF8C6D3E72A056199D_AdjustorThunk },
{ 0x0600016B, XREnvironmentProbe_get_scale_m73AF4CF41515A2EDAD35FFBA598D23207F9D2BD3_AdjustorThunk },
{ 0x0600016C, XREnvironmentProbe_get_pose_m03ABF5D0F413C9892349CF3891D5214147DD4C09_AdjustorThunk },
{ 0x0600016D, XREnvironmentProbe_set_pose_mAC84C3A2D8788D587F0503EA1CE051294A8A87E9_AdjustorThunk },
{ 0x0600016E, XREnvironmentProbe_get_size_mC31926635D53201B3C0E7E76B3ADBE2883374135_AdjustorThunk },
{ 0x0600016F, XREnvironmentProbe_get_textureDescriptor_mDA5B2F0E63647BBC038FB4E476F609625109FA13_AdjustorThunk },
{ 0x06000170, XREnvironmentProbe_get_trackingState_m47E2E959CA905F4498489EEFF1C1DCEC4958582C_AdjustorThunk },
{ 0x06000171, XREnvironmentProbe_get_nativePtr_m00FA5612D1CB3AB7F8F11B1ECBD7AA139FEE60F4_AdjustorThunk },
{ 0x06000172, XREnvironmentProbe_Equals_mAB858DCB46B0A972BE91B46AE6BA4C2AB6B8479B_AdjustorThunk },
{ 0x06000173, XREnvironmentProbe_Equals_m940DA5EE99C70171A86520CA30C33C0E778A15E7_AdjustorThunk },
{ 0x06000174, XREnvironmentProbe_GetHashCode_mE6E401BB29C7F44E680E6561A8AB7CD92B3F2472_AdjustorThunk },
{ 0x06000175, XREnvironmentProbe_ToString_mBF2604257F8CA6CE56C5D389E8D08339725B8B93_AdjustorThunk },
{ 0x06000176, XREnvironmentProbe_ToString_m68F8E47BA9E4040BF7352D68F61FB17177000009_AdjustorThunk },
{ 0x0600018D, XREnvironmentProbeSubsystemCinfo_get_id_mBEA40C4012D8253E65C525083E3454C93BC6F3BE_AdjustorThunk },
{ 0x0600018E, XREnvironmentProbeSubsystemCinfo_set_id_m5C48BD3E879410D5C622BE7DC74D5C798E151731_AdjustorThunk },
{ 0x0600018F, XREnvironmentProbeSubsystemCinfo_get_providerType_m3A3572178EED86B4F98254B4FAB73016B4459AA1_AdjustorThunk },
{ 0x06000190, XREnvironmentProbeSubsystemCinfo_set_providerType_m70C42D1F210DE19AB5E7D82F2D0BDB467E94FC2F_AdjustorThunk },
{ 0x06000191, XREnvironmentProbeSubsystemCinfo_get_subsystemTypeOverride_m258F6355EE3F5ED52ADF4A79777AD092AD9B2F22_AdjustorThunk },
{ 0x06000192, XREnvironmentProbeSubsystemCinfo_set_subsystemTypeOverride_mB35BB7FC1C0C42E0A7773365C147F539E7AC27EE_AdjustorThunk },
{ 0x06000193, XREnvironmentProbeSubsystemCinfo_get_supportsManualPlacement_m194C593950367B1C7EFB50D6F00E5705597065BF_AdjustorThunk },
{ 0x06000194, XREnvironmentProbeSubsystemCinfo_set_supportsManualPlacement_m2D1156DE760E47CBDDC345AD5CAE5D23AC23E524_AdjustorThunk },
{ 0x06000195, XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfManual_m7B2DFDB097FAD2FC7FE6AE7F7A8172FA7B34D406_AdjustorThunk },
{ 0x06000196, XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfManual_m01CE117FEA37EE9BEF79903754E396C35B859419_AdjustorThunk },
{ 0x06000197, XREnvironmentProbeSubsystemCinfo_get_supportsAutomaticPlacement_m2EAA567973D53F9FFCF91AAD4233F91957281B11_AdjustorThunk },
{ 0x06000198, XREnvironmentProbeSubsystemCinfo_set_supportsAutomaticPlacement_mC4DBFBBD4DBB44D6B1154C4759A3175F9AC33D46_AdjustorThunk },
{ 0x06000199, XREnvironmentProbeSubsystemCinfo_get_supportsRemovalOfAutomatic_mFC9AA46EA023D8A0968ED80B1F88F10AA50F549F_AdjustorThunk },
{ 0x0600019A, XREnvironmentProbeSubsystemCinfo_set_supportsRemovalOfAutomatic_m6FCC1E3ACDC01E4447E385A1B89C96DEE16B7EF2_AdjustorThunk },
{ 0x0600019B, XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTexture_m3593704263A383A9EC79E765CCC01632707E4A48_AdjustorThunk },
{ 0x0600019C, XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTexture_mE30B73C6AC37C6DF8F5B7DBDBC90A975A498D3E4_AdjustorThunk },
{ 0x0600019D, XREnvironmentProbeSubsystemCinfo_get_supportsEnvironmentTextureHDR_mDD0F30AB731A6010F6F96DBA660415B55FCD580A_AdjustorThunk },
{ 0x0600019E, XREnvironmentProbeSubsystemCinfo_set_supportsEnvironmentTextureHDR_mA465A23A4DC052895F8F634892B7C8E3A49F4777_AdjustorThunk },
{ 0x0600019F, XREnvironmentProbeSubsystemCinfo_Equals_mECAF625FF6A6D6CB7652827D34BCF4228243102C_AdjustorThunk },
{ 0x060001A0, XREnvironmentProbeSubsystemCinfo_Equals_mE09A9486010D3E88E94AE06CF3BF499D3A2FC6EF_AdjustorThunk },
{ 0x060001A1, XREnvironmentProbeSubsystemCinfo_GetHashCode_mADDFE56D58883EC3832D901FF566989CB00B5D02_AdjustorThunk },
{ 0x060001B0, XRFace_get_trackableId_m997871151FF642B1908F7E352C952A44AB4DD17C_AdjustorThunk },
{ 0x060001B1, XRFace_get_pose_m482AC4907DC02C0B5D67B84320DA7F9D12A43A75_AdjustorThunk },
{ 0x060001B2, XRFace_get_trackingState_m8953B01AB6213402157B69083B318D3F2CDCF26A_AdjustorThunk },
{ 0x060001B3, XRFace_get_nativePtr_mCE6C767CB9DBBCDE7B289D8EBDE1DFC86707BC95_AdjustorThunk },
{ 0x060001B4, XRFace_get_leftEyePose_mEAF86B00D307A5D96D671A85EA1BBF88D82586BF_AdjustorThunk },
{ 0x060001B5, XRFace_get_rightEyePose_m3FA7FDE9C2D9841FB7496B691FCAB1F35475F2B1_AdjustorThunk },
{ 0x060001B6, XRFace_get_fixationPoint_mAEA40B8C8F2C0D0A3B777ACFDE327017C9DF294D_AdjustorThunk },
{ 0x060001B7, XRFace_Equals_mC8676C7F35F0FF582368E8114BDB981C83C82A88_AdjustorThunk },
{ 0x060001B8, XRFace_GetHashCode_mDFFE26F3662B1DF33124A0393FA9FDE444167CEC_AdjustorThunk },
{ 0x060001B9, XRFace_Equals_mF05C24C98D5E1ED344943307E03FE4776CCB4217_AdjustorThunk },
{ 0x060001BB, XRFaceMesh_Resize_m15BF7254A68B9910F518990A33CF037F310ED1E6_AdjustorThunk },
{ 0x060001BC, XRFaceMesh_get_vertices_m19DE0A4E73ED17C8B6427BE86071E10DB65740DD_AdjustorThunk },
{ 0x060001BD, XRFaceMesh_get_normals_m82DE916E7AE8A9BF4768D289E01CD0C65E1001ED_AdjustorThunk },
{ 0x060001BE, XRFaceMesh_get_indices_m93B77F79BB4C67AF1AFFAD29ED8D8F48AF4616FE_AdjustorThunk },
{ 0x060001BF, XRFaceMesh_get_uvs_m89943E9CD34232EF09B81F13EF259C33F1183B49_AdjustorThunk },
{ 0x060001C0, XRFaceMesh_Dispose_m84478F08EEB3D131E0E7785CF4195D424B94543E_AdjustorThunk },
{ 0x060001C1, XRFaceMesh_GetHashCode_mC53C827B010796E1A20690766F1A2A1F70DB614D_AdjustorThunk },
{ 0x060001C2, XRFaceMesh_Equals_mCAC3BFCE776A814088BA4D5361CB771BCC4BE87A_AdjustorThunk },
{ 0x060001C3, XRFaceMesh_ToString_m1997FC173A5BB7E5EFC51893E3BDD26D34F27897_AdjustorThunk },
{ 0x060001C4, XRFaceMesh_Equals_m2BB9E69AD22C8521466B981BA077007536189F0C_AdjustorThunk },
{ 0x060001D4, FaceSubsystemParams_get_id_mE2ED204CE1D85C4ADCFB4436EACF3BF8B6893DEB_AdjustorThunk },
{ 0x060001D5, FaceSubsystemParams_set_id_m89149E2175F86663FDFEB008B36BDAF40EA1585A_AdjustorThunk },
{ 0x060001D6, FaceSubsystemParams_get_providerType_m8984786E19DCC5F9B87060A9BC29F25A4A4A4B3A_AdjustorThunk },
{ 0x060001D7, FaceSubsystemParams_set_providerType_m5D660A72F34CA0D1C887F5BA68045B1D3973C7B3_AdjustorThunk },
{ 0x060001D8, FaceSubsystemParams_get_subsystemTypeOverride_m1B3FD6EA4014688FC34533C9729176AA668C8321_AdjustorThunk },
{ 0x060001D9, FaceSubsystemParams_set_subsystemTypeOverride_mAC64FBAE73E16ACDA48708A4FFB77626437F8306_AdjustorThunk },
{ 0x060001DA, FaceSubsystemParams_get_supportsFacePose_m59079DE37AD698A2132CFEA0EDA5FD4585FC6161_AdjustorThunk },
{ 0x060001DB, FaceSubsystemParams_set_supportsFacePose_mD799A27D00AC28F2E8228E7A3E38464B643BC99A_AdjustorThunk },
{ 0x060001DC, FaceSubsystemParams_get_supportsFaceMeshVerticesAndIndices_mCC93952A6D71E81739E596CEB86A242CD6C9A8AF_AdjustorThunk },
{ 0x060001DD, FaceSubsystemParams_set_supportsFaceMeshVerticesAndIndices_mD137C1594ADBC51EC3017FDFAE248043C4CCBC75_AdjustorThunk },
{ 0x060001DE, FaceSubsystemParams_get_supportsFaceMeshUVs_m86C9DD63849FC891FE62F75B87E7BA894B506BBC_AdjustorThunk },
{ 0x060001DF, FaceSubsystemParams_set_supportsFaceMeshUVs_m9FFBE6EF8118BB7F4A0BA3B50249DA55ED52B39E_AdjustorThunk },
{ 0x060001E0, FaceSubsystemParams_get_supportsFaceMeshNormals_mB5897C36478E2B76A4491DA2C70C89B54AAB92DC_AdjustorThunk },
{ 0x060001E1, FaceSubsystemParams_get_supportsEyeTracking_mC02E124E7C88BBE8BE1D6ABBBFD3C2C68DF2109F_AdjustorThunk },
{ 0x060001E2, FaceSubsystemParams_set_supportsEyeTracking_m52CC3ABEBE97C53ECBB91C0E4A86F388176C3645_AdjustorThunk },
{ 0x060001E3, FaceSubsystemParams_Equals_mAC3B0F001EB7DC4968B350FCE682D21D3C10A4DC_AdjustorThunk },
{ 0x060001E4, FaceSubsystemParams_Equals_mFD36A65AEE79AE0A2C08525BB4AE5B99801CEE2A_AdjustorThunk },
{ 0x060001E5, FaceSubsystemParams_GetHashCode_m83F03C046AA998C73A317CAFBA4C97E2BA468786_AdjustorThunk },
{ 0x060001F1, XRHumanBody_get_trackableId_m1132E7F157E2F1649C9849D0CCCFCCAE12659035_AdjustorThunk },
{ 0x060001F2, XRHumanBody_set_trackableId_mD3C8385C017B211CB843FBE09F865FCFF6736AD5_AdjustorThunk },
{ 0x060001F3, XRHumanBody_get_pose_m5F377842C281F643E6205DF173FAD26A71FD85CB_AdjustorThunk },
{ 0x060001F4, XRHumanBody_set_pose_m041B85CE78A0EEF68E9D04C79D5E896481521F13_AdjustorThunk },
{ 0x060001F5, XRHumanBody_get_estimatedHeightScaleFactor_mCCF772B1264F243207D413D87F9DEB51BAA66625_AdjustorThunk },
{ 0x060001F6, XRHumanBody_set_estimatedHeightScaleFactor_m08C6119D250F4EC14458EF86245F41DE6480928B_AdjustorThunk },
{ 0x060001F7, XRHumanBody_get_trackingState_m1F6F709DD208442C6E3B253BF1E6F5448B0D7913_AdjustorThunk },
{ 0x060001F9, XRHumanBody_Equals_mF1FC1064B3CE595A1D798D2BC6A0A4441E06FEA0_AdjustorThunk },
{ 0x060001FA, XRHumanBody_Equals_mEF4C0F409A971526C9B7E8098F41FCF1B53B7F41_AdjustorThunk },
{ 0x060001FB, XRHumanBody_GetHashCode_m6FBB44640B5771F3C0F07996B0391578ADA3ED29_AdjustorThunk },
{ 0x060001FD, XRHumanBodyJoint_get_tracked_mFE794D3F10CC9FE8B3BBA7EA3DAA2EAD43265030_AdjustorThunk },
{ 0x060001FE, XRHumanBodyJoint_Equals_mF61C132B282799A4A8591EEDFD1C93A5ACB5D690_AdjustorThunk },
{ 0x060001FF, XRHumanBodyJoint_Equals_m4FC5F349868C29B492300324ECEA4327199724B5_AdjustorThunk },
{ 0x06000200, XRHumanBodyJoint_GetHashCode_mB2B4313B997EB976CF9A0621A8B0B41988F41FEC_AdjustorThunk },
{ 0x06000201, XRHumanBodyJoint_ToString_m4A5CA8FD181EF51596129156F8B5D1714B23A0B8_AdjustorThunk },
{ 0x06000202, XRHumanBodyJoint_ToString_m9615CDC8865E5F53A0C1EFC11ED448D8E10517BA_AdjustorThunk },
{ 0x06000203, XRHumanBodyPose2DJoint_get_tracked_m2482827731EF34E90A03BE36B02CD58DC4ED27BA_AdjustorThunk },
{ 0x06000204, XRHumanBodyPose2DJoint_Equals_m13D561FB80FAB3235153ECAA81CDF0A1AB61EBE0_AdjustorThunk },
{ 0x06000205, XRHumanBodyPose2DJoint_Equals_mFD1372A220FB78E1834F741C3C866AA7068614FA_AdjustorThunk },
{ 0x06000206, XRHumanBodyPose2DJoint_GetHashCode_mA55B9AAABC7536E6C93C93F59F4DB417E95F721A_AdjustorThunk },
{ 0x06000207, XRHumanBodyPose2DJoint_ToString_m0776D12ECE559F6F987CB879DC6578E4B69630F8_AdjustorThunk },
{ 0x06000208, XRHumanBodyPose2DJoint_ToString_m0AE3FBFE9BF812C8589AE2F567A79D756700256E_AdjustorThunk },
{ 0x06000224, XRHumanBodySubsystemCinfo_get_id_m6ECD1B43CC3A0BF83286383CA417ECAFB750CB74_AdjustorThunk },
{ 0x06000225, XRHumanBodySubsystemCinfo_set_id_m379B96A2CE563FFD6CAC41112068975C8875B3A7_AdjustorThunk },
{ 0x06000226, XRHumanBodySubsystemCinfo_get_providerType_m9FEA7CEFDEEACC1D13C859C31A2325E50A6132DD_AdjustorThunk },
{ 0x06000227, XRHumanBodySubsystemCinfo_set_providerType_mA34C98EF6EDDFADFF83C4062C0AF33F3C7BA61A5_AdjustorThunk },
{ 0x06000228, XRHumanBodySubsystemCinfo_get_subsystemTypeOverride_mB03C7A5BC048D86AAE6334A221E1DF2FEE059754_AdjustorThunk },
{ 0x06000229, XRHumanBodySubsystemCinfo_set_subsystemTypeOverride_m73A633BECC2393CEB62B95FCF9CD7B32BFDB19FF_AdjustorThunk },
{ 0x0600022A, XRHumanBodySubsystemCinfo_get_supportsHumanBody2D_m26CC2FAAFF325E448010E9DFFDC2CF78C5118E71_AdjustorThunk },
{ 0x0600022B, XRHumanBodySubsystemCinfo_set_supportsHumanBody2D_m33B2A01C8E5F61DFE604BDCD2D438EC0B3C45551_AdjustorThunk },
{ 0x0600022C, XRHumanBodySubsystemCinfo_get_supportsHumanBody3D_m43BFDC9F4E92ECDE599A826C24D951AF90D76331_AdjustorThunk },
{ 0x0600022D, XRHumanBodySubsystemCinfo_set_supportsHumanBody3D_mE30720F10B501314868ABDBE2EDCE11D0A333D24_AdjustorThunk },
{ 0x0600022E, XRHumanBodySubsystemCinfo_get_supportsHumanBody3DScaleEstimation_mDC1321982924ADE85F14D4AA959D2B593D378380_AdjustorThunk },
{ 0x0600022F, XRHumanBodySubsystemCinfo_set_supportsHumanBody3DScaleEstimation_m72411E882EB28AB5BD33F4D266918FA3DB355782_AdjustorThunk },
{ 0x06000230, XRHumanBodySubsystemCinfo_Equals_m0109935097AF2BEE70F4AABB3B8701C50D300F2A_AdjustorThunk },
{ 0x06000231, XRHumanBodySubsystemCinfo_Equals_mC6D157C1801D45FFAA926C64D9C7AFFE6EDAC698_AdjustorThunk },
{ 0x06000232, XRHumanBodySubsystemCinfo_GetHashCode_m24E654BBE6D31E8A07F1B139BDEFF49BF4D77BAF_AdjustorThunk },
{ 0x06000238, AddReferenceImageJobState__ctor_mAFC8E35811BAF9292B00B7D06EF4C6895AFDD74C_AdjustorThunk },
{ 0x06000239, AddReferenceImageJobState_get_jobHandle_mD67B6C7B795C0EAAF2B27C2C23A0CDF0597DDD41_AdjustorThunk },
{ 0x0600023A, AddReferenceImageJobState_AsIntPtr_m3918B9BEE2FA6B991CFA1BE13F1B211656B8A78B_AdjustorThunk },
{ 0x0600023C, AddReferenceImageJobState_get_status_mEB3B5CAB4B567D06A94B438A171D4F21F335D850_AdjustorThunk },
{ 0x0600023D, AddReferenceImageJobState_ToString_mF0C9F0307F13953D372C0BA03F3DFFAC3DE6E912_AdjustorThunk },
{ 0x0600023E, AddReferenceImageJobState_GetHashCode_m7A9EFB3628AFD98DE738E0766DD6267C90303E47_AdjustorThunk },
{ 0x0600023F, AddReferenceImageJobState_Equals_m2B2E0068F7BDF4DB619306E672D9B4FDF1AAD495_AdjustorThunk },
{ 0x06000240, AddReferenceImageJobState_Equals_mDF37DF091DA56B8CFD7EF4AE078984D7A4072AB5_AdjustorThunk },
{ 0x0600024E, Enumerator__ctor_m614C5DEAACB06ED98FFE5BBE716D9F16124A4F81_AdjustorThunk },
{ 0x0600024F, Enumerator_MoveNext_m2B35A4EE1CF9A5E1EA6B97AEDFAED2CC7F99D3C5_AdjustorThunk },
{ 0x06000250, Enumerator_get_Current_m5C9F6233409C9A2321C6CB831457C55C4FCB4570_AdjustorThunk },
{ 0x06000251, Enumerator_GetHashCode_mB41365E33A4AC2A52659D36571BBCE9BC93C2546_AdjustorThunk },
{ 0x06000252, Enumerator_Equals_m5A39AA8617AA067134152ED2D95037C914B42AF4_AdjustorThunk },
{ 0x06000253, Enumerator_Equals_mCBAAE58B6FD7DBD90F3C98F10F06C777E5781A98_AdjustorThunk },
{ 0x0600026C, Cinfo_get_id_m7ACB39F94D161A19473B51245A60F0FE3380E9C6_AdjustorThunk },
{ 0x0600026D, Cinfo_set_id_m57970CF355AB638BAD860B9673F0E76B42126C1A_AdjustorThunk },
{ 0x0600026E, Cinfo_get_providerType_m865B26BBCBE9E542D09269A2CA6BD1FC47976AF2_AdjustorThunk },
{ 0x0600026F, Cinfo_set_providerType_mCACA6EC48AB4B305E1515A312B32DC196AD9B92C_AdjustorThunk },
{ 0x06000270, Cinfo_get_subsystemTypeOverride_m0008239CE298C4881102FED287EC52224601A3A5_AdjustorThunk },
{ 0x06000271, Cinfo_set_subsystemTypeOverride_m167DE9461D1FE4E4D8AB0EE25A7A4B0A947151D8_AdjustorThunk },
{ 0x06000272, Cinfo_get_supportsMovingImages_m7B1E2171F1304A73339266B64548CF305EFEEA91_AdjustorThunk },
{ 0x06000273, Cinfo_set_supportsMovingImages_m04BB57385FC0A2025414437DB1BEFBE97372E579_AdjustorThunk },
{ 0x06000274, Cinfo_get_requiresPhysicalImageDimensions_mEED8602BF9D390F19582D3F706A9C93333AFB0C7_AdjustorThunk },
{ 0x06000275, Cinfo_set_requiresPhysicalImageDimensions_mC794914720C62ACB74173F165B3015ED9B5CA2A6_AdjustorThunk },
{ 0x06000276, Cinfo_get_supportsMutableLibrary_mCD0988DBB5810975CB97BEDD9B2E6B6C168D6E19_AdjustorThunk },
{ 0x06000277, Cinfo_set_supportsMutableLibrary_m434D9A05D0025989AA711BA50139FD348D127661_AdjustorThunk },
{ 0x06000278, Cinfo_get_supportsImageValidation_m417DC16FCA795DB24C8CAA2C81A5E84855D077BD_AdjustorThunk },
{ 0x06000279, Cinfo_set_supportsImageValidation_m9CA1173736665E4DC3B594EE3357416A8A20B266_AdjustorThunk },
{ 0x0600027A, Cinfo_GetHashCode_m8DB95DB86F786705B32382E014B3A5B96F81F4B0_AdjustorThunk },
{ 0x0600027B, Cinfo_Equals_m2D882FB6E58A034244EC05B2701C303C0763C3C1_AdjustorThunk },
{ 0x0600027C, Cinfo_Equals_m7D227238D404DAA7ED5C72A9C3843FE6CB852ED4_AdjustorThunk },
{ 0x0600027D, XRReferenceImage__ctor_m6D6343387F201C296D5D28E2A90D4BB1E83CDBDF_AdjustorThunk },
{ 0x0600027E, XRReferenceImage_get_guid_m1C4FCDF5CE4DB41074E50AB2B3D8B4A20CE290BE_AdjustorThunk },
{ 0x0600027F, XRReferenceImage_get_textureGuid_mDABB849D0FAF44F4FD86B6D794706DC6667A732F_AdjustorThunk },
{ 0x06000280, XRReferenceImage_get_specifySize_mAC02B5D0DBF9D66C2668206B7603C58149EE7D8B_AdjustorThunk },
{ 0x06000281, XRReferenceImage_get_size_m135B7EF1ED61FE27A8793503E8FC84543642C166_AdjustorThunk },
{ 0x06000282, XRReferenceImage_get_name_mE8F3368C2587552333AB78EA72A02E5B73E355C7_AdjustorThunk },
{ 0x06000283, XRReferenceImage_get_texture_mA66A0D26E463C232CA008D5F44A23F9D0AA838B1_AdjustorThunk },
{ 0x06000284, XRReferenceImage_ToString_mF01AB8377D55DC49917B09F0C12A6B02BD5BEE78_AdjustorThunk },
{ 0x06000285, XRReferenceImage_GetHashCode_m04CE90A2F730C6030216560645C2FD3A81C42985_AdjustorThunk },
{ 0x06000286, XRReferenceImage_Equals_m85D0F3511051929A1F06F75CE015DA98934BC211_AdjustorThunk },
{ 0x06000287, XRReferenceImage_Equals_m8F01D42083D0F6155DEDA29D457A0EDA600629AB_AdjustorThunk },
{ 0x0600028F, XRTrackedImage_get_trackableId_m908642D8D46876C10767B693C55A4076AA0230D6_AdjustorThunk },
{ 0x06000290, XRTrackedImage_get_sourceImageId_m7840008F6FBB7242723DBA7ADB29411BF199B063_AdjustorThunk },
{ 0x06000291, XRTrackedImage_get_pose_m2DA4B57E9B5317F353B2766538088CFF8991DAB1_AdjustorThunk },
{ 0x06000292, XRTrackedImage_get_size_mBDB5B8715E7C74B9459198230517668BD215E75F_AdjustorThunk },
{ 0x06000293, XRTrackedImage_get_trackingState_m7ADAE68E0B5A3D253B1E086276EE5BC5D9768E71_AdjustorThunk },
{ 0x06000294, XRTrackedImage_get_nativePtr_mF92D042188F2FF5DADA33AB61235DC6CD874B202_AdjustorThunk },
{ 0x06000295, XRTrackedImage_GetHashCode_m312EB4C09316425C0F30B8988A915F647035846B_AdjustorThunk },
{ 0x06000296, XRTrackedImage_Equals_mFE06306D9BB3EBD3C7CCDD555A2F193ED4FE7D65_AdjustorThunk },
{ 0x06000297, XRTrackedImage_Equals_m953C1CFB9A3879975873D13E24071F51C772635A_AdjustorThunk },
{ 0x060002A7, Capabilities_Equals_m921C39E9F8B9A589D30635AF4D55428F9A48E9F7_AdjustorThunk },
{ 0x060002A8, Capabilities_Equals_mBC54D72E0218CDA4D42F66F1B93C98E3FCC6F509_AdjustorThunk },
{ 0x060002A9, Capabilities_GetHashCode_m2CC9C750B6796CBBC10A34C6E42040FCF9626FBF_AdjustorThunk },
{ 0x060002AA, XRReferenceObject_get_guid_m5D1CC7D28AEF760CC4C8E7AEAE550549C879E204_AdjustorThunk },
{ 0x060002AB, XRReferenceObject_Equals_mE5200369D784FC38ACF7C16EAAC303D845B5F1B4_AdjustorThunk },
{ 0x060002AC, XRReferenceObject_GetHashCode_m088BCD3E046B562DDD8CBFB25AEBF9C5747E2A7C_AdjustorThunk },
{ 0x060002AD, XRReferenceObject_Equals_m63933178BE0E783B54B6A983BD3B5ADDF0817ADA_AdjustorThunk },
{ 0x060002B6, XRTrackedObject_get_trackableId_mB62A1367121F404E7E641459F7A2DE4A35801E72_AdjustorThunk },
{ 0x060002B7, XRTrackedObject_get_pose_mCF3749FD97A427BF58737E1F72C958B688BF4B14_AdjustorThunk },
{ 0x060002B8, XRTrackedObject_get_trackingState_m33C9F81469B2E6174337D76F6109B79B03975349_AdjustorThunk },
{ 0x060002B9, XRTrackedObject_get_nativePtr_m13B4B110BB339AF7AF03B1219247112B4ABB38D8_AdjustorThunk },
{ 0x060002BA, XRTrackedObject_get_referenceObjectGuid_m277B42932D6C8D42820F47A888407FBE9B0A7436_AdjustorThunk },
{ 0x060002BB, XRTrackedObject_Equals_m20B63BFBF61F3D819390A5A574B9916CCE0A7F8B_AdjustorThunk },
{ 0x060002BC, XRTrackedObject_GetHashCode_m0456DF4A009ED3B00F2036F603881D9DB74EDAF9_AdjustorThunk },
{ 0x060002BD, XRTrackedObject_Equals_mAA87562E27ABE20500A8537F56A551B584A551C5_AdjustorThunk },
{ 0x060002F5, XROcclusionSubsystemCinfo_get_id_m52AA71D202632FA1607B0FEF64946642B6C3608C_AdjustorThunk },
{ 0x060002F6, XROcclusionSubsystemCinfo_set_id_m19076B4B5E6D6AA32BE751C1F2611CB7C3C152A0_AdjustorThunk },
{ 0x060002F7, XROcclusionSubsystemCinfo_get_providerType_m8D7C8F76AE3FAEEC4952D6FF75134CE4DADFFA22_AdjustorThunk },
{ 0x060002F8, XROcclusionSubsystemCinfo_set_providerType_mA9E2685FC29652BBF41CD7398D8A434B72B68556_AdjustorThunk },
{ 0x060002F9, XROcclusionSubsystemCinfo_get_subsystemTypeOverride_m60945479B5A62376EEA5633F4FF21D4BD137C125_AdjustorThunk },
{ 0x060002FA, XROcclusionSubsystemCinfo_set_subsystemTypeOverride_mC5D9DB3F2CDC007F826FC2AB790F1622DFBA0F63_AdjustorThunk },
{ 0x060002FB, XROcclusionSubsystemCinfo_get_supportsHumanSegmentationStencilImage_m3F2F9B49E2326FE8A773C655848F6497A5F8A797_AdjustorThunk },
{ 0x060002FC, XROcclusionSubsystemCinfo_set_supportsHumanSegmentationStencilImage_mEC6C58C95DF515008316ED9A33A37ABBFBFD88BD_AdjustorThunk },
{ 0x060002FD, XROcclusionSubsystemCinfo_get_supportsHumanSegmentationDepthImage_mBFFC1F3611B38652EEFD21E2D7433B71F36A172D_AdjustorThunk },
{ 0x060002FE, XROcclusionSubsystemCinfo_set_supportsHumanSegmentationDepthImage_mF08FD3863AEB93D47CCF50BD197780D2AB6F0705_AdjustorThunk },
{ 0x060002FF, XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthImage_m7E021A482EB4D3F52CA43ABEF71FD654304330AC_AdjustorThunk },
{ 0x06000300, XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthImage_m51449A6122E2D967180669F6C0425F5D1E038F7E_AdjustorThunk },
{ 0x06000301, XROcclusionSubsystemCinfo_get_queryForSupportsEnvironmentDepthConfidenceImage_m3A9518505C78739C2476A7E64F6942D83C582DD5_AdjustorThunk },
{ 0x06000302, XROcclusionSubsystemCinfo_set_queryForSupportsEnvironmentDepthConfidenceImage_m24C48D100ECEEC534C92273C21C18FBCCD98C740_AdjustorThunk },
{ 0x06000303, XROcclusionSubsystemCinfo_Equals_mBF75B2160741AC5D0F43480949D690FE94ECCE18_AdjustorThunk },
{ 0x06000304, XROcclusionSubsystemCinfo_Equals_m046DEDAFD67F305D51E59636AF310702B5152EEB_AdjustorThunk },
{ 0x06000305, XROcclusionSubsystemCinfo_GetHashCode_m8A26E07DD1C840DFEC9373E26990B3DA40F1D8A1_AdjustorThunk },
{ 0x0600030F, XRParticipant_get_trackableId_mFE20FF09B28F44F916FD7175C9D1B50658DB8D13_AdjustorThunk },
{ 0x06000310, XRParticipant_get_pose_m8BC5243C4975CE29D2E98B803908FE7B0B2A1D1B_AdjustorThunk },
{ 0x06000311, XRParticipant_get_trackingState_m0510505F8AE642CCCEBD2D784CB898CEDD59A08F_AdjustorThunk },
{ 0x06000312, XRParticipant_get_nativePtr_mF4BBE0CC8C5CFA70984EAAD24CFF13E9BCFE0FE4_AdjustorThunk },
{ 0x06000313, XRParticipant_get_sessionId_m25D8BC6B31A8216FF6959B2C4792CCC7040A2300_AdjustorThunk },
{ 0x06000314, XRParticipant_GetHashCode_mF04382E10454D77B4F1AA3AF615488B98D9D62EC_AdjustorThunk },
{ 0x06000315, XRParticipant_Equals_mE1679D0AAFE2566EA4CE5AF7992F1ADD3D2AFEDA_AdjustorThunk },
{ 0x06000316, XRParticipant_Equals_mBA488A840ABD4DBB6432E2D03126062EC1A6768C_AdjustorThunk },
{ 0x06000320, BoundedPlane__ctor_mDCFBC1B53B86B650BBB103C9FC25E7872CBF804B_AdjustorThunk },
{ 0x06000321, BoundedPlane_get_trackableId_m32943441D74DC226DC907A05B5B6C6EBBC70F95B_AdjustorThunk },
{ 0x06000322, BoundedPlane_get_subsumedById_mD61EFD7A91B5F290F63A1AE59153B75BB33B89CF_AdjustorThunk },
{ 0x06000323, BoundedPlane_get_pose_m8302E13809156362584FA0AE137DD911D30665BA_AdjustorThunk },
{ 0x06000324, BoundedPlane_get_center_mA4667303D86B331F7EC5F278910145E7633EA973_AdjustorThunk },
{ 0x06000325, BoundedPlane_get_extents_mEED7F74BBACA8EA90D43ED12EC9D10C9059118CD_AdjustorThunk },
{ 0x06000326, BoundedPlane_get_size_m204F4F37C0FB6F7294682D961B53F4F9639E3882_AdjustorThunk },
{ 0x06000327, BoundedPlane_get_alignment_m72B849B54224B1493DFF448BCF2AB8634751DC71_AdjustorThunk },
{ 0x06000328, BoundedPlane_get_trackingState_mBF10ADD6DD969A0DA7FCC8299FFA56AEB9B837CA_AdjustorThunk },
{ 0x06000329, BoundedPlane_get_nativePtr_m626921F0179BF37BC5F06C2587D298FB40F31FE9_AdjustorThunk },
{ 0x0600032A, BoundedPlane_get_classification_m842651162BFE9633C414B16CD1D86FBBE86589A3_AdjustorThunk },
{ 0x0600032B, BoundedPlane_ToString_m0A542F5D2CB72755643184989BE3B9E6899D731A_AdjustorThunk },
{ 0x0600032C, BoundedPlane_Equals_m5B2E8A0932BC0242B51091CDDFED85901156A005_AdjustorThunk },
{ 0x0600032D, BoundedPlane_GetHashCode_m99D4D46A432C2E00A182A86788A750522BFBCAEF_AdjustorThunk },
{ 0x0600032E, BoundedPlane_Equals_m3A984C969EC0ACE7B83F661C80AA82C54D455D1A_AdjustorThunk },
{ 0x06000345, Cinfo_get_id_m62022D2EE6912F0B1BDBCA687A4FC63321DE3F86_AdjustorThunk },
{ 0x06000346, Cinfo_set_id_m940361693A3C925B2180733D87611B5FDF0357D7_AdjustorThunk },
{ 0x06000347, Cinfo_get_providerType_m496CFFD5CAAF878266582DECEC5CDFB92A9C0A55_AdjustorThunk },
{ 0x06000348, Cinfo_set_providerType_m8B6A7EE025CCB9B5B5E26E6F4C779DFE09955744_AdjustorThunk },
{ 0x06000349, Cinfo_get_subsystemTypeOverride_m67ACD12818B5C91D42707639EA205E13BB15171A_AdjustorThunk },
{ 0x0600034A, Cinfo_set_subsystemTypeOverride_mBC4F1CC20B4DF3D551BAFC1C38245F457E262A58_AdjustorThunk },
{ 0x0600034B, Cinfo_get_supportsHorizontalPlaneDetection_mBC3012C667106D47D9429F9C8001774038A38216_AdjustorThunk },
{ 0x0600034C, Cinfo_set_supportsHorizontalPlaneDetection_mBC9B4572592B71328A96AF58DEB047528470C440_AdjustorThunk },
{ 0x0600034D, Cinfo_get_supportsVerticalPlaneDetection_m4E3BE200E11784D049B94A054F15E4C76D29D7C6_AdjustorThunk },
{ 0x0600034E, Cinfo_set_supportsVerticalPlaneDetection_mFF310EF7B9F8D9C9F9689CF9D1D2BEDDFF93F9F0_AdjustorThunk },
{ 0x0600034F, Cinfo_get_supportsArbitraryPlaneDetection_mF6CB379C9781FE8B8473949DA99196508EF91DB5_AdjustorThunk },
{ 0x06000350, Cinfo_set_supportsArbitraryPlaneDetection_m70B1D6D27946FB12BF0D3D3AF8C6DC8DC3F399B9_AdjustorThunk },
{ 0x06000351, Cinfo_get_supportsBoundaryVertices_m5BA762B342FCF81EAE6E3645D3BAF04C1E8EAAD9_AdjustorThunk },
{ 0x06000352, Cinfo_set_supportsBoundaryVertices_mC6F86EB28D38CC483AD8F9FD161013BDE3F4AFEF_AdjustorThunk },
{ 0x06000353, Cinfo_get_supportsClassification_m0396A2A62F840D9E283402BFB3681A5CC19C810E_AdjustorThunk },
{ 0x06000354, Cinfo_set_supportsClassification_mA3B11D7CA4F960C89E729E5161AD7CC3211B933C_AdjustorThunk },
{ 0x06000355, Cinfo_Equals_m997D9E2FAF1A57953B2A2C95A4221C9EB82843BC_AdjustorThunk },
{ 0x06000356, Cinfo_Equals_m38EB24520E9273465E918F9F14D72FCE8EE4EB8B_AdjustorThunk },
{ 0x06000357, Cinfo_GetHashCode_m219A4B64FB8A60D947BA345FBD65292065581378_AdjustorThunk },
{ 0x06000362, XRRaycast_get_trackableId_m58733DD621FACDF9F32633AA0247FDDE4B6F4EBE_AdjustorThunk },
{ 0x06000363, XRRaycast_get_pose_m62D623D6E37AE82B0E223804F034E604037E24E1_AdjustorThunk },
{ 0x06000364, XRRaycast_get_trackingState_m8A926660A7D03F72E558198E760AE01936FB8DF0_AdjustorThunk },
{ 0x06000365, XRRaycast_get_nativePtr_m079CE750F279F664A8D524ACA2D070056143389D_AdjustorThunk },
{ 0x06000366, XRRaycast_get_distance_m4D3B928473544B72D50CF70503B18DBC75951263_AdjustorThunk },
{ 0x06000367, XRRaycast_get_hitTrackableId_mA4EE855CDEE8AC2D109FDE58A7EF4AED262CBFFE_AdjustorThunk },
{ 0x06000368, XRRaycast__ctor_mCB8C71860ADB4EEEAECBB9D2FD6373FA7EE13A48_AdjustorThunk },
{ 0x06000369, XRRaycast_GetHashCode_m68040849E5282B2DAEE10DEC5F13B22E69A9EA36_AdjustorThunk },
{ 0x0600036A, XRRaycast_Equals_m808F58AFF56D3598C410DBB759CD48CBEBFBE553_AdjustorThunk },
{ 0x0600036B, XRRaycast_Equals_m155EE0BDA8E10977C499A22B2EE32D252A960535_AdjustorThunk },
{ 0x0600036E, XRRaycastHit_get_trackableId_m39A90CBBE6D03C7C726715BEE8404A5411ACECBA_AdjustorThunk },
{ 0x0600036F, XRRaycastHit_get_pose_m7374236222252D08D08C85145B88AF698FAA77F4_AdjustorThunk },
{ 0x06000370, XRRaycastHit_get_distance_m51570C654B1EED732C9EE7C73D51B13B9CF8262B_AdjustorThunk },
{ 0x06000371, XRRaycastHit_get_hitType_m14A0398215ED8B10A1E505427C7584100189C222_AdjustorThunk },
{ 0x06000372, XRRaycastHit__ctor_mF47DE3277FA881FCB8E74A5ADEC8E9624F00900F_AdjustorThunk },
{ 0x06000373, XRRaycastHit_GetHashCode_m3BA94B911CC05BEC9FB3D5BB2D37142929AF3F33_AdjustorThunk },
{ 0x06000374, XRRaycastHit_Equals_m227F3BD461F3EDA16E3AAF42E40B32607C58F8BB_AdjustorThunk },
{ 0x06000375, XRRaycastHit_Equals_m84983BF79308ADA4ED84E210840E2F950B549FA0_AdjustorThunk },
{ 0x06000390, Cinfo_get_id_m9A34BB7AAEFCB43E1627AA047A68C058D730EDC4_AdjustorThunk },
{ 0x06000391, Cinfo_set_id_m0CB4DA3E552ED7940FBA88D8EE3BB6379EA255D6_AdjustorThunk },
{ 0x06000392, Cinfo_get_providerType_m6AFB0E29047AF8A34F780EBACFC0CDDA44AAF50C_AdjustorThunk },
{ 0x06000393, Cinfo_set_providerType_m20992869A706183D7180A2030C84B5445DCF0BE3_AdjustorThunk },
{ 0x06000394, Cinfo_get_subsystemTypeOverride_mCFC851E4227172E1E01130E60CC64F4B2FFC8C63_AdjustorThunk },
{ 0x06000395, Cinfo_set_subsystemTypeOverride_mD5425E55455A21B7361B847FD6B78998AC70CD5B_AdjustorThunk },
{ 0x06000396, Cinfo_get_supportsViewportBasedRaycast_m76E31D4FF84E88050FE4E8B6C44FB6E4E71A5A3A_AdjustorThunk },
{ 0x06000397, Cinfo_set_supportsViewportBasedRaycast_mCF77DEFDDC3931682A33A063DF2F25FFBF07B807_AdjustorThunk },
{ 0x06000398, Cinfo_get_supportsWorldBasedRaycast_m5242363FA90D64968F4ED236EC35973B7ABC180A_AdjustorThunk },
{ 0x06000399, Cinfo_set_supportsWorldBasedRaycast_m74BF70E612BCAFAD380C108700905E5B8C5425FA_AdjustorThunk },
{ 0x0600039A, Cinfo_get_supportedTrackableTypes_m0DA573866D46012B650151C7538796542A3E2C70_AdjustorThunk },
{ 0x0600039B, Cinfo_set_supportedTrackableTypes_mABC320F641164FC1DB2AB9DB3F1E075B6235A785_AdjustorThunk },
{ 0x0600039C, Cinfo_get_supportsTrackedRaycasts_mB923DE37AE981FB26768CFF11B34A63F481A261A_AdjustorThunk },
{ 0x0600039D, Cinfo_set_supportsTrackedRaycasts_mD7575B5CAA4BB3652786E2AE2C1B94CF8BEB423C_AdjustorThunk },
{ 0x0600039E, Cinfo_GetHashCode_mE07F77F64788F12838A7D8A20E07DE366DDAEEEA_AdjustorThunk },
{ 0x0600039F, Cinfo_Equals_mFDD42918C99F796C9737C544D9858098C0241716_AdjustorThunk },
{ 0x060003A0, Cinfo_ToString_m5E549199F8D40CF630BB8ED6B46EC5F51E580BEB_AdjustorThunk },
{ 0x060003A1, Cinfo_Equals_m96B4DD943D8AAA5D31B0B5BCD0EEC1F94E60F146_AdjustorThunk },
{ 0x060003A2, ScopedProfiler__ctor_m3426FC301C7541283DA4382EFAFDBDFD08358DAD_AdjustorThunk },
{ 0x060003A3, ScopedProfiler_Dispose_mB6720C4212A51CBC86104AF46E081B1CB410BC1A_AdjustorThunk },
{ 0x060003A4, SerializableGuid__ctor_m0A96C8F8254451C083274363A1C68E5FB5CDF107_AdjustorThunk },
{ 0x060003A6, SerializableGuid_get_guid_m54618233E4BD08410123A50B4E8DAC66FCE46032_AdjustorThunk },
{ 0x060003A7, SerializableGuid_GetHashCode_m200045FC79E206A9FD4B9A1578A3C66CCBF41481_AdjustorThunk },
{ 0x060003A8, SerializableGuid_Equals_m20C468F42E878759B4DB1703B99E3EF7FA0DE550_AdjustorThunk },
{ 0x060003A9, SerializableGuid_ToString_m593CC03163539B5043119F380A189EDCBF100D32_AdjustorThunk },
{ 0x060003AA, SerializableGuid_Equals_m1ADEE5CED29ED1D62E794F2CECCDEADF416878A6_AdjustorThunk },
{ 0x060003E3, Cinfo_get_supportsInstall_m706A828C9AE61FF74DF4640D80E52148CDF4F3AD_AdjustorThunk },
{ 0x060003E4, Cinfo_set_supportsInstall_m05EE61C58E505A8F20DEA68862395341F1DAD3FD_AdjustorThunk },
{ 0x060003E5, Cinfo_get_supportsMatchFrameRate_m1E603F47BF0A28EE5E7377A28D9D2BB29BFD3B6F_AdjustorThunk },
{ 0x060003E6, Cinfo_set_supportsMatchFrameRate_m9CB328CEF43BCE3E59F26A97D32AEE1D201F8787_AdjustorThunk },
{ 0x060003E7, Cinfo_get_id_mA521F604882D1F4C6FD30262F3E2C3B0609BFC55_AdjustorThunk },
{ 0x060003E8, Cinfo_set_id_m6A2CAB13FAD54AB05458DC5DE1FAB5C651E9D656_AdjustorThunk },
{ 0x060003E9, Cinfo_get_providerType_mC64DDA0FD5E23FD53F7B9DAEAF4433487436835E_AdjustorThunk },
{ 0x060003EA, Cinfo_set_providerType_m2BCF5FEFC25D812C3E7F00725B49AE02540B2F8E_AdjustorThunk },
{ 0x060003EB, Cinfo_get_subsystemTypeOverride_mFB0EAD46EF91216924D0509C72DF82ADA526B99D_AdjustorThunk },
{ 0x060003EC, Cinfo_set_subsystemTypeOverride_m30FDD93193E0D694ABB33E184552AAF1A8AA36E6_AdjustorThunk },
{ 0x060003ED, Cinfo_GetHashCode_m52D192E832A52B87FB2F03DB84EB47EED7DCD48C_AdjustorThunk },
{ 0x060003EE, Cinfo_Equals_m1C37149A7375CC94768E18102A1CB1AED3E3FF77_AdjustorThunk },
{ 0x060003EF, Cinfo_Equals_m515E1A8509A7C1472469FD535B7CBE5D58E45A78_AdjustorThunk },
{ 0x060003F0, XRSessionUpdateParams_get_screenOrientation_m3200C056D5EF350333CBEC08C5BADCB3F9B3588A_AdjustorThunk },
{ 0x060003F1, XRSessionUpdateParams_set_screenOrientation_m958168FC8048AE33DC4757F9A1184520B15FD341_AdjustorThunk },
{ 0x060003F2, XRSessionUpdateParams_get_screenDimensions_m68257DCBBAEB4090559AC18A180C8E54D02F5118_AdjustorThunk },
{ 0x060003F3, XRSessionUpdateParams_set_screenDimensions_m3658D658C653B6ED72DB68F099A4512FE756D8F6_AdjustorThunk },
{ 0x060003F4, XRSessionUpdateParams_GetHashCode_mCCE320FCC4DE7EEF2FC1778BB15E422BAC190908_AdjustorThunk },
{ 0x060003F5, XRSessionUpdateParams_Equals_m2501DC639F937DCBD2423619545AC556DE71F3B2_AdjustorThunk },
{ 0x060003F6, XRSessionUpdateParams_ToString_m01D74BEF4A53B620271579234011D2F6D0522598_AdjustorThunk },
{ 0x060003F7, XRSessionUpdateParams_Equals_m57475F3E7F97539B697A4DC77122F934C321ECD0_AdjustorThunk },
{ 0x060003F9, TrackableId_get_subId1_m219B741FAF6D36DB7B8CFDC588EA93677FCE174B_AdjustorThunk },
{ 0x060003FA, TrackableId_get_subId2_m136D4970BDCC7323020913A9B5303584AA105B34_AdjustorThunk },
{ 0x060003FB, TrackableId__ctor_mB9B301A9CD03355A4E03A2B1A102B6B75F190792_AdjustorThunk },
{ 0x060003FC, TrackableId_ToString_mCD45FD4FF5DF6DE30A38AD05D02CFA7B2B696BB1_AdjustorThunk },
{ 0x060003FD, TrackableId_GetHashCode_mFD297FC6DB40FB5B28C6E9B7A2CF2785D75C4E86_AdjustorThunk },
{ 0x060003FE, TrackableId_Equals_mA542615B3B7AAD52AEBBEFBCE7E6987B2DE3849D_AdjustorThunk },
{ 0x060003FF, TrackableId_Equals_m1DF35616359175E3D66DE18250E8CDA1E6462B06_AdjustorThunk },
{ 0x06000414, XRTextureDescriptor_get_nativeTexture_mC7D28CAE1A948B378FF5966C85883508435C2B1A_AdjustorThunk },
{ 0x06000415, XRTextureDescriptor_get_width_m16F58793E411A03BDB01C19D0BCDBA8DC52455DC_AdjustorThunk },
{ 0x06000416, XRTextureDescriptor_get_height_mF20F82E1D3B8739A79F017147847B051FD33E554_AdjustorThunk },
{ 0x06000417, XRTextureDescriptor_get_mipmapCount_mE8FD55B645419BA7DA6959B000B8218BE142B302_AdjustorThunk },
{ 0x06000418, XRTextureDescriptor_get_format_mB5A486F3100EB333CF52F505ACB63E68C7CB511D_AdjustorThunk },
{ 0x06000419, XRTextureDescriptor_get_propertyNameId_mF90DF67F19E16118CB3D31EB44E643F4C48DE7C8_AdjustorThunk },
{ 0x0600041A, XRTextureDescriptor_get_valid_m921AF29648A562E6C6D2CA5F0E4A84109368A1E6_AdjustorThunk },
{ 0x0600041B, XRTextureDescriptor_get_depth_m27FA31D85456F65E706B03743250CB3858EBE0E3_AdjustorThunk },
{ 0x0600041C, XRTextureDescriptor_get_dimension_mAB82596EFC83FBC3477D496E77FD9B0579922CCC_AdjustorThunk },
{ 0x0600041D, XRTextureDescriptor_hasIdenticalTextureMetadata_mEEAE086BC369920DB89D8E38BA6A1133436100F2_AdjustorThunk },
{ 0x0600041E, XRTextureDescriptor_Reset_m7C4468143C7A9EA8B43068E809C8A392CCF31F09_AdjustorThunk },
{ 0x0600041F, XRTextureDescriptor_Equals_mD2A71E4A2D68686E74A648896FAC0FCDF02BE0B1_AdjustorThunk },
{ 0x06000420, XRTextureDescriptor_Equals_m37D3AFD7E110F62E8977937DD66AC053B3F64C8D_AdjustorThunk },
{ 0x06000421, XRTextureDescriptor_GetHashCode_m8628ACEB1A4A6203BCD28B01D59B588715C83291_AdjustorThunk },
{ 0x06000422, XRTextureDescriptor_ToString_m13E8A051346374949A95D217BBAAD298893A25EB_AdjustorThunk },
};
static const int32_t s_InvokerIndices[1058] =
{
1784,
1784,
3087,
1779,
1762,
1740,
1742,
1737,
1740,
1259,
1227,
3086,
1784,
856,
594,
389,
1252,
471,
594,
389,
1252,
1784,
1482,
3050,
1532,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1740,
1227,
1301,
3095,
1779,
1762,
1740,
1742,
1737,
1740,
1283,
1227,
3086,
863,
594,
389,
1252,
1784,
1784,
1784,
1784,
478,
594,
389,
1252,
1740,
1740,
1693,
1755,
1740,
1227,
1260,
1741,
1776,
1776,
1723,
1750,
1750,
1776,
1733,
1776,
1776,
1723,
1782,
1777,
1801,
1776,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1773,
1261,
1227,
1740,
1755,
1262,
1227,
1740,
1755,
1484,
1484,
1484,
1484,
1455,
1263,
1227,
1740,
1755,
1784,
1741,
1741,
1456,
1773,
1773,
1482,
1741,
1741,
1456,
848,
1755,
1455,
1148,
845,
1699,
1388,
1773,
604,
1773,
650,
1148,
3014,
1755,
1755,
1773,
1773,
1741,
1741,
1456,
1784,
1784,
1784,
604,
1773,
1773,
1482,
1741,
1741,
1456,
1148,
468,
1699,
1388,
469,
650,
1148,
1026,
1455,
1784,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1264,
1227,
1740,
1498,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
1482,
2992,
1725,
1437,
1741,
1456,
655,
1740,
1186,
1227,
2641,
483,
1784,
1742,
1741,
1740,
1025,
1755,
1740,
1187,
1227,
483,
1784,
2654,
2654,
2557,
2557,
2930,
2930,
2930,
2930,
2588,
2916,
1781,
1491,
1740,
1740,
1740,
1455,
1740,
1455,
1447,
802,
2061,
1784,
1740,
1227,
1265,
1755,
3086,
368,
247,
248,
503,
1206,
367,
279,
1455,
1455,
948,
605,
1784,
782,
152,
1766,
1781,
1740,
1740,
1740,
1303,
1227,
1755,
1740,
1740,
1663,
1740,
1227,
1304,
1755,
1742,
1740,
1740,
1740,
1311,
1227,
1740,
1755,
1740,
1781,
1740,
1733,
1740,
1302,
1227,
1740,
1755,
861,
818,
1784,
1784,
1784,
1784,
476,
818,
1784,
1533,
1482,
1482,
1482,
3051,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1740,
1455,
1305,
1227,
1740,
3092,
1779,
1762,
1740,
1740,
1277,
1227,
3086,
1669,
1359,
1665,
1667,
1357,
1784,
1740,
1227,
1755,
1278,
3088,
1779,
1489,
1782,
1762,
1476,
1782,
1801,
1740,
1742,
1266,
1227,
1740,
1755,
1026,
3086,
1784,
1773,
1482,
1773,
1773,
1482,
1773,
857,
253,
1252,
3015,
1773,
1482,
1773,
1773,
1482,
1773,
253,
1252,
472,
1784,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1267,
1227,
1740,
1500,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1482,
1773,
1482,
2993,
3089,
1779,
1762,
1740,
1742,
1762,
1762,
1782,
1227,
1740,
1268,
3086,
268,
1669,
1669,
1664,
1668,
1784,
1740,
1227,
1755,
1269,
-1,
1784,
1740,
1455,
1740,
1740,
858,
464,
464,
473,
1740,
1740,
1455,
1740,
1784,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1773,
1482,
1198,
1227,
1740,
1449,
1773,
3040,
2531,
2544,
2921,
2271,
2081,
1929,
1865,
1845,
1779,
1489,
1762,
1476,
1776,
1484,
1740,
3090,
1270,
1227,
1740,
3086,
1773,
1271,
1227,
1740,
1755,
1026,
1773,
1272,
1227,
1740,
1755,
1026,
1773,
1482,
1773,
1773,
1482,
1773,
1773,
1482,
1773,
1784,
859,
464,
846,
3016,
1773,
1482,
1773,
1773,
1482,
1773,
1773,
1482,
1773,
474,
464,
111,
1784,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1273,
1227,
1740,
1505,
1482,
1482,
1482,
2994,
427,
1745,
1742,
2938,
1740,
1755,
1740,
1227,
1175,
119,
481,
930,
1773,
112,
112,
255,
1740,
948,
1206,
1814,
3080,
1784,
1468,
1773,
1798,
1740,
1227,
1293,
1554,
1740,
1554,
1784,
1784,
1784,
1784,
1755,
1468,
1026,
864,
1740,
1455,
1740,
479,
1468,
1026,
1740,
1455,
1740,
1784,
1773,
3052,
1534,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1740,
1306,
1227,
169,
1737,
1737,
1773,
1780,
1755,
1755,
1755,
1740,
1227,
1281,
1740,
1634,
1554,
987,
1737,
1784,
3096,
1779,
1737,
1762,
1780,
1740,
1742,
1740,
1286,
1227,
3086,
-1,
-1,
-1,
1784,
1784,
1468,
1784,
865,
-1,
480,
1468,
1784,
1535,
296,
1307,
1227,
1740,
1737,
1282,
1740,
1227,
1784,
1740,
1635,
1556,
1737,
988,
1784,
3097,
1779,
1762,
1740,
1742,
1737,
1227,
1740,
1287,
3086,
3005,
3005,
3005,
1740,
1455,
1740,
1740,
1455,
1740,
1740,
1455,
1740,
1740,
1455,
1740,
1784,
1148,
1148,
1148,
1148,
1148,
1148,
1148,
1148,
848,
650,
3017,
1740,
1455,
1740,
1740,
1455,
1740,
1740,
1455,
1740,
1740,
1455,
1740,
1148,
1148,
1755,
1148,
1148,
1755,
1148,
1148,
1755,
1148,
1148,
1755,
469,
650,
1784,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1755,
1468,
1755,
1468,
1275,
1227,
1740,
1507,
1773,
1482,
1773,
1482,
1773,
1773,
2995,
3091,
1779,
1762,
1740,
1742,
1737,
1740,
1276,
1227,
3086,
1784,
860,
475,
1784,
1455,
-1,
293,
3060,
25,
1779,
1779,
1762,
1780,
1780,
1780,
1740,
1740,
1742,
1740,
1755,
1227,
1740,
1180,
3086,
1784,
1740,
1455,
1740,
855,
464,
-1,
464,
470,
1740,
1455,
1740,
1784,
1482,
1482,
1482,
1773,
1482,
1482,
3053,
1536,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1773,
1482,
1308,
1227,
1740,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
3093,
1779,
1762,
1740,
1742,
1776,
1779,
108,
1740,
1227,
1279,
3086,
3094,
1779,
1762,
1776,
1740,
314,
1740,
1227,
1280,
3086,
1784,
862,
391,
386,
1489,
320,
321,
1784,
1784,
1784,
391,
386,
1489,
477,
173,
174,
1784,
1773,
1482,
1773,
1482,
1455,
1482,
3054,
1537,
1755,
1468,
1755,
1468,
1755,
1468,
1773,
1482,
1773,
1482,
1740,
1455,
1773,
1482,
1740,
1227,
1755,
1309,
1468,
1784,
765,
3080,
1737,
1740,
1227,
1755,
1245,
3086,
3005,
3005,
1755,
1755,
1784,
1784,
849,
1515,
1691,
1381,
1025,
654,
1741,
841,
1784,
1784,
1740,
1741,
1456,
1741,
1740,
1773,
1773,
1482,
1740,
1784,
1784,
1515,
815,
1741,
1741,
1456,
1741,
841,
1784,
1784,
1784,
1784,
1742,
1755,
1755,
1740,
1740,
1737,
1773,
1773,
1482,
1740,
1784,
1773,
1482,
1773,
1482,
3055,
1538,
1773,
1482,
1773,
1482,
1755,
1468,
1755,
1468,
1755,
1468,
1740,
1310,
1227,
1740,
1455,
1781,
1491,
1740,
1227,
1755,
1284,
3082,
1741,
1741,
765,
1755,
1740,
1227,
1252,
2679,
3086,
1779,
1762,
1740,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
1742,
1740,
1740,
1740,
1740,
1740,
1773,
1740,
1740,
1285,
1784,
1285,
1227,
1740,
1755,
};
static const Il2CppTokenIndexMethodTuple s_reversePInvokeIndices[1] =
{
{ 0x06000104, 7, (void**)&XRCpuImage_OnAsyncConversionComplete_m60DC813F1A2B8A59F993D245683847D933D292A9_RuntimeMethod_var, 0 },
};
static const Il2CppTokenRangePair s_rgctxIndices[12] =
{
{ 0x02000074, { 23, 4 } },
{ 0x02000075, { 27, 3 } },
{ 0x0200008A, { 30, 5 } },
{ 0x0200008B, { 35, 2 } },
{ 0x0200008C, { 37, 12 } },
{ 0x060001C5, { 0, 5 } },
{ 0x06000299, { 5, 3 } },
{ 0x0600029A, { 8, 4 } },
{ 0x0600029B, { 12, 2 } },
{ 0x060002A1, { 14, 2 } },
{ 0x0600031D, { 16, 2 } },
{ 0x06000336, { 18, 5 } },
};
extern const uint32_t g_rgctx_NativeArray_1_get_IsCreated_m6D2F5F9E3D90DBEDC0FF56C0025E4F291B63EC3F;
extern const uint32_t g_rgctx_NativeArray_1_get_Length_mA9ACFC32621CF9F287FDCD711DC55496E15B4666;
extern const uint32_t g_rgctx_NativeArray_1_Dispose_mE37FEEA6857E485100A6EF5A157825AF4A05DA92;
extern const uint32_t g_rgctx_NativeArray_1_tEAA8A86AEA80BB0D5A30AFE30F7AA8D6CB06A6FB;
extern const uint32_t g_rgctx_NativeArray_1__ctor_mE6651970D8DDBAE4BA64E4050B9068FFE67A75AA;
extern const uint32_t g_rgctx_NativeCopyUtility_CreateArrayFilledWithValue_TisT_t5F2B5F0A5E6F031567A11A808477BD8AC2810C6C_m6C0D526E905CFBD3E484F843C09F4B71B90F6234;
extern const uint32_t g_rgctx_NativeArrayUnsafeUtility_GetUnsafePtr_TisT_t5F2B5F0A5E6F031567A11A808477BD8AC2810C6C_m3DD4AD3C8C1A36C9BBEBEFCFC1712E33EBDFB0C8;
extern const uint32_t g_rgctx_UnsafeUtility_SizeOf_TisT_t5F2B5F0A5E6F031567A11A808477BD8AC2810C6C_m0AE325FB873CD0279B6798F943C75DB8C8019DB2;
extern const uint32_t g_rgctx_NativeArray_1_get_Length_m5707DE103B5636CBE6CA23A28DAB69CCAD3713FD;
extern const uint32_t g_rgctx_NativeArrayUnsafeUtility_GetUnsafePtr_TisT_t3F481D4D34CBE1F43218BCCF10410D628FC96666_m3D6133A17B46B65B7420431E1CDDA8B155CB96B5;
extern const uint32_t g_rgctx_UnsafeUtility_AddressOf_TisT_t3F481D4D34CBE1F43218BCCF10410D628FC96666_m349B6503DBD88559D1634DC89E89046C818E481C;
extern const uint32_t g_rgctx_UnsafeUtility_SizeOf_TisT_t3F481D4D34CBE1F43218BCCF10410D628FC96666_m328405F2CB0E3ABB7F784F7E37A26211CD518316;
extern const uint32_t g_rgctx_NativeArray_1__ctor_mFC7A7E3C926F2AF6EAB361257BB191271B7D1901;
extern const uint32_t g_rgctx_NativeCopyUtility_FillArrayWithValue_TisT_t17C0F3FFD7F964050DD20FDE0632F500574774BE_mDDED79DFAEEE8D2C0EB88E8D2C46A0E03F52F574;
extern const uint32_t g_rgctx_TProvider_t18341B43272D0A73C32FA0B639EDEA46487CBBD9;
extern const uint32_t g_rgctx_TSubsystemOverride_t99AB75FD881C2291553F6339872FBA85E4240A8E;
extern const uint32_t g_rgctx_TProvider_tF27684A4CA39AC1B31161E92289F123668034C27;
extern const uint32_t g_rgctx_TSubsystemOverride_t358542119FAF3CD9426A9CFB1CC36F5D7FBA6F2B;
extern const uint32_t g_rgctx_NativeArray_1_get_IsCreated_mAB8638C61B394DF458BC3DF25EAED578EC384B53;
extern const uint32_t g_rgctx_NativeArray_1_get_Length_mBC3D5A7A890D01B1073D3111342A5FEF140C5C61;
extern const uint32_t g_rgctx_NativeArray_1_Dispose_m413FCBEE112577E75361C87A8F8A6E4C86B83FB5;
extern const uint32_t g_rgctx_NativeArray_1_t5A88D2A1509555E7EBF137F6584069425DDC364F;
extern const uint32_t g_rgctx_NativeArray_1__ctor_m8F6E093AFEC1D3A45C3CE094809C4CEB4295FDE2;
extern const uint32_t g_rgctx_Promise_1_OnKeepWaiting_mDA2517C888F5380614274ABD507EAB1D8A6E9621;
extern const uint32_t g_rgctx_ImmediatePromise_tCD6F39CF180134EE0F52D8CFD5FC253A97B8D1A8;
extern const uint32_t g_rgctx_ImmediatePromise__ctor_mBFD221F49C30D66C50FFBE338C5C5387D0E80EBE;
extern const uint32_t g_rgctx_Promise_1_set_result_m34A27AE015050ED9B5F33653F34AEE90848EE429;
extern const uint32_t g_rgctx_Promise_1__ctor_m081CB45920138097CDBD0D0876E962E1891F75D1;
extern const uint32_t g_rgctx_Promise_1_tE48FAB6B80EB2CEB32327216CAFF27399353A4E3;
extern const uint32_t g_rgctx_Promise_1_Resolve_m59CD31BB8F6C58E27936BDE587137E81A5E11CD5;
extern const uint32_t g_rgctx_NativeCopyUtility_CreateArrayFilledWithValue_TisT_t730BF6B535492B784E6BA4DB0E7C4165240D3886_m5FB498A63AFA2A9408CCA6B27AB7AC042E9A10EB;
extern const uint32_t g_rgctx_TrackableChanges_1_set_isCreated_mF1E268C7DD460EDB37569BB310B8A9A9A5A1CC0F;
extern const uint32_t g_rgctx_NativeCopyUtility_PtrToNativeArrayWithDefault_TisT_t730BF6B535492B784E6BA4DB0E7C4165240D3886_m01D0D257594BC92AEE18FC41AE7E626386720E41;
extern const uint32_t g_rgctx_TrackableChanges_1_get_isCreated_m69A7E44A9A7687E664C295886EA60CDF9F28EEB7;
extern const uint32_t g_rgctx_NativeArray_1_Dispose_m79CE162F46FBE50CEA9E65DBB216EE3201897897;
extern const uint32_t g_rgctx_SubsystemWithProvider_3__ctor_m6224F5C477C33664D9C26B0FDC1A162022E47557;
extern const uint32_t g_rgctx_SubsystemWithProvider_3_tD24669E63731F7E1C6494BBEAC00BFB6F4FC5DA1;
extern const uint32_t g_rgctx_ValidationUtility_1_t188A42796A80002FF45CAD7E1113DD4D1B86B552;
extern const uint32_t g_rgctx_TrackableChanges_1_get_added_m3C1FF9C60D61E7AF9D44A508C3AC5F1B48502809;
extern const uint32_t g_rgctx_NativeArray_1_GetEnumerator_mCCFD93E9C3EF65809BB2E41EF014F66A3C237BE4;
extern const uint32_t g_rgctx_Enumerator_get_Current_mF3B90886F608370782E2F3BAE212C220BF6AE5F5;
extern const uint32_t g_rgctx_T_tD5B1D9A52FB180FB877C180C967BC006113F3E79;
extern const uint32_t g_rgctx_ValidationUtility_1_AddToSetAndThrowIfDuplicate_mCDC75FF3A363E7E8490C3FCCAD327B051B46F8F2;
extern const uint32_t g_rgctx_Enumerator_MoveNext_m7CB70E85B4B80581E4480A06B8193EB94EC0E453;
extern const uint32_t g_rgctx_Enumerator_t94A658DC0F4649366BC92139A952461159954121;
extern const uint32_t g_rgctx_TrackableChanges_1_get_updated_mDC28D52424CD124030891EF0C241518F830468C9;
extern const uint32_t g_rgctx_TrackableChanges_1_get_removed_m47118C742629A03972C3A47E3667F00A90DC207F;
extern const uint32_t g_rgctx_ValidationUtility_1_ValidateAndThrow_m28E6ECE6E4EF8575D8A709935485D9EF43BE149D;
extern const uint32_t g_rgctx_TrackableChanges_1_Dispose_mD836D556CD05C12BEFBBF5F8D9F32326B2124D18;
static const Il2CppRGCTXDefinition s_rgctxValues[49] =
{
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_get_IsCreated_m6D2F5F9E3D90DBEDC0FF56C0025E4F291B63EC3F },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_get_Length_mA9ACFC32621CF9F287FDCD711DC55496E15B4666 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_Dispose_mE37FEEA6857E485100A6EF5A157825AF4A05DA92 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_tEAA8A86AEA80BB0D5A30AFE30F7AA8D6CB06A6FB },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1__ctor_mE6651970D8DDBAE4BA64E4050B9068FFE67A75AA },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeCopyUtility_CreateArrayFilledWithValue_TisT_t5F2B5F0A5E6F031567A11A808477BD8AC2810C6C_m6C0D526E905CFBD3E484F843C09F4B71B90F6234 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArrayUnsafeUtility_GetUnsafePtr_TisT_t5F2B5F0A5E6F031567A11A808477BD8AC2810C6C_m3DD4AD3C8C1A36C9BBEBEFCFC1712E33EBDFB0C8 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_UnsafeUtility_SizeOf_TisT_t5F2B5F0A5E6F031567A11A808477BD8AC2810C6C_m0AE325FB873CD0279B6798F943C75DB8C8019DB2 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_get_Length_m5707DE103B5636CBE6CA23A28DAB69CCAD3713FD },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArrayUnsafeUtility_GetUnsafePtr_TisT_t3F481D4D34CBE1F43218BCCF10410D628FC96666_m3D6133A17B46B65B7420431E1CDDA8B155CB96B5 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_UnsafeUtility_AddressOf_TisT_t3F481D4D34CBE1F43218BCCF10410D628FC96666_m349B6503DBD88559D1634DC89E89046C818E481C },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_UnsafeUtility_SizeOf_TisT_t3F481D4D34CBE1F43218BCCF10410D628FC96666_m328405F2CB0E3ABB7F784F7E37A26211CD518316 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1__ctor_mFC7A7E3C926F2AF6EAB361257BB191271B7D1901 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeCopyUtility_FillArrayWithValue_TisT_t17C0F3FFD7F964050DD20FDE0632F500574774BE_mDDED79DFAEEE8D2C0EB88E8D2C46A0E03F52F574 },
{ (Il2CppRGCTXDataType)1, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TProvider_t18341B43272D0A73C32FA0B639EDEA46487CBBD9 },
{ (Il2CppRGCTXDataType)1, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TSubsystemOverride_t99AB75FD881C2291553F6339872FBA85E4240A8E },
{ (Il2CppRGCTXDataType)1, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TProvider_tF27684A4CA39AC1B31161E92289F123668034C27 },
{ (Il2CppRGCTXDataType)1, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TSubsystemOverride_t358542119FAF3CD9426A9CFB1CC36F5D7FBA6F2B },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_get_IsCreated_mAB8638C61B394DF458BC3DF25EAED578EC384B53 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_get_Length_mBC3D5A7A890D01B1073D3111342A5FEF140C5C61 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_Dispose_m413FCBEE112577E75361C87A8F8A6E4C86B83FB5 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_t5A88D2A1509555E7EBF137F6584069425DDC364F },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1__ctor_m8F6E093AFEC1D3A45C3CE094809C4CEB4295FDE2 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Promise_1_OnKeepWaiting_mDA2517C888F5380614274ABD507EAB1D8A6E9621 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_ImmediatePromise_tCD6F39CF180134EE0F52D8CFD5FC253A97B8D1A8 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_ImmediatePromise__ctor_mBFD221F49C30D66C50FFBE338C5C5387D0E80EBE },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Promise_1_set_result_m34A27AE015050ED9B5F33653F34AEE90848EE429 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Promise_1__ctor_m081CB45920138097CDBD0D0876E962E1891F75D1 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Promise_1_tE48FAB6B80EB2CEB32327216CAFF27399353A4E3 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Promise_1_Resolve_m59CD31BB8F6C58E27936BDE587137E81A5E11CD5 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeCopyUtility_CreateArrayFilledWithValue_TisT_t730BF6B535492B784E6BA4DB0E7C4165240D3886_m5FB498A63AFA2A9408CCA6B27AB7AC042E9A10EB },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TrackableChanges_1_set_isCreated_mF1E268C7DD460EDB37569BB310B8A9A9A5A1CC0F },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeCopyUtility_PtrToNativeArrayWithDefault_TisT_t730BF6B535492B784E6BA4DB0E7C4165240D3886_m01D0D257594BC92AEE18FC41AE7E626386720E41 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TrackableChanges_1_get_isCreated_m69A7E44A9A7687E664C295886EA60CDF9F28EEB7 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_Dispose_m79CE162F46FBE50CEA9E65DBB216EE3201897897 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_SubsystemWithProvider_3__ctor_m6224F5C477C33664D9C26B0FDC1A162022E47557 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_SubsystemWithProvider_3_tD24669E63731F7E1C6494BBEAC00BFB6F4FC5DA1 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_ValidationUtility_1_t188A42796A80002FF45CAD7E1113DD4D1B86B552 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TrackableChanges_1_get_added_m3C1FF9C60D61E7AF9D44A508C3AC5F1B48502809 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_NativeArray_1_GetEnumerator_mCCFD93E9C3EF65809BB2E41EF014F66A3C237BE4 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Enumerator_get_Current_mF3B90886F608370782E2F3BAE212C220BF6AE5F5 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_T_tD5B1D9A52FB180FB877C180C967BC006113F3E79 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_ValidationUtility_1_AddToSetAndThrowIfDuplicate_mCDC75FF3A363E7E8490C3FCCAD327B051B46F8F2 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Enumerator_MoveNext_m7CB70E85B4B80581E4480A06B8193EB94EC0E453 },
{ (Il2CppRGCTXDataType)2, (const Il2CppRGCTXDefinitionData *)&g_rgctx_Enumerator_t94A658DC0F4649366BC92139A952461159954121 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TrackableChanges_1_get_updated_mDC28D52424CD124030891EF0C241518F830468C9 },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TrackableChanges_1_get_removed_m47118C742629A03972C3A47E3667F00A90DC207F },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_ValidationUtility_1_ValidateAndThrow_m28E6ECE6E4EF8575D8A709935485D9EF43BE149D },
{ (Il2CppRGCTXDataType)3, (const Il2CppRGCTXDefinitionData *)&g_rgctx_TrackableChanges_1_Dispose_mD836D556CD05C12BEFBBF5F8D9F32326B2124D18 },
};
extern const CustomAttributesCacheGenerator g_Unity_XR_ARSubsystems_AttributeGenerators[];
IL2CPP_EXTERN_C const Il2CppCodeGenModule g_Unity_XR_ARSubsystems_CodeGenModule;
const Il2CppCodeGenModule g_Unity_XR_ARSubsystems_CodeGenModule =
{
"Unity.XR.ARSubsystems.dll",
1058,
s_methodPointers,
536,
s_adjustorThunks,
s_InvokerIndices,
1,
s_reversePInvokeIndices,
12,
s_rgctxIndices,
49,
s_rgctxValues,
NULL,
g_Unity_XR_ARSubsystems_AttributeGenerators,
NULL, // module initializer,
NULL,
NULL,
NULL,
};
| 82.241004 | 358 | 0.907558 | [
"object"
] |
65f78bb8fdc5cc2f8a0952edeefaaec55481a051 | 6,410 | h | C | native/src/seal/util/galois.h | Alibaba-Gemini-Lab/SEAL | 26880ce16c7526d4384661e1e17122783316d90e | [
"MIT"
] | 2 | 2021-03-03T07:19:47.000Z | 2021-03-23T07:08:47.000Z | native/src/seal/util/galois.h | Alibaba-Gemini-Lab/Gemini-SEAL | 26880ce16c7526d4384661e1e17122783316d90e | [
"MIT"
] | null | null | null | native/src/seal/util/galois.h | Alibaba-Gemini-Lab/Gemini-SEAL | 26880ce16c7526d4384661e1e17122783316d90e | [
"MIT"
] | 1 | 2020-03-19T09:18:17.000Z | 2020-03-19T09:18:17.000Z | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#pragma once
#include "seal/memorymanager.h"
#include "seal/modulus.h"
#include "seal/util/defines.h"
#include "seal/util/iterator.h"
#include "seal/util/pointer.h"
#include <cstddef>
#include <cstdint>
#include <stdexcept>
namespace seal
{
namespace util
{
class GaloisTool
{
public:
GaloisTool(int coeff_count_power, MemoryPoolHandle pool) : pool_(std::move(pool))
{
if (!pool_)
{
throw std::invalid_argument("pool is uninitialized");
}
initialize(coeff_count_power);
}
void apply_galois(
ConstCoeffIter operand, std::uint32_t galois_elt, const Modulus &modulus, CoeffIter result) const;
inline void apply_galois(
ConstRNSIter operand, std::size_t coeff_modulus_size, std::uint32_t galois_elt,
ConstModulusIter modulus, RNSIter result) const
{
#ifdef SEAL_DEBUG
if ((!operand && coeff_modulus_size > 0) || (operand.poly_modulus_degree() != coeff_count_))
{
throw std::invalid_argument("operand");
}
if ((!result && coeff_modulus_size > 0) || (result.poly_modulus_degree() != coeff_count_))
{
throw std::invalid_argument("result");
}
#endif
SEAL_ITERATE(iter(operand, modulus, result), coeff_modulus_size, [&](auto I) {
apply_galois(get<0>(I), galois_elt, *get<1>(I), get<2>(I));
});
}
void apply_galois(
ConstPolyIter operand, std::size_t size, std::uint32_t galois_elt, ConstModulusIter modulus,
PolyIter result) const
{
#ifdef SEAL_DEBUG
if (!operand && size > 0)
{
throw std::invalid_argument("operand");
}
if (!result && size > 0)
{
throw std::invalid_argument("result");
}
if (operand.coeff_modulus_size() != result.coeff_modulus_size())
{
throw std::invalid_argument("incompatible iterators");
}
#endif
auto coeff_modulus_size = result.coeff_modulus_size();
SEAL_ITERATE(iter(operand, result), size, [&](auto I) {
apply_galois(get<0>(I), coeff_modulus_size, galois_elt, modulus, get<1>(I));
});
}
void apply_galois_ntt(ConstCoeffIter operand, std::uint32_t galois_elt, CoeffIter result) const;
void apply_galois_ntt(
ConstRNSIter operand, std::size_t coeff_modulus_size, std::uint32_t galois_elt, RNSIter result) const
{
#ifdef SEAL_DEBUG
if ((!operand && coeff_modulus_size > 0) || (operand.poly_modulus_degree() != coeff_count_))
{
throw std::invalid_argument("operand");
}
if ((!result && coeff_modulus_size > 0) || (result.poly_modulus_degree() != coeff_count_))
{
throw std::invalid_argument("result");
}
#endif
SEAL_ITERATE(iter(operand, result), coeff_modulus_size, [&](auto I) {
apply_galois_ntt(get<0>(I), galois_elt, get<1>(I));
});
}
void apply_galois_ntt(
ConstPolyIter operand, std::size_t size, std::uint32_t galois_elt, PolyIter result) const
{
#ifdef SEAL_DEBUG
if (!operand && size > 0)
{
throw std::invalid_argument("operand");
}
if (!result && size > 0)
{
throw std::invalid_argument("result");
}
if (operand.coeff_modulus_size() != result.coeff_modulus_size())
{
throw std::invalid_argument("incompatible iterators");
}
#endif
auto coeff_modulus_size = result.coeff_modulus_size();
SEAL_ITERATE(iter(operand, result), size, [&](auto I) {
apply_galois_ntt(get<0>(I), coeff_modulus_size, galois_elt, get<1>(I));
});
}
/**
Compute the Galois element corresponding to a given rotation step.
*/
SEAL_NODISCARD std::uint32_t get_elt_from_step(int step) const;
/**
Compute the Galois elements corresponding to a vector of given rotation steps.
*/
SEAL_NODISCARD std::vector<std::uint32_t> get_elts_from_steps(const std::vector<int> &steps) const;
/**
Compute a vector of all necessary galois_elts.
*/
SEAL_NODISCARD std::vector<std::uint32_t> get_elts_all() const noexcept;
/**
Compute the index in the range of 0 to (coeff_count_ - 1) of a given Galois element.
*/
SEAL_NODISCARD static inline std::size_t GetIndexFromElt(std::uint32_t galois_elt)
{
#ifdef SEAL_DEBUG
if (!(galois_elt & 1))
{
throw std::invalid_argument("galois_elt is not valid");
}
#endif
return util::safe_cast<std::size_t>((galois_elt - 1) >> 1);
}
private:
GaloisTool(const GaloisTool ©) = delete;
GaloisTool(GaloisTool &&source) = delete;
GaloisTool &operator=(const GaloisTool &assign) = delete;
GaloisTool &operator=(GaloisTool &&assign) = delete;
void initialize(int coeff_count_power);
void generate_table_ntt(std::uint32_t galois_elt, Pointer<std::uint32_t> &result) const;
MemoryPoolHandle pool_;
int coeff_count_power_ = 0;
std::size_t coeff_count_ = 0;
static constexpr std::uint32_t generator_ = 5;
mutable Pointer<Pointer<std::uint32_t>> permutation_tables_;
mutable util::ReaderWriterLocker permutation_tables_locker_;
};
} // namespace util
} // namespace seal
| 36.214689 | 117 | 0.53791 | [
"vector"
] |
65fa590808f465205e570013cdc56c34b2803a46 | 8,476 | c | C | src/font.c | snakeye/matrix-clock-3 | 748ac455ab7e3487e551800b428d025753d6cb7c | [
"MIT"
] | null | null | null | src/font.c | snakeye/matrix-clock-3 | 748ac455ab7e3487e551800b428d025753d6cb7c | [
"MIT"
] | null | null | null | src/font.c | snakeye/matrix-clock-3 | 748ac455ab7e3487e551800b428d025753d6cb7c | [
"MIT"
] | null | null | null | /*
* display.c
*
* Created: 19.01.2014 14:46:55
* Author: snakeye
*/
const unsigned char charset_char[] = {
// 20 -
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
// 21 - !
0b01011111,
// 22 - "
0b00000111,
0b00000000,
0b00000111,
// 23 - #
0b00010100,
0b00111110,
0b00010100,
0b00111110,
0b00010100,
// 24 - $
0b00100100,
0b00101010,
0b01111111,
0b00101010,
0b00010010,
// 25 - %
0b00100011,
0b00010011,
0b00001000,
0b01100100,
0b01100010,
// 26 - &
0b00110110,
0b01001001,
0b01010101,
0b00100010,
0b01010000,
// 27 - '
0b00000011,
// 28 - (
0b00011100,
0b00100010,
0b01000001,
// 29 - )
0b01000001,
0b00100010,
0b00011100,
// 2a - *
0b00010100,
0b00001000,
0b00111110,
0b00001000,
0b00010100,
// 2b - +
0b00001000,
0b00001000,
0b00111110,
0b00001000,
0b00001000,
// 2c - ,
0b10100000,
0b01100000,
// 2d - -
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
// 2e - .
0b01100000,
0b01100000,
// 2f - /
0b00100000,
0b00010000,
0b00001000,
0b00000100,
0b00000010,
// 30 - 0
0b00111110,
0b01010001,
0b01001001,
0b01000101,
0b00111110,
// 31 - 1
0b00000000,
0b01000010,
0b01111111,
0b01000000,
0b00000000,
// 32 - 2
0b01000010,
0b01100001,
0b01010001,
0b01001001,
0b01000110,
// 33 - 3
0b00100001,
0b01000001,
0b01000101,
0b01001011,
0b00110001,
// 34 - 4
0b00011000,
0b00010100,
0b00010010,
0b01111111,
0b00010000,
// 35 - 5
0b00100111,
0b01000101,
0b01000101,
0b01000101,
0b00111001,
// 36 - 6
0b00111100,
0b01001010,
0b01001001,
0b01001001,
0b00110000,
// 37 - 7
0b00000011,
0b01110001,
0b00001001,
0b00000101,
0b00000011,
// 38 - 8
0b00110110,
0b01001001,
0b01001001,
0b01001001,
0b00110110,
// 39 - 9
0b00000110,
0b01001001,
0b01001001,
0b00101001,
0b00011110,
// 3a - :
0b00110110,
0b00110110,
// 3b - ;
0b01010110,
0b00110110,
// 3c - <
0b00001000,
0b00010100,
0b00100010,
0b01000001,
// 3d - =
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
// 3e - >
0b01000001,
0b00100010,
0b00010100,
0b00001000,
// 3f - ?
0b00000010,
0b00000001,
0b01010001,
0b00001001,
0b00000110,
// 40 - @
0b00111110,
0b01000001,
0b01001101,
0b01010101,
0b01001110,
// 41 - A
0b01111110,
0b00001001,
0b00001001,
0b00001001,
0b01111110,
// 42 - B
0b01111111,
0b01001001,
0b01001001,
0b01001001,
0b00110110,
// 43 - C
0b00111110,
0b01000001,
0b01000001,
0b01000001,
0b00100010,
// 44 - D
0b01111111,
0b01000001,
0b01000001,
0b01000001,
0b00111110,
// 45 - E
0b01111111,
0b01001001,
0b01001001,
0b01001001,
0b01000001,
// 46 - F
0b01111111,
0b00001001,
0b00001001,
0b00001001,
0b00000001,
// 47 - G
0b00111110,
0b01000001,
0b01000001,
0b01010001,
0b01110010,
// 48 - H
0b01111111,
0b00001000,
0b00001000,
0b00001000,
0b01111111,
// 49 - I
0b01000001,
0b01111111,
0b01000001,
// 4a - J
0b00100000,
0b01000000,
0b01000001,
0b00111111,
0b00000001,
// 4b - K
0b01111111,
0b00001000,
0b00010100,
0b00100010,
0b01000001,
// 4c - L
0b01111111,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
// 4d - M
0b01111111,
0b00000010,
0b00001100,
0b00000010,
0b01111111,
// 4e - N
0b01111111,
0b00000100,
0b00001000,
0b00010000,
0b01111111,
// 4f - O
0b00111110,
0b01000001,
0b01000001,
0b01000001,
0b00111110,
// 50 - P
0b01111111,
0b00001001,
0b00001001,
0b00001001,
0b00000110,
// 51 - Q
0b00111110,
0b01000001,
0b01010001,
0b00100001,
0b01011110,
// 52 - R
0b01111111,
0b00001001,
0b00011001,
0b00101001,
0b01000110,
// 53 - S
0b00100110,
0b01001001,
0b01001001,
0b01001001,
0b00110010,
// 54 - T
0b00000001,
0b00000001,
0b01111111,
0b00000001,
0b00000001,
// 55 - U
0b00111111,
0b01000000,
0b01000000,
0b01000000,
0b00111111,
// 56 - V
0b00011111,
0b00100000,
0b01000000,
0b00100000,
0b00011111,
// 57 - W
0b00111111,
0b01000000,
0b00110000,
0b01000000,
0b00111111,
// 58 - X
0b01100011,
0b00010100,
0b00001000,
0b00010100,
0b01100011,
// 59 - Y
0b00000111,
0b00001000,
0b01110000,
0b00001000,
0b00000111,
// 5a - Z
0b01100001,
0b01010001,
0b01001001,
0b01000101,
0b01000011,
// 5b - [
0b01111111,
0b01000001,
0b01000001,
// 5c - backslash
0b00000010,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
// 5d - ]
0b01000001,
0b01000001,
0b01111111,
// 5e - ^
0b00000100,
0b00000010,
0b00000001,
0b00000010,
0b00000100,
// 5f - _
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
// 60 - `
0b00000001,
0b00000010,
0b00000100,
// 61 - a
0b00100000,
0b01010100,
0b01010100,
0b01010100,
0b01111000,
// 62 - b
0b01111111,
0b01001000,
0b01001000,
0b01001000,
0b00110000,
// 63 - c
0b00111000,
0b01000100,
0b01000100,
0b01000100,
0b00100000,
// 64 - d
0b00110000,
0b01001000,
0b01001000,
0b01001000,
0b01111111,
// 65 - e
0b00111000,
0b01010100,
0b01010100,
0b01010100,
0b00011000,
// 66 - f
0b00001000,
0b01111110,
0b00001001,
0b00000010,
// 67 - g
0b10011000,
0b10100100,
0b10100100,
0b10100100,
0b01111100,
// 68 - h
0b01111111,
0b00001000,
0b00001000,
0b00001000,
0b01110000,
// 69 - i
0b01001000,
0b01111010,
0b01000000,
// 6a - j
0b00100000,
0b01000000,
0b01000100,
0b00111101,
// 6b - k
0b01111111,
0b00010000,
0b00101000,
0b01000100,
// 6c - l
0b01000001,
0b01111111,
0b01000000,
// 6d - m
0b01111100,
0b00000100,
0b00011000,
0b00000100,
0b01111000,
// 6e - n
0b01111100,
0b00001000,
0b00000100,
0b00000100,
0b01111000,
// 6f - o
0b00111000,
0b01000100,
0b01000100,
0b01000100,
0b00111000,
// 70 - p
0b11111100,
0b00100100,
0b00100100,
0b00100100,
0b00011000,
// 71 - q
0b00011000,
0b00100100,
0b00100100,
0b00100100,
0b11111100,
// 72 - r
0b01111100,
0b00001000,
0b00000100,
0b00000100,
0b00001000,
// 73 - s
0b01001000,
0b01010100,
0b01010100,
0b01010100,
0b00100000,
// 74 - t
0b00000100,
0b00111111,
0b01000100,
0b00100000,
// 75 - u
0b00111100,
0b01000000,
0b01000000,
0b00100000,
0b01111100,
// 76 - v
0b00011100,
0b00100000,
0b01000000,
0b00100000,
0b00011100,
// 77 - w
0b00111100,
0b01000000,
0b00110000,
0b01000000,
0b00111100,
// 78 - x
0b01000100,
0b00101000,
0b00010000,
0b00101000,
0b01000100,
// 79 - y
0b00011100,
0b10100000,
0b10100000,
0b10100000,
0b01111100,
// 7a - z
0b01000100,
0b01100100,
0b01010100,
0b01001100,
0b01000100,
// 7b - {
0b00001000,
0b00110110,
0b01000001,
// 7c - |
0b01111111,
// 7d - }
0b01000001,
0b00110110,
0b00001000,
// 7e - ~
0b00001000,
0b00000100,
0b00000100,
0b00001000,
0b00000100,
};
const unsigned int charset_width[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5, 1, 3, 5, 5, 5, 5, 1, 3, 3, 5, 5, 2, 5, 2, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 4, 5, 4, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 3, 5, 5,
3, 5, 5, 5, 5, 5, 4, 5, 5, 3, 4, 4, 3, 5, 5, 5,
5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 3, 1, 3, 5, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const unsigned int charset_offset[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 5, 6, 9, 14, 19, 24, 29, 30, 33, 36, 41, 46, 48, 53, 55,
60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 112, 114, 118, 123, 127,
132, 137, 142, 147, 152, 157, 162, 167, 172, 177, 180, 185, 190, 195, 200, 205,
210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 268, 273, 276, 281,
286, 289, 294, 299, 304, 309, 314, 318, 323, 328, 331, 335, 339, 342, 347, 352,
357, 362, 367, 372, 377, 381, 386, 391, 396, 401, 406, 411, 414, 415, 418, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
| 15.028369 | 80 | 0.624823 | [
"3d"
] |
65fd6da7805144adeeb846d157b37fffec0be77e | 22,359 | c | C | python/sysmodule.c | weimingtom/python222mod | 89ecf277352d72500a158ee3e7fb29e061d1f7df | [
"PSF-2.0"
] | null | null | null | python/sysmodule.c | weimingtom/python222mod | 89ecf277352d72500a158ee3e7fb29e061d1f7df | [
"PSF-2.0"
] | null | null | null | python/sysmodule.c | weimingtom/python222mod | 89ecf277352d72500a158ee3e7fb29e061d1f7df | [
"PSF-2.0"
] | null | null | null | //20180116
#include "python.h"
#include "compile.h"
#include "frameobject.h"
#include "osdefs.h"
PyObject *PySys_GetObject(char *name)
{
PyThreadState *tstate = PyThreadState_Get();
PyObject *sd = tstate->interp->sysdict;
if (sd == NULL)
{
return NULL;
}
return PyDict_GetItemString(sd, name);
}
FILE *PySys_GetFile(char *name, FILE *def)
{
FILE *fp = NULL;
PyObject *v = PySys_GetObject(name);
if (v != NULL && PyFile_Check(v))
{
fp = PyFile_AsFile(v);
}
if (fp == NULL)
{
fp = def;
}
return fp;
}
int PySys_SetObject(char *name, PyObject *v)
{
PyThreadState *tstate = PyThreadState_Get();
PyObject *sd = tstate->interp->sysdict;
if (v == NULL)
{
if (PyDict_GetItemString(sd, name) == NULL)
{
return 0;
}
else
{
return PyDict_DelItemString(sd, name);
}
}
else
{
return PyDict_SetItemString(sd, name, v);
}
}
static PyObject *sys_displayhook(PyObject *self, PyObject *o)
{
PyObject *outf;
PyInterpreterState *interp = PyThreadState_Get()->interp;
PyObject *modules = interp->modules;
PyObject *builtins = PyDict_GetItemString(modules, "__builtin__");
if (builtins == NULL)
{
PyErr_SetString(PyExc_RuntimeError, "lost __builtin__");
return NULL;
}
if (o == Py_None)
{
Py_INCREF(Py_None);
return Py_None;
}
if (PyObject_SetAttrString(builtins, "_", Py_None) != 0)
{
return NULL;
}
if (Py_FlushLine() != 0)
{
return NULL;
}
outf = PySys_GetObject("stdout");
if (outf == NULL)
{
PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
return NULL;
}
if (PyFile_WriteObject(o, outf, 0) != 0)
{
return NULL;
}
PyFile_SoftSpace(outf, 1);
if (Py_FlushLine() != 0)
{
return NULL;
}
if (PyObject_SetAttrString(builtins, "_", o) != 0)
{
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
static char displayhook_doc[] =
"displayhook(object) -> None\n"
"\n"
"Print an object to sys.stdout and also save it in __builtin__._\n";
static PyObject *sys_excepthook(PyObject* self, PyObject* args)
{
PyObject *exc, *value, *tb;
if (!PyArg_UnpackTuple(args, "excepthook", 3, 3, &exc, &value, &tb))
{
return NULL;
}
PyErr_Display(exc, value, tb);
Py_INCREF(Py_None);
return Py_None;
}
static char excepthook_doc[] =
"excepthook(exctype, value, traceback) -> None\n"
"\n"
"Handle an exception by displaying it with a traceback on sys.stderr.\n";
static PyObject *sys_exc_info(PyObject *self)
{
PyThreadState *tstate;
tstate = PyThreadState_Get();
return Py_BuildValue(
"(OOO)",
tstate->exc_type != NULL ? tstate->exc_type : Py_None,
tstate->exc_value != NULL ? tstate->exc_value : Py_None,
tstate->exc_traceback != NULL ?
tstate->exc_traceback : Py_None);
}
static char exc_info_doc[] =
"exc_info() -> (type, value, traceback)\n"
"\n"
"Return information about the exception that is currently being handled.\n"
"This should be called from inside an except clause only.";
static PyObject *sys_exit(PyObject *self, PyObject *args)
{
PyErr_SetObject(PyExc_SystemExit, args);
return NULL;
}
static char exit_doc[] =
"exit([status])\n"
"\n"
"Exit the interpreter by raising SystemExit(status).\n"
"If the status is omitted or None, it defaults to zero (i.e., success).\n"
"If the status is numeric, it will be used as the system exit status.\n"
"If it is another kind of object, it will be printed and the system\n"
"exit status will be one (i.e., failure).";
static PyObject *sys_getdefaultencoding(PyObject *self)
{
return PyString_FromString(PyUnicode_GetDefaultEncoding());
}
static char getdefaultencoding_doc[] =
"getdefaultencoding() -> string\n"
"\n"
"Return the current default string encoding used by the Unicode \n"
"implementation.";
static PyObject *sys_setdefaultencoding(PyObject *self, PyObject *args)
{
char *encoding;
if (!PyArg_ParseTuple(args, "s:setdefaultencoding", &encoding))
{
return NULL;
}
if (PyUnicode_SetDefaultEncoding(encoding))
{
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
static char setdefaultencoding_doc[] =
"setdefaultencoding(encoding)\n"
"\n"
"Set the current default string encoding used by the Unicode implementation.";
static PyObject *whatstrings[4] = {NULL, NULL, NULL, NULL};
static int trace_init()
{
static char *whatnames[4] = {"call", "exception", "line", "return"};
PyObject *name;
int i;
for (i = 0; i < 4; ++i)
{
if (whatstrings[i] == NULL)
{
name = PyString_InternFromString(whatnames[i]);
if (name == NULL)
{
return -1;
}
whatstrings[i] = name;
}
}
return 0;
}
static PyObject *call_trampoline(PyThreadState *tstate, PyObject* callback,
PyFrameObject *frame, int what, PyObject *arg)
{
PyObject *args = PyTuple_New(3);
PyObject *whatstr;
PyObject *result;
if (args == NULL)
{
return NULL;
}
Py_INCREF(frame);
whatstr = whatstrings[what];
Py_INCREF(whatstr);
if (arg == NULL)
{
arg = Py_None;
}
Py_INCREF(arg);
PyTuple_SET_ITEM(args, 0, (PyObject *)frame);
PyTuple_SET_ITEM(args, 1, whatstr);
PyTuple_SET_ITEM(args, 2, arg);
PyFrame_FastToLocals(frame);
result = PyEval_CallObject(callback, args);
PyFrame_LocalsToFast(frame, 1);
if (result == NULL)
{
PyTraceBack_Here(frame);
}
Py_DECREF(args);
return result;
}
static int profile_trampoline(PyObject *self, PyFrameObject *frame,
int what, PyObject *arg)
{
PyThreadState *tstate = frame->f_tstate;
PyObject *result;
if (arg == NULL)
{
arg = Py_None;
}
result = call_trampoline(tstate, self, frame, what, arg);
if (result == NULL)
{
PyEval_SetProfile(NULL, NULL);
return -1;
}
Py_DECREF(result);
return 0;
}
static int trace_trampoline(PyObject *self, PyFrameObject *frame,
int what, PyObject *arg)
{
PyThreadState *tstate = frame->f_tstate;
PyObject *callback;
PyObject *result;
if (what == PyTrace_CALL)
{
callback = self;
}
else
{
callback = frame->f_trace;
}
if (callback == NULL)
{
return 0;
}
result = call_trampoline(tstate, callback, frame, what, arg);
if (result == NULL)
{
PyEval_SetTrace(NULL, NULL);
Py_XDECREF(frame->f_trace);
frame->f_trace = NULL;
return -1;
}
if (result != Py_None)
{
PyObject *temp = frame->f_trace;
frame->f_trace = NULL;
Py_XDECREF(temp);
frame->f_trace = result;
}
else
{
Py_DECREF(result);
}
return 0;
}
static PyObject *sys_settrace(PyObject *self, PyObject *args)
{
if (trace_init() == -1)
{
return NULL;
}
if (args == Py_None)
{
PyEval_SetTrace(NULL, NULL);
}
else
{
PyEval_SetTrace(trace_trampoline, args);
}
Py_INCREF(Py_None);
return Py_None;
}
static char settrace_doc[] =
"settrace(function)\n"
"\n"
"Set the global debug tracing function. It will be called on each\n"
"function call. See the debugger chapter in the library manual.";
static PyObject *sys_setprofile(PyObject *self, PyObject *args)
{
if (trace_init() == -1)
{
return NULL;
}
if (args == Py_None)
{
PyEval_SetProfile(NULL, NULL);
}
else
{
PyEval_SetProfile(profile_trampoline, args);
}
Py_INCREF(Py_None);
return Py_None;
}
static char setprofile_doc[] =
"setprofile(function)\n"
"\n"
"Set the profiling function. It will be called on each function call\n"
"and return. See the profiler chapter in the library manual.";
static PyObject *sys_setcheckinterval(PyObject *self, PyObject *args)
{
PyThreadState *tstate = PyThreadState_Get();
if (!PyArg_ParseTuple(args, "i:setcheckinterval", &tstate->interp->checkinterval))
{
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
static char setcheckinterval_doc[] =
"setcheckinterval(n)\n"
"\n"
"Tell the Python interpreter to check for asynchronous events every\n"
"n instructions. This also affects how often thread switches occur.";
static PyObject *sys_setrecursionlimit(PyObject *self, PyObject *args)
{
int new_limit;
if (!PyArg_ParseTuple(args, "i:setrecursionlimit", &new_limit))
{
return NULL;
}
if (new_limit <= 0)
{
PyErr_SetString(PyExc_ValueError,
"recursion limit must be positive");
return NULL;
}
Py_SetRecursionLimit(new_limit);
Py_INCREF(Py_None);
return Py_None;
}
static char setrecursionlimit_doc[] =
"setrecursionlimit(n)\n"
"\n"
"Set the maximum depth of the Python interpreter stack to n. This\n"
"limit prevents infinite recursion from causing an overflow of the C\n"
"stack and crashing Python. The highest possible limit is platform-\n"
"dependent.";
static PyObject *sys_getrecursionlimit(PyObject *self)
{
return PyInt_FromLong(Py_GetRecursionLimit());
}
static char getrecursionlimit_doc[] =
"getrecursionlimit()\n"
"\n"
"Return the current value of the recursion limit, the maximum depth\n"
"of the Python interpreter stack. This limit prevents infinite\n"
"recursion from causing an overflow of the C stack and crashing Python.";
static PyObject *sys_getrefcount(PyObject *self, PyObject *arg)
{
return PyInt_FromLong(arg->ob_refcnt);
}
#ifdef _DEBUG
static PyObject *sys_gettotalrefcount(PyObject *self)
{
extern long _Py_RefTotal;
return PyInt_FromLong(_Py_RefTotal);
}
#endif
static char getrefcount_doc[] =
"getrefcount(object) -> integer\n"
"\n"
"Return the reference count of object. The count returned is generally\n"
"one higher than you might expect, because it includes the (temporary)\n"
"reference as an argument to getrefcount().";
static char getframe_doc[] =
"_getframe([depth]) -> frameobject\n"
"\n"
"Return a frame object from the call stack. If optional integer depth is\n"
"given, return the frame object that many calls below the top of the stack.\n"
"If that is deeper than the call stack, ValueError is raised. The default\n"
"for depth is zero, returning the frame at the top of the call stack.\n"
"\n"
"This function should be used for internal and specialized\n"
"purposes only.";
static PyObject *sys_getframe(PyObject *self, PyObject *args)
{
PyFrameObject *f = PyThreadState_Get()->frame;
int depth = -1;
if (!PyArg_ParseTuple(args, "|i:_getframe", &depth))
{
return NULL;
}
while (depth > 0 && f != NULL)
{
f = f->f_back;
--depth;
}
if (f == NULL)
{
PyErr_SetString(PyExc_ValueError,
"call stack is not deep enough");
return NULL;
}
Py_INCREF(f);
return (PyObject*)f;
}
#ifdef _DEBUG
extern PyObject *_Py_GetObjects(PyObject *, PyObject *);
#endif
static PyMethodDef sys_methods[] = {
{"displayhook", sys_displayhook, METH_O, displayhook_doc},
{"exc_info", (PyCFunction)sys_exc_info, METH_NOARGS, exc_info_doc},
{"excepthook", sys_excepthook, METH_VARARGS, excepthook_doc},
{"exit", sys_exit, METH_OLDARGS, exit_doc},
{"getdefaultencoding", (PyCFunction)sys_getdefaultencoding, METH_NOARGS, getdefaultencoding_doc},
#ifdef _DEBUG
{"getobjects", _Py_GetObjects, METH_VARARGS},
{"gettotalrefcount", (PyCFunction)sys_gettotalrefcount, METH_NOARGS},
#endif
{"getrefcount", (PyCFunction)sys_getrefcount, METH_O, getrefcount_doc},
{"getrecursionlimit", (PyCFunction)sys_getrecursionlimit, METH_NOARGS, getrecursionlimit_doc},
{"_getframe", sys_getframe, METH_VARARGS, getframe_doc},
{"setdefaultencoding", sys_setdefaultencoding, METH_VARARGS, setdefaultencoding_doc},
{"setcheckinterval", sys_setcheckinterval, METH_VARARGS, setcheckinterval_doc},
{"setprofile", sys_setprofile, METH_O, setprofile_doc},
{"setrecursionlimit", sys_setrecursionlimit, METH_VARARGS, setrecursionlimit_doc},
{"settrace", sys_settrace, METH_O, settrace_doc},
{NULL, NULL}
};
static PyObject *list_builtin_module_names()
{
PyObject *list = PyList_New(0);
int i;
if (list == NULL)
{
return NULL;
}
for (i = 0; PyImport_Inittab[i].name != NULL; i++)
{
PyObject *name = PyString_FromString(
PyImport_Inittab[i].name);
if (name == NULL)
{
break;
}
PyList_Append(list, name);
Py_DECREF(name);
}
if (PyList_Sort(list) != 0)
{
Py_DECREF(list);
list = NULL;
}
if (list)
{
PyObject *v = PyList_AsTuple(list);
Py_DECREF(list);
list = v;
}
return list;
}
static PyObject *warnoptions = NULL;
void PySys_ResetWarnOptions()
{
if (warnoptions == NULL || !PyList_Check(warnoptions))
{
return;
}
PyList_SetSlice(warnoptions, 0, PyList_GET_SIZE(warnoptions), NULL);
}
void PySys_AddWarnOption(char *s)
{
PyObject *str;
if (warnoptions == NULL || !PyList_Check(warnoptions))
{
Py_XDECREF(warnoptions);
warnoptions = PyList_New(0);
if (warnoptions == NULL)
{
return;
}
}
str = PyString_FromString(s);
if (str != NULL)
{
PyList_Append(warnoptions, str);
Py_DECREF(str);
}
}
static char sys_doc[] =
"This module provides access to some objects used or maintained by the\n"
"interpreter and to functions that interact strongly with the interpreter.\n"
"\n"
"Dynamic objects:\n"
"\n"
"argv -- command line arguments; argv[0] is the script pathname if known\n"
"path -- module search path; path[0] is the script directory, else ''\n"
"modules -- dictionary of loaded modules\n"
"\n"
"displayhook -- called to show results in an interactive session\n"
"excepthook -- called to handle any uncaught exception other than SystemExit\n"
" To customize printing in an interactive session or to install a custom\n"
" top-level exception handler, assign other functions to replace these.\n"
"\n"
"exitfunc -- if sys.exitfunc exists, this routine is called when Python exits\n"
" Assigning to sys.exitfunc is deprecated; use the atexit module instead.\n"
"\n"
"stdin -- standard input file object; used by raw_input() and input()\n"
"stdout -- standard output file object; used by the print statement\n"
"stderr -- standard error object; used for error messages\n"
" By assigning other file objects (or objects that behave like files)\n"
" to these, it is possible to redirect all of the interpreter's I/O.\n"
"\n"
"last_type -- type of last uncaught exception\n"
"last_value -- value of last uncaught exception\n"
"last_traceback -- traceback of last uncaught exception\n"
" These three are only available in an interactive session after a\n"
" traceback has been printed.\n"
"\n"
"exc_type -- type of exception currently being handled\n"
"exc_value -- value of exception currently being handled\n"
"exc_traceback -- traceback of exception currently being handled\n"
" The function exc_info() should be used instead of these three,\n"
" because it is thread-safe.\n"
""
"\n"
"Static objects:\n"
"\n"
"maxint -- the largest supported integer (the smallest is -maxint-1)\n"
"maxunicode -- the largest supported character\n"
"builtin_module_names -- tuple of module names built into this interpreter\n"
"version -- the version of this interpreter as a string\n"
"version_info -- version information as a tuple\n"
"hexversion -- version information encoded as a single integer\n"
"copyright -- copyright notice pertaining to this interpreter\n"
"platform -- platform identifier\n"
"executable -- pathname of this Python interpreter\n"
"prefix -- prefix used to find the Python library\n"
"exec_prefix -- prefix used to find the machine-specific Python library\n"
""
"dllhandle -- [Windows only] integer handle of the Python DLL\n"
"winver -- [Windows only] version number of the Python DLL\n"
""
"__stdin__ -- the original stdin; don't touch!\n"
"__stdout__ -- the original stdout; don't touch!\n"
"__stderr__ -- the original stderr; don't touch!\n"
"__displayhook__ -- the original displayhook; don't touch!\n"
"__excepthook__ -- the original excepthook; don't touch!\n"
"\n"
"Functions:\n"
"\n"
"displayhook() -- print an object to the screen, and save it in __builtin__._\n"
"excepthook() -- print an exception and its traceback to sys.stderr\n"
"exc_info() -- return thread-safe information about the current exception\n"
"exit() -- exit the interpreter by raising SystemExit\n"
"getdlopenflags() -- returns flags to be used for dlopen() calls\n"
"getrefcount() -- return the reference count for an object (plus one :-)\n"
"getrecursionlimit() -- return the max recursion depth for the interpreter\n"
"setcheckinterval() -- control how often the interpreter checks for events\n"
"setdlopenflags() -- set the flags to be used for dlopen() calls\n"
"setprofile() -- set the global profiling function\n"
"setrecursionlimit() -- set the max recursion depth for the interpreter\n"
"settrace() -- set the global debug tracing function\n"
""
;
PyObject *_PySys_Init()
{
PyObject *m, *v, *sysdict;
PyObject *sysin, *sysout, *syserr;
char *s;
m = Py_InitModule3("sys", sys_methods, sys_doc);
sysdict = PyModule_GetDict(m);
sysin = PyFile_FromFile(stdin, "<stdin>", "r", NULL);
sysout = PyFile_FromFile(stdout, "<stdout>", "w", NULL);
syserr = PyFile_FromFile(stderr, "<stderr>", "w", NULL);
if (PyErr_Occurred())
{
return NULL;
}
PyDict_SetItemString(sysdict, "stdin", sysin);
PyDict_SetItemString(sysdict, "stdout", sysout);
PyDict_SetItemString(sysdict, "stderr", syserr);
PyDict_SetItemString(sysdict, "__stdin__", sysin);
PyDict_SetItemString(sysdict, "__stdout__", sysout);
PyDict_SetItemString(sysdict, "__stderr__", syserr);
PyDict_SetItemString(sysdict, "__displayhook__",
PyDict_GetItemString(sysdict, "displayhook"));
PyDict_SetItemString(sysdict, "__excepthook__",
PyDict_GetItemString(sysdict, "excepthook"));
Py_XDECREF(sysin);
Py_XDECREF(sysout);
Py_XDECREF(syserr);
PyDict_SetItemString(sysdict, "version",
v = PyString_FromString(Py_GetVersion()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "hexversion",
v = PyInt_FromLong(PY_VERSION_HEX));
Py_XDECREF(v);
s = "final";
PyDict_SetItemString(sysdict, "version_info",
v = Py_BuildValue("iiisi", PY_MAJOR_VERSION,
PY_MINOR_VERSION,
PY_MICRO_VERSION, s,
PY_RELEASE_SERIAL));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "copyright",
v = PyString_FromString(Py_GetCopyright()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "platform",
v = PyString_FromString(Py_GetPlatform()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "executable",
v = PyString_FromString(Py_GetProgramFullPath()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "prefix",
v = PyString_FromString(Py_GetPrefix()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "exec_prefix",
v = PyString_FromString(Py_GetExecPrefix()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "maxint",
v = PyInt_FromLong(PyInt_GetMax()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "maxunicode",
v = PyInt_FromLong(PyUnicode_GetMax()));
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "builtin_module_names",
v = list_builtin_module_names());
Py_XDECREF(v);
{
unsigned long number = 1;
char *value;
s = (char *) &number;
if (s[0] == 0)
{
value = "big";
}
else
{
value = "little";
}
PyDict_SetItemString(sysdict, "byteorder",
v = PyString_FromString(value));
Py_XDECREF(v);
}
if (warnoptions == NULL)
{
warnoptions = PyList_New(0);
}
else
{
Py_INCREF(warnoptions);
}
if (warnoptions != NULL)
{
PyDict_SetItemString(sysdict, "warnoptions", warnoptions);
}
if (PyErr_Occurred())
{
return NULL;
}
return m;
}
static PyObject *makepathobject(char *path, int delim)
{
int i, n;
char *p;
PyObject *v, *w;
n = 1;
p = path;
while ((p = strchr(p, delim)) != NULL)
{
n++;
p++;
}
v = PyList_New(n);
if (v == NULL)
{
return NULL;
}
for (i = 0; ; i++)
{
p = strchr(path, delim);
if (p == NULL)
{
p = strchr(path, '\0');
}
w = PyString_FromStringAndSize(path, (int) (p - path));
if (w == NULL)
{
Py_DECREF(v);
return NULL;
}
PyList_SetItem(v, i, w);
if (*p == '\0')
{
break;
}
path = p + 1;
}
return v;
}
void PySys_SetPath(char *path)
{
PyObject *v;
if ((v = makepathobject(path, DELIM)) == NULL)
{
Py_FatalError("can't create sys.path");
}
if (PySys_SetObject("path", v) != 0)
{
Py_FatalError("can't assign sys.path");
}
Py_DECREF(v);
}
static PyObject *makeargvobject(int argc, char **argv)
{
PyObject *av;
if (argc <= 0 || argv == NULL)
{
static char *empty_argv[1] = {""};
argv = empty_argv;
argc = 1;
}
av = PyList_New(argc);
if (av != NULL)
{
int i;
for (i = 0; i < argc; i++)
{
PyObject *v = PyString_FromString(argv[i]);
if (v == NULL)
{
Py_DECREF(av);
av = NULL;
break;
}
PyList_SetItem(av, i, v);
}
}
return av;
}
void PySys_SetArgv(int argc, char **argv)
{
PyObject *av = makeargvobject(argc, argv);
PyObject *path = PySys_GetObject("path");
if (av == NULL)
{
Py_FatalError("no mem for sys.argv");
}
if (PySys_SetObject("argv", av) != 0)
{
Py_FatalError("can't assign sys.argv");
}
if (path != NULL)
{
char *argv0 = argv[0];
char *p = NULL;
int n = 0;
PyObject *a;
if (argc > 0 && argv0 != NULL)
{
char *q;
p = strrchr(argv0, SEP);
q = strrchr(p ? p : argv0, '/');
if (q != NULL)
{
p = q;
}
if (p != NULL)
{
n = p + 1 - argv0;
if (n > 1 && p[-1] != ':')
{
n--;
}
}
}
a = PyString_FromStringAndSize(argv0, n);
if (a == NULL)
{
Py_FatalError("no mem for sys.path insertion");
}
if (PyList_Insert(path, 0, a) < 0)
{
Py_FatalError("sys.path.insert(0) failed");
}
Py_DECREF(a);
}
Py_DECREF(av);
}
static void mywrite(char *name, FILE *fp, const char *format, va_list va)
{
PyObject *file;
PyObject *error_type, *error_value, *error_traceback;
PyErr_Fetch(&error_type, &error_value, &error_traceback);
file = PySys_GetObject(name);
if (file == NULL || PyFile_AsFile(file) == fp)
{
vfprintf(fp, format, va);
}
else
{
char buffer[1001];
const int written = PyOS_vsnprintf(buffer, sizeof(buffer),
format, va);
if (PyFile_WriteString(buffer, file) != 0)
{
PyErr_Clear();
fputs(buffer, fp);
}
if (written < 0 || written >= sizeof(buffer))
{
const char *truncated = "... truncated";
if (PyFile_WriteString(truncated, file) != 0)
{
PyErr_Clear();
fputs(truncated, fp);
}
}
}
PyErr_Restore(error_type, error_value, error_traceback);
}
void PySys_WriteStdout(const char *format, ...)
{
va_list va;
va_start(va, format);
mywrite("stdout", stdout, format, va);
va_end(va);
}
void PySys_WriteStderr(const char *format, ...)
{
va_list va;
va_start(va, format);
mywrite("stderr", stderr, format, va);
va_end(va);
}
| 24.276873 | 99 | 0.686838 | [
"object"
] |
65fdd4f5ebe113c1cd01899e25d153a624e8f774 | 162 | h | C | src/onyx-char.h | samdphillips/onyx-lst | 8890cf9b28e7b5c5051c52584577763c2baf6fb1 | [
"MIT"
] | 2 | 2020-03-21T14:29:35.000Z | 2021-01-09T17:59:13.000Z | src/onyx-char.h | samdphillips/onyx-lst | 8890cf9b28e7b5c5051c52584577763c2baf6fb1 | [
"MIT"
] | null | null | null | src/onyx-char.h | samdphillips/onyx-lst | 8890cf9b28e7b5c5051c52584577763c2baf6fb1 | [
"MIT"
] | 1 | 2020-06-13T06:51:12.000Z | 2020-06-13T06:51:12.000Z |
#include <stdbool.h>
#define ONYX_CHAR_TAG 0xA
struct object* onyx_char_tag(char);
char onyx_char_untag(struct object*);
bool onyx_is_char(struct object*);
| 16.2 | 37 | 0.771605 | [
"object"
] |
65ffa4cb7cda3ffadc8bc06542e562ad10ee96d3 | 134,305 | h | C | client/recoverKV.pb.h | DivyanshuSaxena/RecoverKV | 116a1634f3df2235814b4ee871d673011db64b2e | [
"MIT"
] | null | null | null | client/recoverKV.pb.h | DivyanshuSaxena/RecoverKV | 116a1634f3df2235814b4ee871d673011db64b2e | [
"MIT"
] | null | null | null | client/recoverKV.pb.h | DivyanshuSaxena/RecoverKV | 116a1634f3df2235814b4ee871d673011db64b2e | [
"MIT"
] | 1 | 2021-06-01T19:29:54.000Z | 2021-06-01T19:29:54.000Z | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: recoverKV.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_recoverKV_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_recoverKV_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3014000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3014000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include <google/protobuf/empty.pb.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_recoverKV_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_recoverKV_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[13]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_recoverKV_2eproto;
namespace recoverKV {
class Ack;
class AckDefaultTypeInternal;
extern AckDefaultTypeInternal _Ack_default_instance_;
class AlivePeersResponse;
class AlivePeersResponseDefaultTypeInternal;
extern AlivePeersResponseDefaultTypeInternal _AlivePeersResponse_default_instance_;
class InternalRequest;
class InternalRequestDefaultTypeInternal;
extern InternalRequestDefaultTypeInternal _InternalRequest_default_instance_;
class InternalResponse;
class InternalResponseDefaultTypeInternal;
extern InternalResponseDefaultTypeInternal _InternalResponse_default_instance_;
class KillRequest;
class KillRequestDefaultTypeInternal;
extern KillRequestDefaultTypeInternal _KillRequest_default_instance_;
class MarkStatus;
class MarkStatusDefaultTypeInternal;
extern MarkStatusDefaultTypeInternal _MarkStatus_default_instance_;
class PartitionRequest;
class PartitionRequestDefaultTypeInternal;
extern PartitionRequestDefaultTypeInternal _PartitionRequest_default_instance_;
class RecRequest;
class RecRequestDefaultTypeInternal;
extern RecRequestDefaultTypeInternal _RecRequest_default_instance_;
class RecResponse;
class RecResponseDefaultTypeInternal;
extern RecResponseDefaultTypeInternal _RecResponse_default_instance_;
class Request;
class RequestDefaultTypeInternal;
extern RequestDefaultTypeInternal _Request_default_instance_;
class Response;
class ResponseDefaultTypeInternal;
extern ResponseDefaultTypeInternal _Response_default_instance_;
class ServerInfo;
class ServerInfoDefaultTypeInternal;
extern ServerInfoDefaultTypeInternal _ServerInfo_default_instance_;
class StateRequest;
class StateRequestDefaultTypeInternal;
extern StateRequestDefaultTypeInternal _StateRequest_default_instance_;
} // namespace recoverKV
PROTOBUF_NAMESPACE_OPEN
template<> ::recoverKV::Ack* Arena::CreateMaybeMessage<::recoverKV::Ack>(Arena*);
template<> ::recoverKV::AlivePeersResponse* Arena::CreateMaybeMessage<::recoverKV::AlivePeersResponse>(Arena*);
template<> ::recoverKV::InternalRequest* Arena::CreateMaybeMessage<::recoverKV::InternalRequest>(Arena*);
template<> ::recoverKV::InternalResponse* Arena::CreateMaybeMessage<::recoverKV::InternalResponse>(Arena*);
template<> ::recoverKV::KillRequest* Arena::CreateMaybeMessage<::recoverKV::KillRequest>(Arena*);
template<> ::recoverKV::MarkStatus* Arena::CreateMaybeMessage<::recoverKV::MarkStatus>(Arena*);
template<> ::recoverKV::PartitionRequest* Arena::CreateMaybeMessage<::recoverKV::PartitionRequest>(Arena*);
template<> ::recoverKV::RecRequest* Arena::CreateMaybeMessage<::recoverKV::RecRequest>(Arena*);
template<> ::recoverKV::RecResponse* Arena::CreateMaybeMessage<::recoverKV::RecResponse>(Arena*);
template<> ::recoverKV::Request* Arena::CreateMaybeMessage<::recoverKV::Request>(Arena*);
template<> ::recoverKV::Response* Arena::CreateMaybeMessage<::recoverKV::Response>(Arena*);
template<> ::recoverKV::ServerInfo* Arena::CreateMaybeMessage<::recoverKV::ServerInfo>(Arena*);
template<> ::recoverKV::StateRequest* Arena::CreateMaybeMessage<::recoverKV::StateRequest>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace recoverKV {
// ===================================================================
class Request PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.Request) */ {
public:
inline Request() : Request(nullptr) {}
virtual ~Request();
Request(const Request& from);
Request(Request&& from) noexcept
: Request() {
*this = ::std::move(from);
}
inline Request& operator=(const Request& from) {
CopyFrom(from);
return *this;
}
inline Request& operator=(Request&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const Request& default_instance();
static inline const Request* internal_default_instance() {
return reinterpret_cast<const Request*>(
&_Request_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(Request& a, Request& b) {
a.Swap(&b);
}
inline void Swap(Request* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(Request* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Request* New() const final {
return CreateMaybeMessage<Request>(nullptr);
}
Request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Request>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Request& from);
void MergeFrom(const Request& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Request* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.Request";
}
protected:
explicit Request(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kClientIDFieldNumber = 1,
kKeyFieldNumber = 2,
kValueFieldNumber = 3,
};
// string clientID = 1;
void clear_clientid();
const std::string& clientid() const;
void set_clientid(const std::string& value);
void set_clientid(std::string&& value);
void set_clientid(const char* value);
void set_clientid(const char* value, size_t size);
std::string* mutable_clientid();
std::string* release_clientid();
void set_allocated_clientid(std::string* clientid);
private:
const std::string& _internal_clientid() const;
void _internal_set_clientid(const std::string& value);
std::string* _internal_mutable_clientid();
public:
// string key = 2;
void clear_key();
const std::string& key() const;
void set_key(const std::string& value);
void set_key(std::string&& value);
void set_key(const char* value);
void set_key(const char* value, size_t size);
std::string* mutable_key();
std::string* release_key();
void set_allocated_key(std::string* key);
private:
const std::string& _internal_key() const;
void _internal_set_key(const std::string& value);
std::string* _internal_mutable_key();
public:
// string value = 3;
void clear_value();
const std::string& value() const;
void set_value(const std::string& value);
void set_value(std::string&& value);
void set_value(const char* value);
void set_value(const char* value, size_t size);
std::string* mutable_value();
std::string* release_value();
void set_allocated_value(std::string* value);
private:
const std::string& _internal_value() const;
void _internal_set_value(const std::string& value);
std::string* _internal_mutable_value();
public:
// @@protoc_insertion_point(class_scope:recoverKV.Request)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr clientid_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class Response PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.Response) */ {
public:
inline Response() : Response(nullptr) {}
virtual ~Response();
Response(const Response& from);
Response(Response&& from) noexcept
: Response() {
*this = ::std::move(from);
}
inline Response& operator=(const Response& from) {
CopyFrom(from);
return *this;
}
inline Response& operator=(Response&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const Response& default_instance();
static inline const Response* internal_default_instance() {
return reinterpret_cast<const Response*>(
&_Response_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(Response& a, Response& b) {
a.Swap(&b);
}
inline void Swap(Response* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(Response* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Response* New() const final {
return CreateMaybeMessage<Response>(nullptr);
}
Response* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Response>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Response& from);
void MergeFrom(const Response& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Response* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.Response";
}
protected:
explicit Response(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kValueFieldNumber = 1,
kSuccessCodeFieldNumber = 2,
};
// string value = 1;
void clear_value();
const std::string& value() const;
void set_value(const std::string& value);
void set_value(std::string&& value);
void set_value(const char* value);
void set_value(const char* value, size_t size);
std::string* mutable_value();
std::string* release_value();
void set_allocated_value(std::string* value);
private:
const std::string& _internal_value() const;
void _internal_set_value(const std::string& value);
std::string* _internal_mutable_value();
public:
// int32 successCode = 2;
void clear_successcode();
::PROTOBUF_NAMESPACE_ID::int32 successcode() const;
void set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_successcode() const;
void _internal_set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.Response)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
::PROTOBUF_NAMESPACE_ID::int32 successcode_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class StateRequest PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.StateRequest) */ {
public:
inline StateRequest() : StateRequest(nullptr) {}
virtual ~StateRequest();
StateRequest(const StateRequest& from);
StateRequest(StateRequest&& from) noexcept
: StateRequest() {
*this = ::std::move(from);
}
inline StateRequest& operator=(const StateRequest& from) {
CopyFrom(from);
return *this;
}
inline StateRequest& operator=(StateRequest&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const StateRequest& default_instance();
static inline const StateRequest* internal_default_instance() {
return reinterpret_cast<const StateRequest*>(
&_StateRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
2;
friend void swap(StateRequest& a, StateRequest& b) {
a.Swap(&b);
}
inline void Swap(StateRequest* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(StateRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline StateRequest* New() const final {
return CreateMaybeMessage<StateRequest>(nullptr);
}
StateRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<StateRequest>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const StateRequest& from);
void MergeFrom(const StateRequest& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(StateRequest* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.StateRequest";
}
protected:
explicit StateRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kClientIDFieldNumber = 1,
kServersListFieldNumber = 2,
};
// string clientID = 1;
void clear_clientid();
const std::string& clientid() const;
void set_clientid(const std::string& value);
void set_clientid(std::string&& value);
void set_clientid(const char* value);
void set_clientid(const char* value, size_t size);
std::string* mutable_clientid();
std::string* release_clientid();
void set_allocated_clientid(std::string* clientid);
private:
const std::string& _internal_clientid() const;
void _internal_set_clientid(const std::string& value);
std::string* _internal_mutable_clientid();
public:
// string serversList = 2;
void clear_serverslist();
const std::string& serverslist() const;
void set_serverslist(const std::string& value);
void set_serverslist(std::string&& value);
void set_serverslist(const char* value);
void set_serverslist(const char* value, size_t size);
std::string* mutable_serverslist();
std::string* release_serverslist();
void set_allocated_serverslist(std::string* serverslist);
private:
const std::string& _internal_serverslist() const;
void _internal_set_serverslist(const std::string& value);
std::string* _internal_mutable_serverslist();
public:
// @@protoc_insertion_point(class_scope:recoverKV.StateRequest)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr clientid_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr serverslist_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class KillRequest PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.KillRequest) */ {
public:
inline KillRequest() : KillRequest(nullptr) {}
virtual ~KillRequest();
KillRequest(const KillRequest& from);
KillRequest(KillRequest&& from) noexcept
: KillRequest() {
*this = ::std::move(from);
}
inline KillRequest& operator=(const KillRequest& from) {
CopyFrom(from);
return *this;
}
inline KillRequest& operator=(KillRequest&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const KillRequest& default_instance();
static inline const KillRequest* internal_default_instance() {
return reinterpret_cast<const KillRequest*>(
&_KillRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
3;
friend void swap(KillRequest& a, KillRequest& b) {
a.Swap(&b);
}
inline void Swap(KillRequest* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(KillRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline KillRequest* New() const final {
return CreateMaybeMessage<KillRequest>(nullptr);
}
KillRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<KillRequest>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const KillRequest& from);
void MergeFrom(const KillRequest& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(KillRequest* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.KillRequest";
}
protected:
explicit KillRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kClientIDFieldNumber = 1,
kServerNameFieldNumber = 2,
kCleanTypeFieldNumber = 3,
};
// string clientID = 1;
void clear_clientid();
const std::string& clientid() const;
void set_clientid(const std::string& value);
void set_clientid(std::string&& value);
void set_clientid(const char* value);
void set_clientid(const char* value, size_t size);
std::string* mutable_clientid();
std::string* release_clientid();
void set_allocated_clientid(std::string* clientid);
private:
const std::string& _internal_clientid() const;
void _internal_set_clientid(const std::string& value);
std::string* _internal_mutable_clientid();
public:
// string serverName = 2;
void clear_servername();
const std::string& servername() const;
void set_servername(const std::string& value);
void set_servername(std::string&& value);
void set_servername(const char* value);
void set_servername(const char* value, size_t size);
std::string* mutable_servername();
std::string* release_servername();
void set_allocated_servername(std::string* servername);
private:
const std::string& _internal_servername() const;
void _internal_set_servername(const std::string& value);
std::string* _internal_mutable_servername();
public:
// int32 cleanType = 3;
void clear_cleantype();
::PROTOBUF_NAMESPACE_ID::int32 cleantype() const;
void set_cleantype(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_cleantype() const;
void _internal_set_cleantype(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.KillRequest)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr clientid_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr servername_;
::PROTOBUF_NAMESPACE_ID::int32 cleantype_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class PartitionRequest PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.PartitionRequest) */ {
public:
inline PartitionRequest() : PartitionRequest(nullptr) {}
virtual ~PartitionRequest();
PartitionRequest(const PartitionRequest& from);
PartitionRequest(PartitionRequest&& from) noexcept
: PartitionRequest() {
*this = ::std::move(from);
}
inline PartitionRequest& operator=(const PartitionRequest& from) {
CopyFrom(from);
return *this;
}
inline PartitionRequest& operator=(PartitionRequest&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const PartitionRequest& default_instance();
static inline const PartitionRequest* internal_default_instance() {
return reinterpret_cast<const PartitionRequest*>(
&_PartitionRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
4;
friend void swap(PartitionRequest& a, PartitionRequest& b) {
a.Swap(&b);
}
inline void Swap(PartitionRequest* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(PartitionRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline PartitionRequest* New() const final {
return CreateMaybeMessage<PartitionRequest>(nullptr);
}
PartitionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<PartitionRequest>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const PartitionRequest& from);
void MergeFrom(const PartitionRequest& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(PartitionRequest* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.PartitionRequest";
}
protected:
explicit PartitionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kClientIDFieldNumber = 1,
kServerNameFieldNumber = 2,
kReachableFieldNumber = 3,
};
// string clientID = 1;
void clear_clientid();
const std::string& clientid() const;
void set_clientid(const std::string& value);
void set_clientid(std::string&& value);
void set_clientid(const char* value);
void set_clientid(const char* value, size_t size);
std::string* mutable_clientid();
std::string* release_clientid();
void set_allocated_clientid(std::string* clientid);
private:
const std::string& _internal_clientid() const;
void _internal_set_clientid(const std::string& value);
std::string* _internal_mutable_clientid();
public:
// string serverName = 2;
void clear_servername();
const std::string& servername() const;
void set_servername(const std::string& value);
void set_servername(std::string&& value);
void set_servername(const char* value);
void set_servername(const char* value, size_t size);
std::string* mutable_servername();
std::string* release_servername();
void set_allocated_servername(std::string* servername);
private:
const std::string& _internal_servername() const;
void _internal_set_servername(const std::string& value);
std::string* _internal_mutable_servername();
public:
// string reachable = 3;
void clear_reachable();
const std::string& reachable() const;
void set_reachable(const std::string& value);
void set_reachable(std::string&& value);
void set_reachable(const char* value);
void set_reachable(const char* value, size_t size);
std::string* mutable_reachable();
std::string* release_reachable();
void set_allocated_reachable(std::string* reachable);
private:
const std::string& _internal_reachable() const;
void _internal_set_reachable(const std::string& value);
std::string* _internal_mutable_reachable();
public:
// @@protoc_insertion_point(class_scope:recoverKV.PartitionRequest)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr clientid_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr servername_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr reachable_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class InternalRequest PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.InternalRequest) */ {
public:
inline InternalRequest() : InternalRequest(nullptr) {}
virtual ~InternalRequest();
InternalRequest(const InternalRequest& from);
InternalRequest(InternalRequest&& from) noexcept
: InternalRequest() {
*this = ::std::move(from);
}
inline InternalRequest& operator=(const InternalRequest& from) {
CopyFrom(from);
return *this;
}
inline InternalRequest& operator=(InternalRequest&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const InternalRequest& default_instance();
static inline const InternalRequest* internal_default_instance() {
return reinterpret_cast<const InternalRequest*>(
&_InternalRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
5;
friend void swap(InternalRequest& a, InternalRequest& b) {
a.Swap(&b);
}
inline void Swap(InternalRequest* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(InternalRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline InternalRequest* New() const final {
return CreateMaybeMessage<InternalRequest>(nullptr);
}
InternalRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<InternalRequest>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const InternalRequest& from);
void MergeFrom(const InternalRequest& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(InternalRequest* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.InternalRequest";
}
protected:
explicit InternalRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kKeyFieldNumber = 2,
kValueFieldNumber = 3,
kQueryIDFieldNumber = 1,
};
// string key = 2;
void clear_key();
const std::string& key() const;
void set_key(const std::string& value);
void set_key(std::string&& value);
void set_key(const char* value);
void set_key(const char* value, size_t size);
std::string* mutable_key();
std::string* release_key();
void set_allocated_key(std::string* key);
private:
const std::string& _internal_key() const;
void _internal_set_key(const std::string& value);
std::string* _internal_mutable_key();
public:
// string value = 3;
void clear_value();
const std::string& value() const;
void set_value(const std::string& value);
void set_value(std::string&& value);
void set_value(const char* value);
void set_value(const char* value, size_t size);
std::string* mutable_value();
std::string* release_value();
void set_allocated_value(std::string* value);
private:
const std::string& _internal_value() const;
void _internal_set_value(const std::string& value);
std::string* _internal_mutable_value();
public:
// int64 queryID = 1;
void clear_queryid();
::PROTOBUF_NAMESPACE_ID::int64 queryid() const;
void set_queryid(::PROTOBUF_NAMESPACE_ID::int64 value);
private:
::PROTOBUF_NAMESPACE_ID::int64 _internal_queryid() const;
void _internal_set_queryid(::PROTOBUF_NAMESPACE_ID::int64 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.InternalRequest)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
::PROTOBUF_NAMESPACE_ID::int64 queryid_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class InternalResponse PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.InternalResponse) */ {
public:
inline InternalResponse() : InternalResponse(nullptr) {}
virtual ~InternalResponse();
InternalResponse(const InternalResponse& from);
InternalResponse(InternalResponse&& from) noexcept
: InternalResponse() {
*this = ::std::move(from);
}
inline InternalResponse& operator=(const InternalResponse& from) {
CopyFrom(from);
return *this;
}
inline InternalResponse& operator=(InternalResponse&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const InternalResponse& default_instance();
static inline const InternalResponse* internal_default_instance() {
return reinterpret_cast<const InternalResponse*>(
&_InternalResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
6;
friend void swap(InternalResponse& a, InternalResponse& b) {
a.Swap(&b);
}
inline void Swap(InternalResponse* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(InternalResponse* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline InternalResponse* New() const final {
return CreateMaybeMessage<InternalResponse>(nullptr);
}
InternalResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<InternalResponse>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const InternalResponse& from);
void MergeFrom(const InternalResponse& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(InternalResponse* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.InternalResponse";
}
protected:
explicit InternalResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kValueFieldNumber = 1,
kSuccessCodeFieldNumber = 2,
};
// string value = 1;
void clear_value();
const std::string& value() const;
void set_value(const std::string& value);
void set_value(std::string&& value);
void set_value(const char* value);
void set_value(const char* value, size_t size);
std::string* mutable_value();
std::string* release_value();
void set_allocated_value(std::string* value);
private:
const std::string& _internal_value() const;
void _internal_set_value(const std::string& value);
std::string* _internal_mutable_value();
public:
// int32 successCode = 2;
void clear_successcode();
::PROTOBUF_NAMESPACE_ID::int32 successcode() const;
void set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_successcode() const;
void _internal_set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.InternalResponse)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
::PROTOBUF_NAMESPACE_ID::int32 successcode_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class MarkStatus PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.MarkStatus) */ {
public:
inline MarkStatus() : MarkStatus(nullptr) {}
virtual ~MarkStatus();
MarkStatus(const MarkStatus& from);
MarkStatus(MarkStatus&& from) noexcept
: MarkStatus() {
*this = ::std::move(from);
}
inline MarkStatus& operator=(const MarkStatus& from) {
CopyFrom(from);
return *this;
}
inline MarkStatus& operator=(MarkStatus&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const MarkStatus& default_instance();
static inline const MarkStatus* internal_default_instance() {
return reinterpret_cast<const MarkStatus*>(
&_MarkStatus_default_instance_);
}
static constexpr int kIndexInFileMessages =
7;
friend void swap(MarkStatus& a, MarkStatus& b) {
a.Swap(&b);
}
inline void Swap(MarkStatus* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(MarkStatus* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline MarkStatus* New() const final {
return CreateMaybeMessage<MarkStatus>(nullptr);
}
MarkStatus* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<MarkStatus>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const MarkStatus& from);
void MergeFrom(const MarkStatus& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(MarkStatus* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.MarkStatus";
}
protected:
explicit MarkStatus(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kServerNameFieldNumber = 1,
kNewStatusFieldNumber = 2,
};
// string serverName = 1;
void clear_servername();
const std::string& servername() const;
void set_servername(const std::string& value);
void set_servername(std::string&& value);
void set_servername(const char* value);
void set_servername(const char* value, size_t size);
std::string* mutable_servername();
std::string* release_servername();
void set_allocated_servername(std::string* servername);
private:
const std::string& _internal_servername() const;
void _internal_set_servername(const std::string& value);
std::string* _internal_mutable_servername();
public:
// int32 newStatus = 2;
void clear_newstatus();
::PROTOBUF_NAMESPACE_ID::int32 newstatus() const;
void set_newstatus(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_newstatus() const;
void _internal_set_newstatus(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.MarkStatus)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr servername_;
::PROTOBUF_NAMESPACE_ID::int32 newstatus_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class ServerInfo PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.ServerInfo) */ {
public:
inline ServerInfo() : ServerInfo(nullptr) {}
virtual ~ServerInfo();
ServerInfo(const ServerInfo& from);
ServerInfo(ServerInfo&& from) noexcept
: ServerInfo() {
*this = ::std::move(from);
}
inline ServerInfo& operator=(const ServerInfo& from) {
CopyFrom(from);
return *this;
}
inline ServerInfo& operator=(ServerInfo&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const ServerInfo& default_instance();
static inline const ServerInfo* internal_default_instance() {
return reinterpret_cast<const ServerInfo*>(
&_ServerInfo_default_instance_);
}
static constexpr int kIndexInFileMessages =
8;
friend void swap(ServerInfo& a, ServerInfo& b) {
a.Swap(&b);
}
inline void Swap(ServerInfo* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(ServerInfo* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline ServerInfo* New() const final {
return CreateMaybeMessage<ServerInfo>(nullptr);
}
ServerInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<ServerInfo>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const ServerInfo& from);
void MergeFrom(const ServerInfo& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(ServerInfo* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.ServerInfo";
}
protected:
explicit ServerInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kServerNameFieldNumber = 1,
};
// string serverName = 1;
void clear_servername();
const std::string& servername() const;
void set_servername(const std::string& value);
void set_servername(std::string&& value);
void set_servername(const char* value);
void set_servername(const char* value, size_t size);
std::string* mutable_servername();
std::string* release_servername();
void set_allocated_servername(std::string* servername);
private:
const std::string& _internal_servername() const;
void _internal_set_servername(const std::string& value);
std::string* _internal_mutable_servername();
public:
// @@protoc_insertion_point(class_scope:recoverKV.ServerInfo)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr servername_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class AlivePeersResponse PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.AlivePeersResponse) */ {
public:
inline AlivePeersResponse() : AlivePeersResponse(nullptr) {}
virtual ~AlivePeersResponse();
AlivePeersResponse(const AlivePeersResponse& from);
AlivePeersResponse(AlivePeersResponse&& from) noexcept
: AlivePeersResponse() {
*this = ::std::move(from);
}
inline AlivePeersResponse& operator=(const AlivePeersResponse& from) {
CopyFrom(from);
return *this;
}
inline AlivePeersResponse& operator=(AlivePeersResponse&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const AlivePeersResponse& default_instance();
static inline const AlivePeersResponse* internal_default_instance() {
return reinterpret_cast<const AlivePeersResponse*>(
&_AlivePeersResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
9;
friend void swap(AlivePeersResponse& a, AlivePeersResponse& b) {
a.Swap(&b);
}
inline void Swap(AlivePeersResponse* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(AlivePeersResponse* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline AlivePeersResponse* New() const final {
return CreateMaybeMessage<AlivePeersResponse>(nullptr);
}
AlivePeersResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<AlivePeersResponse>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const AlivePeersResponse& from);
void MergeFrom(const AlivePeersResponse& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(AlivePeersResponse* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.AlivePeersResponse";
}
protected:
explicit AlivePeersResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kAliveListFieldNumber = 1,
};
// string aliveList = 1;
void clear_alivelist();
const std::string& alivelist() const;
void set_alivelist(const std::string& value);
void set_alivelist(std::string&& value);
void set_alivelist(const char* value);
void set_alivelist(const char* value, size_t size);
std::string* mutable_alivelist();
std::string* release_alivelist();
void set_allocated_alivelist(std::string* alivelist);
private:
const std::string& _internal_alivelist() const;
void _internal_set_alivelist(const std::string& value);
std::string* _internal_mutable_alivelist();
public:
// @@protoc_insertion_point(class_scope:recoverKV.AlivePeersResponse)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr alivelist_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class Ack PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.Ack) */ {
public:
inline Ack() : Ack(nullptr) {}
virtual ~Ack();
Ack(const Ack& from);
Ack(Ack&& from) noexcept
: Ack() {
*this = ::std::move(from);
}
inline Ack& operator=(const Ack& from) {
CopyFrom(from);
return *this;
}
inline Ack& operator=(Ack&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const Ack& default_instance();
static inline const Ack* internal_default_instance() {
return reinterpret_cast<const Ack*>(
&_Ack_default_instance_);
}
static constexpr int kIndexInFileMessages =
10;
friend void swap(Ack& a, Ack& b) {
a.Swap(&b);
}
inline void Swap(Ack* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(Ack* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Ack* New() const final {
return CreateMaybeMessage<Ack>(nullptr);
}
Ack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Ack>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Ack& from);
void MergeFrom(const Ack& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Ack* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.Ack";
}
protected:
explicit Ack(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kGlobalUIDFieldNumber = 1,
};
// int64 globalUID = 1;
void clear_globaluid();
::PROTOBUF_NAMESPACE_ID::int64 globaluid() const;
void set_globaluid(::PROTOBUF_NAMESPACE_ID::int64 value);
private:
::PROTOBUF_NAMESPACE_ID::int64 _internal_globaluid() const;
void _internal_set_globaluid(::PROTOBUF_NAMESPACE_ID::int64 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.Ack)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::int64 globaluid_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class RecRequest PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.RecRequest) */ {
public:
inline RecRequest() : RecRequest(nullptr) {}
virtual ~RecRequest();
RecRequest(const RecRequest& from);
RecRequest(RecRequest&& from) noexcept
: RecRequest() {
*this = ::std::move(from);
}
inline RecRequest& operator=(const RecRequest& from) {
CopyFrom(from);
return *this;
}
inline RecRequest& operator=(RecRequest&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const RecRequest& default_instance();
static inline const RecRequest* internal_default_instance() {
return reinterpret_cast<const RecRequest*>(
&_RecRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
11;
friend void swap(RecRequest& a, RecRequest& b) {
a.Swap(&b);
}
inline void Swap(RecRequest* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(RecRequest* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline RecRequest* New() const final {
return CreateMaybeMessage<RecRequest>(nullptr);
}
RecRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<RecRequest>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const RecRequest& from);
void MergeFrom(const RecRequest& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(RecRequest* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.RecRequest";
}
protected:
explicit RecRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kMissingUIDsFieldNumber = 1,
kAddressFieldNumber = 2,
};
// string missingUIDs = 1;
void clear_missinguids();
const std::string& missinguids() const;
void set_missinguids(const std::string& value);
void set_missinguids(std::string&& value);
void set_missinguids(const char* value);
void set_missinguids(const char* value, size_t size);
std::string* mutable_missinguids();
std::string* release_missinguids();
void set_allocated_missinguids(std::string* missinguids);
private:
const std::string& _internal_missinguids() const;
void _internal_set_missinguids(const std::string& value);
std::string* _internal_mutable_missinguids();
public:
// string address = 2;
void clear_address();
const std::string& address() const;
void set_address(const std::string& value);
void set_address(std::string&& value);
void set_address(const char* value);
void set_address(const char* value, size_t size);
std::string* mutable_address();
std::string* release_address();
void set_allocated_address(std::string* address);
private:
const std::string& _internal_address() const;
void _internal_set_address(const std::string& value);
std::string* _internal_mutable_address();
public:
// @@protoc_insertion_point(class_scope:recoverKV.RecRequest)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr missinguids_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr address_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// -------------------------------------------------------------------
class RecResponse PROTOBUF_FINAL :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:recoverKV.RecResponse) */ {
public:
inline RecResponse() : RecResponse(nullptr) {}
virtual ~RecResponse();
RecResponse(const RecResponse& from);
RecResponse(RecResponse&& from) noexcept
: RecResponse() {
*this = ::std::move(from);
}
inline RecResponse& operator=(const RecResponse& from) {
CopyFrom(from);
return *this;
}
inline RecResponse& operator=(RecResponse&& from) noexcept {
if (GetArena() == from.GetArena()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const RecResponse& default_instance();
static inline const RecResponse* internal_default_instance() {
return reinterpret_cast<const RecResponse*>(
&_RecResponse_default_instance_);
}
static constexpr int kIndexInFileMessages =
12;
friend void swap(RecResponse& a, RecResponse& b) {
a.Swap(&b);
}
inline void Swap(RecResponse* other) {
if (other == this) return;
if (GetArena() == other->GetArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(RecResponse* other) {
if (other == this) return;
GOOGLE_DCHECK(GetArena() == other->GetArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline RecResponse* New() const final {
return CreateMaybeMessage<RecResponse>(nullptr);
}
RecResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<RecResponse>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const RecResponse& from);
void MergeFrom(const RecResponse& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(RecResponse* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "recoverKV.RecResponse";
}
protected:
explicit RecResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_recoverKV_2eproto);
return ::descriptor_table_recoverKV_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kQueryFieldNumber = 1,
kFoundErrorFieldNumber = 2,
};
// string query = 1;
void clear_query();
const std::string& query() const;
void set_query(const std::string& value);
void set_query(std::string&& value);
void set_query(const char* value);
void set_query(const char* value, size_t size);
std::string* mutable_query();
std::string* release_query();
void set_allocated_query(std::string* query);
private:
const std::string& _internal_query() const;
void _internal_set_query(const std::string& value);
std::string* _internal_mutable_query();
public:
// int32 foundError = 2;
void clear_founderror();
::PROTOBUF_NAMESPACE_ID::int32 founderror() const;
void set_founderror(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_founderror() const;
void _internal_set_founderror(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// @@protoc_insertion_point(class_scope:recoverKV.RecResponse)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr query_;
::PROTOBUF_NAMESPACE_ID::int32 founderror_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_recoverKV_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// Request
// string clientID = 1;
inline void Request::clear_clientid() {
clientid_.ClearToEmpty();
}
inline const std::string& Request::clientid() const {
// @@protoc_insertion_point(field_get:recoverKV.Request.clientID)
return _internal_clientid();
}
inline void Request::set_clientid(const std::string& value) {
_internal_set_clientid(value);
// @@protoc_insertion_point(field_set:recoverKV.Request.clientID)
}
inline std::string* Request::mutable_clientid() {
// @@protoc_insertion_point(field_mutable:recoverKV.Request.clientID)
return _internal_mutable_clientid();
}
inline const std::string& Request::_internal_clientid() const {
return clientid_.Get();
}
inline void Request::_internal_set_clientid(const std::string& value) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void Request::set_clientid(std::string&& value) {
clientid_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.Request.clientID)
}
inline void Request::set_clientid(const char* value) {
GOOGLE_DCHECK(value != nullptr);
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.Request.clientID)
}
inline void Request::set_clientid(const char* value,
size_t size) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.Request.clientID)
}
inline std::string* Request::_internal_mutable_clientid() {
return clientid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* Request::release_clientid() {
// @@protoc_insertion_point(field_release:recoverKV.Request.clientID)
return clientid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void Request::set_allocated_clientid(std::string* clientid) {
if (clientid != nullptr) {
} else {
}
clientid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), clientid,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.Request.clientID)
}
// string key = 2;
inline void Request::clear_key() {
key_.ClearToEmpty();
}
inline const std::string& Request::key() const {
// @@protoc_insertion_point(field_get:recoverKV.Request.key)
return _internal_key();
}
inline void Request::set_key(const std::string& value) {
_internal_set_key(value);
// @@protoc_insertion_point(field_set:recoverKV.Request.key)
}
inline std::string* Request::mutable_key() {
// @@protoc_insertion_point(field_mutable:recoverKV.Request.key)
return _internal_mutable_key();
}
inline const std::string& Request::_internal_key() const {
return key_.Get();
}
inline void Request::_internal_set_key(const std::string& value) {
key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void Request::set_key(std::string&& value) {
key_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.Request.key)
}
inline void Request::set_key(const char* value) {
GOOGLE_DCHECK(value != nullptr);
key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.Request.key)
}
inline void Request::set_key(const char* value,
size_t size) {
key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.Request.key)
}
inline std::string* Request::_internal_mutable_key() {
return key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* Request::release_key() {
// @@protoc_insertion_point(field_release:recoverKV.Request.key)
return key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void Request::set_allocated_key(std::string* key) {
if (key != nullptr) {
} else {
}
key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.Request.key)
}
// string value = 3;
inline void Request::clear_value() {
value_.ClearToEmpty();
}
inline const std::string& Request::value() const {
// @@protoc_insertion_point(field_get:recoverKV.Request.value)
return _internal_value();
}
inline void Request::set_value(const std::string& value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:recoverKV.Request.value)
}
inline std::string* Request::mutable_value() {
// @@protoc_insertion_point(field_mutable:recoverKV.Request.value)
return _internal_mutable_value();
}
inline const std::string& Request::_internal_value() const {
return value_.Get();
}
inline void Request::_internal_set_value(const std::string& value) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void Request::set_value(std::string&& value) {
value_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.Request.value)
}
inline void Request::set_value(const char* value) {
GOOGLE_DCHECK(value != nullptr);
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.Request.value)
}
inline void Request::set_value(const char* value,
size_t size) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.Request.value)
}
inline std::string* Request::_internal_mutable_value() {
return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* Request::release_value() {
// @@protoc_insertion_point(field_release:recoverKV.Request.value)
return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void Request::set_allocated_value(std::string* value) {
if (value != nullptr) {
} else {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.Request.value)
}
// -------------------------------------------------------------------
// Response
// string value = 1;
inline void Response::clear_value() {
value_.ClearToEmpty();
}
inline const std::string& Response::value() const {
// @@protoc_insertion_point(field_get:recoverKV.Response.value)
return _internal_value();
}
inline void Response::set_value(const std::string& value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:recoverKV.Response.value)
}
inline std::string* Response::mutable_value() {
// @@protoc_insertion_point(field_mutable:recoverKV.Response.value)
return _internal_mutable_value();
}
inline const std::string& Response::_internal_value() const {
return value_.Get();
}
inline void Response::_internal_set_value(const std::string& value) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void Response::set_value(std::string&& value) {
value_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.Response.value)
}
inline void Response::set_value(const char* value) {
GOOGLE_DCHECK(value != nullptr);
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.Response.value)
}
inline void Response::set_value(const char* value,
size_t size) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.Response.value)
}
inline std::string* Response::_internal_mutable_value() {
return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* Response::release_value() {
// @@protoc_insertion_point(field_release:recoverKV.Response.value)
return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void Response::set_allocated_value(std::string* value) {
if (value != nullptr) {
} else {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.Response.value)
}
// int32 successCode = 2;
inline void Response::clear_successcode() {
successcode_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Response::_internal_successcode() const {
return successcode_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Response::successcode() const {
// @@protoc_insertion_point(field_get:recoverKV.Response.successCode)
return _internal_successcode();
}
inline void Response::_internal_set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value) {
successcode_ = value;
}
inline void Response::set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_successcode(value);
// @@protoc_insertion_point(field_set:recoverKV.Response.successCode)
}
// -------------------------------------------------------------------
// StateRequest
// string clientID = 1;
inline void StateRequest::clear_clientid() {
clientid_.ClearToEmpty();
}
inline const std::string& StateRequest::clientid() const {
// @@protoc_insertion_point(field_get:recoverKV.StateRequest.clientID)
return _internal_clientid();
}
inline void StateRequest::set_clientid(const std::string& value) {
_internal_set_clientid(value);
// @@protoc_insertion_point(field_set:recoverKV.StateRequest.clientID)
}
inline std::string* StateRequest::mutable_clientid() {
// @@protoc_insertion_point(field_mutable:recoverKV.StateRequest.clientID)
return _internal_mutable_clientid();
}
inline const std::string& StateRequest::_internal_clientid() const {
return clientid_.Get();
}
inline void StateRequest::_internal_set_clientid(const std::string& value) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void StateRequest::set_clientid(std::string&& value) {
clientid_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.StateRequest.clientID)
}
inline void StateRequest::set_clientid(const char* value) {
GOOGLE_DCHECK(value != nullptr);
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.StateRequest.clientID)
}
inline void StateRequest::set_clientid(const char* value,
size_t size) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.StateRequest.clientID)
}
inline std::string* StateRequest::_internal_mutable_clientid() {
return clientid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* StateRequest::release_clientid() {
// @@protoc_insertion_point(field_release:recoverKV.StateRequest.clientID)
return clientid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void StateRequest::set_allocated_clientid(std::string* clientid) {
if (clientid != nullptr) {
} else {
}
clientid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), clientid,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.StateRequest.clientID)
}
// string serversList = 2;
inline void StateRequest::clear_serverslist() {
serverslist_.ClearToEmpty();
}
inline const std::string& StateRequest::serverslist() const {
// @@protoc_insertion_point(field_get:recoverKV.StateRequest.serversList)
return _internal_serverslist();
}
inline void StateRequest::set_serverslist(const std::string& value) {
_internal_set_serverslist(value);
// @@protoc_insertion_point(field_set:recoverKV.StateRequest.serversList)
}
inline std::string* StateRequest::mutable_serverslist() {
// @@protoc_insertion_point(field_mutable:recoverKV.StateRequest.serversList)
return _internal_mutable_serverslist();
}
inline const std::string& StateRequest::_internal_serverslist() const {
return serverslist_.Get();
}
inline void StateRequest::_internal_set_serverslist(const std::string& value) {
serverslist_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void StateRequest::set_serverslist(std::string&& value) {
serverslist_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.StateRequest.serversList)
}
inline void StateRequest::set_serverslist(const char* value) {
GOOGLE_DCHECK(value != nullptr);
serverslist_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.StateRequest.serversList)
}
inline void StateRequest::set_serverslist(const char* value,
size_t size) {
serverslist_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.StateRequest.serversList)
}
inline std::string* StateRequest::_internal_mutable_serverslist() {
return serverslist_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* StateRequest::release_serverslist() {
// @@protoc_insertion_point(field_release:recoverKV.StateRequest.serversList)
return serverslist_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void StateRequest::set_allocated_serverslist(std::string* serverslist) {
if (serverslist != nullptr) {
} else {
}
serverslist_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), serverslist,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.StateRequest.serversList)
}
// -------------------------------------------------------------------
// KillRequest
// string clientID = 1;
inline void KillRequest::clear_clientid() {
clientid_.ClearToEmpty();
}
inline const std::string& KillRequest::clientid() const {
// @@protoc_insertion_point(field_get:recoverKV.KillRequest.clientID)
return _internal_clientid();
}
inline void KillRequest::set_clientid(const std::string& value) {
_internal_set_clientid(value);
// @@protoc_insertion_point(field_set:recoverKV.KillRequest.clientID)
}
inline std::string* KillRequest::mutable_clientid() {
// @@protoc_insertion_point(field_mutable:recoverKV.KillRequest.clientID)
return _internal_mutable_clientid();
}
inline const std::string& KillRequest::_internal_clientid() const {
return clientid_.Get();
}
inline void KillRequest::_internal_set_clientid(const std::string& value) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void KillRequest::set_clientid(std::string&& value) {
clientid_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.KillRequest.clientID)
}
inline void KillRequest::set_clientid(const char* value) {
GOOGLE_DCHECK(value != nullptr);
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.KillRequest.clientID)
}
inline void KillRequest::set_clientid(const char* value,
size_t size) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.KillRequest.clientID)
}
inline std::string* KillRequest::_internal_mutable_clientid() {
return clientid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* KillRequest::release_clientid() {
// @@protoc_insertion_point(field_release:recoverKV.KillRequest.clientID)
return clientid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void KillRequest::set_allocated_clientid(std::string* clientid) {
if (clientid != nullptr) {
} else {
}
clientid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), clientid,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.KillRequest.clientID)
}
// string serverName = 2;
inline void KillRequest::clear_servername() {
servername_.ClearToEmpty();
}
inline const std::string& KillRequest::servername() const {
// @@protoc_insertion_point(field_get:recoverKV.KillRequest.serverName)
return _internal_servername();
}
inline void KillRequest::set_servername(const std::string& value) {
_internal_set_servername(value);
// @@protoc_insertion_point(field_set:recoverKV.KillRequest.serverName)
}
inline std::string* KillRequest::mutable_servername() {
// @@protoc_insertion_point(field_mutable:recoverKV.KillRequest.serverName)
return _internal_mutable_servername();
}
inline const std::string& KillRequest::_internal_servername() const {
return servername_.Get();
}
inline void KillRequest::_internal_set_servername(const std::string& value) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void KillRequest::set_servername(std::string&& value) {
servername_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.KillRequest.serverName)
}
inline void KillRequest::set_servername(const char* value) {
GOOGLE_DCHECK(value != nullptr);
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.KillRequest.serverName)
}
inline void KillRequest::set_servername(const char* value,
size_t size) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.KillRequest.serverName)
}
inline std::string* KillRequest::_internal_mutable_servername() {
return servername_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* KillRequest::release_servername() {
// @@protoc_insertion_point(field_release:recoverKV.KillRequest.serverName)
return servername_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void KillRequest::set_allocated_servername(std::string* servername) {
if (servername != nullptr) {
} else {
}
servername_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), servername,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.KillRequest.serverName)
}
// int32 cleanType = 3;
inline void KillRequest::clear_cleantype() {
cleantype_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 KillRequest::_internal_cleantype() const {
return cleantype_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 KillRequest::cleantype() const {
// @@protoc_insertion_point(field_get:recoverKV.KillRequest.cleanType)
return _internal_cleantype();
}
inline void KillRequest::_internal_set_cleantype(::PROTOBUF_NAMESPACE_ID::int32 value) {
cleantype_ = value;
}
inline void KillRequest::set_cleantype(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_cleantype(value);
// @@protoc_insertion_point(field_set:recoverKV.KillRequest.cleanType)
}
// -------------------------------------------------------------------
// PartitionRequest
// string clientID = 1;
inline void PartitionRequest::clear_clientid() {
clientid_.ClearToEmpty();
}
inline const std::string& PartitionRequest::clientid() const {
// @@protoc_insertion_point(field_get:recoverKV.PartitionRequest.clientID)
return _internal_clientid();
}
inline void PartitionRequest::set_clientid(const std::string& value) {
_internal_set_clientid(value);
// @@protoc_insertion_point(field_set:recoverKV.PartitionRequest.clientID)
}
inline std::string* PartitionRequest::mutable_clientid() {
// @@protoc_insertion_point(field_mutable:recoverKV.PartitionRequest.clientID)
return _internal_mutable_clientid();
}
inline const std::string& PartitionRequest::_internal_clientid() const {
return clientid_.Get();
}
inline void PartitionRequest::_internal_set_clientid(const std::string& value) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void PartitionRequest::set_clientid(std::string&& value) {
clientid_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.PartitionRequest.clientID)
}
inline void PartitionRequest::set_clientid(const char* value) {
GOOGLE_DCHECK(value != nullptr);
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.PartitionRequest.clientID)
}
inline void PartitionRequest::set_clientid(const char* value,
size_t size) {
clientid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.PartitionRequest.clientID)
}
inline std::string* PartitionRequest::_internal_mutable_clientid() {
return clientid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* PartitionRequest::release_clientid() {
// @@protoc_insertion_point(field_release:recoverKV.PartitionRequest.clientID)
return clientid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void PartitionRequest::set_allocated_clientid(std::string* clientid) {
if (clientid != nullptr) {
} else {
}
clientid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), clientid,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.PartitionRequest.clientID)
}
// string serverName = 2;
inline void PartitionRequest::clear_servername() {
servername_.ClearToEmpty();
}
inline const std::string& PartitionRequest::servername() const {
// @@protoc_insertion_point(field_get:recoverKV.PartitionRequest.serverName)
return _internal_servername();
}
inline void PartitionRequest::set_servername(const std::string& value) {
_internal_set_servername(value);
// @@protoc_insertion_point(field_set:recoverKV.PartitionRequest.serverName)
}
inline std::string* PartitionRequest::mutable_servername() {
// @@protoc_insertion_point(field_mutable:recoverKV.PartitionRequest.serverName)
return _internal_mutable_servername();
}
inline const std::string& PartitionRequest::_internal_servername() const {
return servername_.Get();
}
inline void PartitionRequest::_internal_set_servername(const std::string& value) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void PartitionRequest::set_servername(std::string&& value) {
servername_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.PartitionRequest.serverName)
}
inline void PartitionRequest::set_servername(const char* value) {
GOOGLE_DCHECK(value != nullptr);
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.PartitionRequest.serverName)
}
inline void PartitionRequest::set_servername(const char* value,
size_t size) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.PartitionRequest.serverName)
}
inline std::string* PartitionRequest::_internal_mutable_servername() {
return servername_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* PartitionRequest::release_servername() {
// @@protoc_insertion_point(field_release:recoverKV.PartitionRequest.serverName)
return servername_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void PartitionRequest::set_allocated_servername(std::string* servername) {
if (servername != nullptr) {
} else {
}
servername_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), servername,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.PartitionRequest.serverName)
}
// string reachable = 3;
inline void PartitionRequest::clear_reachable() {
reachable_.ClearToEmpty();
}
inline const std::string& PartitionRequest::reachable() const {
// @@protoc_insertion_point(field_get:recoverKV.PartitionRequest.reachable)
return _internal_reachable();
}
inline void PartitionRequest::set_reachable(const std::string& value) {
_internal_set_reachable(value);
// @@protoc_insertion_point(field_set:recoverKV.PartitionRequest.reachable)
}
inline std::string* PartitionRequest::mutable_reachable() {
// @@protoc_insertion_point(field_mutable:recoverKV.PartitionRequest.reachable)
return _internal_mutable_reachable();
}
inline const std::string& PartitionRequest::_internal_reachable() const {
return reachable_.Get();
}
inline void PartitionRequest::_internal_set_reachable(const std::string& value) {
reachable_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void PartitionRequest::set_reachable(std::string&& value) {
reachable_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.PartitionRequest.reachable)
}
inline void PartitionRequest::set_reachable(const char* value) {
GOOGLE_DCHECK(value != nullptr);
reachable_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.PartitionRequest.reachable)
}
inline void PartitionRequest::set_reachable(const char* value,
size_t size) {
reachable_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.PartitionRequest.reachable)
}
inline std::string* PartitionRequest::_internal_mutable_reachable() {
return reachable_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* PartitionRequest::release_reachable() {
// @@protoc_insertion_point(field_release:recoverKV.PartitionRequest.reachable)
return reachable_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void PartitionRequest::set_allocated_reachable(std::string* reachable) {
if (reachable != nullptr) {
} else {
}
reachable_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), reachable,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.PartitionRequest.reachable)
}
// -------------------------------------------------------------------
// InternalRequest
// int64 queryID = 1;
inline void InternalRequest::clear_queryid() {
queryid_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 InternalRequest::_internal_queryid() const {
return queryid_;
}
inline ::PROTOBUF_NAMESPACE_ID::int64 InternalRequest::queryid() const {
// @@protoc_insertion_point(field_get:recoverKV.InternalRequest.queryID)
return _internal_queryid();
}
inline void InternalRequest::_internal_set_queryid(::PROTOBUF_NAMESPACE_ID::int64 value) {
queryid_ = value;
}
inline void InternalRequest::set_queryid(::PROTOBUF_NAMESPACE_ID::int64 value) {
_internal_set_queryid(value);
// @@protoc_insertion_point(field_set:recoverKV.InternalRequest.queryID)
}
// string key = 2;
inline void InternalRequest::clear_key() {
key_.ClearToEmpty();
}
inline const std::string& InternalRequest::key() const {
// @@protoc_insertion_point(field_get:recoverKV.InternalRequest.key)
return _internal_key();
}
inline void InternalRequest::set_key(const std::string& value) {
_internal_set_key(value);
// @@protoc_insertion_point(field_set:recoverKV.InternalRequest.key)
}
inline std::string* InternalRequest::mutable_key() {
// @@protoc_insertion_point(field_mutable:recoverKV.InternalRequest.key)
return _internal_mutable_key();
}
inline const std::string& InternalRequest::_internal_key() const {
return key_.Get();
}
inline void InternalRequest::_internal_set_key(const std::string& value) {
key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void InternalRequest::set_key(std::string&& value) {
key_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.InternalRequest.key)
}
inline void InternalRequest::set_key(const char* value) {
GOOGLE_DCHECK(value != nullptr);
key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.InternalRequest.key)
}
inline void InternalRequest::set_key(const char* value,
size_t size) {
key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.InternalRequest.key)
}
inline std::string* InternalRequest::_internal_mutable_key() {
return key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* InternalRequest::release_key() {
// @@protoc_insertion_point(field_release:recoverKV.InternalRequest.key)
return key_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void InternalRequest::set_allocated_key(std::string* key) {
if (key != nullptr) {
} else {
}
key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.InternalRequest.key)
}
// string value = 3;
inline void InternalRequest::clear_value() {
value_.ClearToEmpty();
}
inline const std::string& InternalRequest::value() const {
// @@protoc_insertion_point(field_get:recoverKV.InternalRequest.value)
return _internal_value();
}
inline void InternalRequest::set_value(const std::string& value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:recoverKV.InternalRequest.value)
}
inline std::string* InternalRequest::mutable_value() {
// @@protoc_insertion_point(field_mutable:recoverKV.InternalRequest.value)
return _internal_mutable_value();
}
inline const std::string& InternalRequest::_internal_value() const {
return value_.Get();
}
inline void InternalRequest::_internal_set_value(const std::string& value) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void InternalRequest::set_value(std::string&& value) {
value_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.InternalRequest.value)
}
inline void InternalRequest::set_value(const char* value) {
GOOGLE_DCHECK(value != nullptr);
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.InternalRequest.value)
}
inline void InternalRequest::set_value(const char* value,
size_t size) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.InternalRequest.value)
}
inline std::string* InternalRequest::_internal_mutable_value() {
return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* InternalRequest::release_value() {
// @@protoc_insertion_point(field_release:recoverKV.InternalRequest.value)
return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void InternalRequest::set_allocated_value(std::string* value) {
if (value != nullptr) {
} else {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.InternalRequest.value)
}
// -------------------------------------------------------------------
// InternalResponse
// string value = 1;
inline void InternalResponse::clear_value() {
value_.ClearToEmpty();
}
inline const std::string& InternalResponse::value() const {
// @@protoc_insertion_point(field_get:recoverKV.InternalResponse.value)
return _internal_value();
}
inline void InternalResponse::set_value(const std::string& value) {
_internal_set_value(value);
// @@protoc_insertion_point(field_set:recoverKV.InternalResponse.value)
}
inline std::string* InternalResponse::mutable_value() {
// @@protoc_insertion_point(field_mutable:recoverKV.InternalResponse.value)
return _internal_mutable_value();
}
inline const std::string& InternalResponse::_internal_value() const {
return value_.Get();
}
inline void InternalResponse::_internal_set_value(const std::string& value) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void InternalResponse::set_value(std::string&& value) {
value_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.InternalResponse.value)
}
inline void InternalResponse::set_value(const char* value) {
GOOGLE_DCHECK(value != nullptr);
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.InternalResponse.value)
}
inline void InternalResponse::set_value(const char* value,
size_t size) {
value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.InternalResponse.value)
}
inline std::string* InternalResponse::_internal_mutable_value() {
return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* InternalResponse::release_value() {
// @@protoc_insertion_point(field_release:recoverKV.InternalResponse.value)
return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void InternalResponse::set_allocated_value(std::string* value) {
if (value != nullptr) {
} else {
}
value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.InternalResponse.value)
}
// int32 successCode = 2;
inline void InternalResponse::clear_successcode() {
successcode_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 InternalResponse::_internal_successcode() const {
return successcode_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 InternalResponse::successcode() const {
// @@protoc_insertion_point(field_get:recoverKV.InternalResponse.successCode)
return _internal_successcode();
}
inline void InternalResponse::_internal_set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value) {
successcode_ = value;
}
inline void InternalResponse::set_successcode(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_successcode(value);
// @@protoc_insertion_point(field_set:recoverKV.InternalResponse.successCode)
}
// -------------------------------------------------------------------
// MarkStatus
// string serverName = 1;
inline void MarkStatus::clear_servername() {
servername_.ClearToEmpty();
}
inline const std::string& MarkStatus::servername() const {
// @@protoc_insertion_point(field_get:recoverKV.MarkStatus.serverName)
return _internal_servername();
}
inline void MarkStatus::set_servername(const std::string& value) {
_internal_set_servername(value);
// @@protoc_insertion_point(field_set:recoverKV.MarkStatus.serverName)
}
inline std::string* MarkStatus::mutable_servername() {
// @@protoc_insertion_point(field_mutable:recoverKV.MarkStatus.serverName)
return _internal_mutable_servername();
}
inline const std::string& MarkStatus::_internal_servername() const {
return servername_.Get();
}
inline void MarkStatus::_internal_set_servername(const std::string& value) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void MarkStatus::set_servername(std::string&& value) {
servername_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.MarkStatus.serverName)
}
inline void MarkStatus::set_servername(const char* value) {
GOOGLE_DCHECK(value != nullptr);
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.MarkStatus.serverName)
}
inline void MarkStatus::set_servername(const char* value,
size_t size) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.MarkStatus.serverName)
}
inline std::string* MarkStatus::_internal_mutable_servername() {
return servername_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* MarkStatus::release_servername() {
// @@protoc_insertion_point(field_release:recoverKV.MarkStatus.serverName)
return servername_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void MarkStatus::set_allocated_servername(std::string* servername) {
if (servername != nullptr) {
} else {
}
servername_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), servername,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.MarkStatus.serverName)
}
// int32 newStatus = 2;
inline void MarkStatus::clear_newstatus() {
newstatus_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MarkStatus::_internal_newstatus() const {
return newstatus_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MarkStatus::newstatus() const {
// @@protoc_insertion_point(field_get:recoverKV.MarkStatus.newStatus)
return _internal_newstatus();
}
inline void MarkStatus::_internal_set_newstatus(::PROTOBUF_NAMESPACE_ID::int32 value) {
newstatus_ = value;
}
inline void MarkStatus::set_newstatus(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_newstatus(value);
// @@protoc_insertion_point(field_set:recoverKV.MarkStatus.newStatus)
}
// -------------------------------------------------------------------
// ServerInfo
// string serverName = 1;
inline void ServerInfo::clear_servername() {
servername_.ClearToEmpty();
}
inline const std::string& ServerInfo::servername() const {
// @@protoc_insertion_point(field_get:recoverKV.ServerInfo.serverName)
return _internal_servername();
}
inline void ServerInfo::set_servername(const std::string& value) {
_internal_set_servername(value);
// @@protoc_insertion_point(field_set:recoverKV.ServerInfo.serverName)
}
inline std::string* ServerInfo::mutable_servername() {
// @@protoc_insertion_point(field_mutable:recoverKV.ServerInfo.serverName)
return _internal_mutable_servername();
}
inline const std::string& ServerInfo::_internal_servername() const {
return servername_.Get();
}
inline void ServerInfo::_internal_set_servername(const std::string& value) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void ServerInfo::set_servername(std::string&& value) {
servername_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.ServerInfo.serverName)
}
inline void ServerInfo::set_servername(const char* value) {
GOOGLE_DCHECK(value != nullptr);
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.ServerInfo.serverName)
}
inline void ServerInfo::set_servername(const char* value,
size_t size) {
servername_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.ServerInfo.serverName)
}
inline std::string* ServerInfo::_internal_mutable_servername() {
return servername_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* ServerInfo::release_servername() {
// @@protoc_insertion_point(field_release:recoverKV.ServerInfo.serverName)
return servername_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void ServerInfo::set_allocated_servername(std::string* servername) {
if (servername != nullptr) {
} else {
}
servername_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), servername,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.ServerInfo.serverName)
}
// -------------------------------------------------------------------
// AlivePeersResponse
// string aliveList = 1;
inline void AlivePeersResponse::clear_alivelist() {
alivelist_.ClearToEmpty();
}
inline const std::string& AlivePeersResponse::alivelist() const {
// @@protoc_insertion_point(field_get:recoverKV.AlivePeersResponse.aliveList)
return _internal_alivelist();
}
inline void AlivePeersResponse::set_alivelist(const std::string& value) {
_internal_set_alivelist(value);
// @@protoc_insertion_point(field_set:recoverKV.AlivePeersResponse.aliveList)
}
inline std::string* AlivePeersResponse::mutable_alivelist() {
// @@protoc_insertion_point(field_mutable:recoverKV.AlivePeersResponse.aliveList)
return _internal_mutable_alivelist();
}
inline const std::string& AlivePeersResponse::_internal_alivelist() const {
return alivelist_.Get();
}
inline void AlivePeersResponse::_internal_set_alivelist(const std::string& value) {
alivelist_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void AlivePeersResponse::set_alivelist(std::string&& value) {
alivelist_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.AlivePeersResponse.aliveList)
}
inline void AlivePeersResponse::set_alivelist(const char* value) {
GOOGLE_DCHECK(value != nullptr);
alivelist_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.AlivePeersResponse.aliveList)
}
inline void AlivePeersResponse::set_alivelist(const char* value,
size_t size) {
alivelist_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.AlivePeersResponse.aliveList)
}
inline std::string* AlivePeersResponse::_internal_mutable_alivelist() {
return alivelist_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* AlivePeersResponse::release_alivelist() {
// @@protoc_insertion_point(field_release:recoverKV.AlivePeersResponse.aliveList)
return alivelist_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void AlivePeersResponse::set_allocated_alivelist(std::string* alivelist) {
if (alivelist != nullptr) {
} else {
}
alivelist_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), alivelist,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.AlivePeersResponse.aliveList)
}
// -------------------------------------------------------------------
// Ack
// int64 globalUID = 1;
inline void Ack::clear_globaluid() {
globaluid_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 Ack::_internal_globaluid() const {
return globaluid_;
}
inline ::PROTOBUF_NAMESPACE_ID::int64 Ack::globaluid() const {
// @@protoc_insertion_point(field_get:recoverKV.Ack.globalUID)
return _internal_globaluid();
}
inline void Ack::_internal_set_globaluid(::PROTOBUF_NAMESPACE_ID::int64 value) {
globaluid_ = value;
}
inline void Ack::set_globaluid(::PROTOBUF_NAMESPACE_ID::int64 value) {
_internal_set_globaluid(value);
// @@protoc_insertion_point(field_set:recoverKV.Ack.globalUID)
}
// -------------------------------------------------------------------
// RecRequest
// string missingUIDs = 1;
inline void RecRequest::clear_missinguids() {
missinguids_.ClearToEmpty();
}
inline const std::string& RecRequest::missinguids() const {
// @@protoc_insertion_point(field_get:recoverKV.RecRequest.missingUIDs)
return _internal_missinguids();
}
inline void RecRequest::set_missinguids(const std::string& value) {
_internal_set_missinguids(value);
// @@protoc_insertion_point(field_set:recoverKV.RecRequest.missingUIDs)
}
inline std::string* RecRequest::mutable_missinguids() {
// @@protoc_insertion_point(field_mutable:recoverKV.RecRequest.missingUIDs)
return _internal_mutable_missinguids();
}
inline const std::string& RecRequest::_internal_missinguids() const {
return missinguids_.Get();
}
inline void RecRequest::_internal_set_missinguids(const std::string& value) {
missinguids_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void RecRequest::set_missinguids(std::string&& value) {
missinguids_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.RecRequest.missingUIDs)
}
inline void RecRequest::set_missinguids(const char* value) {
GOOGLE_DCHECK(value != nullptr);
missinguids_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.RecRequest.missingUIDs)
}
inline void RecRequest::set_missinguids(const char* value,
size_t size) {
missinguids_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.RecRequest.missingUIDs)
}
inline std::string* RecRequest::_internal_mutable_missinguids() {
return missinguids_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* RecRequest::release_missinguids() {
// @@protoc_insertion_point(field_release:recoverKV.RecRequest.missingUIDs)
return missinguids_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void RecRequest::set_allocated_missinguids(std::string* missinguids) {
if (missinguids != nullptr) {
} else {
}
missinguids_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), missinguids,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.RecRequest.missingUIDs)
}
// string address = 2;
inline void RecRequest::clear_address() {
address_.ClearToEmpty();
}
inline const std::string& RecRequest::address() const {
// @@protoc_insertion_point(field_get:recoverKV.RecRequest.address)
return _internal_address();
}
inline void RecRequest::set_address(const std::string& value) {
_internal_set_address(value);
// @@protoc_insertion_point(field_set:recoverKV.RecRequest.address)
}
inline std::string* RecRequest::mutable_address() {
// @@protoc_insertion_point(field_mutable:recoverKV.RecRequest.address)
return _internal_mutable_address();
}
inline const std::string& RecRequest::_internal_address() const {
return address_.Get();
}
inline void RecRequest::_internal_set_address(const std::string& value) {
address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void RecRequest::set_address(std::string&& value) {
address_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.RecRequest.address)
}
inline void RecRequest::set_address(const char* value) {
GOOGLE_DCHECK(value != nullptr);
address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.RecRequest.address)
}
inline void RecRequest::set_address(const char* value,
size_t size) {
address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.RecRequest.address)
}
inline std::string* RecRequest::_internal_mutable_address() {
return address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* RecRequest::release_address() {
// @@protoc_insertion_point(field_release:recoverKV.RecRequest.address)
return address_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void RecRequest::set_allocated_address(std::string* address) {
if (address != nullptr) {
} else {
}
address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), address,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.RecRequest.address)
}
// -------------------------------------------------------------------
// RecResponse
// string query = 1;
inline void RecResponse::clear_query() {
query_.ClearToEmpty();
}
inline const std::string& RecResponse::query() const {
// @@protoc_insertion_point(field_get:recoverKV.RecResponse.query)
return _internal_query();
}
inline void RecResponse::set_query(const std::string& value) {
_internal_set_query(value);
// @@protoc_insertion_point(field_set:recoverKV.RecResponse.query)
}
inline std::string* RecResponse::mutable_query() {
// @@protoc_insertion_point(field_mutable:recoverKV.RecResponse.query)
return _internal_mutable_query();
}
inline const std::string& RecResponse::_internal_query() const {
return query_.Get();
}
inline void RecResponse::_internal_set_query(const std::string& value) {
query_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
}
inline void RecResponse::set_query(std::string&& value) {
query_.Set(
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
// @@protoc_insertion_point(field_set_rvalue:recoverKV.RecResponse.query)
}
inline void RecResponse::set_query(const char* value) {
GOOGLE_DCHECK(value != nullptr);
query_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
// @@protoc_insertion_point(field_set_char:recoverKV.RecResponse.query)
}
inline void RecResponse::set_query(const char* value,
size_t size) {
query_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
reinterpret_cast<const char*>(value), size), GetArena());
// @@protoc_insertion_point(field_set_pointer:recoverKV.RecResponse.query)
}
inline std::string* RecResponse::_internal_mutable_query() {
return query_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
}
inline std::string* RecResponse::release_query() {
// @@protoc_insertion_point(field_release:recoverKV.RecResponse.query)
return query_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void RecResponse::set_allocated_query(std::string* query) {
if (query != nullptr) {
} else {
}
query_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), query,
GetArena());
// @@protoc_insertion_point(field_set_allocated:recoverKV.RecResponse.query)
}
// int32 foundError = 2;
inline void RecResponse::clear_founderror() {
founderror_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 RecResponse::_internal_founderror() const {
return founderror_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 RecResponse::founderror() const {
// @@protoc_insertion_point(field_get:recoverKV.RecResponse.foundError)
return _internal_founderror();
}
inline void RecResponse::_internal_set_founderror(::PROTOBUF_NAMESPACE_ID::int32 value) {
founderror_ = value;
}
inline void RecResponse::set_founderror(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_founderror(value);
// @@protoc_insertion_point(field_set:recoverKV.RecResponse.foundError)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
} // namespace recoverKV
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_recoverKV_2eproto
| 36.978249 | 123 | 0.725007 | [
"object"
] |
5a040fff7f6f9af55a368c10b40d5743666192b9 | 9,604 | c | C | source/blender/modifiers/intern/MOD_particleinstance.c | wycivil08/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 30 | 2015-01-29T14:06:05.000Z | 2022-01-10T07:47:29.000Z | source/blender/modifiers/intern/MOD_particleinstance.c | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 1 | 2017-02-20T20:57:48.000Z | 2018-12-19T23:44:38.000Z | source/blender/modifiers/intern/MOD_particleinstance.c | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 15 | 2015-04-23T02:38:36.000Z | 2021-03-01T20:09:39.000Z | /*
* $Id: MOD_particleinstance.c 39342 2011-08-12 18:11:22Z blendix $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 by the Blender Foundation.
* All rights reserved.
*
* Contributor(s): Daniel Dunbar
* Ton Roosendaal,
* Ben Batt,
* Brecht Van Lommel,
* Campbell Barton
*
* ***** END GPL LICENSE BLOCK *****
*
*/
/** \file blender/modifiers/intern/MOD_particleinstance.c
* \ingroup modifiers
*/
#include "DNA_meshdata_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_lattice.h"
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "MOD_util.h"
#include "depsgraph_private.h"
static void initData(ModifierData *md)
{
ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
pimd->flag = eParticleInstanceFlag_Parents|eParticleInstanceFlag_Unborn|
eParticleInstanceFlag_Alive|eParticleInstanceFlag_Dead;
pimd->psys = 1;
pimd->position = 1.0f;
pimd->axis = 2;
}
static void copyData(ModifierData *md, ModifierData *target)
{
ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
ParticleInstanceModifierData *tpimd= (ParticleInstanceModifierData*) target;
tpimd->ob = pimd->ob;
tpimd->psys = pimd->psys;
tpimd->flag = pimd->flag;
tpimd->axis = pimd->axis;
tpimd->position = pimd->position;
tpimd->random_position = pimd->random_position;
}
static int dependsOnTime(ModifierData *UNUSED(md))
{
return 0;
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
struct Scene *UNUSED(scene),
Object *UNUSED(ob),
DagNode *obNode)
{
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData*) md;
if (pimd->ob) {
DagNode *curNode = dag_get_node(forest, pimd->ob);
dag_add_relation(forest, curNode, obNode,
DAG_RL_DATA_DATA | DAG_RL_OB_DATA,
"Particle Instance Modifier");
}
}
static void foreachObjectLink(ModifierData *md, Object *ob,
ObjectWalkFunc walk, void *userData)
{
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData*) md;
walk(userData, ob, &pimd->ob);
}
static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
DerivedMesh *derivedData,
int UNUSED(useRenderParams),
int UNUSED(isFinalCalc))
{
DerivedMesh *dm = derivedData, *result;
ParticleInstanceModifierData *pimd= (ParticleInstanceModifierData*) md;
ParticleSimulationData sim;
ParticleSystem *psys= NULL;
ParticleData *pa= NULL, *pars= NULL;
MFace *mface, *orig_mface;
MVert *mvert, *orig_mvert;
int i,totvert, totpart=0, totface, maxvert, maxface, first_particle=0;
short track=ob->trackflag%3, trackneg, axis = pimd->axis;
float max_co=0.0, min_co=0.0, temp_co[3], cross[3];
float *size=NULL;
trackneg=((ob->trackflag>2)?1:0);
if(pimd->ob==ob){
pimd->ob= NULL;
return derivedData;
}
if(pimd->ob){
psys = BLI_findlink(&pimd->ob->particlesystem,pimd->psys-1);
if(psys==NULL || psys->totpart==0)
return derivedData;
}
else return derivedData;
if(pimd->flag & eParticleInstanceFlag_Parents)
totpart+=psys->totpart;
if(pimd->flag & eParticleInstanceFlag_Children){
if(totpart==0)
first_particle=psys->totpart;
totpart+=psys->totchild;
}
if(totpart==0)
return derivedData;
sim.scene = md->scene;
sim.ob = pimd->ob;
sim.psys = psys;
sim.psmd = psys_get_modifier(pimd->ob, psys);
if(pimd->flag & eParticleInstanceFlag_UseSize) {
int p;
float *si;
si = size = MEM_callocN(totpart * sizeof(float), "particle size array");
if(pimd->flag & eParticleInstanceFlag_Parents) {
for(p=0, pa= psys->particles; p<psys->totpart; p++, pa++, si++)
*si = pa->size;
}
if(pimd->flag & eParticleInstanceFlag_Children) {
ChildParticle *cpa = psys->child;
for(p=0; p<psys->totchild; p++, cpa++, si++) {
*si = psys_get_child_size(psys, cpa, 0.0f, NULL);
}
}
}
pars=psys->particles;
totvert=dm->getNumVerts(dm);
totface=dm->getNumFaces(dm);
maxvert=totvert*totpart;
maxface=totface*totpart;
psys->lattice=psys_get_lattice(&sim);
if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED){
float min_r[3], max_r[3];
INIT_MINMAX(min_r, max_r);
dm->getMinMax(dm, min_r, max_r);
min_co=min_r[track];
max_co=max_r[track];
}
result = CDDM_from_template(dm, maxvert,dm->getNumEdges(dm)*totpart,maxface);
mvert=result->getVertArray(result);
orig_mvert=dm->getVertArray(dm);
for(i=0; i<maxvert; i++){
MVert *inMV;
MVert *mv = mvert + i;
ParticleKey state;
inMV = orig_mvert + i%totvert;
DM_copy_vert_data(dm, result, i%totvert, i, 1);
*mv = *inMV;
/*change orientation based on object trackflag*/
copy_v3_v3(temp_co, mv->co);
mv->co[axis]=temp_co[track];
mv->co[(axis+1)%3]=temp_co[(track+1)%3];
mv->co[(axis+2)%3]=temp_co[(track+2)%3];
if((psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) && pimd->flag & eParticleInstanceFlag_Path){
float ran = 0.0f;
if(pimd->random_position != 0.0f) {
BLI_srandom(psys->seed + (i/totvert)%totpart);
ran = pimd->random_position * BLI_frand();
}
if(pimd->flag & eParticleInstanceFlag_KeepShape) {
state.time = pimd->position * (1.0f - ran);
}
else {
state.time=(mv->co[axis]-min_co)/(max_co-min_co) * pimd->position * (1.0f - ran);
if(trackneg)
state.time=1.0f-state.time;
mv->co[axis] = 0.0;
}
psys_get_particle_on_path(&sim, first_particle + i/totvert, &state,1);
normalize_v3(state.vel);
/* TODO: incremental rotations somehow */
if(state.vel[axis] < -0.9999f || state.vel[axis] > 0.9999f) {
state.rot[0] = 1;
state.rot[1] = state.rot[2] = state.rot[3] = 0.0f;
}
else {
float temp[3] = {0.0f,0.0f,0.0f};
temp[axis] = 1.0f;
cross_v3_v3v3(cross, temp, state.vel);
/* state.vel[axis] is the only component surviving from a dot product with the axis */
axis_angle_to_quat(state.rot,cross,saacos(state.vel[axis]));
}
}
else{
state.time=-1.0;
psys_get_particle_state(&sim, first_particle + i/totvert, &state,1);
}
mul_qt_v3(state.rot,mv->co);
if(pimd->flag & eParticleInstanceFlag_UseSize)
mul_v3_fl(mv->co, size[i/totvert]);
VECADD(mv->co,mv->co,state.co);
}
mface=result->getFaceArray(result);
orig_mface=dm->getFaceArray(dm);
for(i=0; i<maxface; i++){
MFace *inMF;
MFace *mf = mface + i;
if(pimd->flag & eParticleInstanceFlag_Parents){
if(i/totface>=psys->totpart){
if(psys->part->childtype==PART_CHILD_PARTICLES)
pa=psys->particles+(psys->child+i/totface-psys->totpart)->parent;
else
pa= NULL;
}
else
pa=pars+i/totface;
}
else{
if(psys->part->childtype==PART_CHILD_PARTICLES)
pa=psys->particles+(psys->child+i/totface)->parent;
else
pa= NULL;
}
if(pa){
if(pa->alive==PARS_UNBORN && (pimd->flag&eParticleInstanceFlag_Unborn)==0) continue;
if(pa->alive==PARS_ALIVE && (pimd->flag&eParticleInstanceFlag_Alive)==0) continue;
if(pa->alive==PARS_DEAD && (pimd->flag&eParticleInstanceFlag_Dead)==0) continue;
}
inMF = orig_mface + i%totface;
DM_copy_face_data(dm, result, i%totface, i, 1);
*mf = *inMF;
mf->v1+=(i/totface)*totvert;
mf->v2+=(i/totface)*totvert;
mf->v3+=(i/totface)*totvert;
if(mf->v4)
mf->v4+=(i/totface)*totvert;
}
CDDM_calc_edges(result);
CDDM_calc_normals(result);
if(psys->lattice){
end_latt_deform(psys->lattice);
psys->lattice= NULL;
}
if(size)
MEM_freeN(size);
return result;
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
struct EditMesh *UNUSED(editData),
DerivedMesh *derivedData)
{
return applyModifier(md, ob, derivedData, 0, 1);
}
ModifierTypeInfo modifierType_ParticleInstance = {
/* name */ "ParticleInstance",
/* structName */ "ParticleInstanceModifierData",
/* structSize */ sizeof(ParticleInstanceModifierData),
/* type */ eModifierTypeType_Constructive,
/* flags */ eModifierTypeFlag_AcceptsMesh
| eModifierTypeFlag_SupportsMapping
| eModifierTypeFlag_SupportsEditmode
| eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
/* deformVerts */ NULL,
/* deformMatrices */ NULL,
/* deformVertsEM */ NULL,
/* deformMatricesEM */ NULL,
/* applyModifier */ applyModifier,
/* applyModifierEM */ applyModifierEM,
/* initData */ initData,
/* requiredDataMask */ NULL,
/* freeData */ NULL,
/* isDisabled */ NULL,
/* updateDepgraph */ updateDepgraph,
/* dependsOnTime */ dependsOnTime,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,
};
| 27.053521 | 134 | 0.682112 | [
"object"
] |
d65bae0b2187c6580a2deabd6c724d6da809888a | 11,436 | h | C | src/lib/binutils-bfd/include/elf/external.h | kkysen/LibCKhyber | 58be4b217500e7b494df3265660b7b30f4a52e64 | [
"MIT"
] | null | null | null | src/lib/binutils-bfd/include/elf/external.h | kkysen/LibCKhyber | 58be4b217500e7b494df3265660b7b30f4a52e64 | [
"MIT"
] | null | null | null | src/lib/binutils-bfd/include/elf/external.h | kkysen/LibCKhyber | 58be4b217500e7b494df3265660b7b30f4a52e64 | [
"MIT"
] | null | null | null | /* ELF support for BFD.
Copyright (C) 1991-2017 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
Programming Support Tools".
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
/* This file is part of ELF support for BFD, and contains the portions
that describe how ELF is represented externally by the BFD library.
I.E. it describes the in-file representation of ELF. It requires
the elf/common.h file which contains the portions that are common to
both the internal and external representations. */
/* The 64-bit stuff is kind of random. Perhaps someone will publish a
spec someday. */
#ifndef _ELF_EXTERNAL_H
#define _ELF_EXTERNAL_H
/* Special section indices, which may show up in st_shndx fields, among
other places. */
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */
#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
/* ELF Header (32-bit implementations) */
typedef struct {
unsigned char e_ident[16]; /* ELF "magic number" */
unsigned char e_type[2]; /* Identifies object file type */
unsigned char e_machine[2]; /* Specifies required architecture */
unsigned char e_version[4]; /* Identifies object file version */
unsigned char e_entry[4]; /* Entry point virtual address */
unsigned char e_phoff[4]; /* Program header table file offset */
unsigned char e_shoff[4]; /* Section header table file offset */
unsigned char e_flags[4]; /* Processor-specific flags */
unsigned char e_ehsize[2]; /* ELF header size in bytes */
unsigned char e_phentsize[2]; /* Program header table entry size */
unsigned char e_phnum[2]; /* Program header table entry count */
unsigned char e_shentsize[2]; /* Section header table entry size */
unsigned char e_shnum[2]; /* Section header table entry count */
unsigned char e_shstrndx[2]; /* Section header string table index */
} Elf32_External_Ehdr;
typedef struct {
unsigned char e_ident[16]; /* ELF "magic number" */
unsigned char e_type[2]; /* Identifies object file type */
unsigned char e_machine[2]; /* Specifies required architecture */
unsigned char e_version[4]; /* Identifies object file version */
unsigned char e_entry[8]; /* Entry point virtual address */
unsigned char e_phoff[8]; /* Program header table file offset */
unsigned char e_shoff[8]; /* Section header table file offset */
unsigned char e_flags[4]; /* Processor-specific flags */
unsigned char e_ehsize[2]; /* ELF header size in bytes */
unsigned char e_phentsize[2]; /* Program header table entry size */
unsigned char e_phnum[2]; /* Program header table entry count */
unsigned char e_shentsize[2]; /* Section header table entry size */
unsigned char e_shnum[2]; /* Section header table entry count */
unsigned char e_shstrndx[2]; /* Section header string table index */
} Elf64_External_Ehdr;
/* Program header */
typedef struct {
unsigned char p_type[4]; /* Identifies program segment type */
unsigned char p_offset[4]; /* Segment file offset */
unsigned char p_vaddr[4]; /* Segment virtual address */
unsigned char p_paddr[4]; /* Segment physical address */
unsigned char p_filesz[4]; /* Segment size in file */
unsigned char p_memsz[4]; /* Segment size in memory */
unsigned char p_flags[4]; /* Segment flags */
unsigned char p_align[4]; /* Segment alignment, file & memory */
} Elf32_External_Phdr;
typedef struct {
unsigned char p_type[4]; /* Identifies program segment type */
unsigned char p_flags[4]; /* Segment flags */
unsigned char p_offset[8]; /* Segment file offset */
unsigned char p_vaddr[8]; /* Segment virtual address */
unsigned char p_paddr[8]; /* Segment physical address */
unsigned char p_filesz[8]; /* Segment size in file */
unsigned char p_memsz[8]; /* Segment size in memory */
unsigned char p_align[8]; /* Segment alignment, file & memory */
} Elf64_External_Phdr;
/* Section header */
typedef struct {
unsigned char sh_name[4]; /* Section name, index in string tbl */
unsigned char sh_type[4]; /* Type of section */
unsigned char sh_flags[4]; /* Miscellaneous section attributes */
unsigned char sh_addr[4]; /* Section virtual addr at execution */
unsigned char sh_offset[4]; /* Section file offset */
unsigned char sh_size[4]; /* Size of section in bytes */
unsigned char sh_link[4]; /* Index of another section */
unsigned char sh_info[4]; /* Additional section information */
unsigned char sh_addralign[4]; /* Section alignment */
unsigned char sh_entsize[4]; /* Entry size if section holds table */
} Elf32_External_Shdr;
typedef struct {
unsigned char sh_name[4]; /* Section name, index in string tbl */
unsigned char sh_type[4]; /* Type of section */
unsigned char sh_flags[8]; /* Miscellaneous section attributes */
unsigned char sh_addr[8]; /* Section virtual addr at execution */
unsigned char sh_offset[8]; /* Section file offset */
unsigned char sh_size[8]; /* Size of section in bytes */
unsigned char sh_link[4]; /* Index of another section */
unsigned char sh_info[4]; /* Additional section information */
unsigned char sh_addralign[8]; /* Section alignment */
unsigned char sh_entsize[8]; /* Entry size if section holds table */
} Elf64_External_Shdr;
/* Compression header */
typedef struct {
unsigned char ch_type[4]; /* Type of compression */
unsigned char ch_size[4]; /* Size of uncompressed data in bytes */
unsigned char ch_addralign[4]; /* Alignment of uncompressed data */
} Elf32_External_Chdr;
typedef struct {
unsigned char ch_type[4]; /* Type of compression */
unsigned char ch_reserved[4]; /* Padding */
unsigned char ch_size[8]; /* Size of uncompressed data in bytes */
unsigned char ch_addralign[8]; /* Alignment of uncompressed data */
} Elf64_External_Chdr;
/* Symbol table entry */
typedef struct {
unsigned char st_name[4]; /* Symbol name, index in string tbl */
unsigned char st_value[4]; /* Value of the symbol */
unsigned char st_size[4]; /* Associated symbol size */
unsigned char st_info[1]; /* Type and binding attributes */
unsigned char st_other[1]; /* No defined meaning, 0 */
unsigned char st_shndx[2]; /* Associated section index */
} Elf32_External_Sym;
typedef struct {
unsigned char st_name[4]; /* Symbol name, index in string tbl */
unsigned char st_info[1]; /* Type and binding attributes */
unsigned char st_other[1]; /* No defined meaning, 0 */
unsigned char st_shndx[2]; /* Associated section index */
unsigned char st_value[8]; /* Value of the symbol */
unsigned char st_size[8]; /* Associated symbol size */
} Elf64_External_Sym;
typedef struct {
unsigned char est_shndx[4]; /* Section index */
} Elf_External_Sym_Shndx;
/* Note segments */
typedef struct {
unsigned char namesz[4]; /* Size of entry's owner string */
unsigned char descsz[4]; /* Size of the note descriptor */
unsigned char type[4]; /* Interpretation of the descriptor */
char name[1]; /* Start of the name+desc data */
} Elf_External_Note;
/* Relocation Entries */
typedef struct {
unsigned char r_offset[4]; /* Location at which to apply the action */
unsigned char r_info[4]; /* index and type of relocation */
} Elf32_External_Rel;
typedef struct {
unsigned char r_offset[4]; /* Location at which to apply the action */
unsigned char r_info[4]; /* index and type of relocation */
unsigned char r_addend[4]; /* Constant addend used to compute value */
} Elf32_External_Rela;
typedef struct {
unsigned char r_offset[8]; /* Location at which to apply the action */
unsigned char r_info[8]; /* index and type of relocation */
} Elf64_External_Rel;
typedef struct {
unsigned char r_offset[8]; /* Location at which to apply the action */
unsigned char r_info[8]; /* index and type of relocation */
unsigned char r_addend[8]; /* Constant addend used to compute value */
} Elf64_External_Rela;
/* dynamic section structure */
typedef struct {
unsigned char d_tag[4]; /* entry tag value */
union {
unsigned char d_val[4];
unsigned char d_ptr[4];
} d_un;
} Elf32_External_Dyn;
typedef struct {
unsigned char d_tag[8]; /* entry tag value */
union {
unsigned char d_val[8];
unsigned char d_ptr[8];
} d_un;
} Elf64_External_Dyn;
/* The version structures are currently size independent. They are
named without a 32 or 64. If that ever changes, these structures
will need to be renamed. */
/* This structure appears in a SHT_GNU_verdef section. */
typedef struct {
unsigned char vd_version[2];
unsigned char vd_flags[2];
unsigned char vd_ndx[2];
unsigned char vd_cnt[2];
unsigned char vd_hash[4];
unsigned char vd_aux[4];
unsigned char vd_next[4];
} Elf_External_Verdef;
/* This structure appears in a SHT_GNU_verdef section. */
typedef struct {
unsigned char vda_name[4];
unsigned char vda_next[4];
} Elf_External_Verdaux;
/* This structure appears in a SHT_GNU_verneed section. */
typedef struct {
unsigned char vn_version[2];
unsigned char vn_cnt[2];
unsigned char vn_file[4];
unsigned char vn_aux[4];
unsigned char vn_next[4];
} Elf_External_Verneed;
/* This structure appears in a SHT_GNU_verneed section. */
typedef struct {
unsigned char vna_hash[4];
unsigned char vna_flags[2];
unsigned char vna_other[2];
unsigned char vna_name[4];
unsigned char vna_next[4];
} Elf_External_Vernaux;
/* This structure appears in a SHT_GNU_versym section. This is not a
standard ELF structure; ELF just uses Elf32_Half. */
typedef struct {
unsigned char vs_vers[2];
} ATTRIBUTE_PACKED Elf_External_Versym;
/* Structure for syminfo section. */
typedef struct
{
unsigned char si_boundto[2];
unsigned char si_flags[2];
} Elf_External_Syminfo;
/* This structure appears on the stack and in NT_AUXV core file notes. */
typedef struct
{
unsigned char a_type[4];
unsigned char a_val[4];
} Elf32_External_Auxv;
typedef struct
{
unsigned char a_type[8];
unsigned char a_val[8];
} Elf64_External_Auxv;
/* Size of SHT_GROUP section entry. */
#define GRP_ENTRY_SIZE 4
#endif /* _ELF_EXTERNAL_H */
| 37.742574 | 74 | 0.712312 | [
"object"
] |
d65de801485b80a5639fb98e51ce16b55eef4dbb | 1,744 | h | C | src/ArduinoOcpp/Tasks/Metering/ConnectorMeterValuesRecorder.h | othorne-public/ArduinoOcpp | 7e63351917a12707bc0b9cd8d3a8680306661f49 | [
"MIT"
] | null | null | null | src/ArduinoOcpp/Tasks/Metering/ConnectorMeterValuesRecorder.h | othorne-public/ArduinoOcpp | 7e63351917a12707bc0b9cd8d3a8680306661f49 | [
"MIT"
] | null | null | null | src/ArduinoOcpp/Tasks/Metering/ConnectorMeterValuesRecorder.h | othorne-public/ArduinoOcpp | 7e63351917a12707bc0b9cd8d3a8680306661f49 | [
"MIT"
] | null | null | null | // matth-x/ArduinoOcpp
// Copyright Matthias Akstaller 2019 - 2022
// MIT License
#ifndef CONNECTOR_METER_VALUES_RECORDER
#define CONNECTOR_METER_VALUES_RECORDER
//#define METER_VALUE_SAMPLE_INTERVAL 60 //in seconds
//#define METER_VALUES_SAMPLED_DATA_MAX_LENGTH 4 //after 4 measurements, send the values to the CS
#include <functional>
#include <memory>
#include <ArduinoOcpp/Tasks/Metering/MeterValue.h>
#include <ArduinoOcpp/Core/ConfigurationKeyValue.h>
namespace ArduinoOcpp {
using PowerSampler = std::function<float()>;
using EnergySampler = std::function<float()>;
class OcppModel;
class OcppTimestamp;
class OcppMessage;
class ConnectorMeterValuesRecorder {
private:
OcppModel& context;
const int connectorId;
std::vector<std::unique_ptr<MeterValue>> meterValue;
ulong lastSampleTime = 0; //0 means not charging right now
float lastPower;
int lastTransactionId = -1;
PowerSampler powerSampler = nullptr;
EnergySampler energySampler = nullptr;
std::vector<std::unique_ptr<SampledValueSampler>> meterValueSamplers;
std::shared_ptr<Configuration<int>> MeterValueSampleInterval = nullptr;
std::shared_ptr<Configuration<int>> MeterValuesSampledDataMaxLength = nullptr;
void takeSample();
OcppMessage *toMeterValues();
void clear();
public:
ConnectorMeterValuesRecorder(OcppModel& context, int connectorId);
OcppMessage *loop();
void setPowerSampler(PowerSampler powerSampler);
void setEnergySampler(EnergySampler energySampler);
void addMeterValueSampler(std::unique_ptr<SampledValueSampler> meterValueSampler);
int32_t readEnergyActiveImportRegister();
OcppMessage *takeMeterValuesNow();
};
} //end namespace ArduinoOcpp
#endif
| 26.029851 | 98 | 0.768349 | [
"vector"
] |
d65e4993e2c05839f685cb64e90393c12f299c6e | 428 | h | C | Code/Projects/Eldritch/src/SDPs/sdpeldhudcalibration.h | kas1e/Eldritch | 032b4ac52f7508c89efa407d6fe60f40c6281fd9 | [
"Zlib"
] | null | null | null | Code/Projects/Eldritch/src/SDPs/sdpeldhudcalibration.h | kas1e/Eldritch | 032b4ac52f7508c89efa407d6fe60f40c6281fd9 | [
"Zlib"
] | null | null | null | Code/Projects/Eldritch/src/SDPs/sdpeldhudcalibration.h | kas1e/Eldritch | 032b4ac52f7508c89efa407d6fe60f40c6281fd9 | [
"Zlib"
] | null | null | null | #ifndef SDPELDHUDCALIBRATION_H
#define SDPELDHUDCALIBRATION_H
#include "SDPs/sdpbase.h"
class SDPEldHUDCalibration : public SDPBase {
public:
SDPEldHUDCalibration();
virtual ~SDPEldHUDCalibration();
DEFINE_SDP_FACTORY(EldHUDCalibration);
virtual void SetShaderParameters(IRenderer* const pRenderer,
Mesh* const pMesh, const View& View) const;
};
#endif // SDPELDHUDCALIBRATION_H | 25.176471 | 78 | 0.731308 | [
"mesh"
] |
d661fc0310ee025bddd603deb9175adf09278324 | 12,932 | h | C | third_party/gecko-2/win32/include/AccessibleHypertext.h | akiellor/selenium | 239490f9c5f3c7e7d4082bbe53c86eb5158d70a3 | [
"Apache-2.0"
] | 1 | 2018-08-24T18:01:34.000Z | 2018-08-24T18:01:34.000Z | third_party/gecko-2/win32/include/AccessibleHypertext.h | akiellor/selenium | 239490f9c5f3c7e7d4082bbe53c86eb5158d70a3 | [
"Apache-2.0"
] | 1 | 2021-10-18T12:23:37.000Z | 2021-10-18T12:23:37.000Z | third_party/gecko-2/win32/include/AccessibleHypertext.h | akiellor/selenium | 239490f9c5f3c7e7d4082bbe53c86eb5158d70a3 | [
"Apache-2.0"
] | 2 | 2018-04-30T21:35:30.000Z | 2021-05-14T08:11:46.000Z |
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 7.00.0555 */
/* at Fri Mar 18 05:54:17 2011
*/
/* Compiler settings for e:/builds/moz2_slave/rel-2.0-xr-w32-bld/build/other-licenses/ia2/AccessibleHypertext.idl:
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555
protocol : dce , ms_ext, app_config, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING( ) */
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __AccessibleHypertext_h__
#define __AccessibleHypertext_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifndef __IAccessibleHypertext_FWD_DEFINED__
#define __IAccessibleHypertext_FWD_DEFINED__
typedef interface IAccessibleHypertext IAccessibleHypertext;
#endif /* __IAccessibleHypertext_FWD_DEFINED__ */
/* header files for imported files */
#include "objidl.h"
#include "oaidl.h"
#include "oleacc.h"
#include "AccessibleText.h"
#include "AccessibleHyperlink.h"
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IAccessibleHypertext_INTERFACE_DEFINED__
#define __IAccessibleHypertext_INTERFACE_DEFINED__
/* interface IAccessibleHypertext */
/* [uuid][object] */
EXTERN_C const IID IID_IAccessibleHypertext;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("6B4F8BBF-F1F2-418a-B35E-A195BC4103B9")
IAccessibleHypertext : public IAccessibleText
{
public:
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nHyperlinks(
/* [retval][out] */ long *hyperlinkCount) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_hyperlink(
/* [in] */ long index,
/* [retval][out] */ IAccessibleHyperlink **hyperlink) = 0;
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_hyperlinkIndex(
/* [in] */ long charIndex,
/* [retval][out] */ long *hyperlinkIndex) = 0;
};
#else /* C style interface */
typedef struct IAccessibleHypertextVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IAccessibleHypertext * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
__RPC__deref_out void **ppvObject);
ULONG ( STDMETHODCALLTYPE *AddRef )(
IAccessibleHypertext * This);
ULONG ( STDMETHODCALLTYPE *Release )(
IAccessibleHypertext * This);
HRESULT ( STDMETHODCALLTYPE *addSelection )(
IAccessibleHypertext * This,
/* [in] */ long startOffset,
/* [in] */ long endOffset);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_attributes )(
IAccessibleHypertext * This,
/* [in] */ long offset,
/* [out] */ long *startOffset,
/* [out] */ long *endOffset,
/* [retval][out] */ BSTR *textAttributes);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_caretOffset )(
IAccessibleHypertext * This,
/* [retval][out] */ long *offset);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_characterExtents )(
IAccessibleHypertext * This,
/* [in] */ long offset,
/* [in] */ enum IA2CoordinateType coordType,
/* [out] */ long *x,
/* [out] */ long *y,
/* [out] */ long *width,
/* [retval][out] */ long *height);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_nSelections )(
IAccessibleHypertext * This,
/* [retval][out] */ long *nSelections);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_offsetAtPoint )(
IAccessibleHypertext * This,
/* [in] */ long x,
/* [in] */ long y,
/* [in] */ enum IA2CoordinateType coordType,
/* [retval][out] */ long *offset);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_selection )(
IAccessibleHypertext * This,
/* [in] */ long selectionIndex,
/* [out] */ long *startOffset,
/* [retval][out] */ long *endOffset);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_text )(
IAccessibleHypertext * This,
/* [in] */ long startOffset,
/* [in] */ long endOffset,
/* [retval][out] */ BSTR *text);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_textBeforeOffset )(
IAccessibleHypertext * This,
/* [in] */ long offset,
/* [in] */ enum IA2TextBoundaryType boundaryType,
/* [out] */ long *startOffset,
/* [out] */ long *endOffset,
/* [retval][out] */ BSTR *text);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_textAfterOffset )(
IAccessibleHypertext * This,
/* [in] */ long offset,
/* [in] */ enum IA2TextBoundaryType boundaryType,
/* [out] */ long *startOffset,
/* [out] */ long *endOffset,
/* [retval][out] */ BSTR *text);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_textAtOffset )(
IAccessibleHypertext * This,
/* [in] */ long offset,
/* [in] */ enum IA2TextBoundaryType boundaryType,
/* [out] */ long *startOffset,
/* [out] */ long *endOffset,
/* [retval][out] */ BSTR *text);
HRESULT ( STDMETHODCALLTYPE *removeSelection )(
IAccessibleHypertext * This,
/* [in] */ long selectionIndex);
HRESULT ( STDMETHODCALLTYPE *setCaretOffset )(
IAccessibleHypertext * This,
/* [in] */ long offset);
HRESULT ( STDMETHODCALLTYPE *setSelection )(
IAccessibleHypertext * This,
/* [in] */ long selectionIndex,
/* [in] */ long startOffset,
/* [in] */ long endOffset);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_nCharacters )(
IAccessibleHypertext * This,
/* [retval][out] */ long *nCharacters);
HRESULT ( STDMETHODCALLTYPE *scrollSubstringTo )(
IAccessibleHypertext * This,
/* [in] */ long startIndex,
/* [in] */ long endIndex,
/* [in] */ enum IA2ScrollType scrollType);
HRESULT ( STDMETHODCALLTYPE *scrollSubstringToPoint )(
IAccessibleHypertext * This,
/* [in] */ long startIndex,
/* [in] */ long endIndex,
/* [in] */ enum IA2CoordinateType coordinateType,
/* [in] */ long x,
/* [in] */ long y);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_newText )(
IAccessibleHypertext * This,
/* [retval][out] */ IA2TextSegment *newText);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_oldText )(
IAccessibleHypertext * This,
/* [retval][out] */ IA2TextSegment *oldText);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_nHyperlinks )(
IAccessibleHypertext * This,
/* [retval][out] */ long *hyperlinkCount);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_hyperlink )(
IAccessibleHypertext * This,
/* [in] */ long index,
/* [retval][out] */ IAccessibleHyperlink **hyperlink);
/* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_hyperlinkIndex )(
IAccessibleHypertext * This,
/* [in] */ long charIndex,
/* [retval][out] */ long *hyperlinkIndex);
END_INTERFACE
} IAccessibleHypertextVtbl;
interface IAccessibleHypertext
{
CONST_VTBL struct IAccessibleHypertextVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAccessibleHypertext_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAccessibleHypertext_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAccessibleHypertext_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAccessibleHypertext_addSelection(This,startOffset,endOffset) \
( (This)->lpVtbl -> addSelection(This,startOffset,endOffset) )
#define IAccessibleHypertext_get_attributes(This,offset,startOffset,endOffset,textAttributes) \
( (This)->lpVtbl -> get_attributes(This,offset,startOffset,endOffset,textAttributes) )
#define IAccessibleHypertext_get_caretOffset(This,offset) \
( (This)->lpVtbl -> get_caretOffset(This,offset) )
#define IAccessibleHypertext_get_characterExtents(This,offset,coordType,x,y,width,height) \
( (This)->lpVtbl -> get_characterExtents(This,offset,coordType,x,y,width,height) )
#define IAccessibleHypertext_get_nSelections(This,nSelections) \
( (This)->lpVtbl -> get_nSelections(This,nSelections) )
#define IAccessibleHypertext_get_offsetAtPoint(This,x,y,coordType,offset) \
( (This)->lpVtbl -> get_offsetAtPoint(This,x,y,coordType,offset) )
#define IAccessibleHypertext_get_selection(This,selectionIndex,startOffset,endOffset) \
( (This)->lpVtbl -> get_selection(This,selectionIndex,startOffset,endOffset) )
#define IAccessibleHypertext_get_text(This,startOffset,endOffset,text) \
( (This)->lpVtbl -> get_text(This,startOffset,endOffset,text) )
#define IAccessibleHypertext_get_textBeforeOffset(This,offset,boundaryType,startOffset,endOffset,text) \
( (This)->lpVtbl -> get_textBeforeOffset(This,offset,boundaryType,startOffset,endOffset,text) )
#define IAccessibleHypertext_get_textAfterOffset(This,offset,boundaryType,startOffset,endOffset,text) \
( (This)->lpVtbl -> get_textAfterOffset(This,offset,boundaryType,startOffset,endOffset,text) )
#define IAccessibleHypertext_get_textAtOffset(This,offset,boundaryType,startOffset,endOffset,text) \
( (This)->lpVtbl -> get_textAtOffset(This,offset,boundaryType,startOffset,endOffset,text) )
#define IAccessibleHypertext_removeSelection(This,selectionIndex) \
( (This)->lpVtbl -> removeSelection(This,selectionIndex) )
#define IAccessibleHypertext_setCaretOffset(This,offset) \
( (This)->lpVtbl -> setCaretOffset(This,offset) )
#define IAccessibleHypertext_setSelection(This,selectionIndex,startOffset,endOffset) \
( (This)->lpVtbl -> setSelection(This,selectionIndex,startOffset,endOffset) )
#define IAccessibleHypertext_get_nCharacters(This,nCharacters) \
( (This)->lpVtbl -> get_nCharacters(This,nCharacters) )
#define IAccessibleHypertext_scrollSubstringTo(This,startIndex,endIndex,scrollType) \
( (This)->lpVtbl -> scrollSubstringTo(This,startIndex,endIndex,scrollType) )
#define IAccessibleHypertext_scrollSubstringToPoint(This,startIndex,endIndex,coordinateType,x,y) \
( (This)->lpVtbl -> scrollSubstringToPoint(This,startIndex,endIndex,coordinateType,x,y) )
#define IAccessibleHypertext_get_newText(This,newText) \
( (This)->lpVtbl -> get_newText(This,newText) )
#define IAccessibleHypertext_get_oldText(This,oldText) \
( (This)->lpVtbl -> get_oldText(This,oldText) )
#define IAccessibleHypertext_get_nHyperlinks(This,hyperlinkCount) \
( (This)->lpVtbl -> get_nHyperlinks(This,hyperlinkCount) )
#define IAccessibleHypertext_get_hyperlink(This,index,hyperlink) \
( (This)->lpVtbl -> get_hyperlink(This,index,hyperlink) )
#define IAccessibleHypertext_get_hyperlinkIndex(This,charIndex,hyperlinkIndex) \
( (This)->lpVtbl -> get_hyperlinkIndex(This,charIndex,hyperlinkIndex) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAccessibleHypertext_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
| 36.948571 | 115 | 0.616455 | [
"object"
] |
d662abdc84ee6c99386784d7a6096c29a4fe6a95 | 1,028 | h | C | Extensions/std/Vector.h | Enseed/Season | 84107a92c8c649debca7453b9ae7dfa2e3060620 | [
"Apache-2.0"
] | null | null | null | Extensions/std/Vector.h | Enseed/Season | 84107a92c8c649debca7453b9ae7dfa2e3060620 | [
"Apache-2.0"
] | null | null | null | Extensions/std/Vector.h | Enseed/Season | 84107a92c8c649debca7453b9ae7dfa2e3060620 | [
"Apache-2.0"
] | null | null | null | #pragma once
#include <vector>
namespace season
{
namespace parsing
{
template<class TREE, class T>
struct ConvertComplexType<TREE, std::vector<T>>
{
static void toDocument(const char *name, const std::vector<T> &vecObj, typename TREE::Document *document, typename TREE::Node *node)
{
TREE::Node vecNode;
TREE::setArrayType(&vecNode);
for (const T &obj : vecObj)
{
ConvertNode<TREE, T>::toDocument(nullptr, obj, document, &vecNode);
}
TREE::addNode(node, name, &vecNode, document);
}
static void fromDocument(const typename TREE::Node &node, std::vector<T> *vecObj, typename TREE::Document *document)
{
size_t size = TREE::getSize(node);
vecObj->resize(size);
typename TREE::ConstArrayIterator nodeIter = TREE::arrayBegin(node);
for (std::vector<T>::iterator vecIter = vecObj->begin(); vecIter != vecObj->end(); ++nodeIter, ++vecIter)
{
ConvertNode<TREE, T>::fromDocument(TREE::getIterValue(nodeIter), &*vecIter, document);
};
}
};
}
}
| 27.052632 | 135 | 0.664397 | [
"vector"
] |
d6671bc8623ea783293a9a0b97ea1de823a2c4fc | 3,894 | h | C | content/browser/service_worker/service_worker_handle.h | Fusion-Rom/android_external_chromium_org | d8b126911c6ea9753e9f526bee5654419e1d0ebd | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2019-02-03T05:32:07.000Z | 2019-02-03T05:32:07.000Z | content/browser/service_worker/service_worker_handle.h | Fusion-Rom/android_external_chromium_org | d8b126911c6ea9753e9f526bee5654419e1d0ebd | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | content/browser/service_worker/service_worker_handle.h | Fusion-Rom/android_external_chromium_org | d8b126911c6ea9753e9f526bee5654419e1d0ebd | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-11-04T06:34:36.000Z | 2020-11-04T06:34:36.000Z | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HANDLE_H_
#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HANDLE_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/service_worker/service_worker_version.h"
#include "content/common/content_export.h"
#include "content/common/service_worker/service_worker_types.h"
namespace IPC {
class Sender;
}
namespace content {
class ServiceWorkerContextCore;
class ServiceWorkerRegistration;
// Roughly corresponds to one ServiceWorker object in the renderer process
// (WebServiceWorkerImpl).
// Has references to the corresponding ServiceWorkerVersion and
// ServiceWorkerRegistration (therefore they're guaranteed to be alive while
// this handle is around).
class CONTENT_EXPORT ServiceWorkerHandle
: NON_EXPORTED_BASE(public ServiceWorkerVersion::Listener) {
public:
// Creates a handle for a live version. The version's corresponding
// registration must be also alive.
// This may return NULL if |context|.get() or |version| is NULL.
// |sender| and |thread_id| will be used to send messages to the
// corresponding WebServiceWorkerImpl (which should live on |thread_id|
// in the child process).
static scoped_ptr<ServiceWorkerHandle> Create(
base::WeakPtr<ServiceWorkerContextCore> context,
IPC::Sender* sender,
int thread_id,
int provider_id,
ServiceWorkerVersion* version);
ServiceWorkerHandle(base::WeakPtr<ServiceWorkerContextCore> context,
IPC::Sender* sender,
int thread_id,
int provider_id,
ServiceWorkerRegistration* registration,
ServiceWorkerVersion* version);
virtual ~ServiceWorkerHandle();
// ServiceWorkerVersion::Listener overrides.
virtual void OnWorkerStarted(ServiceWorkerVersion* version) OVERRIDE;
virtual void OnWorkerStopped(ServiceWorkerVersion* version) OVERRIDE;
virtual void OnErrorReported(ServiceWorkerVersion* version,
const base::string16& error_message,
int line_number,
int column_number,
const GURL& source_url) OVERRIDE;
virtual void OnReportConsoleMessage(ServiceWorkerVersion* version,
int source_identifier,
int message_level,
const base::string16& message,
int line_number,
const GURL& source_url) OVERRIDE;
virtual void OnVersionStateChanged(ServiceWorkerVersion* version) OVERRIDE;
ServiceWorkerObjectInfo GetObjectInfo();
int thread_id() const { return thread_id_; }
int provider_id() const { return provider_id_; }
int handle_id() const { return handle_id_; }
ServiceWorkerRegistration* registration() { return registration_.get(); }
ServiceWorkerVersion* version() { return version_.get(); }
bool HasNoRefCount() const { return ref_count_ <= 0; }
void IncrementRefCount();
void DecrementRefCount();
private:
base::WeakPtr<ServiceWorkerContextCore> context_;
IPC::Sender* sender_; // Not owned, it should always outlive this.
const int thread_id_;
const int provider_id_;
const int handle_id_;
int ref_count_; // Created with 1.
scoped_refptr<ServiceWorkerRegistration> registration_;
scoped_refptr<ServiceWorkerVersion> version_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerHandle);
};
} // namespace content
#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HANDLE_H_
| 39.734694 | 77 | 0.70416 | [
"object"
] |
d66a441a0aa66c0be6ac7e99079b5b7657fa6361 | 3,738 | h | C | 3rdparty/spirv-tools/source/opt/local_single_store_elim_pass.h | VertexStudio/bgfx | b3844959dbea0c98744011593aa89fce08a45a75 | [
"BSD-2-Clause"
] | 67 | 2018-01-17T17:18:37.000Z | 2020-08-24T23:45:56.000Z | 3rdparty/spirv-tools/source/opt/local_single_store_elim_pass.h | VertexStudio/bgfx | b3844959dbea0c98744011593aa89fce08a45a75 | [
"BSD-2-Clause"
] | 132 | 2018-01-17T17:43:25.000Z | 2020-09-01T07:41:17.000Z | 3rdparty/spirv-tools/source/opt/local_single_store_elim_pass.h | VertexStudio/bgfx | b3844959dbea0c98744011593aa89fce08a45a75 | [
"BSD-2-Clause"
] | 5 | 2020-10-10T19:45:20.000Z | 2021-03-02T11:36:19.000Z | // Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017 Valve Corporation
// Copyright (c) 2017 LunarG Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SOURCE_OPT_LOCAL_SINGLE_STORE_ELIM_PASS_H_
#define SOURCE_OPT_LOCAL_SINGLE_STORE_ELIM_PASS_H_
#include <algorithm>
#include <map>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "source/opt/basic_block.h"
#include "source/opt/def_use_manager.h"
#include "source/opt/mem_pass.h"
#include "source/opt/module.h"
namespace spvtools {
namespace opt {
// See optimizer.hpp for documentation.
class LocalSingleStoreElimPass : public Pass {
using cbb_ptr = const BasicBlock*;
public:
LocalSingleStoreElimPass();
const char* name() const override { return "eliminate-local-single-store"; }
Status Process() override;
IRContext::Analysis GetPreservedAnalyses() override {
return IRContext::kAnalysisDefUse |
IRContext::kAnalysisInstrToBlockMapping |
IRContext::kAnalysisConstants | IRContext::kAnalysisTypes;
}
private:
// Do "single-store" optimization of function variables defined only
// with a single non-access-chain store in |func|. Replace all their
// non-access-chain loads with the value that is stored and eliminate
// any resulting dead code.
bool LocalSingleStoreElim(Function* func);
// Initialize extensions allowlist
void InitExtensionAllowList();
// Return true if all extensions in this module are allowed by this pass.
bool AllExtensionsSupported() const;
Pass::Status ProcessImpl();
// If there is a single store to |var_inst|, and it covers the entire
// variable, then replace all of the loads of the entire variable that are
// dominated by the store by the value that was stored. Returns true if the
// module was changed.
bool ProcessVariable(Instruction* var_inst);
// Collects all of the uses of |var_inst| into |uses|. This looks through
// OpObjectCopy's that copy the address of the variable, and collects those
// uses as well.
void FindUses(const Instruction* var_inst,
std::vector<Instruction*>* uses) const;
// Returns a store to |var_inst| if
// - it is a store to the entire variable,
// - and there are no other instructions that may modify |var_inst|.
Instruction* FindSingleStoreAndCheckUses(
Instruction* var_inst, const std::vector<Instruction*>& users) const;
// Returns true if the address that results from |inst| may be used as a base
// address in a store instruction or may be used to compute the base address
// of a store instruction.
bool FeedsAStore(Instruction* inst) const;
// Replaces all of the loads in |uses| by the value stored in |store_inst|.
// The load instructions are then killed. |all_rewritten| is true iff all
// uses have been rewritten.
bool RewriteLoads(Instruction* store_inst,
const std::vector<Instruction*>& uses, bool* all_rewritten);
// Extensions supported by this pass.
std::unordered_set<std::string> extensions_allowlist_;
};
} // namespace opt
} // namespace spvtools
#endif // SOURCE_OPT_LOCAL_SINGLE_STORE_ELIM_PASS_H_
| 35.6 | 80 | 0.73649 | [
"vector"
] |
d66a7bc3752a5ffb8e507e33572eadcb3d09c1c5 | 40,595 | c | C | lte/gateway/c/oai/tasks/nas/nas_proc.c | tcirstea/magma | d5a9d6916ba2e98b4f6a70f6db444ee9246a7c6a | [
"BSD-3-Clause"
] | 3 | 2019-08-16T17:03:09.000Z | 2019-08-23T21:57:48.000Z | lte/gateway/c/oai/tasks/nas/nas_proc.c | irsols-devops/magma | 1f01a86e0515ffeef689e863db6daa7b31a57e0b | [
"BSD-3-Clause"
] | null | null | null | lte/gateway/c/oai/tasks/nas/nas_proc.c | irsols-devops/magma | 1f01a86e0515ffeef689e863db6daa7b31a57e0b | [
"BSD-3-Clause"
] | null | null | null | /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*****************************************************************************
Source nas_proc.c
Version 0.1
Date 2012/09/20
Product NAS stack
Subsystem NAS main process
Author Frederic Maurel, Lionel GAUTHIER
Description NAS procedure call manager
*****************************************************************************/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "bstrlib.h"
#include "log.h"
#include "assertions.h"
#include "conversions.h"
#include "nas_proc.h"
#include "emm_proc.h"
#include "emm_main.h"
#include "emm_sap.h"
#include "esm_main.h"
#include "s6a_defs.h"
#include "mme_app_ue_context.h"
#include "3gpp_24.008.h"
#include "3gpp_33.401.h"
#include "DetachRequest.h"
#include "MobileIdentity.h"
#include "common_types.h"
#include "emm_asDef.h"
#include "emm_data.h"
#include "hashtable.h"
#include "mme_api.h"
#include "mme_app_desc.h"
#include "nas_procedures.h"
#include "service303.h"
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/
/****************************************************************************/
/******************* L O C A L D E F I N I T I O N S *******************/
/****************************************************************************/
static nas_cause_t s6a_error_2_nas_cause(uint32_t s6a_error, int experimental);
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
/****************************************************************************
** **
** Name: nas_proc_initialize() **
** **
** Description: **
** **
** Inputs: None **
** Others: None **
** **
** Outputs: None **
** Return: None **
** Others: None **
** **
***************************************************************************/
void nas_proc_initialize(mme_config_t *mme_config_p)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
/*
* Initialize the EMM procedure manager
*/
emm_main_initialize(mme_config_p);
/*
* Initialize the ESM procedure manager
*/
esm_main_initialize();
OAILOG_FUNC_OUT(LOG_NAS_EMM);
}
/****************************************************************************
** **
** Name: nas_proc_cleanup() **
** **
** Description: Performs clean up procedure before the system is shutdown **
** **
** Inputs: None **
** Others: None **
** **
** Outputs: None **
** Return: None **
** Others: None **
** **
***************************************************************************/
void nas_proc_cleanup(void)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
/*
* Perform the EPS Mobility Manager's clean up procedure
*/
emm_main_cleanup();
/*
* Perform the EPS Session Manager's clean up procedure
*/
esm_main_cleanup();
OAILOG_FUNC_OUT(LOG_NAS_EMM);
}
/*
--------------------------------------------------------------------------
NAS procedures triggered by the user
--------------------------------------------------------------------------
*/
/****************************************************************************
** **
** Name: nas_proc_establish_ind() **
** **
** Description: Processes the NAS signalling connection establishment **
** indication message received from the network **
** **
** Inputs: ueid: UE identifier **
** tac: The code of the tracking area the initia- **
** ting UE belongs to **
** data: The initial NAS message transfered within **
** the message **
** len: The length of the initial NAS message **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
int nas_proc_establish_ind(
const mme_ue_s1ap_id_t ue_id,
const bool is_mm_ctx_new,
const tai_t originating_tai,
const ecgi_t ecgi,
const as_cause_t as_cause,
const s_tmsi_t s_tmsi,
STOLEN_REF bstring *msg)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
if (msg) {
emm_sap_t emm_sap = {0};
/*
* Notify the EMM procedure call manager that NAS signalling
* connection establishment indication message has been received
* from the Access-Stratum sublayer
*/
emm_sap.primitive = EMMAS_ESTABLISH_REQ;
emm_sap.u.emm_as.u.establish.ue_id = ue_id;
emm_sap.u.emm_as.u.establish.is_initial = true;
emm_sap.u.emm_as.u.establish.is_mm_ctx_new = is_mm_ctx_new;
emm_sap.u.emm_as.u.establish.nas_msg = *msg;
*msg = NULL;
emm_sap.u.emm_as.u.establish.tai = &originating_tai;
//emm_sap.u.emm_as.u.establish.plmn_id = &originating_tai.plmn;
//emm_sap.u.emm_as.u.establish.tac = originating_tai.tac;
emm_sap.u.emm_as.u.establish.ecgi = ecgi;
rc = emm_sap_send(&emm_sap);
}
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: nas_proc_dl_transfer_cnf() **
** **
** Description: Processes the downlink data transfer confirm message re- **
** ceived from the network while NAS message has been succes-**
** sfully delivered to the NAS sublayer on the receiver side.**
** **
** Inputs: ueid: UE identifier **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
int nas_proc_dl_transfer_cnf(
const uint32_t ue_id,
const nas_error_code_t status,
bstring *STOLEN_REF nas_msg)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap_t emm_sap = {0};
int rc = RETURNok;
/*
* Notify the EMM procedure call manager that downlink NAS message
* has been successfully delivered to the NAS sublayer on the
* receiver side
*/
emm_sap.primitive = EMMAS_DATA_IND;
if (AS_SUCCESS == status) {
emm_sap.u.emm_as.u.data.delivered = EMM_AS_DATA_DELIVERED_TRUE;
} else {
emm_sap.u.emm_as.u.data.delivered =
EMM_AS_DATA_DELIVERED_LOWER_LAYER_FAILURE;
}
emm_sap.u.emm_as.u.data.ue_id = ue_id;
if (*nas_msg) {
emm_sap.u.emm_as.u.data.nas_msg = *nas_msg;
*nas_msg = NULL;
}
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: nas_proc_dl_transfer_rej() **
** **
** Description: Processes the downlink data transfer confirm message re- **
** ceived from the network while NAS message has not been **
** delivered to the NAS sublayer on the receiver side. **
** **
** Inputs: ueid: UE identifier **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
int nas_proc_dl_transfer_rej(
const uint32_t ue_id,
const nas_error_code_t status,
bstring *STOLEN_REF nas_msg)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap_t emm_sap = {0};
int rc = RETURNok;
/*
* Notify the EMM procedure call manager that transmission
* failure of downlink NAS message indication has been received
* from lower layers
*/
emm_sap.primitive = EMMAS_DATA_IND;
emm_sap.u.emm_as.u.data.ue_id = ue_id;
if (AS_SUCCESS == status) {
emm_sap.u.emm_as.u.data.delivered = EMM_AS_DATA_DELIVERED_TRUE;
} else if (AS_NON_DELIVERED_DUE_HO == status) {
emm_sap.u.emm_as.u.data.delivered =
EMM_AS_DATA_DELIVERED_LOWER_LAYER_NON_DELIVERY_INDICATION_DUE_TO_HO;
} else {
emm_sap.u.emm_as.u.data.delivered =
EMM_AS_DATA_DELIVERED_LOWER_LAYER_FAILURE;
}
emm_sap.u.emm_as.u.data.delivered = status;
emm_sap.u.emm_as.u.data.nas_msg = NULL;
if (*nas_msg) {
emm_sap.u.emm_as.u.data.nas_msg = *nas_msg;
*nas_msg = NULL;
}
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: nas_proc_ul_transfer_ind() **
** **
** Description: Processes uplink data transfer indication message recei- **
** ved from the network **
** **
** Inputs: ueid: UE identifier **
** data: The transfered NAS message **
** len: The length of the NAS message **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
int nas_proc_ul_transfer_ind(
const mme_ue_s1ap_id_t ue_id,
const tai_t originating_tai,
const ecgi_t cgi,
STOLEN_REF bstring *msg)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
OAILOG_INFO(
LOG_NAS,
"Received NAS UPLINK DATA IND from S1AP for ue_id = (%u)\n",
ue_id);
if (msg) {
emm_sap_t emm_sap = {0};
/*
* Notify the EMM procedure call manager that data transfer
* indication has been received from the Access-Stratum sublayer
*/
emm_sap.primitive = EMMAS_DATA_IND;
emm_sap.u.emm_as.u.data.ue_id = ue_id;
emm_sap.u.emm_as.u.data.delivered = true;
emm_sap.u.emm_as.u.data.nas_msg = *msg;
*msg = NULL;
emm_sap.u.emm_as.u.data.tai = &originating_tai;
//emm_sap.u.emm_as.u.data.plmn_id = &originating_tai.plmn;
//emm_sap.u.emm_as.u.data.tac = originating_tai.tac;
emm_sap.u.emm_as.u.data.ecgi = cgi;
rc = emm_sap_send(&emm_sap);
} else {
OAILOG_WARNING(
LOG_NAS,
"Received NAS message in uplink is NULL for ue_id = (%u)\n",
ue_id);
}
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_authentication_info_answer(s6a_auth_info_ans_t *aia)
{
imsi64_t imsi64 = INVALID_IMSI64;
int rc = RETURNerror;
emm_context_t *ctxt = NULL;
ue_mm_context_t *ue_mm_context = NULL;
OAILOG_FUNC_IN(LOG_NAS_EMM);
DevAssert(aia);
IMSI_STRING_TO_IMSI64((char *) aia->imsi, &imsi64);
OAILOG_DEBUG(LOG_NAS_EMM, "Handling imsi " IMSI_64_FMT "\n", imsi64);
ue_mm_context = mme_ue_context_exists_imsi(
&mme_app_desc.mme_ue_contexts, (const hash_key_t) imsi64);
if (ue_mm_context) {
ctxt = &ue_mm_context->emm_context;
}
if (!(ctxt)) {
OAILOG_ERROR(
LOG_NAS_EMM, "That's embarrassing as we don't know this IMSI\n");
unlock_ue_contexts(ue_mm_context);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, RETURNerror);
}
mme_ue_s1ap_id_t mme_ue_s1ap_id = ue_mm_context->mme_ue_s1ap_id;
unlock_ue_contexts(ue_mm_context);
OAILOG_INFO(
LOG_NAS_EMM, "Received Authentication Information Answer from S6A for ue_id = (%u)\n",
mme_ue_s1ap_id);
if (
(aia->result.present == S6A_RESULT_BASE) &&
(aia->result.choice.base == DIAMETER_SUCCESS)) {
/*
* Check that list is not empty and contain at most MAX_EPS_AUTH_VECTORS elements
*/
DevCheck(
aia->auth_info.nb_of_vectors <= MAX_EPS_AUTH_VECTORS,
aia->auth_info.nb_of_vectors,
MAX_EPS_AUTH_VECTORS,
0);
DevCheck(
aia->auth_info.nb_of_vectors > 0, aia->auth_info.nb_of_vectors, 1, 0);
OAILOG_DEBUG(
LOG_NAS_EMM,
"INFORMING NAS ABOUT AUTH RESP SUCCESS got %u vector(s)\n",
aia->auth_info.nb_of_vectors);
rc = nas_proc_auth_param_res(
mme_ue_s1ap_id,
aia->auth_info.nb_of_vectors,
aia->auth_info.eutran_vector);
} else {
OAILOG_ERROR(LOG_NAS_EMM, "INFORMING NAS ABOUT AUTH RESP ERROR CODE\n");
increment_counter(
"ue_attach",
1,
2,
"result",
"failure",
"cause",
"auth_info_failure_from_hss");
/*
* Inform NAS layer with the right failure
*/
if (aia->result.present == S6A_RESULT_BASE) {
OAILOG_ERROR(
LOG_NAS_EMM,
"Auth info Rsp failure for imsi " IMSI_64_FMT ", base_error_code %d \n",
imsi64,
aia->result.choice.base);
rc = nas_proc_auth_param_fail(
mme_ue_s1ap_id, s6a_error_2_nas_cause(aia->result.choice.base, 0));
} else {
OAILOG_ERROR(
LOG_NAS_EMM,
"Auth info Rsp failure for imsi " IMSI_64_FMT
", experimental_error_code %d \n",
imsi64,
aia->result.choice.experimental);
rc = nas_proc_auth_param_fail(
mme_ue_s1ap_id,
s6a_error_2_nas_cause(aia->result.choice.experimental, 1));
}
}
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_auth_param_res(
mme_ue_s1ap_id_t ue_id,
uint8_t nb_vectors,
eutran_vector_t *vectors)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
emm_cn_auth_res_t emm_cn_auth_res = {0};
emm_cn_auth_res.ue_id = ue_id;
emm_cn_auth_res.nb_vectors = nb_vectors;
for (int i = 0; i < nb_vectors; i++) {
emm_cn_auth_res.vector[i] = &vectors[i];
}
emm_sap.primitive = EMMCN_AUTHENTICATION_PARAM_RES;
emm_sap.u.emm_cn.u.auth_res = &emm_cn_auth_res;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_auth_param_fail(mme_ue_s1ap_id_t ue_id, nas_cause_t cause)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
emm_cn_auth_fail_t emm_cn_auth_fail = {0};
emm_cn_auth_fail.cause = cause;
emm_cn_auth_fail.ue_id = ue_id;
emm_sap.primitive = EMMCN_AUTHENTICATION_PARAM_FAIL;
emm_sap.u.emm_cn.u.auth_fail = &emm_cn_auth_fail;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_deregister_ue(mme_ue_s1ap_id_t ue_id)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMCN_DEREGISTER_UE;
emm_sap.u.emm_cn.u.deregister.ue_id = ue_id;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_pdn_config_res(emm_cn_pdn_config_res_t *emm_cn_pdn_config_res)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
emm_sap.primitive = EMMCN_PDN_CONFIG_RES;
emm_sap.u.emm_cn.u.emm_cn_pdn_config_res = emm_cn_pdn_config_res;
OAILOG_INFO(
LOG_NAS,
"Received PDN CONFIG RESPONSE from MME_APP for ue_id = (%u)\n",
emm_cn_pdn_config_res->ue_id);
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_pdn_connectivity_res(emm_cn_pdn_res_t *emm_cn_pdn_res)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
emm_sap.primitive = EMMCN_PDN_CONNECTIVITY_RES;
emm_sap.u.emm_cn.u.emm_cn_pdn_res = emm_cn_pdn_res;
OAILOG_INFO(
LOG_NAS,
"Received PDN CONNECTIVITY RESPONSE from MME_APP for ue_id = (%u)\n",
emm_cn_pdn_res->ue_id);
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_pdn_connectivity_fail(emm_cn_pdn_fail_t *emm_cn_pdn_fail)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
emm_sap.primitive = EMMCN_PDN_CONNECTIVITY_FAIL;
emm_sap.u.emm_cn.u.emm_cn_pdn_fail = emm_cn_pdn_fail;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_create_dedicated_bearer(
emm_cn_activate_dedicated_bearer_req_t *emm_cn_activate)
{
OAILOG_FUNC_IN(LOG_NAS_EMM);
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
emm_sap.primitive = _EMMCN_ACTIVATE_DEDICATED_BEARER_REQ;
emm_sap.u.emm_cn.u.activate_dedicated_bearer_req = emm_cn_activate;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_implicit_detach_ue_ind(mme_ue_s1ap_id_t ue_id)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMCN_IMPLICIT_DETACH_UE;
emm_sap.u.emm_cn.u.emm_cn_implicit_detach.ue_id = ue_id;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_nw_initiated_detach_ue_request(
itti_nas_nw_initiated_detach_ue_req_t *const nw_initiated_detach_p)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMCN_NW_INITIATED_DETACH_UE;
emm_sap.u.emm_cn.u.emm_cn_nw_initiated_detach.ue_id =
nw_initiated_detach_p->ue_id;
if (nw_initiated_detach_p->detach_type == HSS_INITIATED_EPS_DETACH) {
emm_sap.u.emm_cn.u.emm_cn_nw_initiated_detach.detach_type =
NW_DETACH_TYPE_RE_ATTACH_NOT_REQUIRED;
} else if (nw_initiated_detach_p->detach_type == SGS_INITIATED_IMSI_DETACH) {
emm_sap.u.emm_cn.u.emm_cn_nw_initiated_detach.detach_type =
NW_DETACH_TYPE_IMSI_DETACH;
}
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_downlink_unitdata(itti_sgsap_downlink_unitdata_t *dl_unitdata)
{
imsi64_t imsi64 = INVALID_IMSI64;
int rc = RETURNerror;
emm_context_t *ctxt = NULL;
emm_sap_t emm_sap = {0};
emm_as_data_t *emm_as = &emm_sap.u.emm_as.u.data;
OAILOG_FUNC_IN(LOG_NAS_EMM);
DevAssert(dl_unitdata);
IMSI_STRING_TO_IMSI64(dl_unitdata->imsi, &imsi64);
OAILOG_DEBUG(LOG_NAS_EMM, "Handling imsi " IMSI_64_FMT "\n", imsi64);
ctxt = emm_context_get_by_imsi(&_emm_data, imsi64);
if (!(ctxt)) {
OAILOG_ERROR(
LOG_NAS_EMM, "That's embarrassing as we don't know this IMSI\n");
OAILOG_FUNC_RETURN(LOG_NAS_EMM, RETURNerror);
}
emm_as->nas_info = EMM_AS_NAS_DL_NAS_TRANSPORT;
emm_as->nas_msg = bstrcpy(dl_unitdata->nas_msg_container);
/*
* Set the UE identifier
*/
emm_as->ue_id = PARENT_STRUCT(ctxt, struct ue_mm_context_s, emm_context)
->mme_ue_s1ap_id;
/*
* Setup EPS NAS security data
*/
emm_as_set_security_data(&emm_as->sctx, &ctxt->_security, false, true);
/*
* Notify EMM-AS SAP that Downlink Nas transport message has to be sent to the ue
*/
emm_sap.primitive = EMMAS_DATA_REQ;
emm_context_unlock(ctxt);
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
int encode_mobileid_imsi_tmsi(
MobileIdentity *out,
MobileIdentity in,
uint8_t typeofidentity)
{
if (typeofidentity == MOBILE_IDENTITY_IMSI) {
out->imsi.digit1 = in.imsi.digit1;
out->imsi.oddeven = in.imsi.oddeven;
out->imsi.typeofidentity = in.imsi.typeofidentity;
out->imsi.digit2 = in.imsi.digit2;
out->imsi.digit3 = in.imsi.digit3;
out->imsi.digit4 = in.imsi.digit4;
out->imsi.digit5 = in.imsi.digit5;
out->imsi.digit6 = in.imsi.digit6;
out->imsi.digit7 = in.imsi.digit7;
out->imsi.digit8 = in.imsi.digit8;
out->imsi.digit9 = in.imsi.digit9;
out->imsi.digit10 = in.imsi.digit10;
out->imsi.digit11 = in.imsi.digit11;
out->imsi.digit12 = in.imsi.digit12;
out->imsi.digit13 = in.imsi.digit13;
out->imsi.digit14 = in.imsi.digit14;
out->imsi.digit15 = in.imsi.digit15;
out->imsi.numOfValidImsiDigits = in.imsi.numOfValidImsiDigits;
} else if (typeofidentity == MOBILE_IDENTITY_TMSI) {
out->tmsi.digit1 = in.tmsi.digit1;
out->tmsi.oddeven = in.tmsi.oddeven;
out->tmsi.typeofidentity = in.tmsi.typeofidentity;
out->tmsi.digit2 = in.tmsi.digit2;
out->tmsi.digit3 = in.tmsi.digit3;
out->tmsi.digit4 = in.tmsi.digit4;
out->tmsi.digit5 = in.tmsi.digit5;
out->tmsi.digit6 = in.tmsi.digit6;
out->tmsi.digit7 = in.tmsi.digit7;
out->tmsi.digit8 = in.tmsi.digit8;
out->tmsi.digit9 = in.tmsi.digit9;
out->tmsi.digit10 = in.tmsi.digit10;
out->tmsi.digit11 = in.tmsi.digit11;
out->tmsi.digit12 = in.tmsi.digit12;
out->tmsi.digit13 = in.tmsi.digit13;
out->tmsi.digit14 = in.tmsi.digit14;
out->tmsi.digit15 = in.tmsi.digit15;
out->tmsi.numOfValidImsiDigits = in.tmsi.numOfValidImsiDigits;
}
OAILOG_FUNC_RETURN(LOG_NAS_EMM, RETURNok);
}
//------------------------------------------------------------------------------
int nas_proc_cs_domain_location_updt_fail(
itti_nas_cs_domain_location_update_fail_t *itti_nas_location_update_fail_p)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMCN_CS_DOMAIN_LOCATION_UPDT_FAIL;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.ue_id =
itti_nas_location_update_fail_p->ue_id;
//LAI
if (itti_nas_location_update_fail_p->presencemask & LAI) {
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.mccdigit2 =
itti_nas_location_update_fail_p->laicsfb.mccdigit2;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.mccdigit1 =
itti_nas_location_update_fail_p->laicsfb.mccdigit1;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.mncdigit3 =
itti_nas_location_update_fail_p->laicsfb.mncdigit3;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.mccdigit3 =
itti_nas_location_update_fail_p->laicsfb.mccdigit3;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.mncdigit2 =
itti_nas_location_update_fail_p->laicsfb.mncdigit2;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.mncdigit1 =
itti_nas_location_update_fail_p->laicsfb.mncdigit1;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.laicsfb.lac =
itti_nas_location_update_fail_p->laicsfb.lac;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.presencemask = LAI;
}
//SGS cause
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_fail.reject_cause =
itti_nas_location_update_fail_p->reject_cause;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_cs_domain_location_updt_acc(
itti_nas_cs_domain_location_update_acc_t *itti_nas_location_update_acc_p)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMCN_CS_DOMAIN_LOCATION_UPDT_ACC;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.ue_id =
itti_nas_location_update_acc_p->ue_id;
/*If is_sgs_assoc_exists is true no all the IEs*/
if (true == itti_nas_location_update_acc_p->is_sgs_assoc_exists) {
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.is_sgs_assoc_exists =
itti_nas_location_update_acc_p->is_sgs_assoc_exists;
if (itti_nas_location_update_acc_p->presencemask & ADD_UPDT_TYPE) {
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.add_updt_res =
itti_nas_location_update_acc_p->add_updt_res;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.presencemask |=
ADD_UPDT_TYPE;
}
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//LAI
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.mccdigit2 =
itti_nas_location_update_acc_p->laicsfb.mccdigit2;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.mccdigit1 =
itti_nas_location_update_acc_p->laicsfb.mccdigit1;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.mncdigit3 =
itti_nas_location_update_acc_p->laicsfb.mncdigit3;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.mccdigit3 =
itti_nas_location_update_acc_p->laicsfb.mccdigit3;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.mncdigit2 =
itti_nas_location_update_acc_p->laicsfb.mncdigit2;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.mncdigit1 =
itti_nas_location_update_acc_p->laicsfb.mncdigit1;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.laicsfb.lac =
itti_nas_location_update_acc_p->laicsfb.lac;
//Mobile Identity
if (itti_nas_location_update_acc_p->presencemask & MOBILE_IDENTITY) {
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.presencemask |=
MOBILE_IDENTITY;
if (
itti_nas_location_update_acc_p->mobileid.imsi.typeofidentity ==
MOBILE_IDENTITY_IMSI) {
memcpy(
&emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.mobileid.imsi,
&itti_nas_location_update_acc_p->mobileid.imsi,
sizeof(itti_nas_location_update_acc_p->mobileid.imsi));
} else if (
itti_nas_location_update_acc_p->mobileid.tmsi.typeofidentity ==
MOBILE_IDENTITY_TMSI) {
memcpy(
&emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.mobileid.tmsi,
&itti_nas_location_update_acc_p->mobileid.tmsi,
sizeof(itti_nas_location_update_acc_p->mobileid.tmsi));
OAILOG_DEBUG(
LOG_NAS_EMM,
"TMSI digit1 %d\n",
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.mobileid.tmsi
.tmsi[0]);
OAILOG_DEBUG(
LOG_NAS_EMM,
"TMSI digit2 %d\n",
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.mobileid.tmsi
.tmsi[1]);
OAILOG_DEBUG(
LOG_NAS_EMM,
"TMSI digit3 %d\n",
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.mobileid.tmsi
.tmsi[2]);
OAILOG_DEBUG(
LOG_NAS_EMM,
"TMSI digit4 %d\n",
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.mobileid.tmsi
.tmsi[3]);
}
}
//Additional Update Result
if (itti_nas_location_update_acc_p->presencemask & ADD_UPDT_TYPE) {
emm_sap.u.emm_cn.u.emm_cn_cs_domain_location_updt_acc.add_updt_res =
itti_nas_location_update_acc_p->add_updt_res;
}
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
//------------------------------------------------------------------------------
int nas_proc_sgs_release_req(itti_sgsap_release_req_t *sgs_release_req)
{
imsi64_t imsi64 = INVALID_IMSI64;
int rc = RETURNerror;
emm_context_t *ctxt = NULL;
OAILOG_FUNC_IN(LOG_NAS_EMM);
DevAssert(sgs_release_req);
IMSI_STRING_TO_IMSI64(sgs_release_req->imsi, &imsi64);
OAILOG_DEBUG(LOG_NAS_EMM, "Handling imsi " IMSI_64_FMT "\n", imsi64);
ctxt = emm_context_get_by_imsi(&_emm_data, imsi64);
if (!(ctxt)) {
OAILOG_ERROR(
LOG_NAS_EMM, "That's embarrassing as we don't know this IMSI\n");
OAILOG_FUNC_RETURN(LOG_NAS_EMM, RETURNerror);
}
/*
* As per spec 29.118 section 5.11.4
* Check the SGS cause recieved in SGS Release Request
* if sgs cause is "IMSI unknown" or "IMSI detached for non-EPS services"
* set the "VLR-Reliable" MM context variable to "false"
* MME requests the UE to re-attach for non-EPS services
*/
if (
(sgs_release_req->opt_cause == SGS_CAUSE_IMSI_UNKNOWN) ||
(sgs_release_req->opt_cause ==
SGS_CAUSE_IMSI_DETACHED_FOR_NONEPS_SERVICE)) {
// NAS trigger UE to re-attach for non-EPS services.
mme_ue_s1ap_id_t ue_id = PARENT_STRUCT(ctxt, struct ue_mm_context_s,
emm_context)->mme_ue_s1ap_id;
// update the ue context vlr_reliable flag to false
mme_ue_context_update_ue_sgs_vlr_reliable(ue_id, false);
emm_sap_t emm_sap = {0};
emm_sap.primitive = EMMCN_NW_INITIATED_DETACH_UE;
emm_sap.u.emm_cn.u.emm_cn_nw_initiated_detach.ue_id = ue_id;
emm_sap.u.emm_cn.u.emm_cn_nw_initiated_detach.detach_type =
NW_DETACH_TYPE_IMSI_DETACH;
rc = emm_sap_send(&emm_sap);
}
emm_context_unlock(ctxt);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: nas_proc_cs_service_notification() **
** **
** Description: Processes CS Paging Request message from MSC/VLR **
** over SGs interface **
** **
** Inputs: **
** cs_service_notification: The received message from MME app **
** **
** Outputs: **
** Return: RETURNok, RETURNerror **
** **
***************************************************************************/
int nas_proc_cs_service_notification(
itti_nas_cs_service_notification_t *const cs_service_notification)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMAS_DATA_REQ;
emm_sap.u.emm_as.u.data.nas_info = EMM_AS_NAS_DATA_CS_SERVICE_NOTIFICATION;
emm_sap.u.emm_as.u.data.ue_id = cs_service_notification->ue_id;
emm_sap.u.emm_as.u.data.nas_msg = NULL; /*No Esm container*/
emm_sap.u.emm_as.u.data.paging_identity = cs_service_notification->paging_id;
emm_sap.u.emm_as.u.data.cli = cs_service_notification->cli;
rc = emm_sap_send(&emm_sap);
if (emm_sap.u.emm_as.u.data.cli) {
bdestroy(emm_sap.u.emm_as.u.data.cli);
cs_service_notification->cli = NULL;
}
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
/****************************************************************************/
/********************* L O C A L F U N C T I O N S *********************/
/****************************************************************************/
static nas_cause_t s6a_error_2_nas_cause(uint32_t s6a_error, int experimental)
{
if (experimental == 0) {
/*
* Base protocol errors
*/
switch (s6a_error) {
/*
* 3002
*/
case ER_DIAMETER_UNABLE_TO_DELIVER: /* Fall through */
/*
* 3003
*/
case ER_DIAMETER_REALM_NOT_SERVED: /* Fall through */
/*
* 5003
*/
case ER_DIAMETER_AUTHORIZATION_REJECTED:
return NAS_CAUSE_IMSI_UNKNOWN_IN_HSS;
/*
* 5012
*/
case ER_DIAMETER_UNABLE_TO_COMPLY: /* Fall through */
/*
* 5004
*/
case ER_DIAMETER_INVALID_AVP_VALUE: /* Fall through */
/*
* Any other permanent errors from the diameter base protocol
*/
default: break;
}
} else {
switch (s6a_error) {
/*
* 4181
*/
case DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE:
return NAS_CAUSE_ILLEGAL_UE;
/*
* 5001
*/
case DIAMETER_ERROR_USER_UNKNOWN:
return NAS_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED;
/*
* TODO: distinguish GPRS_DATA_SUBSCRIPTION
*/
/*
* 5420
*/
case DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION:
return NAS_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA;
/*
* 5421
*/
case DIAMETER_ERROR_RAT_NOT_ALLOWED:
/*
* One of the following parameter can be sent depending on
* operator preference:
* ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA
* TRACKING_AREA_NOT_ALLOWED
* NO_SUITABLE_CELLS_IN_TRACKING_AREA
*/
return NAS_CAUSE_TRACKING_AREA_NOT_ALLOWED;
/*
* 5004 without error diagnostic
*/
case DIAMETER_ERROR_ROAMING_NOT_ALLOWED:
return NAS_CAUSE_PLMN_NOT_ALLOWED;
/*
* TODO: 5004 with error diagnostic of ODB_HPLMN_APN or
* ODB_VPLMN_APN
*/
/*
* TODO: 5004 with error diagnostic of ODB_ALL_APN
*/
default: break;
}
}
return NAS_CAUSE_NETWORK_FAILURE;
}
/* Handle CS domain MM-Information request from MSC/VLR */
int nas_proc_cs_domain_mm_information_request(
itti_sgsap_mm_information_req_t *const mm_information_req_pP)
{
int rc = RETURNerror;
emm_sap_t emm_sap = {0};
OAILOG_FUNC_IN(LOG_NAS_EMM);
emm_sap.primitive = EMMCN_CS_DOMAIN_MM_INFORMATION_REQ;
emm_sap.u.emm_cn.u.emm_cn_cs_domain_mm_information_req =
mm_information_req_pP;
rc = emm_sap_send(&emm_sap);
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
/****************************************************************************
** **
** Name: nas_proc_notify_service_reject() **
** **
** Description: Processes Service Reject notification received from **
** MME APP **
** **
** Inputs: **
** service_reject_p : The received message from MME app **
** **
** Outputs: **
** Return: RETURNok, RETURNerror **
** **
***************************************************************************/
int nas_proc_notify_service_reject(
itti_nas_notify_service_reject_t *const service_reject_p)
{
int rc = RETURNerror;
OAILOG_FUNC_IN(LOG_NAS_EMM);
DevAssert(service_reject_p);
if (
service_reject_p->failed_procedure ==
INTIAL_CONTEXT_SETUP_PROCEDURE_FAILED) {
OAILOG_INFO(
LOG_NAS_EMM,
"Send Service Reject for failed procedure %d for ue-id: %u \n",
service_reject_p->failed_procedure,
service_reject_p->ue_id);
rc = emm_proc_service_reject(
service_reject_p->ue_id, service_reject_p->emm_cause);
} else if (
service_reject_p->failed_procedure ==
UE_CONTEXT_MODIFICATION_PROCEDURE_FAILED) {
OAILOG_INFO(
LOG_NAS_EMM,
"Send Service Reject for failed UE_CONTEXT_MODIFICATION procedure for "
"ue-id:%u \n",
service_reject_p->ue_id);
rc = emm_send_service_reject_in_dl_nas(
service_reject_p->ue_id, service_reject_p->emm_cause);
} else if (
service_reject_p->failed_procedure ==
MT_CALL_CANCELLED_BY_NW_IN_IDLE_STATE) {
// If ECM state is IDLE send service_reject in Establish cnf else send in DL NAS Transport
rc = emm_proc_service_reject(
service_reject_p->ue_id, service_reject_p->emm_cause);
OAILOG_INFO(
LOG_NAS_EMM,
"Send Service Reject for FAILED_PROCEDURE_MT_CALL_CANCELLED_BY_NW "
"procedure for ue-id:%u \n",
service_reject_p->ue_id);
} else if (
service_reject_p->failed_procedure ==
MT_CALL_CANCELLED_BY_NW_IN_CONNECTED_STATE) {
rc = emm_send_service_reject_in_dl_nas(
service_reject_p->ue_id, service_reject_p->emm_cause);
OAILOG_INFO(
LOG_NAS_EMM,
"Send Service Reject for FAILED_PROCEDURE_MT_CALL_CANCELLED_BY_NW "
"procedure for ue-id:%u \n",
service_reject_p->ue_id);
}
OAILOG_FUNC_RETURN(LOG_NAS_EMM, rc);
}
| 37.587963 | 94 | 0.554994 | [
"vector"
] |
d66d838a43b2a03295fbe1d7dfb2d8c588c8cca7 | 926 | h | C | CGALWrapper/Triangulations/TriVertex2.h | unitycoder/CGALDotNet | 90682724a55aec2818847500047d4785aa7e1d67 | [
"MIT"
] | null | null | null | CGALWrapper/Triangulations/TriVertex2.h | unitycoder/CGALDotNet | 90682724a55aec2818847500047d4785aa7e1d67 | [
"MIT"
] | null | null | null | CGALWrapper/Triangulations/TriVertex2.h | unitycoder/CGALDotNet | 90682724a55aec2818847500047d4785aa7e1d67 | [
"MIT"
] | null | null | null | #pragma once
#include "../CGALWrapper.h"
#include "../Geometry/Geometry2.h"
#include "../Geometry/Geometry3.h"
#include "CGAL/Point_2.h"
struct TriVertex2
{
Point2d Point;
BOOL IsInfinite;
int Degree;
int Index;
int FaceIndex;
static TriVertex2 NullVertex()
{
TriVertex2 v;
v.Point = { 0, 0};
v.IsInfinite = false;
v.Degree = 0;
v.Index = NULL_INDEX;
v.FaceIndex = NULL_INDEX;
return v;
}
template<class K, class TRI, class VERT>
static TriVertex2 FromVertex(const TRI& tri, VERT vert, int degree)
{
TriVertex2 triVertex;
triVertex.Point = Point2d::FromCGAL<K>(vert->point());
triVertex.IsInfinite = tri.is_infinite(vert);
triVertex.Degree = degree;
triVertex.Index = vert->info();
auto face = vert->face();
if (tri.is_infinite(face) || tri.number_of_faces() == 0)
triVertex.FaceIndex = NULL_INDEX;
else
triVertex.FaceIndex = face->info();
return triVertex;
}
};
| 17.807692 | 68 | 0.682505 | [
"geometry"
] |
d672db119e690450b3c7c6a8e3076dc5490a64b6 | 3,329 | h | C | src/services/pcn-iptables/src/serializer/IptablesJsonObject.h | francescomessina/polycube | 38f2fb4ffa13cf51313b3cab9994be738ba367be | [
"ECL-2.0",
"Apache-2.0"
] | 337 | 2018-12-12T11:50:15.000Z | 2022-03-15T00:24:35.000Z | src/services/pcn-iptables/src/serializer/IptablesJsonObject.h | l1b0k/polycube | 7af919245c131fa9fe24c5d39d10039cbb81e825 | [
"ECL-2.0",
"Apache-2.0"
] | 253 | 2018-12-17T21:36:15.000Z | 2022-01-17T09:30:42.000Z | src/services/pcn-iptables/src/serializer/IptablesJsonObject.h | l1b0k/polycube | 7af919245c131fa9fe24c5d39d10039cbb81e825 | [
"ECL-2.0",
"Apache-2.0"
] | 90 | 2018-12-19T15:49:38.000Z | 2022-03-27T03:56:07.000Z | /**
* iptables API
* iptables API generated from iptables.yang
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/polycube-network/swagger-codegen.git
* branch polycube
*/
/* Do not edit this file manually */
/*
* IptablesJsonObject.h
*
*
*/
#pragma once
#include "JsonObjectBase.h"
#include "ChainJsonObject.h"
#include "SessionTableJsonObject.h"
#include "PortsJsonObject.h"
#include <vector>
#include "polycube/services/cube.h"
namespace io {
namespace swagger {
namespace server {
namespace model {
enum class IptablesConntrackEnum {
ON, OFF
};
enum class IptablesHorusEnum {
ON, OFF
};
/// <summary>
///
/// </summary>
class IptablesJsonObject : public JsonObjectBase {
public:
IptablesJsonObject();
IptablesJsonObject(const nlohmann::json &json);
~IptablesJsonObject() final = default;
nlohmann::json toJson() const final;
/// <summary>
/// Name of the iptables service
/// </summary>
std::string getName() const;
void setName(std::string value);
bool nameIsSet() const;
/// <summary>
/// Entry of the ports table
/// </summary>
const std::vector<PortsJsonObject>& getPorts() const;
void addPorts(PortsJsonObject value);
bool portsIsSet() const;
void unsetPorts();
/// <summary>
/// Interactive mode applies new rules immediately; if 'false', the command 'apply-rules' has to be used to apply all the rules at once. Default is TRUE.
/// </summary>
bool getInteractive() const;
void setInteractive(bool value);
bool interactiveIsSet() const;
void unsetInteractive();
/// <summary>
/// Enables the Connection Tracking module. Mandatory if connection tracking rules are needed. Default is ON.
/// </summary>
IptablesConntrackEnum getConntrack() const;
void setConntrack(IptablesConntrackEnum value);
bool conntrackIsSet() const;
void unsetConntrack();
static std::string IptablesConntrackEnum_to_string(const IptablesConntrackEnum &value);
static IptablesConntrackEnum string_to_IptablesConntrackEnum(const std::string &str);
/// <summary>
/// Enables the HORUS optimization. Default is OFF.
/// </summary>
IptablesHorusEnum getHorus() const;
void setHorus(IptablesHorusEnum value);
bool horusIsSet() const;
void unsetHorus();
static std::string IptablesHorusEnum_to_string(const IptablesHorusEnum &value);
static IptablesHorusEnum string_to_IptablesHorusEnum(const std::string &str);
/// <summary>
///
/// </summary>
const std::vector<SessionTableJsonObject>& getSessionTable() const;
void addSessionTable(SessionTableJsonObject value);
bool sessionTableIsSet() const;
void unsetSessionTable();
/// <summary>
///
/// </summary>
const std::vector<ChainJsonObject>& getChain() const;
void addChain(ChainJsonObject value);
bool chainIsSet() const;
void unsetChain();
private:
std::string m_name;
bool m_nameIsSet;
std::vector<PortsJsonObject> m_ports;
bool m_portsIsSet;
bool m_interactive;
bool m_interactiveIsSet;
IptablesConntrackEnum m_conntrack;
bool m_conntrackIsSet;
IptablesHorusEnum m_horus;
bool m_horusIsSet;
std::vector<SessionTableJsonObject> m_sessionTable;
bool m_sessionTableIsSet;
std::vector<ChainJsonObject> m_chain;
bool m_chainIsSet;
};
}
}
}
}
| 24.477941 | 171 | 0.73055 | [
"vector",
"model"
] |
d675af558f4aefbcffbb08b54155fe590ae71b07 | 56,625 | c | C | contrib/gnu/gdb/dist/gas/config/tc-h8300.c | TheSledgeHammer/2.11BSD | fe61f0b9aaa273783cd027c7b5ec77e95ead2153 | [
"BSD-3-Clause"
] | 3 | 2021-05-04T17:09:06.000Z | 2021-10-04T07:19:26.000Z | contrib/gnu/gdb/dist/gas/config/tc-h8300.c | TheSledgeHammer/2.11BSD | fe61f0b9aaa273783cd027c7b5ec77e95ead2153 | [
"BSD-3-Clause"
] | null | null | null | contrib/gnu/gdb/dist/gas/config/tc-h8300.c | TheSledgeHammer/2.11BSD | fe61f0b9aaa273783cd027c7b5ec77e95ead2153 | [
"BSD-3-Clause"
] | null | null | null | /* tc-h8300.c -- Assemble code for the Renesas H8/300
Copyright (C) 1991-2020 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
/* Written By Steve Chamberlain <sac@cygnus.com>. */
#include "as.h"
#include "subsegs.h"
#include "dwarf2dbg.h"
#define DEFINE_TABLE
#define h8_opcodes ops
#include "opcode/h8300.h"
#include "safe-ctype.h"
#include "elf/h8.h"
const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
#ifdef TE_LINUX
const char line_separator_chars[] = "!";
#else
const char line_separator_chars[] = "";
#endif
static void sbranch (int);
static void h8300hmode (int);
static void h8300smode (int);
static void h8300hnmode (int);
static void h8300snmode (int);
static void h8300sxmode (int);
static void h8300sxnmode (int);
static void pint (int);
int Hmode;
int Smode;
int Nmode;
int SXmode;
static int default_mach = bfd_mach_h8300;
#define PSIZE (Hmode && !Nmode ? L_32 : L_16)
static int bsize = L_8; /* Default branch displacement. */
struct h8_instruction
{
int length;
int noperands;
int idx;
int size;
const struct h8_opcode *opcode;
};
static struct h8_instruction *h8_instructions;
static void
h8300hmode (int arg ATTRIBUTE_UNUSED)
{
Hmode = 1;
Smode = 0;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300h))
as_warn (_("could not set architecture and machine"));
}
static void
h8300smode (int arg ATTRIBUTE_UNUSED)
{
Smode = 1;
Hmode = 1;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300s))
as_warn (_("could not set architecture and machine"));
}
static void
h8300hnmode (int arg ATTRIBUTE_UNUSED)
{
Hmode = 1;
Smode = 0;
Nmode = 1;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300hn))
as_warn (_("could not set architecture and machine"));
}
static void
h8300snmode (int arg ATTRIBUTE_UNUSED)
{
Smode = 1;
Hmode = 1;
Nmode = 1;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300sn))
as_warn (_("could not set architecture and machine"));
}
static void
h8300sxmode (int arg ATTRIBUTE_UNUSED)
{
Smode = 1;
Hmode = 1;
SXmode = 1;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300sx))
as_warn (_("could not set architecture and machine"));
}
static void
h8300sxnmode (int arg ATTRIBUTE_UNUSED)
{
Smode = 1;
Hmode = 1;
SXmode = 1;
Nmode = 1;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300sxn))
as_warn (_("could not set architecture and machine"));
}
static void
sbranch (int size)
{
bsize = size;
}
static void
pint (int arg ATTRIBUTE_UNUSED)
{
cons (Hmode ? 4 : 2);
}
/* Like obj_elf_section, but issues a warning for new
sections which do not have an attribute specification. */
static void
h8300_elf_section (int push)
{
static const char * known_data_sections [] = { ".rodata", ".tdata", ".tbss" };
static const char * known_data_prefixes [] = { ".debug", ".zdebug", ".gnu.warning" };
char * saved_ilp = input_line_pointer;
const char * name;
name = obj_elf_section_name ();
if (name == NULL)
return;
if (* input_line_pointer != ','
&& bfd_get_section_by_name (stdoutput, name) == NULL)
{
signed int i;
/* Ignore this warning for well known data sections. */
for (i = ARRAY_SIZE (known_data_sections); i--;)
if (strcmp (name, known_data_sections[i]) == 0)
break;
if (i < 0)
for (i = ARRAY_SIZE (known_data_prefixes); i--;)
if (strncmp (name, known_data_prefixes[i],
strlen (known_data_prefixes[i])) == 0)
break;
if (i < 0)
as_warn (_("new section '%s' defined without attributes - this might cause problems"), name);
}
/* FIXME: We ought to free the memory allocated by obj_elf_section_name()
for 'name', but we do not know if it was taken from the obstack, via
demand_copy_C_string(), or xmalloc()ed. */
input_line_pointer = saved_ilp;
obj_elf_section (push);
}
/* This table describes all the machine specific pseudo-ops the assembler
has to support. The fields are:
pseudo-op name without dot
function to call to execute this pseudo-op
Integer arg to pass to the function. */
const pseudo_typeS md_pseudo_table[] =
{
{"h8300h", h8300hmode, 0},
{"h8300hn", h8300hnmode, 0},
{"h8300s", h8300smode, 0},
{"h8300sn", h8300snmode, 0},
{"h8300sx", h8300sxmode, 0},
{"h8300sxn", h8300sxnmode, 0},
{"sbranch", sbranch, L_8},
{"lbranch", sbranch, L_16},
{"int", pint, 0},
{"data.b", cons, 1},
{"data.w", cons, 2},
{"data.l", cons, 4},
{"form", listing_psize, 0},
{"heading", listing_title, 0},
{"import", s_ignore, 0},
{"page", listing_eject, 0},
{"program", s_ignore, 0},
{"section", h8300_elf_section, 0},
{"section.s", h8300_elf_section, 0},
{"sect", h8300_elf_section, 0},
{"sect.s", h8300_elf_section, 0},
{0, 0, 0}
};
const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant
As in 0f12.456
or 0d1.2345e12. */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
static htab_t opcode_hash_control; /* Opcode mnemonics. */
/* This function is called once, at assembler startup time. This
should set up all the tables, etc. that the MD part of the assembler
needs. */
void
md_begin (void)
{
unsigned int nopcodes;
struct h8_opcode *p, *p1;
struct h8_instruction *pi;
char prev_buffer[100];
int idx = 0;
if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, default_mach))
as_warn (_("could not set architecture and machine"));
opcode_hash_control = str_htab_create ();
prev_buffer[0] = 0;
nopcodes = sizeof (h8_opcodes) / sizeof (struct h8_opcode);
h8_instructions = XNEWVEC (struct h8_instruction, nopcodes);
pi = h8_instructions;
p1 = h8_opcodes;
/* We do a minimum amount of sorting on the opcode table; this is to
make it easy to describe the mova instructions without unnecessary
code duplication.
Sorting only takes place inside blocks of instructions of the form
X/Y, so for example mova/b, mova/w and mova/l can be intermixed. */
while (p1)
{
struct h8_opcode *first_skipped = 0;
int len, cmplen = 0;
const char *src = p1->name;
char *dst, *buffer;
if (p1->name == 0)
break;
/* Strip off any . part when inserting the opcode and only enter
unique codes into the hash table. */
dst = buffer = XNEWVEC (char, strlen (src) + 1);
while (*src)
{
if (*src == '.')
{
src++;
break;
}
if (*src == '/')
cmplen = src - p1->name + 1;
*dst++ = *src++;
}
*dst = 0;
len = dst - buffer;
if (cmplen == 0)
cmplen = len;
str_hash_insert (opcode_hash_control, buffer, pi, 0);
strcpy (prev_buffer, buffer);
idx++;
for (p = p1; p->name; p++)
{
/* A negative TIME is used to indicate that we've added this opcode
already. */
if (p->time == -1)
continue;
if (strncmp (p->name, buffer, cmplen) != 0
|| (p->name[cmplen] != '\0' && p->name[cmplen] != '.'
&& p->name[cmplen - 1] != '/'))
{
if (first_skipped == 0)
first_skipped = p;
break;
}
if (strncmp (p->name, buffer, len) != 0)
{
if (first_skipped == 0)
first_skipped = p;
continue;
}
p->time = -1;
pi->size = p->name[len] == '.' ? p->name[len + 1] : 0;
pi->idx = idx;
/* Find the number of operands. */
pi->noperands = 0;
while (pi->noperands < 3 && p->args.nib[pi->noperands] != (op_type) E)
pi->noperands++;
/* Find the length of the opcode in bytes. */
pi->length = 0;
while (p->data.nib[pi->length * 2] != (op_type) E)
pi->length++;
pi->opcode = p;
pi++;
}
p1 = first_skipped;
}
/* Add entry for the NULL vector terminator. */
pi->length = 0;
pi->noperands = 0;
pi->idx = 0;
pi->size = 0;
pi->opcode = 0;
linkrelax = 1;
}
struct h8_op
{
op_type mode;
unsigned reg;
expressionS exp;
};
static void clever_message (const struct h8_instruction *, struct h8_op *);
static void fix_operand_size (struct h8_op *, int);
static void build_bytes (const struct h8_instruction *, struct h8_op *);
static void do_a_fix_imm (int, int, struct h8_op *, int, const struct h8_instruction *);
static void check_operand (struct h8_op *, unsigned int, const char *);
static const struct h8_instruction * get_specific (const struct h8_instruction *, struct h8_op *, int) ;
static char *get_operands (unsigned, char *, struct h8_op *);
static void get_operand (char **, struct h8_op *, int);
static int parse_reg (char *, op_type *, unsigned *, int);
static char *skip_colonthing (char *, int *);
static char *parse_exp (char *, struct h8_op *);
static int constant_fits_size_p (struct h8_op *, int, int);
/*
parse operands
WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp
r0l,r0h,..r7l,r7h
@WREG
@WREG+
@-WREG
#const
ccr
*/
/* Try to parse a reg name. Return the number of chars consumed. */
static int
parse_reg (char *src, op_type *mode, unsigned int *reg, int direction)
{
char *end;
int len;
/* Cribbed from get_symbol_name. */
if (!is_name_beginner (*src) || *src == '\001')
return 0;
end = src + 1;
while ((is_part_of_name (*end) && *end != '.') || *end == '\001')
end++;
len = end - src;
if (len == 2 && TOLOWER (src[0]) == 's' && TOLOWER (src[1]) == 'p')
{
*mode = PSIZE | REG | direction;
*reg = 7;
return len;
}
if (len == 3 &&
TOLOWER (src[0]) == 'c' &&
TOLOWER (src[1]) == 'c' &&
TOLOWER (src[2]) == 'r')
{
*mode = CCR;
*reg = 0;
return len;
}
if (len == 3 &&
TOLOWER (src[0]) == 'e' &&
TOLOWER (src[1]) == 'x' &&
TOLOWER (src[2]) == 'r')
{
*mode = EXR;
*reg = 1;
return len;
}
if (len == 3 &&
TOLOWER (src[0]) == 'v' &&
TOLOWER (src[1]) == 'b' &&
TOLOWER (src[2]) == 'r')
{
*mode = VBR;
*reg = 6;
return len;
}
if (len == 3 &&
TOLOWER (src[0]) == 's' &&
TOLOWER (src[1]) == 'b' &&
TOLOWER (src[2]) == 'r')
{
*mode = SBR;
*reg = 7;
return len;
}
if (len == 2 && TOLOWER (src[0]) == 'f' && TOLOWER (src[1]) == 'p')
{
*mode = PSIZE | REG | direction;
*reg = 6;
return len;
}
if (len == 3 && TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' &&
src[2] >= '0' && src[2] <= '7')
{
*mode = L_32 | REG | direction;
*reg = src[2] - '0';
if (!Hmode)
as_warn (_("Reg not valid for H8/300"));
return len;
}
if (len == 2 && TOLOWER (src[0]) == 'e' && src[1] >= '0' && src[1] <= '7')
{
*mode = L_16 | REG | direction;
*reg = src[1] - '0' + 8;
if (!Hmode)
as_warn (_("Reg not valid for H8/300"));
return len;
}
if (TOLOWER (src[0]) == 'r')
{
if (src[1] >= '0' && src[1] <= '7')
{
if (len == 3 && TOLOWER (src[2]) == 'l')
{
*mode = L_8 | REG | direction;
*reg = (src[1] - '0') + 8;
return len;
}
if (len == 3 && TOLOWER (src[2]) == 'h')
{
*mode = L_8 | REG | direction;
*reg = (src[1] - '0');
return len;
}
if (len == 2)
{
*mode = L_16 | REG | direction;
*reg = (src[1] - '0');
return len;
}
}
}
return 0;
}
/* Parse an immediate or address-related constant and store it in OP.
If the user also specifies the operand's size, store that size
in OP->MODE, otherwise leave it for later code to decide. */
static char *
parse_exp (char *src, struct h8_op *op)
{
char *save;
save = input_line_pointer;
input_line_pointer = src;
expression (&op->exp);
if (op->exp.X_op == O_absent)
as_bad (_("missing operand"));
src = input_line_pointer;
input_line_pointer = save;
return skip_colonthing (src, &op->mode);
}
/* If SRC starts with an explicit operand size, skip it and store the size
in *MODE. Leave *MODE unchanged otherwise. */
static char *
skip_colonthing (char *src, int *mode)
{
if (*src == ':')
{
src++;
*mode &= ~SIZE;
if (src[0] == '8' && !ISDIGIT (src[1]))
*mode |= L_8;
else if (src[0] == '2' && !ISDIGIT (src[1]))
*mode |= L_2;
else if (src[0] == '3' && !ISDIGIT (src[1]))
*mode |= L_3;
else if (src[0] == '4' && !ISDIGIT (src[1]))
*mode |= L_4;
else if (src[0] == '5' && !ISDIGIT (src[1]))
*mode |= L_5;
else if (src[0] == '2' && src[1] == '4' && !ISDIGIT (src[2]))
*mode |= L_24;
else if (src[0] == '3' && src[1] == '2' && !ISDIGIT (src[2]))
*mode |= L_32;
else if (src[0] == '1' && src[1] == '6' && !ISDIGIT (src[2]))
*mode |= L_16;
else
as_bad (_("invalid operand size requested"));
while (ISDIGIT (*src))
src++;
}
return src;
}
/* The many forms of operand:
Rn Register direct
@Rn Register indirect
@(exp[:16], Rn) Register indirect with displacement
@Rn+
@-Rn
@aa:8 absolute 8 bit
@aa:16 absolute 16 bit
@aa absolute 16 bit
#xx[:size] immediate data
@(exp:[8], pc) pc rel
@@aa[:8] memory indirect. */
static int
constant_fits_width_p (struct h8_op *operand, offsetT width)
{
offsetT num;
num = ((operand->exp.X_add_number & 0xffffffff) ^ 0x80000000) - 0x80000000;
return (num & ~width) == 0 || (num | width) == ~0;
}
static int
constant_fits_size_p (struct h8_op *operand, int size, int no_symbols)
{
offsetT num;
if (no_symbols
&& (operand->exp.X_add_symbol != 0 || operand->exp.X_op_symbol != 0))
return 0;
num = operand->exp.X_add_number & 0xffffffff;
switch (size)
{
case L_2:
return (num & ~3) == 0;
case L_3:
return (num & ~7) == 0;
case L_3NZ:
return num >= 1 && num < 8;
case L_4:
return (num & ~15) == 0;
case L_5:
return num >= 1 && num < 32;
case L_8:
num = (num ^ 0x80000000) - 0x80000000;
return (num & ~0xFF) == 0 || (num | 0x7F) == ~0;
case L_8U:
return (num & ~0xFF) == 0;
case L_16:
num = (num ^ 0x80000000) - 0x80000000;
return (num & ~0xFFFF) == 0 || (num | 0x7FFF) == ~0;
case L_16U:
return (num & ~0xFFFF) == 0;
case L_32:
return 1;
default:
abort ();
}
}
static void
get_operand (char **ptr, struct h8_op *op, int direction)
{
char *src = *ptr;
op_type mode;
unsigned int num;
unsigned int len;
op->mode = 0;
/* Check for '(' and ')' for instructions ldm and stm. */
if (src[0] == '(' && src[8] == ')')
++ src;
/* Gross. Gross. ldm and stm have a format not easily handled
by get_operand. We deal with it explicitly here. */
if (TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' &&
ISDIGIT (src[2]) && src[3] == '-' &&
TOLOWER (src[4]) == 'e' && TOLOWER (src[5]) == 'r' && ISDIGIT (src[6]))
{
int low, high;
low = src[2] - '0';
high = src[6] - '0';
/* Check register pair's validity as per tech note TN-H8*-193A/E
from Renesas for H8S and H8SX hardware manual. */
if ( !(low == 0 && (high == 1 || high == 2 || high == 3))
&& !(low == 1 && (high == 2 || high == 3 || high == 4) && SXmode)
&& !(low == 2 && (high == 3 || ((high == 4 || high == 5) && SXmode)))
&& !(low == 3 && (high == 4 || high == 5 || high == 6) && SXmode)
&& !(low == 4 && (high == 5 || high == 6))
&& !(low == 4 && high == 7 && SXmode)
&& !(low == 5 && (high == 6 || high == 7) && SXmode)
&& !(low == 6 && high == 7 && SXmode))
as_bad (_("Invalid register list for ldm/stm\n"));
/* Even sicker. We encode two registers into op->reg. One
for the low register to save, the other for the high
register to save; we also set the high bit in op->reg
so we know this is "very special". */
op->reg = 0x80000000 | (high << 8) | low;
op->mode = REG;
if (src[7] == ')')
*ptr = src + 8;
else
*ptr = src + 7;
return;
}
len = parse_reg (src, &op->mode, &op->reg, direction);
if (len)
{
src += len;
if (*src == '.')
{
int size = op->mode & SIZE;
switch (src[1])
{
case 'l': case 'L':
if (size != L_32)
as_warn (_("mismatch between register and suffix"));
op->mode = (op->mode & ~MODE) | LOWREG;
break;
case 'w': case 'W':
if (size != L_32 && size != L_16)
as_warn (_("mismatch between register and suffix"));
op->mode = (op->mode & ~MODE) | LOWREG;
op->mode = (op->mode & ~SIZE) | L_16;
break;
case 'b': case 'B':
op->mode = (op->mode & ~MODE) | LOWREG;
if (size != L_32 && size != L_8)
as_warn (_("mismatch between register and suffix"));
op->mode = (op->mode & ~MODE) | LOWREG;
op->mode = (op->mode & ~SIZE) | L_8;
break;
default:
as_warn (_("invalid suffix after register."));
break;
}
src += 2;
}
*ptr = src;
return;
}
if (*src == '@')
{
src++;
if (*src == '@')
{
*ptr = parse_exp (src + 1, op);
if (op->exp.X_add_number >= 0x100)
{
int divisor = 1;
op->mode = VECIND;
/* FIXME : 2? or 4? */
if (op->exp.X_add_number >= 0x400)
as_bad (_("address too high for vector table jmp/jsr"));
else if (op->exp.X_add_number >= 0x200)
divisor = 4;
else
divisor = 2;
op->exp.X_add_number = op->exp.X_add_number / divisor - 0x80;
}
else
op->mode = MEMIND;
return;
}
if (*src == '-' || *src == '+')
{
len = parse_reg (src + 1, &mode, &num, direction);
if (len == 0)
{
/* Oops, not a reg after all, must be ordinary exp. */
op->mode = ABS | direction;
*ptr = parse_exp (src, op);
return;
}
if (((mode & SIZE) != PSIZE)
/* For Normal mode accept 16 bit and 32 bit pointer registers. */
&& (!Nmode || ((mode & SIZE) != L_32)))
as_bad (_("Wrong size pointer register for architecture."));
op->mode = src[0] == '-' ? RDPREDEC : RDPREINC;
op->reg = num;
*ptr = src + 1 + len;
return;
}
if (*src == '(')
{
src++;
/* See if this is @(ERn.x, PC). */
len = parse_reg (src, &mode, &op->reg, direction);
if (len != 0 && (mode & MODE) == REG && src[len] == '.')
{
switch (TOLOWER (src[len + 1]))
{
case 'b':
mode = PCIDXB | direction;
break;
case 'w':
mode = PCIDXW | direction;
break;
case 'l':
mode = PCIDXL | direction;
break;
default:
mode = 0;
break;
}
if (mode
&& src[len + 2] == ','
&& TOLOWER (src[len + 3]) != 'p'
&& TOLOWER (src[len + 4]) != 'c'
&& src[len + 5] != ')')
{
*ptr = src + len + 6;
op->mode |= mode;
return;
}
/* Fall through into disp case - the grammar is somewhat
ambiguous, so we should try whether it's a DISP operand
after all ("ER3.L" might be a poorly named label...). */
}
/* Disp. */
/* Start off assuming a 16 bit offset. */
src = parse_exp (src, op);
if (*src == ')')
{
op->mode |= ABS | direction;
*ptr = src + 1;
return;
}
if (*src != ',')
{
as_bad (_("expected @(exp, reg16)"));
return;
}
src++;
len = parse_reg (src, &mode, &op->reg, direction);
if (len == 0 || (mode & MODE) != REG)
{
as_bad (_("expected @(exp, reg16)"));
return;
}
src += len;
if (src[0] == '.')
{
switch (TOLOWER (src[1]))
{
case 'b':
op->mode |= INDEXB | direction;
break;
case 'w':
op->mode |= INDEXW | direction;
break;
case 'l':
op->mode |= INDEXL | direction;
break;
default:
as_bad (_("expected .L, .W or .B for register in indexed addressing mode"));
}
src += 2;
op->reg &= 7;
}
else
op->mode |= DISP | direction;
src = skip_colonthing (src, &op->mode);
if (*src != ')')
{
as_bad (_("expected @(exp, reg16)"));
return;
}
*ptr = src + 1;
return;
}
len = parse_reg (src, &mode, &num, direction);
if (len)
{
src += len;
if (*src == '+' || *src == '-')
{
if (((mode & SIZE) != PSIZE)
/* For Normal mode accept 16 bit and 32 bit pointer registers. */
&& (!Nmode || ((mode & SIZE) != L_32)))
as_bad (_("Wrong size pointer register for architecture."));
op->mode = *src == '+' ? RSPOSTINC : RSPOSTDEC;
op->reg = num;
src++;
*ptr = src;
return;
}
if (((mode & SIZE) != PSIZE)
/* For Normal mode accept 16 bit and 32 bit pointer registers. */
&& (!Nmode || ((mode & SIZE) != L_32)))
as_bad (_("Wrong size pointer register for architecture."));
op->mode = direction | IND | PSIZE;
op->reg = num;
*ptr = src;
return;
}
else
{
/* must be a symbol */
op->mode = ABS | direction;
*ptr = parse_exp (src, op);
return;
}
}
if (*src == '#')
{
op->mode = IMM;
*ptr = parse_exp (src + 1, op);
return;
}
else if (strncmp (src, "mach", 4) == 0 ||
strncmp (src, "macl", 4) == 0 ||
strncmp (src, "MACH", 4) == 0 ||
strncmp (src, "MACL", 4) == 0)
{
op->reg = TOLOWER (src[3]) == 'l';
op->mode = MACREG;
*ptr = src + 4;
return;
}
else
{
op->mode = PCREL;
*ptr = parse_exp (src, op);
}
}
static char *
get_operands (unsigned int noperands, char *op_end, struct h8_op *operand)
{
char *ptr = op_end;
switch (noperands)
{
case 0:
break;
case 1:
ptr++;
get_operand (&ptr, operand + 0, SRC);
if (*ptr == ',')
{
ptr++;
get_operand (&ptr, operand + 1, DST);
}
break;
case 2:
ptr++;
get_operand (&ptr, operand + 0, SRC);
if (*ptr == ',')
ptr++;
get_operand (&ptr, operand + 1, DST);
break;
case 3:
ptr++;
get_operand (&ptr, operand + 0, SRC);
if (*ptr == ',')
ptr++;
get_operand (&ptr, operand + 1, DST);
if (*ptr == ',')
ptr++;
get_operand (&ptr, operand + 2, OP3);
break;
default:
abort ();
}
return ptr;
}
/* MOVA has special requirements. Rather than adding twice the amount of
addressing modes, we simply special case it a bit. */
static void
get_mova_operands (char *op_end, struct h8_op *operand)
{
char *ptr = op_end;
if (ptr[1] != '@' || ptr[2] != '(')
goto error;
ptr += 3;
operand[0].mode = 0;
ptr = parse_exp (ptr, &operand[0]);
if (*ptr !=',')
goto error;
ptr++;
get_operand (&ptr, operand + 1, DST);
if (*ptr =='.')
{
ptr++;
switch (*ptr++)
{
case 'b': case 'B':
operand[0].mode = (operand[0].mode & ~MODE) | INDEXB;
break;
case 'w': case 'W':
operand[0].mode = (operand[0].mode & ~MODE) | INDEXW;
break;
case 'l': case 'L':
operand[0].mode = (operand[0].mode & ~MODE) | INDEXL;
break;
default:
goto error;
}
}
else if ((operand[1].mode & MODE) == LOWREG)
{
switch (operand[1].mode & SIZE)
{
case L_8:
operand[0].mode = (operand[0].mode & ~MODE) | INDEXB;
break;
case L_16:
operand[0].mode = (operand[0].mode & ~MODE) | INDEXW;
break;
case L_32:
operand[0].mode = (operand[0].mode & ~MODE) | INDEXL;
break;
default:
goto error;
}
}
else
goto error;
if (*ptr++ != ')' || *ptr++ != ',')
goto error;
get_operand (&ptr, operand + 2, OP3);
/* See if we can use the short form of MOVA. */
if (((operand[1].mode & MODE) == REG || (operand[1].mode & MODE) == LOWREG)
&& (operand[2].mode & MODE) == REG
&& (operand[1].reg & 7) == (operand[2].reg & 7))
{
operand[1].mode = operand[2].mode = 0;
operand[0].reg = operand[2].reg & 7;
}
return;
error:
as_bad (_("expected valid addressing mode for mova: \"@(disp, ea.sz),ERn\""));
}
static void
get_rtsl_operands (char *ptr, struct h8_op *operand)
{
int mode, len, type = 0;
unsigned int num, num2;
ptr++;
if (*ptr == '(')
{
ptr++;
type = 1;
}
len = parse_reg (ptr, &mode, &num, SRC);
if (len == 0 || (mode & MODE) != REG)
{
as_bad (_("expected register"));
return;
}
ptr += len;
if (*ptr == '-')
{
len = parse_reg (++ptr, &mode, &num2, SRC);
if (len == 0 || (mode & MODE) != REG)
{
as_bad (_("expected register"));
return;
}
ptr += len;
/* CONST_xxx are used as placeholders in the opcode table. */
num = num2 - num;
if (num > 3)
{
as_bad (_("invalid register list"));
return;
}
}
else
num2 = num, num = 0;
if (type == 1 && *ptr++ != ')')
{
as_bad (_("expected closing paren"));
return;
}
operand[0].mode = RS32;
operand[1].mode = RD32;
operand[0].reg = num;
operand[1].reg = num2;
}
/* Passed a pointer to a list of opcodes which use different
addressing modes, return the opcode which matches the opcodes
provided. */
static const struct h8_instruction *
get_specific (const struct h8_instruction *instruction,
struct h8_op *operands, int size)
{
const struct h8_instruction *this_try = instruction;
const struct h8_instruction *found_other = 0, *found_mismatched = 0;
int found = 0;
int this_index = instruction->idx;
int noperands = 0;
/* There's only one ldm/stm and it's easier to just
get out quick for them. */
if (OP_KIND (instruction->opcode->how) == O_LDM
|| OP_KIND (instruction->opcode->how) == O_STM)
return this_try;
while (noperands < 3 && operands[noperands].mode != 0)
noperands++;
while (this_index == instruction->idx && !found)
{
int this_size;
found = 1;
this_try = instruction++;
this_size = this_try->opcode->how & SN;
if (this_try->noperands != noperands)
found = 0;
else if (this_try->noperands > 0)
{
int i;
for (i = 0; i < this_try->noperands && found; i++)
{
op_type op = this_try->opcode->args.nib[i];
int op_mode = op & MODE;
int op_size = op & SIZE;
int x = operands[i].mode;
int x_mode = x & MODE;
int x_size = x & SIZE;
if (op_mode == LOWREG && (x_mode == REG || x_mode == LOWREG))
{
if ((x_size == L_8 && (operands[i].reg & 8) == 0)
|| (x_size == L_16 && (operands[i].reg & 8) == 8))
as_warn (_("can't use high part of register in operand %d"), i);
if (x_size != op_size)
found = 0;
}
else if (op_mode == REG)
{
if (x_mode == LOWREG)
x_mode = REG;
if (x_mode != REG)
found = 0;
if (x_size == L_P)
x_size = (Hmode ? L_32 : L_16);
if (op_size == L_P)
op_size = (Hmode ? L_32 : L_16);
/* The size of the reg is v important. */
if (op_size != x_size)
found = 0;
}
else if (op_mode & CTRL) /* control register */
{
if (!(x_mode & CTRL))
found = 0;
switch (x_mode)
{
case CCR:
if (op_mode != CCR &&
op_mode != CCR_EXR &&
op_mode != CC_EX_VB_SB)
found = 0;
break;
case EXR:
if (op_mode != EXR &&
op_mode != CCR_EXR &&
op_mode != CC_EX_VB_SB)
found = 0;
break;
case MACH:
if (op_mode != MACH &&
op_mode != MACREG)
found = 0;
break;
case MACL:
if (op_mode != MACL &&
op_mode != MACREG)
found = 0;
break;
case VBR:
if (op_mode != VBR &&
op_mode != VBR_SBR &&
op_mode != CC_EX_VB_SB)
found = 0;
break;
case SBR:
if (op_mode != SBR &&
op_mode != VBR_SBR &&
op_mode != CC_EX_VB_SB)
found = 0;
break;
}
}
else if ((op & ABSJMP) && (x_mode == ABS || x_mode == PCREL))
{
operands[i].mode &= ~MODE;
operands[i].mode |= ABSJMP;
/* But it may not be 24 bits long. */
if (x_mode == ABS && !Hmode)
{
operands[i].mode &= ~SIZE;
operands[i].mode |= L_16;
}
if ((operands[i].mode & SIZE) == L_32
&& (op_mode & SIZE) != L_32)
found = 0;
}
else if (x_mode == IMM && op_mode != IMM)
{
offsetT num = operands[i].exp.X_add_number & 0xffffffff;
if (op_mode == KBIT || op_mode == DBIT)
/* This is ok if the immediate value is sensible. */;
else if (op_mode == CONST_2)
found = num == 2;
else if (op_mode == CONST_4)
found = num == 4;
else if (op_mode == CONST_8)
found = num == 8;
else if (op_mode == CONST_16)
found = num == 16;
else
found = 0;
}
else if (op_mode == PCREL && op_mode == x_mode)
{
/* movsd, bsr/bc and bsr/bs only come in PCREL16 flavour:
If x_size is L_8, promote it. */
if (OP_KIND (this_try->opcode->how) == O_MOVSD
|| OP_KIND (this_try->opcode->how) == O_BSRBC
|| OP_KIND (this_try->opcode->how) == O_BSRBS)
if (x_size == L_8)
x_size = L_16;
/* The size of the displacement is important. */
if (op_size != x_size)
found = 0;
}
else if ((op_mode == DISP || op_mode == IMM || op_mode == ABS
|| op_mode == INDEXB || op_mode == INDEXW
|| op_mode == INDEXL)
&& op_mode == x_mode)
{
/* Promote a L_24 to L_32 if it makes us match. */
if (x_size == L_24 && op_size == L_32)
{
x &= ~SIZE;
x |= x_size = L_32;
}
if (((x_size == L_16 && op_size == L_16U)
|| (x_size == L_8 && op_size == L_8U)
|| (x_size == L_3 && op_size == L_3NZ))
/* We're deliberately more permissive for ABS modes. */
&& (op_mode == ABS
|| constant_fits_size_p (operands + i, op_size,
op & NO_SYMBOLS)))
x_size = op_size;
if (x_size != 0 && op_size != x_size)
found = 0;
else if (x_size == 0
&& ! constant_fits_size_p (operands + i, op_size,
op & NO_SYMBOLS))
found = 0;
}
else if (op_mode != x_mode)
{
found = 0;
}
}
}
if (found)
{
if ((this_try->opcode->available == AV_H8SX && ! SXmode)
|| (this_try->opcode->available == AV_H8S && ! Smode)
|| (this_try->opcode->available == AV_H8H && ! Hmode))
found = 0, found_other = this_try;
else if (this_size != size && (this_size != SN && size != SN))
found_mismatched = this_try, found = 0;
}
}
if (found)
return this_try;
if (found_other)
{
as_warn (_("Opcode `%s' with these operand types not available in %s mode"),
found_other->opcode->name,
(! Hmode && ! Smode ? "H8/300"
: SXmode ? "H8sx"
: Smode ? "H8/300S"
: "H8/300H"));
}
else if (found_mismatched)
{
as_warn (_("mismatch between opcode size and operand size"));
return found_mismatched;
}
return 0;
}
static void
check_operand (struct h8_op *operand, unsigned int width, const char *string)
{
if (operand->exp.X_add_symbol == 0
&& operand->exp.X_op_symbol == 0)
{
/* No symbol involved, let's look at offset, it's dangerous if
any of the high bits are not 0 or ff's, find out by oring or
anding with the width and seeing if the answer is 0 or all
fs. */
if (! constant_fits_width_p (operand, width))
{
if (width == 255
&& (operand->exp.X_add_number & 0xff00) == 0xff00)
{
/* Just ignore this one - which happens when trying to
fit a 16 bit address truncated into an 8 bit address
of something like bset. */
}
else if (strcmp (string, "@") == 0
&& width == 0xffff
&& (operand->exp.X_add_number & 0xff8000) == 0xff8000)
{
/* Just ignore this one - which happens when trying to
fit a 24 bit address truncated into a 16 bit address
of something like mov.w. */
}
else
{
as_warn (_("operand %s0x%lx out of range."), string,
(unsigned long) operand->exp.X_add_number);
}
}
}
}
/* RELAXMODE has one of 3 values:
0 Output a "normal" reloc, no relaxing possible for this insn/reloc
1 Output a relaxable 24bit absolute mov.w address relocation
(may relax into a 16bit absolute address).
2 Output a relaxable 16/24 absolute mov.b address relocation
(may relax into an 8bit absolute address). */
static void
do_a_fix_imm (int offset, int nibble, struct h8_op *operand, int relaxmode, const struct h8_instruction *this_try)
{
int idx;
int size;
int where;
char *bytes = frag_now->fr_literal + offset;
const char *t = ((operand->mode & MODE) == IMM) ? "#" : "@";
if (operand->exp.X_add_symbol == 0)
{
switch (operand->mode & SIZE)
{
case L_2:
check_operand (operand, 0x3, t);
bytes[0] |= (operand->exp.X_add_number & 3) << (nibble ? 0 : 4);
break;
case L_3:
case L_3NZ:
check_operand (operand, 0x7, t);
bytes[0] |= (operand->exp.X_add_number & 7) << (nibble ? 0 : 4);
break;
case L_4:
check_operand (operand, 0xF, t);
bytes[0] |= (operand->exp.X_add_number & 15) << (nibble ? 0 : 4);
break;
case L_5:
check_operand (operand, 0x1F, t);
bytes[0] |= operand->exp.X_add_number & 31;
break;
case L_8:
case L_8U:
check_operand (operand, 0xff, t);
bytes[0] |= operand->exp.X_add_number;
break;
case L_16:
case L_16U:
check_operand (operand, 0xffff, t);
bytes[0] |= operand->exp.X_add_number >> 8;
bytes[1] |= operand->exp.X_add_number >> 0;
/* MOVA needs both relocs to relax the second operand properly. */
if (relaxmode != 0
&& (OP_KIND(this_try->opcode->how) == O_MOVAB
|| OP_KIND(this_try->opcode->how) == O_MOVAW
|| OP_KIND(this_try->opcode->how) == O_MOVAL))
{
idx = BFD_RELOC_16;
fix_new_exp (frag_now, offset, 2, &operand->exp, 0, idx);
}
break;
case L_24:
check_operand (operand, 0xffffff, t);
bytes[0] |= operand->exp.X_add_number >> 16;
bytes[1] |= operand->exp.X_add_number >> 8;
bytes[2] |= operand->exp.X_add_number >> 0;
break;
case L_32:
/* This should be done with bfd. */
bytes[0] |= operand->exp.X_add_number >> 24;
bytes[1] |= operand->exp.X_add_number >> 16;
bytes[2] |= operand->exp.X_add_number >> 8;
bytes[3] |= operand->exp.X_add_number >> 0;
if (relaxmode != 0)
{
if ((operand->mode & MODE) == DISP && relaxmode == 1)
idx = BFD_RELOC_H8_DISP32A16;
else
idx = (relaxmode == 2) ? R_MOV24B1 : R_MOVL1;
fix_new_exp (frag_now, offset, 4, &operand->exp, 0, idx);
}
break;
}
}
else
{
switch (operand->mode & SIZE)
{
case L_24:
case L_32:
size = 4;
where = (operand->mode & SIZE) == L_24 ? -1 : 0;
if ((operand->mode & MODE) == DISP && relaxmode == 1)
idx = BFD_RELOC_H8_DISP32A16;
else if (relaxmode == 2)
idx = R_MOV24B1;
else if (relaxmode == 1)
idx = R_MOVL1;
else
idx = R_RELLONG;
break;
default:
as_bad (_("Can't work out size of operand.\n"));
/* Fall through. */
case L_16:
case L_16U:
size = 2;
where = 0;
if (relaxmode == 2)
idx = R_MOV16B1;
else
idx = R_RELWORD;
operand->exp.X_add_number =
((operand->exp.X_add_number & 0xffff) ^ 0x8000) - 0x8000;
operand->exp.X_add_number |= (bytes[0] << 8) | bytes[1];
break;
case L_8:
size = 1;
where = 0;
idx = R_RELBYTE;
operand->exp.X_add_number =
((operand->exp.X_add_number & 0xff) ^ 0x80) - 0x80;
operand->exp.X_add_number |= bytes[0];
}
fix_new_exp (frag_now,
offset + where,
size,
&operand->exp,
0,
idx);
}
}
/* Now we know what sort of opcodes it is, let's build the bytes. */
static void
build_bytes (const struct h8_instruction *this_try, struct h8_op *operand)
{
int i;
char *output = frag_more (this_try->length);
const op_type *nibble_ptr = this_try->opcode->data.nib;
op_type c;
unsigned int nibble_count = 0;
int op_at[3];
int nib = 0;
int movb = 0;
char asnibbles[100];
char *p = asnibbles;
int high, low;
if (!Hmode && this_try->opcode->available != AV_H8)
as_warn (_("Opcode `%s' with these operand types not available in H8/300 mode"),
this_try->opcode->name);
else if (!Smode
&& this_try->opcode->available != AV_H8
&& this_try->opcode->available != AV_H8H)
as_warn (_("Opcode `%s' with these operand types not available in H8/300H mode"),
this_try->opcode->name);
else if (!SXmode
&& this_try->opcode->available != AV_H8
&& this_try->opcode->available != AV_H8H
&& this_try->opcode->available != AV_H8S)
as_warn (_("Opcode `%s' with these operand types not available in H8/300S mode"),
this_try->opcode->name);
while (*nibble_ptr != (op_type) E)
{
int d;
nib = 0;
c = *nibble_ptr++;
d = (c & OP3) == OP3 ? 2 : (c & DST) == DST ? 1 : 0;
if (c < 16)
nib = c;
else
{
int c2 = c & MODE;
if (c2 == REG || c2 == LOWREG
|| c2 == IND || c2 == PREINC || c2 == PREDEC
|| c2 == POSTINC || c2 == POSTDEC)
{
nib = operand[d].reg;
if (c2 == LOWREG)
nib &= 7;
}
else if (c & CTRL) /* Control reg operand. */
nib = operand[d].reg;
else if ((c & DISPREG) == (DISPREG))
{
nib = operand[d].reg;
}
else if (c2 == ABS)
{
operand[d].mode = c;
op_at[d] = nibble_count;
nib = 0;
}
else if (c2 == IMM || c2 == PCREL || c2 == ABS
|| (c & ABSJMP) || c2 == DISP)
{
operand[d].mode = c;
op_at[d] = nibble_count;
nib = 0;
}
else if ((c & IGNORE) || (c & DATA))
nib = 0;
else if (c2 == DBIT)
{
switch (operand[0].exp.X_add_number)
{
case 1:
nib = c;
break;
case 2:
nib = 0x8 | c;
break;
default:
as_bad (_("Need #1 or #2 here"));
}
}
else if (c2 == KBIT)
{
switch (operand[0].exp.X_add_number)
{
case 1:
nib = 0;
break;
case 2:
nib = 8;
break;
case 4:
if (!Hmode)
as_warn (_("#4 not valid on H8/300."));
nib = 9;
break;
default:
as_bad (_("Need #1 or #2 here"));
break;
}
/* Stop it making a fix. */
operand[0].mode = 0;
}
if (c & MEMRELAX)
operand[d].mode |= MEMRELAX;
if (c & B31)
nib |= 0x8;
if (c & B21)
nib |= 0x4;
if (c & B11)
nib |= 0x2;
if (c & B01)
nib |= 0x1;
if (c2 == MACREG)
{
if (operand[0].mode == MACREG)
/* stmac has mac[hl] as the first operand. */
nib = 2 + operand[0].reg;
else
/* ldmac has mac[hl] as the second operand. */
nib = 2 + operand[1].reg;
}
}
nibble_count++;
*p++ = nib;
}
/* Disgusting. Why, oh why didn't someone ask us for advice
on the assembler format. */
if (OP_KIND (this_try->opcode->how) == O_LDM)
{
high = (operand[1].reg >> 8) & 0xf;
low = (operand[1].reg) & 0xf;
asnibbles[2] = high - low;
asnibbles[7] = high;
}
else if (OP_KIND (this_try->opcode->how) == O_STM)
{
high = (operand[0].reg >> 8) & 0xf;
low = (operand[0].reg) & 0xf;
asnibbles[2] = high - low;
asnibbles[7] = low;
}
for (i = 0; i < this_try->length; i++)
output[i] = (asnibbles[i * 2] << 4) | asnibbles[i * 2 + 1];
/* Note if this is a mov.b or a bit manipulation instruction
there is a special relaxation which only applies. */
if ( this_try->opcode->how == O (O_MOV, SB)
|| this_try->opcode->how == O (O_BCLR, SB)
|| this_try->opcode->how == O (O_BAND, SB)
|| this_try->opcode->how == O (O_BIAND, SB)
|| this_try->opcode->how == O (O_BILD, SB)
|| this_try->opcode->how == O (O_BIOR, SB)
|| this_try->opcode->how == O (O_BIST, SB)
|| this_try->opcode->how == O (O_BIXOR, SB)
|| this_try->opcode->how == O (O_BLD, SB)
|| this_try->opcode->how == O (O_BNOT, SB)
|| this_try->opcode->how == O (O_BOR, SB)
|| this_try->opcode->how == O (O_BSET, SB)
|| this_try->opcode->how == O (O_BST, SB)
|| this_try->opcode->how == O (O_BTST, SB)
|| this_try->opcode->how == O (O_BXOR, SB))
movb = 1;
/* Output any fixes. */
for (i = 0; i < this_try->noperands; i++)
{
int x = operand[i].mode;
int x_mode = x & MODE;
if (x_mode == IMM || x_mode == DISP)
do_a_fix_imm (output - frag_now->fr_literal + op_at[i] / 2,
op_at[i] & 1, operand + i, (x & MEMRELAX) != 0,
this_try);
else if (x_mode == ABS)
do_a_fix_imm (output - frag_now->fr_literal + op_at[i] / 2,
op_at[i] & 1, operand + i,
(x & MEMRELAX) ? movb + 1 : 0,
this_try);
else if (x_mode == PCREL)
{
int size16 = (x & SIZE) == L_16;
int size = size16 ? 2 : 1;
int type = size16 ? R_PCRWORD : R_PCRBYTE;
fixS *fixP;
check_operand (operand + i, size16 ? 0x7fff : 0x7f, "@");
if (operand[i].exp.X_add_number & 1)
as_warn (_("branch operand has odd offset (%lx)\n"),
(unsigned long) operand->exp.X_add_number);
if (size16)
{
operand[i].exp.X_add_number =
((operand[i].exp.X_add_number & 0xffff) ^ 0x8000) - 0x8000;
}
else
{
operand[i].exp.X_add_number =
((operand[i].exp.X_add_number & 0xff) ^ 0x80) - 0x80;
}
/* For BRA/S. */
if (! size16)
operand[i].exp.X_add_number |= output[op_at[i] / 2];
fixP = fix_new_exp (frag_now,
output - frag_now->fr_literal + op_at[i] / 2,
size,
&operand[i].exp,
1,
type);
fixP->fx_signed = 1;
}
else if (x_mode == MEMIND)
{
check_operand (operand + i, 0xff, "@@");
fix_new_exp (frag_now,
output - frag_now->fr_literal + 1,
1,
&operand[i].exp,
0,
R_MEM_INDIRECT);
}
else if (x_mode == VECIND)
{
check_operand (operand + i, 0x7f, "@@");
/* FIXME: approximating the effect of "B31" here...
This is very hackish, and ought to be done a better way. */
operand[i].exp.X_add_number |= 0x80;
fix_new_exp (frag_now,
output - frag_now->fr_literal + 1,
1,
&operand[i].exp,
0,
R_MEM_INDIRECT);
}
else if (x & ABSJMP)
{
int where = 0;
bfd_reloc_code_real_type reloc_type = R_JMPL1;
/* To be compatible with the proposed H8 ELF format, we
want the relocation's offset to point to the first byte
that will be modified, not to the start of the instruction. */
if ((operand->mode & SIZE) == L_32)
{
where = 2;
reloc_type = R_RELLONG;
}
else
where = 1;
/* This jmp may be a jump or a branch. */
check_operand (operand + i,
SXmode ? 0xffffffff : Hmode ? 0xffffff : 0xffff,
"@");
if (operand[i].exp.X_add_number & 1)
as_warn (_("branch operand has odd offset (%lx)\n"),
(unsigned long) operand->exp.X_add_number);
if (!Hmode)
operand[i].exp.X_add_number =
((operand[i].exp.X_add_number & 0xffff) ^ 0x8000) - 0x8000;
fix_new_exp (frag_now,
output - frag_now->fr_literal + where,
4,
&operand[i].exp,
0,
reloc_type);
}
}
}
/* Try to give an intelligent error message for common and simple to
detect errors. */
static void
clever_message (const struct h8_instruction *instruction,
struct h8_op *operand)
{
/* Find out if there was more than one possible opcode. */
if ((instruction + 1)->idx != instruction->idx)
{
int argn;
/* Only one opcode of this flavour, try to guess which operand
didn't match. */
for (argn = 0; argn < instruction->noperands; argn++)
{
switch (instruction->opcode->args.nib[argn])
{
case RD16:
if (operand[argn].mode != RD16)
{
as_bad (_("destination operand must be 16 bit register"));
return;
}
break;
case RS8:
if (operand[argn].mode != RS8)
{
as_bad (_("source operand must be 8 bit register"));
return;
}
break;
case ABS16DST:
if (operand[argn].mode != ABS16DST)
{
as_bad (_("destination operand must be 16bit absolute address"));
return;
}
break;
case RD8:
if (operand[argn].mode != RD8)
{
as_bad (_("destination operand must be 8 bit register"));
return;
}
break;
case ABS16SRC:
if (operand[argn].mode != ABS16SRC)
{
as_bad (_("source operand must be 16bit absolute address"));
return;
}
break;
}
}
}
as_bad (_("invalid operands"));
}
/* If OPERAND is part of an address, adjust its size and value given
that it addresses SIZE bytes.
This function decides how big non-immediate constants are when no
size was explicitly given. It also scales down the assembly-level
displacement in an @(d:2,ERn) operand. */
static void
fix_operand_size (struct h8_op *operand, int size)
{
if (SXmode && (operand->mode & MODE) == DISP)
{
/* If the user didn't specify an operand width, see if we
can use @(d:2,ERn). */
if ((operand->mode & SIZE) == 0
&& operand->exp.X_add_symbol == 0
&& operand->exp.X_op_symbol == 0
&& (operand->exp.X_add_number == size
|| operand->exp.X_add_number == size * 2
|| operand->exp.X_add_number == size * 3))
operand->mode |= L_2;
/* Scale down the displacement in an @(d:2,ERn) operand.
X_add_number then contains the desired field value. */
if ((operand->mode & SIZE) == L_2)
{
if (operand->exp.X_add_number % size != 0)
as_warn (_("operand/size mis-match"));
operand->exp.X_add_number /= size;
}
}
if ((operand->mode & SIZE) == 0)
switch (operand->mode & MODE)
{
case DISP:
case INDEXB:
case INDEXW:
case INDEXL:
case ABS:
/* Pick a 24-bit address unless we know that a 16-bit address
is safe. get_specific() will relax L_24 into L_32 where
necessary. */
if (Hmode
&& !Nmode
&& ((((addressT) operand->exp.X_add_number + 0x8000)
& 0xffffffff) > 0xffff
|| operand->exp.X_add_symbol != 0
|| operand->exp.X_op_symbol != 0))
operand->mode |= L_24;
else
operand->mode |= L_16;
break;
case PCREL:
if ((((addressT) operand->exp.X_add_number + 0x80)
& 0xffffffff) <= 0xff)
{
if (operand->exp.X_add_symbol != NULL)
operand->mode |= bsize;
else
operand->mode |= L_8;
}
else
operand->mode |= L_16;
break;
}
}
/* This is the guts of the machine-dependent assembler. STR points to
a machine dependent instruction. This function is supposed to emit
the frags/bytes it assembles. */
void
md_assemble (char *str)
{
char *op_start;
char *op_end;
struct h8_op operand[3];
const struct h8_instruction *instruction;
const struct h8_instruction *prev_instruction;
char *dot = 0;
char *slash = 0;
char c;
int size, i;
/* Drop leading whitespace. */
while (*str == ' ')
str++;
/* Find the op code end. */
for (op_start = op_end = str;
*op_end != 0 && *op_end != ' ';
op_end++)
{
if (*op_end == '.')
{
dot = op_end + 1;
*op_end = 0;
op_end += 2;
break;
}
else if (*op_end == '/' && ! slash)
slash = op_end;
}
if (op_end == op_start)
{
as_bad (_("can't find opcode "));
}
c = *op_end;
*op_end = 0;
/* The assembler stops scanning the opcode at slashes, so it fails
to make characters following them lower case. Fix them. */
if (slash)
while (*++slash)
*slash = TOLOWER (*slash);
instruction = (const struct h8_instruction *)
str_hash_find (opcode_hash_control, op_start);
if (instruction == NULL)
{
as_bad (_("unknown opcode"));
return;
}
/* We used to set input_line_pointer to the result of get_operands,
but that is wrong. Our caller assumes we don't change it. */
operand[0].mode = 0;
operand[1].mode = 0;
operand[2].mode = 0;
if (OP_KIND (instruction->opcode->how) == O_MOVAB
|| OP_KIND (instruction->opcode->how) == O_MOVAW
|| OP_KIND (instruction->opcode->how) == O_MOVAL)
get_mova_operands (op_end, operand);
else if (OP_KIND (instruction->opcode->how) == O_RTEL
|| OP_KIND (instruction->opcode->how) == O_RTSL)
get_rtsl_operands (op_end, operand);
else
get_operands (instruction->noperands, op_end, operand);
*op_end = c;
prev_instruction = instruction;
/* Now we have operands from instruction.
Let's check them out for ldm and stm. */
if (OP_KIND (instruction->opcode->how) == O_LDM)
{
/* The first operand must be @er7+, and the
second operand must be a register pair. */
if ((operand[0].mode != RSINC)
|| (operand[0].reg != 7)
|| ((operand[1].reg & 0x80000000) == 0))
as_bad (_("invalid operand in ldm"));
}
else if (OP_KIND (instruction->opcode->how) == O_STM)
{
/* The first operand must be a register pair,
and the second operand must be @-er7. */
if (((operand[0].reg & 0x80000000) == 0)
|| (operand[1].mode != RDDEC)
|| (operand[1].reg != 7))
as_bad (_("invalid operand in stm"));
}
size = SN;
if (dot)
{
switch (TOLOWER (*dot))
{
case 'b':
size = SB;
break;
case 'w':
size = SW;
break;
case 'l':
size = SL;
break;
}
}
if (OP_KIND (instruction->opcode->how) == O_MOVAB ||
OP_KIND (instruction->opcode->how) == O_MOVAW ||
OP_KIND (instruction->opcode->how) == O_MOVAL)
{
switch (operand[0].mode & MODE)
{
case INDEXB:
default:
fix_operand_size (&operand[1], 1);
break;
case INDEXW:
fix_operand_size (&operand[1], 2);
break;
case INDEXL:
fix_operand_size (&operand[1], 4);
break;
}
}
else
{
for (i = 0; i < 3 && operand[i].mode != 0; i++)
switch (size)
{
case SN:
case SB:
default:
fix_operand_size (&operand[i], 1);
break;
case SW:
fix_operand_size (&operand[i], 2);
break;
case SL:
fix_operand_size (&operand[i], 4);
break;
}
}
instruction = get_specific (instruction, operand, size);
if (instruction == 0)
{
/* Couldn't find an opcode which matched the operands. */
char *where = frag_more (2);
where[0] = 0x0;
where[1] = 0x0;
clever_message (prev_instruction, operand);
return;
}
build_bytes (instruction, operand);
dwarf2_emit_insn (instruction->length);
}
symbolS *
md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
{
return 0;
}
/* Various routines to kill one day. */
const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
}
#define OPTION_H_TICK_HEX (OPTION_MD_BASE)
#define OPTION_MACH (OPTION_MD_BASE+1)
const char *md_shortopts = "";
struct option md_longopts[] =
{
{ "h-tick-hex", no_argument, NULL, OPTION_H_TICK_HEX },
{ "mach", required_argument, NULL, OPTION_MACH },
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
struct mach_func
{
const char *name;
void (*func) (void);
};
static void
mach_h8300h (void)
{
Hmode = 1;
Smode = 0;
Nmode = 0;
SXmode = 0;
default_mach = bfd_mach_h8300h;
}
static void
mach_h8300hn (void)
{
Hmode = 1;
Smode = 0;
Nmode = 1;
SXmode = 0;
default_mach = bfd_mach_h8300hn;
}
static void
mach_h8300s (void)
{
Hmode = 1;
Smode = 1;
Nmode = 0;
SXmode = 0;
default_mach = bfd_mach_h8300s;
}
static void
mach_h8300sn (void)
{
Hmode = 1;
Smode = 1;
Nmode = 1;
SXmode = 0;
default_mach = bfd_mach_h8300sn;
}
static void
mach_h8300sx (void)
{
Hmode = 1;
Smode = 1;
Nmode = 0;
SXmode = 1;
default_mach = bfd_mach_h8300sx;
}
static void
mach_h8300sxn (void)
{
Hmode = 1;
Smode = 1;
Nmode = 1;
SXmode = 1;
default_mach = bfd_mach_h8300sxn;
}
const struct mach_func mach_table[] =
{
{"h8300h", mach_h8300h},
{"h8300hn", mach_h8300hn},
{"h8300s", mach_h8300s},
{"h8300sn", mach_h8300sn},
{"h8300sx", mach_h8300sx},
{"h8300sxn", mach_h8300sxn}
};
int
md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
unsigned int i;
switch (c)
{
case OPTION_H_TICK_HEX:
enable_h_tick_hex = 1;
break;
case OPTION_MACH:
for (i = 0; i < sizeof(mach_table) / sizeof(struct mach_func); i++)
{
if (strcasecmp (arg, mach_table[i].name) == 0)
{
mach_table[i].func();
break;
}
}
if (i >= sizeof(mach_table) / sizeof(struct mach_func))
as_bad (_("Invalid argument to --mach option: %s"), arg);
break;
default:
return 0;
}
return 1;
}
void
md_show_usage (FILE *stream)
{
fprintf (stream, _(" H8300-specific assembler options:\n"));
fprintf (stream, _("\
-mach=<name> Set the H8300 machine type to one of:\n\
h8300h, h8300hn, h8300s, h8300sn, h8300sx, h8300sxn\n"));
fprintf (stream, _("\
-h-tick-hex Support H'00 style hex constants\n"));
}
void tc_aout_fix_to_chars (void);
void
tc_aout_fix_to_chars (void)
{
printf (_("call to tc_aout_fix_to_chars \n"));
abort ();
}
void
md_convert_frag (bfd *headers ATTRIBUTE_UNUSED,
segT seg ATTRIBUTE_UNUSED,
fragS *fragP ATTRIBUTE_UNUSED)
{
printf (_("call to md_convert_frag \n"));
abort ();
}
valueT
md_section_align (segT segment, valueT size)
{
int align = bfd_section_alignment (segment);
return ((size + (1 << align) - 1) & (-1U << align));
}
void
md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
{
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
long val = *valP;
switch (fixP->fx_size)
{
case 1:
*buf++ = val;
break;
case 2:
*buf++ = (val >> 8);
*buf++ = val;
break;
case 4:
*buf++ = (val >> 24);
*buf++ = (val >> 16);
*buf++ = (val >> 8);
*buf++ = val;
break;
case 8:
/* This can arise when the .quad or .8byte pseudo-ops are used.
Returning here (without setting fx_done) will cause the code
to attempt to generate a reloc which will then fail with the
slightly more helpful error message: "Cannot represent
relocation type BFD_RELOC_64". */
return;
default:
abort ();
}
if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
fixP->fx_done = 1;
}
int
md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED,
segT segment_type ATTRIBUTE_UNUSED)
{
printf (_("call to md_estimate_size_before_relax \n"));
abort ();
}
/* Put number into target byte order. */
void
md_number_to_chars (char *ptr, valueT use, int nbytes)
{
number_to_chars_bigendian (ptr, use, nbytes);
}
long
md_pcrel_from (fixS *fixp)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
_("Unexpected reference to a symbol in a non-code section"));
return 0;
}
arelent *
tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
{
arelent *rel;
bfd_reloc_code_real_type r_type;
if (fixp->fx_addsy && fixp->fx_subsy)
{
if ((S_GET_SEGMENT (fixp->fx_addsy) != S_GET_SEGMENT (fixp->fx_subsy))
|| S_GET_SEGMENT (fixp->fx_addsy) == undefined_section)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
_("Difference of symbols in different sections is not supported"));
return NULL;
}
}
rel = XNEW (arelent);
rel->sym_ptr_ptr = XNEW (asymbol *);
*rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
rel->addend = fixp->fx_offset;
r_type = fixp->fx_r_type;
#define DEBUG 0
#if DEBUG
fprintf (stderr, "%s\n", bfd_get_reloc_code_name (r_type));
fflush (stderr);
#endif
rel->howto = bfd_reloc_type_lookup (stdoutput, r_type);
if (rel->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
_("Cannot represent relocation type %s"),
bfd_get_reloc_code_name (r_type));
return NULL;
}
return rel;
}
| 24.281732 | 114 | 0.567046 | [
"vector"
] |
d676c358d411e39fe9afa33c4e4e526018bc9e41 | 4,758 | c | C | epc9153-acmc.X/sources/configuration_bits.c | microchip-pic-avr-solutions/epc9153-power-sync-buck-acmc | 59a675f048be4271fddeb987e1c37face49e7a84 | [
"Unlicense"
] | 2 | 2020-12-15T13:55:14.000Z | 2021-06-10T01:18:01.000Z | epc9153-acmc.X/sources/configuration_bits.c | microchip-pic-avr-solutions/epc9153-power-sync-buck-acmc | 59a675f048be4271fddeb987e1c37face49e7a84 | [
"Unlicense"
] | null | null | null | epc9153-acmc.X/sources/configuration_bits.c | microchip-pic-avr-solutions/epc9153-power-sync-buck-acmc | 59a675f048be4271fddeb987e1c37face49e7a84 | [
"Unlicense"
] | 3 | 2020-12-15T14:23:55.000Z | 2022-01-14T12:00:41.000Z |
// DSPIC33CK32MP102 Configuration Bit Settings
// 'C' source line config statements
// FSEC
#pragma config BWRP = OFF // Boot Segment Write-Protect bit (Boot Segment may be written)
#pragma config BSS = DISABLED // Boot Segment Code-Protect Level bits (No Protection (other than BWRP))
#pragma config BSEN = OFF // Boot Segment Control bit (No Boot Segment)
#pragma config GWRP = OFF // General Segment Write-Protect bit (General Segment may be written)
#pragma config GSS = HIGH // General Segment Code-Protect Level bits (High Security)
#pragma config CWRP = OFF // Configuration Segment Write-Protect bit (Configuration Segment may be written)
#pragma config CSS = STNDRD // Configuration Segment Code-Protect Level bits (Standard Security)
#pragma config AIVTDIS = OFF // Alternate Interrupt Vector Table bit (Disabled AIVT)
// FBSLIM
#pragma config BSLIM = 0x1FFF // Boot Segment Flash Page Address Limit bits (Enter Hexadecimal value)
// FOSCSEL
#pragma config FNOSC = FRC // Oscillator Source Selection (Internal Fast RC (FRC))
#pragma config IESO = ON // Two-speed Oscillator Start-up Enable bit (Start up device with FRC, then switch to user-selected oscillator source)
// FOSC
#pragma config POSCMD = NONE // Primary Oscillator Mode Select bits (Primary Oscillator disabled)
#pragma config OSCIOFNC = ON // OSC2 Pin Function bit (OSC2 is general purpose digital I/O pin)
#pragma config FCKSM = CSECMD // Clock Switching Mode bits (Clock switching is enabled,Fail-safe Clock Monitor is disabled)
#pragma config PLLKEN = ON // PLL Lock Enable (PLL clock output will be disabled if LOCK is lost)
#pragma config XTCFG = G3 // XT Config (24-32 MHz crystals)
#pragma config XTBST = ENABLE // XT Boost (Boost the kick-start)
// FWDT
#pragma config RWDTPS = PS2147483648 // Run Mode Watchdog Timer Post Scaler select bits (1:2147483648)
#pragma config RCLKSEL = LPRC // Watchdog Timer Clock Select bits (Always use LPRC)
#pragma config WINDIS = ON // Watchdog Timer Window Enable bit (Watchdog Timer operates in Non-Window mode)
#pragma config WDTWIN = WIN25 // Watchdog Timer Window Select bits (WDT Window is 25% of WDT period)
#pragma config SWDTPS = PS2147483648 // Sleep Mode Watchdog Timer Post Scaler select bits (1:2147483648)
#pragma config FWDTEN = ON_SW // Watchdog Timer Enable bit (WDT controlled via SW, use WDTCON.ON bit)
// FPOR
#pragma config BISTDIS = DISABLED // Memory BIST Feature Disable (mBIST on reset feature disabled)
// FICD
#pragma config ICS = PGD1 // ICD Communication Channel Select bits (Communicate on PGC1 and PGD1)
#pragma config JTAGEN = OFF // JTAG Enable bit (JTAG is disabled)
// FDMTIVTL
#pragma config DMTIVTL = 0xFFFF // Dead Man Timer Interval low word (Enter Hexadecimal value)
// FDMTIVTH
#pragma config DMTIVTH = 0xFFFF // Dead Man Timer Interval high word (Enter Hexadecimal value)
// FDMTCNTL
#pragma config DMTCNTL = 0xFFFF // Lower 16 bits of 32 bit DMT instruction count time-out value (0-0xFFFF) (Enter Hexadecimal value)
// FDMTCNTH
#pragma config DMTCNTH = 0xFFFF // Upper 16 bits of 32 bit DMT instruction count time-out value (0-0xFFFF) (Enter Hexadecimal value)
// FDMT
#pragma config DMTDIS = OFF // Dead Man Timer Disable bit (Dead Man Timer is Disabled and can be enabled by software)
// FDEVOPT
#pragma config ALTI2C1 = OFF // Alternate I2C1 Pin bit (I2C1 mapped to SDA1/SCL1 pins)
#pragma config ALTI2C2 = OFF // Alternate I2C2 Pin bit (I2C2 mapped to SDA2/SCL2 pins)
#pragma config SMB3EN = SMBUS3 // SM Bus Enable (SMBus 3.0 input levels)
#pragma config SPI2PIN = PPS // SPI2 Pin Select bit (SPI2 uses I/O remap (PPS) pins)
// FALTREG
#pragma config CTXT1 = IPL5 // Specifies Interrupt Priority Level (IPL) Associated to Alternate Working Register 1 bits (Alternate Register set assigned to IPL level 5)
#pragma config CTXT2 = OFF // Specifies Interrupt Priority Level (IPL) Associated to Alternate Working Register 2 bits (Not Assigned)
#pragma config CTXT3 = OFF // Specifies Interrupt Priority Level (IPL) Associated to Alternate Working Register 3 bits (Not Assigned)
#pragma config CTXT4 = OFF // Specifies Interrupt Priority Level (IPL) Associated to Alternate Working Register 4 bits (Not Assigned)
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
#include <xc.h>
| 61 | 180 | 0.691677 | [
"vector"
] |
d67c2ab5cc5584beacdfb47a0cc6f111894c0042 | 5,161 | h | C | include/tnt/deps/simd/detail/null/bitwise.h | JordanCheney/tnt | a0fd378079d36b2bd39960c34e5c83f9633db0c0 | [
"MIT"
] | null | null | null | include/tnt/deps/simd/detail/null/bitwise.h | JordanCheney/tnt | a0fd378079d36b2bd39960c34e5c83f9633db0c0 | [
"MIT"
] | 1 | 2018-06-09T04:40:01.000Z | 2018-06-09T04:40:01.000Z | include/tnt/deps/simd/detail/null/bitwise.h | JordanCheney/tnt | a0fd378079d36b2bd39960c34e5c83f9633db0c0 | [
"MIT"
] | null | null | null | /* Copyright (C) 2011-2012 Povilas Kanapickas <povilas@radix.lt>
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 LIBSIMDPP_DETAIL_NULL_BITWISE_H
#define LIBSIMDPP_DETAIL_NULL_BITWISE_H
#if SIMDPP_USE_NULL || SIMDPP_USE_NEON || SIMDPP_USE_ALTIVEC
#ifndef LIBSIMDPP_SIMD_H
#error "This file must be included through simd.h"
#endif
#include <tnt/deps/simd/types.h>
#include <tnt/deps/simd/core/cast.h>
#include <tnt/deps/simd/detail/null/mask.h>
namespace simdpp {
namespace SIMDPP_ARCH_NAMESPACE {
namespace detail {
namespace null {
/* *_vm variants accept a vector as the first argument and a mask as the second
*_mm variants accept masks as both arguments
*/
template<class V> SIMDPP_INL
V bit_and(const V& a, const V& b)
{
V r;
using E = typename V::element_type;
using U = typename V::uint_element_type;
for (unsigned i = 0; i < V::length; i++) {
U a1 = bit_cast<U, E>(a.el(i));
U b1 = bit_cast<U, E>(b.el(i));
r.el(i) = bit_cast<E, U>(a1 & b1);
}
return r;
}
template<class V, class M> SIMDPP_INL
V bit_and_vm(const V& a, const M& m)
{
V r;
for (unsigned i = 0; i < V::length; i++) {
r.el(i) = m.el(i) ? a.el(i) : 0;
}
return r;
}
template<class M> SIMDPP_INL
M bit_and_mm(const M& a, const M& b)
{
M r;
for (unsigned i = 0; i < M::length; i++) {
r.el(i) = a.el(i) & b.el(i);
}
return r;
}
template<class V> SIMDPP_INL
V bit_andnot(const V& a, const V& b)
{
V r;
using E = typename V::element_type;
using U = typename V::uint_element_type;
for (unsigned i = 0; i < V::length; i++) {
U a1 = bit_cast<U, E>(a.el(i));
U b1 = bit_cast<U, E>(b.el(i));
r.el(i) = bit_cast<E, U>(a1 & ~b1);
}
return r;
}
template<class V, class M> SIMDPP_INL
V bit_andnot_vm(const V& a, const M& m)
{
V r;
for (unsigned i = 0; i < V::length; i++) {
r.el(i) = m.el(i) ? 0 : a.el(i);
}
return r;
}
template<class M> SIMDPP_INL
M bit_andnot_mm(const M& a, const M& b)
{
M r;
for (unsigned i = 0; i < M::length; i++) {
r.el(i) = a.el(i) & (b.el(i) ^ 1);
}
return r;
}
template<class V> SIMDPP_INL
V bit_or(const V& a, const V& b)
{
V r;
using E = typename V::element_type;
using U = typename V::uint_element_type;
for (unsigned i = 0; i < V::length; i++) {
U a1 = bit_cast<U, E>(a.el(i));
U b1 = bit_cast<U, E>(b.el(i));
r.el(i) = bit_cast<E, U>(a1 | b1);
}
return r;
}
template<class M> SIMDPP_INL
M bit_or_mm(const M& a, const M& b)
{
M r;
for (unsigned i = 0; i < M::length; i++) {
r.el(i) = a.el(i) | b.el(i);
}
return r;
}
template<class V> SIMDPP_INL
V bit_xor(const V& a, const V& b)
{
V r;
using E = typename V::element_type;
using U = typename V::uint_element_type;
for (unsigned i = 0; i < V::length; i++) {
U a1 = bit_cast<U, E>(a.el(i));
U b1 = bit_cast<U, E>(b.el(i));
r.el(i) = bit_cast<E, U>(a1 ^ b1);
}
return r;
}
template<class M> SIMDPP_INL
M bit_xor_mm(const M& a, const M& b)
{
M r;
for (unsigned i = 0; i < M::length; i++) {
r.el(i) = a.el(i) ^ b.el(i);
}
return r;
}
template<class M> SIMDPP_INL
M bit_not_mm(const M& a)
{
M r;
for (unsigned i = 0; i < M::length; i++) {
r.el(i) = a.el(i) ^ 1;
}
return r;
}
template<class V> SIMDPP_INL
bool test_bits_any(const V& a)
{
using U = typename V::uint_element_type;
U r = 0;
for (unsigned i = 0; i < a.length; ++i) {
r |= bit_cast<U>(a.el(i));
}
return r != 0;
}
static SIMDPP_INL
uint8_t el_popcnt8(uint8_t v)
{
uint8_t m55 = 0x55;
uint8_t m33 = 0x33;
uint8_t m0f = 0x0f;
v = v - ((v >> 1) & m55);
v = (v & m33) + ((v >> 2) & m33);
v = (v + (v >> 4)) & m0f;
return v;
}
static SIMDPP_INL
uint16_t el_popcnt16(uint16_t v)
{
uint16_t m55 = 0x5555;
uint16_t m33 = 0x3333;
uint16_t m0f = 0x0f0f;
v = v - ((v >> 1) & m55);
v = (v & m33) + ((v >> 2) & m33);
v = (v + (v >> 4)) & m0f;
v = (v + (v >> 8));
v = v & 0x00ff;
return v;
}
static SIMDPP_INL
uint32_t el_popcnt32(uint32_t v)
{
uint32_t m55 = 0x55555555;
uint32_t m33 = 0x33333333;
uint32_t m0f = 0x0f0f0f0f;
v = v - ((v >> 1) & m55);
v = (v & m33) + ((v >> 2) & m33);
v = (v + (v >> 4)) & m0f;
// rather than doing 2 adds + 2 shifts we can do 1 mul + 1 shift
v = (v * 0x01010101) >> 24;
return v;
}
static SIMDPP_INL
uint64_t el_popcnt64(uint64_t v)
{
uint64_t m55 = 0x5555555555555555;
uint64_t m33 = 0x3333333333333333;
uint64_t m0f = 0x0f0f0f0f0f0f0f0f;
v = v - ((v >> 1) & m55);
v = (v & m33) + ((v >> 2) & m33);
v = (v + (v >> 4)) & m0f;
// rather than doing 3 adds + 3 shifts we can do 1 mul + 1 shift
v = (v * 0x0101010101010101) >> 56;
return v;
}
} // namespace null
} // namespace detail
} // namespace SIMDPP_ARCH_NAMESPACE
} // namespace simdpp
#endif
#endif
| 22.537118 | 79 | 0.563069 | [
"vector"
] |
d67e2c505e9f1331726347a8c51f9f9f7fb61440 | 7,443 | h | C | third_party/viecut/algorithms/multicut/ilp_model.h | realdavidpang/livehd | c0462922400d34c0327b4aabb450332bda50f174 | [
"BSD-3-Clause"
] | 46 | 2018-05-31T23:07:02.000Z | 2019-09-16T20:21:03.000Z | third_party/viecut/algorithms/multicut/ilp_model.h | realdavidpang/livehd | c0462922400d34c0327b4aabb450332bda50f174 | [
"BSD-3-Clause"
] | 120 | 2018-05-16T23:11:09.000Z | 2019-09-25T18:52:49.000Z | third_party/viecut/algorithms/multicut/ilp_model.h | realdavidpang/livehd | c0462922400d34c0327b4aabb450332bda50f174 | [
"BSD-3-Clause"
] | 8 | 2018-11-08T18:53:52.000Z | 2019-09-05T20:04:20.000Z | /******************************************************************************
* ilp_model.h
*
* Source of VieCut
*
******************************************************************************
* Copyright (C) 2017 Alexandra Henzinger <ahenz@stanford.edu>
* Copyright (C) 2017-2019 Alexander Noe <alexander.noe@univie.ac.at>
*
* Published under the MIT license in the LICENSE file.
*****************************************************************************/
#pragma once
#include <cmath>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "gurobi_c++.h" // NOLINT
#include "algorithms/multicut/multicut_problem.h"
#include "common/configuration.h"
#include "tools/timer.h"
class ilp_model {
public:
std::tuple<std::vector<NodeID>, EdgeWeight, bool> computeIlp(
problemPointer problem,
const std::vector<NodeID>& presets,
size_t num_terminals,
bool parallel,
size_t thread_id) {
try {
mutableGraphPtr graph = problem->graph;
timer ilp_timer;
GRBModel model = GRBModel(ilp_model::env);
NodeID max_weight = 0;
NodeID max_id = 0;
for (size_t i = 0; i < problem->terminals.size(); ++i) {
NodeID v = problem->terminals[i].position;
if (graph->getWeightedNodeDegree(v) > max_weight) {
max_weight = graph->getWeightedNodeDegree(v);
max_id = i;
}
}
std::vector<std::vector<GRBVar> > nodes(num_terminals);
std::vector<GRBVar> edges(graph->m() / 2);
for (auto& v : nodes) {
v.resize(graph->n());
}
model.set(GRB_StringAttr_ModelName, "Partition");
model.set(GRB_DoubleParam_MIPGap, 0);
model.set(GRB_IntParam_LogToConsole, 0);
if (!parallel) {
model.set(GRB_IntParam_Threads, 1);
} else {
size_t threads = configuration::getConfig()->threads;
model.set(GRB_IntParam_Threads, threads);
if (!configuration::getConfig()->disable_cpu_affinity) {
cpu_set_t all_cores;
CPU_ZERO(&all_cores);
for (size_t i = 0; i < threads; ++i) {
CPU_SET(i, &all_cores);
}
sched_setaffinity(0, sizeof(cpu_set_t), &all_cores);
}
}
model.set(GRB_IntParam_PoolSearchMode, 0);
model.set(GRB_DoubleParam_TimeLimit,
configuration::getConfig()->ilpTime);
// Set decision variables for nodes
for (size_t q = 0; q < num_terminals; q++) {
GRBLinExpr nodeTot = 0;
for (NodeID i = 0; i < graph->n(); i++) {
if (presets[i] < num_terminals) {
bool isCurrent = (presets[i] == q);
double f = isCurrent ? 1.0 : 0.0;
nodes[q][i] = model.addVar(f, f, 0, GRB_BINARY);
nodes[q][i].set(GRB_DoubleAttr_Start, f);
} else {
nodes[q][i] = model.addVar(0.0, 1.0, 0, GRB_BINARY);
nodes[q][i].set(GRB_DoubleAttr_Start, (max_id == q));
}
}
}
size_t j = 0;
// Decision variables for edges
GRBLinExpr edgeTot = 0;
for (NodeID n : graph->nodes()) {
for (EdgeID e : graph->edges_of(n)) {
auto [t, w] = graph->getEdge(n, e);
if (n > t) {
bool terminalIncident = (presets[n] < num_terminals ||
presets[t] < num_terminals);
edges[j] = model.addVar(0.0, 1.0, w, GRB_BINARY);
// there is no edge between terminals, we mark edges
// that are incident to non-maximal weight terminal
double start =
(terminalIncident && presets[n] != max_id
&& presets[t] != max_id) ? 1.0 : 0.0;
edges[j].set(GRB_DoubleAttr_Start, start);
for (size_t q = 0; q < num_terminals; q++) {
GRBLinExpr c = nodes[q][n] - nodes[q][t];
// Add constraint: valid partiton
std::string v =
"valid part on edge " + std::to_string(j)
+ " between " + std::to_string(n)
+ " and " + std::to_string(t);
std::string w =
"neg valid part on edge "
+ std::to_string(j) + " between "
+ std::to_string(n) + " and "
+ std::to_string(t);
model.addConstr(edges[j], GRB_GREATER_EQUAL, c, v);
model.addConstr(edges[j], GRB_GREATER_EQUAL, -c, w);
}
j++;
}
}
}
// Add constraint: sum of all decision variables for 1 node is 1
for (size_t i = 0; i < graph->n(); i++) {
GRBLinExpr sumCons = 0;
for (size_t q = 0; q < num_terminals; q++) {
sumCons += nodes[q][i];
}
model.addConstr(sumCons, GRB_EQUAL, 1);
}
model.set(GRB_IntAttr_ModelSense, GRB_MINIMIZE);
// Optimize model
model.optimize();
std::vector<NodeID> result(graph->n());
// if solution is found
if (model.get(GRB_IntAttr_Status) == GRB_OPTIMAL ||
model.get(GRB_IntAttr_Status) == GRB_TIME_LIMIT) {
// set partition
for (PartitionID q = 0; q < num_terminals; q++) {
for (size_t i = 0; i < graph->n(); i++) {
auto v = nodes[q][i].get(GRB_DoubleAttr_X);
if (v == 1) {
result[i] = q;
}
}
}
} else {
}
bool reIntroduce = false;
if (model.get(GRB_IntAttr_Status) == GRB_TIME_LIMIT) {
reIntroduce = true;
}
EdgeWeight wgt = std::lround(model.get(GRB_DoubleAttr_ObjVal));
if (model.get(GRB_IntAttr_Status) == GRB_OPTIMAL ||
model.get(GRB_IntAttr_Status) == GRB_TIME_LIMIT) {
bool optimal = (model.get(GRB_IntAttr_Status) == GRB_OPTIMAL);
}
if (parallel) {
if (!configuration::getConfig()->disable_cpu_affinity) {
cpu_set_t my_id;
CPU_ZERO(&my_id);
CPU_SET(thread_id, &my_id);
sched_setaffinity(0, sizeof(cpu_set_t), &my_id);
}
}
return std::make_tuple(result, wgt, reIntroduce);
} catch (GRBException e) {
exit(1);
}
}
private:
GRBEnv env;
};
| 38.765625 | 80 | 0.440279 | [
"vector",
"model"
] |
d680b8978d41a3d37cfffdafcb96f36e5844462d | 16,380 | h | C | zetasql/reference_impl/evaluation.h | wbsouza/zetasql-formatter | 3db113adee8d4fcb27dc978123dc75079442bf69 | [
"Apache-2.0"
] | 24 | 2020-05-09T09:47:37.000Z | 2022-03-22T22:23:03.000Z | zetasql/reference_impl/evaluation.h | wbsouza/zetasql-formatter | 3db113adee8d4fcb27dc978123dc75079442bf69 | [
"Apache-2.0"
] | 7 | 2020-09-14T00:54:57.000Z | 2022-02-08T20:05:34.000Z | zetasql/reference_impl/evaluation.h | wbsouza/zetasql-formatter | 3db113adee8d4fcb27dc978123dc75079442bf69 | [
"Apache-2.0"
] | 5 | 2020-08-27T20:11:35.000Z | 2021-11-05T20:49:20.000Z | //
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef ZETASQL_REFERENCE_IMPL_EVALUATION_H_
#define ZETASQL_REFERENCE_IMPL_EVALUATION_H_
#include <cstdint>
#include <functional>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "zetasql/public/civil_time.h"
#include "zetasql/public/language_options.h"
#include "zetasql/public/value.h"
#include "zetasql/reference_impl/tuple.h"
#include "zetasql/resolved_ast/resolved_ast.h"
#include <cstdint>
#include "absl/container/flat_hash_map.h"
#include "absl/flags/declare.h"
#include "absl/random/random.h"
#include "absl/time/time.h"
#include "absl/types/optional.h"
#include "zetasql/base/map_util.h"
#include "zetasql/base/status.h"
#include "zetasql/base/clock.h"
// See description in the cc file.
ABSL_DECLARE_FLAG(int64_t, zetasql_call_verify_not_aborted_rows_period);
namespace zetasql {
// Returns OK if the first column is the primary key column for a table named
// 'table_name' represented by 'array'. Specifically, the first column must meet
// the following criteria:
// 1. SupportsGrouping() is true for the type of the column
// 2. Does not have NULL Values
// 3. Does not have duplicate Values
absl::Status ValidateFirstColumnPrimaryKey(
const std::string& table_name, const Value& array,
const LanguageOptions& language_options);
struct EvaluationOptions {
// If true, operations will act as if the first column of a non-value table is
// a primary key that may not be NULL. EvaluationContext::AddTable() will also
// verify tables accordingly.
// TODO: Migrate the compliance framework off this option and
// remove this option.
bool emulate_primary_keys = false;
// If true, the reference implementation will deterministically scramble the
// output of relations whose order is not defined by ZetaSQL. This requires
// some extra processing and so is only appropriate for tests. See
// ReorderingTupleIterator in tuple.h for details.
bool scramble_undefined_orderings = false;
// If true, the reference implementation will always perform stable sorting
// where sorting is required. This is useful for obtaining deterministic
// results in the (text-based) reference implementation compliance tests,
// especially when running with different implementations of the C++ standard
// library.
bool always_use_stable_sort = false;
// If true, the reference implementation will store proto field values in
// TupleSlots (to avoid extra deserialization).
bool store_proto_field_value_maps = false;
// If true, the reference implementation will use the TopNAccumulator instead
// of LimitAccumulator(OrderByAccumulator) when possible in order to save
// memory. Not safe to use in compliance or random query tests because it
// always says its results are ordered according to ZetaSQL semantics.
bool use_top_n_accumulator_when_possible = false;
// Limit on the maximum number of in-memory bytes used by values. Exceeding
// this limit results in an error. See the implementation of
// Value::physical_byte_size for more details.
int64_t max_value_byte_size = 1024 * 1024;
// The limit on the maximum number of in-memory bytes that can be used for
// storing accumulated Tuples (e.g., during an ORDER BY query). Exceeding this
// limit results in an error.
int64_t max_intermediate_byte_size = 128 * 1024 * 1024;
// If true, the results of DML statements will include all rows in the
// modified table; otherwise, only modified rows (i.e. those matching the
// WHERE clause) are included. For DELETE, 'modified rows' means the rows to
// be deleted.
//
// Note that rows are considered modified even if the new row happens to be
// the same as the old as long as they match the WHERE clause.
bool return_all_rows_for_dml = true;
};
class ProtoFieldReader;
// Base class for C++ values which can be associated with a variable.
class CppValueBase {
public:
virtual ~CppValueBase() {}
};
// Contains state about the evaluation in progress.
class EvaluationContext {
public:
// Objects can register CancelCallbacks with RegisterCancelCallback() to be
// notified when CancelStatement() is called. A CancelCallback must not block
// for a long time.
using CancelCallback = std::function<absl::Status()>;
explicit EvaluationContext(const EvaluationOptions& options);
EvaluationContext(const EvaluationContext&) = delete;
EvaluationContext& operator=(const EvaluationContext&) = delete;
const EvaluationOptions& options() const { return options_; }
MemoryAccountant* memory_accountant() { return &memory_accountant_; }
// Returns the contents of table 'table_name' or Value::Invalid().
Value GetTableAsArray(const std::string& table_name) {
const auto it = tables_.find(table_name);
if (it != tables_.end()) {
return it->second;
}
return Value();
}
// Makes the given 'array' accessible under 'table_name'.
absl::Status AddTableAsArray(const std::string& table_name,
bool is_value_table, Value array,
const LanguageOptions& language_options);
// Indicates that the result of evaluation is non-deterministic.
void SetNonDeterministicOutput() { deterministic_output_ = false; }
bool IsDeterministicOutput() const { return deterministic_output_; }
void SetLanguageOptions(const LanguageOptions& options) {
language_options_ = options;
}
const LanguageOptions& GetLanguageOptions() const {
return language_options_;
}
// Also clears the current timestamp (to force us to lazily regenerate the
// current timestamp in the default timezone). This should not be called after
// getting the current timestamp unless the user is using a frozen Clock.
void SetDefaultTimeZone(absl::TimeZone timezone) {
default_timezone_ = timezone;
// Clear current_timestamp_ to force us to regenerate
// *_in_default_timezone_.
current_timestamp_.reset();
}
// If necessary, (lazily) initializes the default timezone. Lazy
// initialization saves time for most evaluations, which don't require time
// zone information.
absl::TimeZone GetDefaultTimeZone() {
LazilyInitializeDefaultTimeZone();
return default_timezone_.value();
}
// If necessary, (lazily) initializes the random number generator. Lazy
// initialization saves time for most evaluations, which don't require random
// numbers.
absl::BitGen* GetRandomNumberGenerator() {
if (!rand_.has_value()) {
rand_.emplace();
}
return &rand_.value();
}
// Sets the clock to use when evaluating CURRENT_TIMESTAMP(),
// CURRENT_DATE(), CURRENT_DATETIME(), etc functions.
// Units are microseconds since the unix epoch UTC.
// The ZetaSQL spec requires that all timestamps are within the range of
// years [1, 9999].
void SetClockAndClearCurrentTimestamp(zetasql_base::Clock* clock) {
clock_ = clock;
current_timestamp_.reset();
}
// If necessary, (lazily) initializes the default timezone and the current
// timestamp. Lazy initialization saves time for most evaluations, which don't
// require the current timestamp.
int64_t GetCurrentTimestamp() {
LazilyInitializeCurrentTimestamp();
return current_timestamp_.value();
}
// If necessary, (lazily) initializes the default timezone and the current
// timestamp. Lazy initialization saves time for most evaluations, which don't
// require the current timestamp.
int64_t GetCurrentDateInDefaultTimezone() {
LazilyInitializeCurrentTimestamp();
return current_date_in_default_timezone_;
}
// If necessary, (lazily) initializes the default timezone and the current
// timestamp. Lazy initialization saves time for most evaluations, which don't
// require the current timestamp.
DatetimeValue GetCurrentDatetimeInDefaultTimezone() {
LazilyInitializeCurrentTimestamp();
return current_datetime_in_default_timezone_;
}
// If necessary, (lazily) initializes the default timezone and the current
// timestamp. Lazy initialization saves time for most evaluations, which don't
// require the current timestamp.
TimeValue GetCurrentTimeInDefaultTimezone() {
LazilyInitializeCurrentTimestamp();
return current_time_in_default_timezone_;
}
// Sets the statement evaluation deadline of some time duration from now. If
// the statement is still being evaluated after that time it will be aborted
// and an error will be returned.
void SetStatementEvaluationDeadlineFromNow(absl::Duration time_limit) {
statement_eval_deadline_ =
::zetasql_base::Clock::RealClock()->TimeNow() + time_limit;
}
// Sets the statement evaluation deadline.
// If the statement is still being evaluated after that time it will be
// aborted and an error will be returned.
void SetStatementEvaluationDeadline(absl::Time statement_deadline) {
statement_eval_deadline_ = statement_deadline;
}
absl::Time GetStatementEvaluationDeadline() const {
return statement_eval_deadline_;
}
// Register a callback to be notified when CancelStatement() is called. As
// with all non-const methods in this thread compatible class, using this
// method in a multithreaded setting requires external synchronization of
// this object. In practice, this is called by iterators that need to
// propagate the cancellation request to user code.
void RegisterCancelCallback(const CancelCallback& cb) {
cancel_cbs_.push_back(cb);
}
// Cancels the current statement and invokes all of the cancellation
// callbacks. Cancellation support is best-effort, in that iterators should be
// periodicially polling the cancellation state (by calling VerifyNotAborted)
// and cancelling if they discover the statement has been cancelled. The
// callbacks are just a way of notifying user code that the statement has been
// cancelled if we are stuck in a user's EvaluatorTableIterator.
absl::Status CancelStatement() {
cancelled_ = true;
// Call all the callbacks, returning the first non-OK error code.
absl::Status ret = absl::OkStatus();
for (const CancelCallback& cb : cancel_cbs_) {
absl::Status status = cb();
if (ret.ok() && !status.ok()) {
ret = status;
}
}
return ret;
}
// Reset the deadline to infinity, uncancel the statement, and clear the
// cancellation callbacks.
void ClearDeadlineAndCancellationState() {
SetStatementEvaluationDeadline(absl::InfiniteFuture());
cancelled_ = false;
cancel_cbs_.clear();
}
// Returns an error if the statement has been aborted. This function is
// expensive (it gets the current time).
absl::Status VerifyNotAborted() const;
int num_proto_deserializations() const { return num_proto_deserializations_; }
void set_num_proto_deserializations(int n) {
num_proto_deserializations_ = n;
}
bool used_top_n_accumulator() const { return used_top_n_accumulator_; }
void set_used_top_n_accumulator(bool value) {
used_top_n_accumulator_ = value;
}
bool populate_last_get_field_value_call_read_fields_from_proto_map() const {
return populate_last_get_field_value_call_read_fields_from_proto_map_;
}
void set_populate_last_get_field_value_call_read_fields_from_proto_map(
bool value) {
populate_last_get_field_value_call_read_fields_from_proto_map_ = value;
}
bool last_get_field_value_call_read_fields_from_proto(
const ProtoFieldReader* reader) const {
return zetasql_base::FindWithDefault(
last_get_field_value_call_read_fields_from_proto_map_, reader, false);
}
void set_last_get_field_value_call_read_fields_from_proto(
const ProtoFieldReader* reader, bool value) {
// Only populate in unit tests for performance reasons.
if (populate_last_get_field_value_call_read_fields_from_proto_map_) {
last_get_field_value_call_read_fields_from_proto_map_[reader] = value;
}
}
// Retrieves the C++ value associated with the given VariableId, or nullptr
// if not value with the given VariableId exists.
//
// The returned pointer is owned by the EvaluationContext and destroyed when
// the same variable is passed to ClearCppValue() or
// SetCppValueIfNotPresent().
//
// Ideally, these values would be passed to ValueExpr::Eval() and
// RelationalOp::CreateIterator(), alongside the TupleData's. However, the
// refactoring required to alter the signatures of these two methods was too
// much, so we store VariableId's C++ values instead, using the TupleData's
// only for Tuple values.
CppValueBase* GetCppValue(VariableId variable) const {
auto it = cpp_values_.find(variable);
return it == cpp_values_.end() ? nullptr : it->second.get();
}
// Sets the C++ value associated with the given variable ID, taking ownership
// of the provided object. Returns true if successful, false if the given
// VariableId already has a value.
ABSL_MUST_USE_RESULT bool SetCppValueIfNotPresent(
VariableId variable, std::unique_ptr<CppValueBase> value) {
return cpp_values_.insert(std::make_pair(variable, std::move(value)))
.second;
}
// Deletes the C++ value associated with the given variable Id.
void ClearCppValue(VariableId variable) { cpp_values_.erase(variable); }
private:
void LazilyInitializeDefaultTimeZone() {
if (!default_timezone_.has_value()) {
InitializeDefaultTimeZone();
}
}
void InitializeDefaultTimeZone();
void LazilyInitializeCurrentTimestamp() {
if (!current_timestamp_.has_value()) {
InitializeCurrentTimestamp();
}
}
void InitializeCurrentTimestamp();
const EvaluationOptions options_;
MemoryAccountant memory_accountant_;
// Tables added by AddTableAsArray().
std::map<std::string, Value> tables_;
// Indicates that the result of evaluation is non-deterministic.
bool deterministic_output_;
LanguageOptions language_options_;
// Default is no deadline.
absl::Time statement_eval_deadline_ = absl::InfiniteFuture();
bool cancelled_ = false;
std::vector<CancelCallback> cancel_cbs_;
// Used to obtain the current timestamp.
zetasql_base::Clock* clock_ = zetasql_base::Clock::RealClock();
// Lazily initialized because not all queries need them, and initializing them
// is expensive.
absl::optional<absl::TimeZone> default_timezone_;
absl::optional<int64_t> current_timestamp_;
absl::optional<absl::BitGen> rand_;
// Only valid if 'current_timestamp_' has a value.
int32_t current_date_in_default_timezone_;
DatetimeValue current_datetime_in_default_timezone_;
TimeValue current_time_in_default_timezone_;
// Records the number of times a proto was deserialized. Only for unit tests.
int num_proto_deserializations_ = 0;
// Whether to populate
// 'last_get_field_value_call_read_fields_from_proto_map_'. For performance
// reasons, this is only set to true in unit tests.
bool populate_last_get_field_value_call_read_fields_from_proto_map_ = false;
// Maps a ProtoFieldReader to whether the last call to its GetFieldValue()
// method read fields from the proto. Only for unit tests.
absl::flat_hash_map<const ProtoFieldReader*, bool>
last_get_field_value_call_read_fields_from_proto_map_;
// Records whether a TopNAccumulator was used. Only for unit tests.
bool used_top_n_accumulator_ = false;
// Current C++ values associated with variables.
absl::flat_hash_map<VariableId, std::unique_ptr<CppValueBase>> cpp_values_;
};
// Returns true if we should suppress 'error' (which must not be OK) in
// 'error_mode'.
bool ShouldSuppressError(const absl::Status& error,
ResolvedFunctionCallBase::ErrorMode error_mode);
} // namespace zetasql
#endif // ZETASQL_REFERENCE_IMPL_EVALUATION_H_
| 38.907363 | 80 | 0.749512 | [
"object",
"vector"
] |
d68b751da5376a5fa6610dfcd4112e00980b89f4 | 3,808 | h | C | Processing/foleys_ControllableBase.h | amatushkin/foleys_video_engine | 63dce248d2ed126b0a58d06afac40f1255450380 | [
"Unlicense"
] | 41 | 2019-05-26T19:02:24.000Z | 2022-03-31T14:54:47.000Z | Processing/foleys_ControllableBase.h | amatushkin/foleys_video_engine | 63dce248d2ed126b0a58d06afac40f1255450380 | [
"Unlicense"
] | 4 | 2019-04-30T14:15:22.000Z | 2021-03-04T19:50:58.000Z | Processing/foleys_ControllableBase.h | amatushkin/foleys_video_engine | 63dce248d2ed126b0a58d06afac40f1255450380 | [
"Unlicense"
] | 9 | 2019-12-16T13:23:20.000Z | 2022-02-07T21:48:14.000Z | /*
==============================================================================
Copyright (c) 2019 - 2021, Foleys Finest Audio - Daniel Walz
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
==============================================================================
*/
#pragma once
namespace foleys
{
class ClipDescriptor;
class ParameterAutomation;
using AutomationMap=std::map<juce::Identifier, std::unique_ptr<ParameterAutomation>>;
/**
The ControllableBase acts as counterpart to ParameterAutomation. By inheriting this
interface, it is possible to automate things like AudioProcessors or VideoProcessors.
But also Clips could have automated parameters, e.g. for geometric information, alpha
or an audio gain.
*/
class ControllableBase
{
public:
ControllableBase (TimeCodeAware& reference);
virtual ~ControllableBase() = default;
/**
Since the automation values are time dependent, every instance, that inherits
ControllableBase needs a way to tell the local time (presentation time stamp).
The PTS refers to the audio clock master, video is rendered asynchronously and
may have a different PTS
*/
virtual double getCurrentPTS() const = 0;
/**
Grant access to the individual parameters.
*/
virtual AutomationMap& getParameters() = 0;
virtual int getNumParameters() const = 0;
/**
Return the value of the parameter at a certain time point.
Since the parameter can be used from outside the parameter (i.e. for scale, position etc.)
There needs to be a default value, in case the ControllableBase doesn't provide that parameter.
@param paramID the identifier of the parameter
@param pts the timestamp in seconds in clip time
@param defaultValue the value that is returned, if the parameter is not set up
*/
virtual double getValueAtTime (juce::Identifier paramID, double pts, double defaultValue) = 0;
/**
The Listener can subscribe to automation changes, e.g. to invalidate existing render, to update UI elements etc.
*/
class Listener
{
public:
Listener() = default;
virtual ~Listener() = default;
virtual void parameterAutomationChanged (const ParameterAutomation*) = 0;
private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Listener)
};
void addListener (Listener*);
void removeListener (Listener*);
/**
This notifies all ProcessorController::Listeners about an automation change,
so they can adapt accordingly by redrawing the curves or invalidating pre-rendered
video frames.
*/
void notifyParameterAutomationChange (const ParameterAutomation* p);
/**
Grant access to the time reference of this ControllableBase
*/
TimeCodeAware& getTimeReference();
const TimeCodeAware& getTimeReference() const;
private:
TimeCodeAware& timeReference;
juce::ListenerList<Listener> listeners;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ControllableBase)
};
} // foleys
| 35.259259 | 117 | 0.701943 | [
"render"
] |
d68e76148bbf619f6e417d1cb2dad86a442dc0bf | 5,999 | h | C | tensorflow/lite/delegates/gpu/metal/compute_task_descriptor.h | deerluffy/tensorflow | 73e9dc4e1eae1589c8ea4a7cf1e8398c1eff3ab1 | [
"Apache-2.0"
] | 1 | 2020-09-30T07:40:55.000Z | 2020-09-30T07:40:55.000Z | tensorflow/lite/delegates/gpu/metal/compute_task_descriptor.h | deerluffy/tensorflow | 73e9dc4e1eae1589c8ea4a7cf1e8398c1eff3ab1 | [
"Apache-2.0"
] | null | null | null | tensorflow/lite/delegates/gpu/metal/compute_task_descriptor.h | deerluffy/tensorflow | 73e9dc4e1eae1589c8ea4a7cf1e8398c1eff3ab1 | [
"Apache-2.0"
] | 1 | 2021-03-28T10:02:51.000Z | 2021-03-28T10:02:51.000Z | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_METAL_COMPUTE_TASK_DESCRIPTOR_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_METAL_COMPUTE_TASK_DESCRIPTOR_H_
#include <cstdint>
#include <functional>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "tensorflow/lite/delegates/gpu/common/model.h"
#include "tensorflow/lite/delegates/gpu/common/shape.h"
#include "tensorflow/lite/delegates/gpu/common/task/arguments.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/metal/runtime_options.h"
namespace tflite {
namespace gpu {
namespace metal {
using OutputDimensions =
std::function<BHWC(const std::map<ValueId, BHWC>& buffers)>;
using UniformsFunction =
std::function<std::vector<uint8_t>(const std::map<ValueId, BHWC>& buffers)>;
using DispatchParamsFunction = std::function<std::pair<uint3, uint3>(
const std::map<ValueId, BHWC>& buffers)>;
// Compute task descriptor contains a linkable shader code or a code for
// complete shader to which other linkable can be attached or not. An operation
// can produce one or more descriptors and graph compiler uses descriptors as
// building blocks. All required data like immutable operation parameters
// (weights etc.) is attached to the descriptor.
struct ComputeTaskDescriptor {
struct InputBufferDescriptor {
ValueId id;
// The declaration is inserted into the compute function arguments list.
// Example for non-linkable task: "device FLT4* const input_buffer"
// Example for linkable: "device FLT4* const"
std::string declaration;
};
struct OutputBufferDescriptor {
ValueId id;
// The declaration is inserted into the compute function arguments list.
// Example for non-linkable task: "device FLT4* output_buffer"
// Example for linkable: "device FLT4*"
std::string declaration;
};
struct ImmutableBufferDescriptor {
std::string declaration;
std::vector<uint8_t> data;
};
// Uniforms are recalculated at any setInputDimensions call.
struct UniformBufferDescriptor {
// The declaration is inserted into the compute function arguments list.
// Example: "constant uint4& some_uniforms"
std::string declaration;
// This function re-calculates uniforms for specific input dimensions.
UniformsFunction data_function;
};
ComputeTaskDescriptor() = default;
// Move only
ComputeTaskDescriptor(ComputeTaskDescriptor&& task) = default;
ComputeTaskDescriptor& operator=(ComputeTaskDescriptor&& task) = default;
ComputeTaskDescriptor(const ComputeTaskDescriptor&) = delete;
ComputeTaskDescriptor& operator=(const ComputeTaskDescriptor&) = delete;
Arguments args;
// Unique ID to match the graph compilation errors.
int id;
bool is_linkable = false;
// A linkable function or a full shader source with 3 parameters $ for
// substitute function. Example of linkable: "(FLT4 linkable$0(FLT4 value, int
// linear_index) { return value; })" Example of non-linkable function:
// #include <metal_stdlib>
// using namespace metal;
// $0
// kernel void ComputeFunction(
// $1
// uint3 gid[[thread_position_in_grid]]) {
// if (int(gid.x) >= size.x || int(gid.y) >= size.y) {
// return;
// }
// const int linear_index = (gid.z * size.y + gid.y) * size.x + gid.x;
// FLT4 value = input_buffer[linear_index] + 1.0f;
// $2
// output_buffer[linear_index] = value;
// }
// when operation associative, we can rearrange input tensors
// for example add is associative
bool is_associative_op = false;
std::string shader_source;
std::vector<InputBufferDescriptor> input_buffers;
// A single per-operation output is supported now.
OutputBufferDescriptor output_buffer;
std::vector<ImmutableBufferDescriptor> immutable_buffers;
std::vector<UniformBufferDescriptor> uniform_buffers;
// Dynamic resizing of input tensor is supported. User-defined functions to
// calculate new parameters for GPU compute task dispatching. A leading
// unlinkable task must provide this.
DispatchParamsFunction resize_function;
std::string description;
};
using ComputeTaskDescriptorPtr = std::shared_ptr<ComputeTaskDescriptor>;
/// Helper function to convert buffer's content into stream of bytes
template <typename T>
std::vector<uint8_t> GetByteBuffer(const std::vector<T>& input_vector) {
std::vector<uint8_t> result;
result.insert(result.begin(),
reinterpret_cast<const uint8_t*>(input_vector.data()),
reinterpret_cast<const uint8_t*>(input_vector.data()) +
input_vector.size() * sizeof(*input_vector.data()));
return result;
}
/// Converts float to destination type (if needed) and stores as bytes array.
std::vector<uint8_t> GetByteBufferConverted(
const std::vector<float>& input_vector,
RuntimeOptions::Precision destination_type);
/// Resizes, Converts float to destination type (if needed) and stores as bytes
/// array.
std::vector<uint8_t> GetByteBufferConvertedResized(
const std::vector<float>& input_vector,
RuntimeOptions::Precision destination_type, size_t elements_count);
} // namespace metal
} // namespace gpu
} // namespace tflite
#endif // TENSORFLOW_LITE_DELEGATES_GPU_METAL_COMPUTE_TASK_DESCRIPTOR_H_
| 39.993333 | 80 | 0.729622 | [
"shape",
"vector",
"model"
] |
d68f8c54aa9374a5ccb0ac1c69741257da319d7f | 5,750 | h | C | core/platform/win32/CCFileUtils-win32.h | rh101/engine-x | 17ad9829dd410c689857760b6ece89d99e877a95 | [
"MIT"
] | null | null | null | core/platform/win32/CCFileUtils-win32.h | rh101/engine-x | 17ad9829dd410c689857760b6ece89d99e877a95 | [
"MIT"
] | null | null | null | core/platform/win32/CCFileUtils-win32.h | rh101/engine-x | 17ad9829dd410c689857760b6ece89d99e877a95 | [
"MIT"
] | null | null | null | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
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.
****************************************************************************/
#pragma once
#include "platform/CCFileUtils.h"
#include "platform/CCPlatformMacros.h"
#include "base/ccTypes.h"
#include <string>
#include <vector>
NS_CC_BEGIN
/**
* @addtogroup platform
* @{
*/
//! @brief Helper class to handle file operations
class CC_DLL FileUtilsWin32 : public FileUtils
{
friend class FileUtils;
protected:
FileUtilsWin32();
public:
/* override functions */
bool init() override;
virtual std::string getWritablePath() const override;
virtual std::string getNativeWritableAbsolutePath() const override;
protected:
virtual bool isFileExistInternal(std::string_view strFilePath) const override;
/**
* Renames a file under the given directory.
*
* @param path The parent directory path of the file, it must be an absolute path.
* @param oldname The current name of the file.
* @param name The new name of the file.
* @return True if the file have been renamed successfully, false if not.
*/
virtual bool renameFile(std::string_view path, std::string_view oldname, std::string_view name) const override;
/**
* Renames a file under the given directory.
*
* @param oldfullpath The current path + name of the file.
* @param newfullpath The new path + name of the file.
* @return True if the file have been renamed successfully, false if not.
*/
virtual bool renameFile(std::string_view oldfullpath, std::string_view newfullpath) const override;
/**
* Checks whether a directory exists without considering search paths and resolution orders.
* @param dirPath The directory (with absolute path) to look up for
* @return Returns true if the directory found at the given absolute path, otherwise returns false
*/
virtual bool isDirectoryExistInternal(std::string_view dirPath) const override;
/**
* Removes a file.
*
* @param filepath The full path of the file, it must be an absolute path.
* @return True if the file have been removed successfully, false if not.
*/
virtual bool removeFile(std::string_view filepath) const override;
/**
* Creates a directory.
*
* @param dirPath The path of the directory, it must be an absolute path.
* @return True if the directory have been created successfully, false if not.
*/
virtual bool createDirectory(std::string_view dirPath) const override;
/**
* Removes a directory.
*
* @param dirPath The full path of the directory, it must be an absolute path.
* @return True if the directory have been removed successfully, false if not.
*/
virtual bool removeDirectory(std::string_view dirPath) const override;
virtual FileUtils::Status getContents(std::string_view filename, ResizableBuffer* buffer) const override;
virtual int64_t getFileSize(std::string_view filepath) const override;
/**
* Gets full path for filename, resolution directory and search path.
*
* @param filename The file name.
* @param resolutionDirectory The resolution directory.
* @param searchPath The search path.
* @return The full path of the file. It will return an empty string if the full path of the file doesn't exist.
*/
virtual std::string getPathForFilename(std::string_view filename,
std::string_view resolutionDirectory,
std::string_view searchPath) const override;
/**
* Gets full path for the directory and the filename.
*
* @note Only iOS and Mac need to override this method since they are using
* `[[NSBundle mainBundle] pathForResource: ofType: inDirectory:]` to make a full path.
* Other platforms will use the default implementation of this method.
* @param directory The directory contains the file we are looking for.
* @param filename The name of the file.
* @return The full path of the file, if the file can't be found, it will return an empty string.
*/
virtual std::string getFullPathForFilenameWithinDirectory(std::string_view directory,
std::string_view filename) const override;
private:
std::wstring_view _defaultResRootPathUtf16;
};
// end of platform group
/// @}
NS_CC_END
| 39.655172 | 117 | 0.681043 | [
"vector"
] |
d691bfe6eaf602b9afe415bd5fcb0f7d26db1129 | 12,532 | c | C | myutils/myutils_lib/src/myutils/myutils_c/math_stats.c | juanbarrios/multimedia_tools | 91fe64779168c3dd3ad4e51e089df9ccad5f176b | [
"BSD-2-Clause"
] | 6 | 2015-09-08T00:14:59.000Z | 2018-09-11T09:46:40.000Z | myutils/myutils_lib/src/myutils/myutils_c/math_stats.c | juanbarrios/multimedia_tools | 91fe64779168c3dd3ad4e51e089df9ccad5f176b | [
"BSD-2-Clause"
] | null | null | null | myutils/myutils_lib/src/myutils/myutils_c/math_stats.c | juanbarrios/multimedia_tools | 91fe64779168c3dd3ad4e51e089df9ccad5f176b | [
"BSD-2-Clause"
] | 1 | 2020-11-13T15:55:30.000Z | 2020-11-13T15:55:30.000Z | /*
* Copyright (C) 2012-2015, Juan Manuel Barrios <http://juan.cl/>
* All rights reserved.
*
* This file is part of MultimediaTools. https://github.com/juanbarrios/multimedia_tools
* MultimediaTools is made available under the terms of the BSD 2-Clause License.
*/
#include "math_util.h"
struct DataStats {
double min, max;
double avg, sum_diffs;
//double sum_diff3, sum_diff4;
double last_diff;
double *sum_codiff;
};
struct MyDataStatsCompute {
int64_t num_dimensions;
int64_t cont_samples;
struct DataStats *stats_by_dimension;
};
struct MyDataStatsCompute *my_math_computeStats_new(int64_t num_dimensions) {
struct MyDataStatsCompute *dsc = MY_MALLOC(1, struct MyDataStatsCompute);
dsc->num_dimensions = num_dimensions;
dsc->stats_by_dimension = MY_MALLOC(num_dimensions, struct DataStats);
for (int64_t i = 0; i < dsc->num_dimensions; i++) {
struct DataStats *dim_stats = dsc->stats_by_dimension + i;
dim_stats->sum_codiff = MY_MALLOC(dsc->num_dimensions, double);
}
return dsc;
}
int64_t my_math_computeStats_getNumDimensions(struct MyDataStatsCompute *dsc) {
return dsc->num_dimensions;
}
static void addValue(struct MyDataStatsCompute *dsc, int64_t i, double value) {
struct DataStats *dim_stats = dsc->stats_by_dimension + i;
if (dsc->cont_samples <= 1 || value > dim_stats->max)
dim_stats->max = value;
if (dsc->cont_samples <= 1 || value < dim_stats->min)
dim_stats->min = value;
//computing average and variance: Knuth, the ACP, vol.2, pag 232
//http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
//http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
double diffpre = value - dim_stats->avg;
dim_stats->avg += diffpre / dsc->cont_samples;
double diffpos = value - dim_stats->avg;
dim_stats->sum_diffs += diffpre * diffpos;
//double diffpos2 = diffpos * diffpos;
//dim_stats->sum_diff3 += diffpos2 * diffpos;
//dim_stats->sum_diff4 += diffpos2 * diffpos2;
dim_stats->last_diff = diffpos;
for (int64_t j = 0; j < i; j++) {
struct DataStats *co_dim_stats = dsc->stats_by_dimension + j;
co_dim_stats->sum_codiff[i] += diffpre * co_dim_stats->last_diff;
}
}
#define ADDSAMPLE_FUNCTIONS(typeVector) \
static void addSample_##typeVector(struct MyDataStatsCompute *dsc, void *vector) { \
typeVector *array = vector; \
dsc->cont_samples++; \
for (int64_t i = 0; i < dsc->num_dimensions; i++) { \
addValue(dsc, i, array[i]); \
} \
}
ADDSAMPLE_FUNCTIONS(int8_t)
ADDSAMPLE_FUNCTIONS(int16_t)
ADDSAMPLE_FUNCTIONS(int32_t)
ADDSAMPLE_FUNCTIONS(int64_t)
ADDSAMPLE_FUNCTIONS(uint8_t)
ADDSAMPLE_FUNCTIONS(uint16_t)
ADDSAMPLE_FUNCTIONS(uint32_t)
ADDSAMPLE_FUNCTIONS(uint64_t)
ADDSAMPLE_FUNCTIONS(float)
ADDSAMPLE_FUNCTIONS(double)
#define INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, constantDatatype, nameDatatype) \
if (varDatatype.my_datatype_code == constantDatatype.my_datatype_code) { \
return namePrefix##nameDatatype; \
}
#define RETURN_SINGLE_DATATYPE(varDatatype, namePrefix) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_INT8 , int8_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_INT16 , int16_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_INT32 , int32_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_INT64 , int64_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_UINT8 , uint8_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_UINT16 , uint16_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_UINT32 , uint32_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_UINT64 , uint64_t) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_FLOAT32 , float) \
INTERNAL_TEST_SINGLE_ASSIGN(varDatatype, namePrefix, MY_DATATYPE_FLOAT64 , double)
my_math_computeStats_addSample my_math_computeStats_getAddSampleFunction(
MyDatatype dtype_vector) {
RETURN_SINGLE_DATATYPE(dtype_vector, addSample_)
my_log_error("unknown type %i\n", (int) dtype_vector.my_datatype_code);
return NULL;
}
void my_math_computeStats_getStats(struct MyDataStatsCompute *dsc,
int64_t id_dimension, struct MyDataStats *out_stats) {
struct DataStats *dim_stats = dsc->stats_by_dimension + id_dimension;
out_stats->num_samples = dsc->cont_samples;
out_stats->minimum = dim_stats->min;
out_stats->maximum = dim_stats->max;
out_stats->average = dim_stats->avg;
double variance =
(dsc->cont_samples == 0) ?
0 : dim_stats->sum_diffs / dsc->cont_samples;
if (variance == 0) {
out_stats->variance = out_stats->std_dev = out_stats->skewness =
out_stats->kurtosis = out_stats->rho = 0;
} else {
out_stats->variance = variance;
out_stats->std_dev = sqrt(variance);
//double variance_2 = variance * variance;
//double variance_3 = variance * variance_2;
//out_stats->skewness = (dim_stats->sum_diff3 / dsc->cont_samples)/ sqrt(variance_3);
//out_stats->kurtosis = (dim_stats->sum_diff4 / dsc->cont_samples)/ variance_2 - 3;
out_stats->rho = dim_stats->avg * (dim_stats->avg / variance) / 2;
}
}
double my_math_computeStats_getCovariance(struct MyDataStatsCompute *dsc,
int64_t dim1, int64_t dim2) {
if (dim1 == dim2)
return dsc->stats_by_dimension[dim1].sum_diffs / dsc->cont_samples;
else if (dim1 < dim2)
return (dsc->stats_by_dimension + dim1)->sum_codiff[dim2]
/ dsc->cont_samples;
else
return (dsc->stats_by_dimension + dim2)->sum_codiff[dim1]
/ dsc->cont_samples;
}
void my_math_computeStats_fillCovarianceMatrix(struct MyDataStatsCompute *dsc,
double **matrix) {
for (int64_t i = 0; i < dsc->num_dimensions; i++) {
for (int64_t j = 0; j <= i; j++) {
matrix[i][j] = matrix[j][i] = my_math_computeStats_getCovariance(
dsc, i, j);
}
}
}
void my_math_computeStats_release(struct MyDataStatsCompute *dsc) {
if (dsc == NULL)
return;
for (int64_t i = 0; i < dsc->num_dimensions; i++) {
struct DataStats *dim_stats = dsc->stats_by_dimension + i;
free(dim_stats->sum_codiff);
}
free(dsc->stats_by_dimension);
free(dsc);
}
struct MyDataStats my_math_computeStats(int64_t data_size, double *data_values) {
struct MyDataStatsCompute *dsc = my_math_computeStats_new(1);
for (int64_t i = 0; i < data_size; ++i) {
dsc->cont_samples++;
addValue(dsc, 0, data_values[i]);
}
struct MyDataStats stats = { 0 };
my_math_computeStats_getStats(dsc, 0, &stats);
my_math_computeStats_release(dsc);
return stats;
}
char *my_math_statsSummary_newString(struct MyDataStats *stats) {
char *st1 = my_newString_int(stats->num_samples);
char *st2 = my_newString_doubleDec(stats->minimum, 1);
char *st3 = my_newString_doubleDec(stats->maximum, 1);
char *st4 = my_newString_doubleDec(stats->average, 1);
char *st5 = my_newString_doubleDec(stats->variance, 1);
char *txt = my_newString_format("samples=%s min=%s max=%s avg=%s var=%s",
st1, st2, st3, st4, st5);
MY_FREE_MULTI(st1, st2, st3, st4, st5);
return txt;
}
static void append_DataStat(MyStringBuffer *sb, const char *field_name,
double field_value, const char *field_prefix,
const char *field_separator, const char *field_suffix) {
my_stringbuf_appendString(sb, field_prefix);
my_stringbuf_appendString(sb, field_name);
my_stringbuf_appendString(sb, field_separator);
my_stringbuf_appendDouble(sb, field_value);
my_stringbuf_appendString(sb, field_suffix);
}
char *my_math_statsDetail_newString(struct MyDataStats *stats,
const char *field_prefix, const char *field_separator,
const char *field_suffix) {
MyStringBuffer *sb = my_stringbuf_new();
append_DataStat(sb, "samples", stats->num_samples, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "minimum", stats->minimum, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "maximum", stats->maximum, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "average", stats->average, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "variance", stats->variance, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "std_dev", stats->std_dev, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "skewness", stats->skewness, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "kurtosis", stats->kurtosis, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "rho", stats->rho, field_prefix, field_separator,
field_suffix);
return my_stringbuf_releaseReturnBuffer(sb);
}
/* *************** */
static double get_value_at(int64_t data_size, double *data_values,
double fraction) {
int64_t pos = my_math_round_int((data_size - 1) * fraction);
my_assert_indexRangeInt("pos", pos, data_size);
return data_values[pos];
}
struct MyQuantiles my_math_computeQuantiles(int64_t data_size,
double *data_values) {
struct MyQuantiles quant = { .a0 = 0, .a1 = 0 };
if (data_size == 0)
return quant;
//in order to compute quantiles, data must be sorted
MyTimer *timer = my_timer_new();
if (data_size > 1000000)
my_log_info("sorting %"PRIi64" values (1 thread)...\n", data_size);
my_qsort_double_array(data_values, data_size);
double secs = my_timer_getSeconds(timer);
if (secs > 5)
my_log_info("%"PRIi64" values sorted in %1.1lf seconds\n", data_size,
secs);
my_timer_release(timer);
quant.a1 = get_value_at(data_size, data_values, 1);
quant.a0_9 = get_value_at(data_size, data_values, 0.9);
quant.a0_8 = get_value_at(data_size, data_values, 0.8);
quant.a0_7 = get_value_at(data_size, data_values, 0.7);
quant.a0_6 = get_value_at(data_size, data_values, 0.6);
quant.a0_5 = get_value_at(data_size, data_values, 0.5);
quant.a0_4 = get_value_at(data_size, data_values, 0.4);
quant.a0_3 = get_value_at(data_size, data_values, 0.3);
quant.a0_2 = get_value_at(data_size, data_values, 0.2);
quant.a0_1 = get_value_at(data_size, data_values, 0.1);
quant.a0 = get_value_at(data_size, data_values, 0);
quant.a0_01 = get_value_at(data_size, data_values, 0.01);
quant.a0_001 = get_value_at(data_size, data_values, 0.001);
quant.a0_0001 = get_value_at(data_size, data_values, 0.0001);
quant.a0_00001 = get_value_at(data_size, data_values, 0.00001);
quant.a0_99 = get_value_at(data_size, data_values, 0.99);
quant.a0_999 = get_value_at(data_size, data_values, 0.999);
quant.a0_9999 = get_value_at(data_size, data_values, 0.9999);
quant.a0_99999 = get_value_at(data_size, data_values, 0.99999);
return quant;
}
char *my_math_computeQuantiles_newString(struct MyQuantiles stats,
const char *field_prefix, const char *field_separator,
const char *field_suffix) {
MyStringBuffer *sb = my_stringbuf_new();
append_DataStat(sb, "alpha 0", stats.a0, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.1", stats.a0_1, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.2", stats.a0_2, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.3", stats.a0_3, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.4", stats.a0_4, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.5", stats.a0_5, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.6", stats.a0_6, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.7", stats.a0_7, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.8", stats.a0_8, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.9", stats.a0_9, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 1", stats.a1, field_prefix, field_separator,
field_suffix);
append_DataStat(sb, "alpha 0.01", stats.a0_01, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.001", stats.a0_001, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.0001", stats.a0_0001, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.00001", stats.a0_00001, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.99", stats.a0_99, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.999", stats.a0_999, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.9999", stats.a0_9999, field_prefix,
field_separator, field_suffix);
append_DataStat(sb, "alpha 0.99999", stats.a0_99999, field_prefix,
field_separator, field_suffix);
return my_stringbuf_releaseReturnBuffer(sb);
}
| 41.496689 | 94 | 0.760772 | [
"vector"
] |
d6934afc87ef3a80a25d7e98d3daee3250879c48 | 5,863 | c | C | kubernetes/model/extensions_v1beta1_pod_security_policy.c | minerba/c | 8eb6593e55d0e5d57a2dd3153c15c9645de677bc | [
"Apache-2.0"
] | 69 | 2020-03-17T13:47:05.000Z | 2022-03-30T08:25:05.000Z | kubernetes/model/extensions_v1beta1_pod_security_policy.c | minerba/c | 8eb6593e55d0e5d57a2dd3153c15c9645de677bc | [
"Apache-2.0"
] | 115 | 2020-03-17T14:53:19.000Z | 2022-03-31T11:31:30.000Z | kubernetes/model/extensions_v1beta1_pod_security_policy.c | minerba/c | 8eb6593e55d0e5d57a2dd3153c15c9645de677bc | [
"Apache-2.0"
] | 28 | 2020-03-17T13:42:21.000Z | 2022-03-19T23:37:16.000Z | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "extensions_v1beta1_pod_security_policy.h"
extensions_v1beta1_pod_security_policy_t *extensions_v1beta1_pod_security_policy_create(
char *api_version,
char *kind,
v1_object_meta_t *metadata,
extensions_v1beta1_pod_security_policy_spec_t *spec
) {
extensions_v1beta1_pod_security_policy_t *extensions_v1beta1_pod_security_policy_local_var = malloc(sizeof(extensions_v1beta1_pod_security_policy_t));
if (!extensions_v1beta1_pod_security_policy_local_var) {
return NULL;
}
extensions_v1beta1_pod_security_policy_local_var->api_version = api_version;
extensions_v1beta1_pod_security_policy_local_var->kind = kind;
extensions_v1beta1_pod_security_policy_local_var->metadata = metadata;
extensions_v1beta1_pod_security_policy_local_var->spec = spec;
return extensions_v1beta1_pod_security_policy_local_var;
}
void extensions_v1beta1_pod_security_policy_free(extensions_v1beta1_pod_security_policy_t *extensions_v1beta1_pod_security_policy) {
if(NULL == extensions_v1beta1_pod_security_policy){
return ;
}
listEntry_t *listEntry;
if (extensions_v1beta1_pod_security_policy->api_version) {
free(extensions_v1beta1_pod_security_policy->api_version);
extensions_v1beta1_pod_security_policy->api_version = NULL;
}
if (extensions_v1beta1_pod_security_policy->kind) {
free(extensions_v1beta1_pod_security_policy->kind);
extensions_v1beta1_pod_security_policy->kind = NULL;
}
if (extensions_v1beta1_pod_security_policy->metadata) {
v1_object_meta_free(extensions_v1beta1_pod_security_policy->metadata);
extensions_v1beta1_pod_security_policy->metadata = NULL;
}
if (extensions_v1beta1_pod_security_policy->spec) {
extensions_v1beta1_pod_security_policy_spec_free(extensions_v1beta1_pod_security_policy->spec);
extensions_v1beta1_pod_security_policy->spec = NULL;
}
free(extensions_v1beta1_pod_security_policy);
}
cJSON *extensions_v1beta1_pod_security_policy_convertToJSON(extensions_v1beta1_pod_security_policy_t *extensions_v1beta1_pod_security_policy) {
cJSON *item = cJSON_CreateObject();
// extensions_v1beta1_pod_security_policy->api_version
if(extensions_v1beta1_pod_security_policy->api_version) {
if(cJSON_AddStringToObject(item, "apiVersion", extensions_v1beta1_pod_security_policy->api_version) == NULL) {
goto fail; //String
}
}
// extensions_v1beta1_pod_security_policy->kind
if(extensions_v1beta1_pod_security_policy->kind) {
if(cJSON_AddStringToObject(item, "kind", extensions_v1beta1_pod_security_policy->kind) == NULL) {
goto fail; //String
}
}
// extensions_v1beta1_pod_security_policy->metadata
if(extensions_v1beta1_pod_security_policy->metadata) {
cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(extensions_v1beta1_pod_security_policy->metadata);
if(metadata_local_JSON == NULL) {
goto fail; //model
}
cJSON_AddItemToObject(item, "metadata", metadata_local_JSON);
if(item->child == NULL) {
goto fail;
}
}
// extensions_v1beta1_pod_security_policy->spec
if(extensions_v1beta1_pod_security_policy->spec) {
cJSON *spec_local_JSON = extensions_v1beta1_pod_security_policy_spec_convertToJSON(extensions_v1beta1_pod_security_policy->spec);
if(spec_local_JSON == NULL) {
goto fail; //model
}
cJSON_AddItemToObject(item, "spec", spec_local_JSON);
if(item->child == NULL) {
goto fail;
}
}
return item;
fail:
if (item) {
cJSON_Delete(item);
}
return NULL;
}
extensions_v1beta1_pod_security_policy_t *extensions_v1beta1_pod_security_policy_parseFromJSON(cJSON *extensions_v1beta1_pod_security_policyJSON){
extensions_v1beta1_pod_security_policy_t *extensions_v1beta1_pod_security_policy_local_var = NULL;
// extensions_v1beta1_pod_security_policy->api_version
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(extensions_v1beta1_pod_security_policyJSON, "apiVersion");
if (api_version) {
if(!cJSON_IsString(api_version))
{
goto end; //String
}
}
// extensions_v1beta1_pod_security_policy->kind
cJSON *kind = cJSON_GetObjectItemCaseSensitive(extensions_v1beta1_pod_security_policyJSON, "kind");
if (kind) {
if(!cJSON_IsString(kind))
{
goto end; //String
}
}
// extensions_v1beta1_pod_security_policy->metadata
cJSON *metadata = cJSON_GetObjectItemCaseSensitive(extensions_v1beta1_pod_security_policyJSON, "metadata");
v1_object_meta_t *metadata_local_nonprim = NULL;
if (metadata) {
metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive
}
// extensions_v1beta1_pod_security_policy->spec
cJSON *spec = cJSON_GetObjectItemCaseSensitive(extensions_v1beta1_pod_security_policyJSON, "spec");
extensions_v1beta1_pod_security_policy_spec_t *spec_local_nonprim = NULL;
if (spec) {
spec_local_nonprim = extensions_v1beta1_pod_security_policy_spec_parseFromJSON(spec); //nonprimitive
}
extensions_v1beta1_pod_security_policy_local_var = extensions_v1beta1_pod_security_policy_create (
api_version ? strdup(api_version->valuestring) : NULL,
kind ? strdup(kind->valuestring) : NULL,
metadata ? metadata_local_nonprim : NULL,
spec ? spec_local_nonprim : NULL
);
return extensions_v1beta1_pod_security_policy_local_var;
end:
if (metadata_local_nonprim) {
v1_object_meta_free(metadata_local_nonprim);
metadata_local_nonprim = NULL;
}
if (spec_local_nonprim) {
extensions_v1beta1_pod_security_policy_spec_free(spec_local_nonprim);
spec_local_nonprim = NULL;
}
return NULL;
}
| 36.64375 | 154 | 0.766331 | [
"model"
] |
d69abe4129e8c5eade3b5b76e58858d3322e498a | 492,241 | h | C | raylib_sources/src/external/mini_al.h | Elkantor/raylib_package | 92e075ecdc05ff8e2547c980547f3d3ae6aee16d | [
"MIT"
] | 1 | 2021-09-06T21:21:41.000Z | 2021-09-06T21:21:41.000Z | raylib/external/mini_al.h | bbssamuray/raylib-go | 391c25482d466d1adc18e2151388cf8519b5d875 | [
"Zlib"
] | null | null | null | raylib/external/mini_al.h | bbssamuray/raylib-go | 391c25482d466d1adc18e2151388cf8519b5d875 | [
"Zlib"
] | null | null | null | // Audio playback and capture library. Public domain. See "unlicense" statement at the end of this file.
// mini_al - v0.6b - 2018-02-03
//
// David Reid - davidreidsoftware@gmail.com
// ABOUT
// =====
// mini_al is a small library for making it easy to connect to a playback or capture device and send
// or receive data from that device.
//
// mini_al uses an asynchronous API. Every device is created with it's own thread, with audio data
// being delivered to or from the device via a callback. Synchronous APIs are not supported in the
// interest of keeping the library as simple and light-weight as possible.
//
// Supported Backends:
// - WASAPI
// - DirectSound
// - WinMM
// - ALSA
// - OSS
// - OpenSL|ES / Android
// - OpenAL
// - SDL
// - Null (Silence)
// - ... and more in the future.
// - Core Audio (OSX, iOS)
//
// Supported Formats:
// - Unsigned 8-bit PCM
// - Signed 16-bit PCM
// - Signed 24-bit PCM (tightly packed)
// - Signed 32-bit PCM
// - IEEE 32-bit floating point PCM
//
//
// USAGE
// =====
// mini_al is a single-file library. To use it, do something like the following in one .c file.
// #define MAL_IMPLEMENTATION
// #include "mini_al.h"
//
// You can then #include this file in other parts of the program as you would with any other header file.
//
// The implementation of this library will try #include-ing necessary headers for each backend. If you do not have
// the development packages for any particular backend you can disable it by #define-ing the appropriate MAL_NO_*
// option before the implementation.
//
//
// Building (Windows)
// ------------------
// The Windows build should compile clean on all modern versions of MSVC without the need to configure any include
// paths nor link to any libraries. The same applies to MinGW/GCC and Clang.
//
// Building (Linux)
// ----------------
// The Linux build uses ALSA for it's backend so you will need to install the relevant ALSA development packages
// for your preferred distro. It also uses pthreads. Dependencies are dynamically linked at runtime so you do not
// need to link to -lasound nor -lpthread. You will need to link to -ldl.
//
// Building (BSD)
// --------------
// BSD build uses OSS. Requires linking to -lossaudio on {Open,Net}BSD, but not FreeBSD.
//
// Building (Emscripten)
// ---------------------
// The Emscripten build currently uses SDL 1.2 for it's backend which means specifying "-s USE_SDL=2" is unecessary
// as of this version. However, if in the future there is legitimate benefit or enough demand for SDL 2 to be used
// instead, you will need to specify this when compiling.
//
//
// Playback Example
// ----------------
// mal_uint32 on_send_samples(mal_device* pDevice, mal_uint32 frameCount, void* pSamples)
// {
// // This callback is set at initialization time and will be called when a playback device needs more
// // data. You need to write as many frames as you can to pSamples (but no more than frameCount) and
// // then return the number of frames you wrote.
// //
// // The user data (pDevice->pUserData) is set by mal_device_init().
// return (mal_uint32)drwav_read_f32((drwav*)pDevice->pUserData, frameCount * pDevice->channels, (float*)pSamples) / pDevice->channels;
// }
//
// ...
//
// mal_context context;
// if (mal_context_init(NULL, 0, NULL, &context) != MAL_SUCCESS) {
// printf("Failed to initialize context.");
// return -3;
// }
//
// mal_device_config config = mal_device_config_init_playback(mal_format_s16, wav.channels, wav.sampleRate, on_send_frames_to_device);
//
// mal_device device;
// mal_result result = mal_device_init(&context, mal_device_type_playback, NULL, &config, pMyData, &device);
// if (result != MAL_SUCCESS) {
// return -1;
// }
//
// mal_device_start(&device); // The device is sleeping by default so you'll need to start it manually.
//
// ...
//
// mal_device_uninit(&device); // This will stop the device so no need to do that manually.
//
//
//
// NOTES
// =====
// - This library uses an asynchronous API for delivering and requesting audio data. Each device will have
// it's own worker thread which is managed by the library.
// - If mal_device_init() is called with a device that's not aligned to the platform's natural alignment
// boundary (4 bytes on 32-bit, 8 bytes on 64-bit), it will _not_ be thread-safe. The reason for this
// is that it depends on members of mal_device being correctly aligned for atomic assignments.
// - Sample data is always little-endian and interleaved. For example, mal_format_s16 means signed 16-bit
// integer samples, interleaved. Let me know if you need non-interleaved and I'll look into it.
//
//
//
// BACKEND NUANCES
// ===============
// - The absolute best latency I am able to get on DirectSound is about 10 milliseconds. This seems very
// consistent so I'm suspecting there's some kind of hard coded limit there or something.
// - DirectSound currently supports a maximum of 4 periods.
// - To capture audio on Android, remember to add the RECORD_AUDIO permission to your manifest:
// <uses-permission android:name="android.permission.RECORD_AUDIO" />
// - UWP is only supported when compiling as C++.
// - UWP only supports default playback and capture devices.
// - UWP requires the Microphone capability to be enabled in the application's manifest (Package.appxmanifest):
// <Package ...>
// ...
// <Capabilities>
// <DeviceCapability Name="microphone" />
// </Capabilities>
// </Package>
//
//
// OPTIONS
// =======
// #define these options before including this file.
//
// #define MAL_NO_WASAPI
// Disables the WASAPI backend.
//
// #define MAL_NO_DSOUND
// Disables the DirectSound backend.
//
// #define MAL_NO_WINMM
// Disables the WinMM backend.
//
// #define MAL_NO_ALSA
// Disables the ALSA backend.
//
// #define MAL_NO_OSS
// Disables the OSS backend.
//
// #define MAL_NO_OPENSL
// Disables the OpenSL|ES backend.
//
// #define MAL_NO_OPENAL
// Disables the OpenAL backend.
//
// #define MAL_NO_SDL
// Disables the SDL backend.
//
// #define MAL_NO_NULL
// Disables the null backend.
//
// #define MAL_DEFAULT_BUFFER_SIZE_IN_MILLISECONDS
// When a buffer size of 0 is specified when a device is initialized, it will default to a size with
// this number of milliseconds worth of data. Note that some backends may adjust this setting if that
// particular backend has unusual latency characteristics.
//
// #define MAL_DEFAULT_PERIODS
// When a period count of 0 is specified when a device is initialized, it will default to this.
#ifndef mini_al_h
#define mini_al_h
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4201) // nonstandard extension used: nameless struct/union
#endif
// Platform/backend detection.
#ifdef _WIN32
#define MAL_WIN32
#if (!defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
#define MAL_WIN32_DESKTOP
#endif
#else
#define MAL_POSIX
#include <pthread.h> // Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types.
#define MAL_UNIX
#ifdef __linux__
#define MAL_LINUX
#endif
#ifdef __APPLE__
#define MAL_APPLE
#endif
#ifdef __ANDROID__
#define MAL_ANDROID
#endif
#ifdef __EMSCRIPTEN__
#define MAL_EMSCRIPTEN
#endif
#endif
// Some backends are only supported on certain platforms.
#if defined(MAL_WIN32)
#define MAL_SUPPORT_WASAPI
#if defined(MAL_WIN32_DESKTOP) // DirectSound and WinMM backends are only supported on desktop's.
#define MAL_SUPPORT_DSOUND
#define MAL_SUPPORT_WINMM
#endif
// Don't support WASAPI on older versions of MSVC for now.
#if defined(_MSC_VER)
#if _MSC_VER < 1600
#if !defined(__audioclient_h__)
#undef MAL_SUPPORT_WASAPI
#endif
#endif
#endif
#endif
#if defined(MAL_UNIX)
#if defined(MAL_LINUX)
#if !defined(MAL_ANDROID) // ALSA is not supported on Android.
#define MAL_SUPPORT_ALSA
#endif
#endif
#if defined(MAL_APPLE)
#define MAL_SUPPORT_COREAUDIO
#endif
#if defined(MAL_ANDROID)
#define MAL_SUPPORT_OPENSL
#endif
#if !defined(MAL_LINUX) && !defined(MAL_APPLE) && !defined(MAL_ANDROID) && !defined(MAL_EMSCRIPTEN)
#define MAL_SUPPORT_OSS
#endif
#endif
#define MAL_SUPPORT_SDL // All platforms support SDL.
// Explicitly disable OpenAL and Null backends for Emscripten because they both use a background thread which is not properly supported right now.
#if !defined(MAL_EMSCRIPTEN)
#define MAL_SUPPORT_OPENAL
#define MAL_SUPPORT_NULL // All platforms support the null backend.
#endif
#if !defined(MAL_NO_WASAPI) && defined(MAL_SUPPORT_WASAPI)
#define MAL_ENABLE_WASAPI
#endif
#if !defined(MAL_NO_DSOUND) && defined(MAL_SUPPORT_DSOUND)
#define MAL_ENABLE_DSOUND
#endif
#if !defined(MAL_NO_WINMM) && defined(MAL_SUPPORT_WINMM)
#define MAL_ENABLE_WINMM
#endif
#if !defined(MAL_NO_ALSA) && defined(MAL_SUPPORT_ALSA)
#define MAL_ENABLE_ALSA
#endif
#if !defined(MAL_NO_COREAUDIO) && defined(MAL_SUPPORT_COREAUDIO)
#define MAL_ENABLE_COREAUDIO
#endif
#if !defined(MAL_NO_OSS) && defined(MAL_SUPPORT_OSS)
#define MAL_ENABLE_OSS
#endif
#if !defined(MAL_NO_OPENSL) && defined(MAL_SUPPORT_OPENSL)
#define MAL_ENABLE_OPENSL
#endif
#if !defined(MAL_NO_OPENAL) && defined(MAL_SUPPORT_OPENAL)
#define MAL_ENABLE_OPENAL
#endif
#if !defined(MAL_NO_SDL) && defined(MAL_SUPPORT_SDL)
#define MAL_ENABLE_SDL
#endif
#if !defined(MAL_NO_NULL) && defined(MAL_SUPPORT_NULL)
#define MAL_ENABLE_NULL
#endif
#if defined(_MSC_VER) && _MSC_VER < 1600
typedef signed char mal_int8;
typedef unsigned char mal_uint8;
typedef signed short mal_int16;
typedef unsigned short mal_uint16;
typedef signed int mal_int32;
typedef unsigned int mal_uint32;
typedef signed __int64 mal_int64;
typedef unsigned __int64 mal_uint64;
#else
#include <stdint.h>
typedef int8_t mal_int8;
typedef uint8_t mal_uint8;
typedef int16_t mal_int16;
typedef uint16_t mal_uint16;
typedef int32_t mal_int32;
typedef uint32_t mal_uint32;
typedef int64_t mal_int64;
typedef uint64_t mal_uint64;
#endif
typedef mal_uint8 mal_bool8;
typedef mal_uint32 mal_bool32;
#define MAL_TRUE 1
#define MAL_FALSE 0
typedef void* mal_handle;
typedef void* mal_ptr;
typedef void (* mal_proc)();
typedef struct mal_context mal_context;
typedef struct mal_device mal_device;
typedef struct
{
mal_context* pContext;
union
{
#ifdef MAL_WIN32
struct
{
/*HANDLE*/ mal_handle hThread;
} win32;
#endif
#ifdef MAL_POSIX
struct
{
pthread_t thread;
} posix;
#endif
int _unused;
};
} mal_thread;
typedef struct
{
mal_context* pContext;
union
{
#ifdef MAL_WIN32
struct
{
/*HANDLE*/ mal_handle hMutex;
} win32;
#endif
#ifdef MAL_POSIX
struct
{
pthread_mutex_t mutex;
} posix;
#endif
int _unused;
};
} mal_mutex;
typedef struct
{
mal_context* pContext;
union
{
#ifdef MAL_WIN32
struct
{
/*HANDLE*/ mal_handle hEvent;
} win32;
#endif
#ifdef MAL_POSIX
struct
{
pthread_mutex_t mutex;
pthread_cond_t condition;
mal_uint32 value;
} posix;
#endif
int _unused;
};
} mal_event;
#if defined(_MSC_VER) && !defined(_WCHAR_T_DEFINED)
typedef mal_uint16 wchar_t;
#endif
// Define NULL for some compilers.
#ifndef NULL
#define NULL 0
#endif
#define MAL_MAX_PERIODS_DSOUND 4
#define MAL_MAX_PERIODS_OPENAL 4
typedef mal_uint8 mal_channel;
#define MAL_CHANNEL_NONE 0
#define MAL_CHANNEL_FRONT_LEFT 1
#define MAL_CHANNEL_FRONT_RIGHT 2
#define MAL_CHANNEL_FRONT_CENTER 3
#define MAL_CHANNEL_LFE 4
#define MAL_CHANNEL_BACK_LEFT 5
#define MAL_CHANNEL_BACK_RIGHT 6
#define MAL_CHANNEL_FRONT_LEFT_CENTER 7
#define MAL_CHANNEL_FRONT_RIGHT_CENTER 8
#define MAL_CHANNEL_BACK_CENTER 9
#define MAL_CHANNEL_SIDE_LEFT 10
#define MAL_CHANNEL_SIDE_RIGHT 11
#define MAL_CHANNEL_TOP_CENTER 12
#define MAL_CHANNEL_TOP_FRONT_LEFT 13
#define MAL_CHANNEL_TOP_FRONT_CENTER 14
#define MAL_CHANNEL_TOP_FRONT_RIGHT 15
#define MAL_CHANNEL_TOP_BACK_LEFT 16
#define MAL_CHANNEL_TOP_BACK_CENTER 17
#define MAL_CHANNEL_TOP_BACK_RIGHT 18
#define MAL_CHANNEL_MONO MAL_CHANNEL_FRONT_CENTER
#define MAL_MAX_CHANNELS 18
#define MAL_MAX_SAMPLE_SIZE_IN_BYTES 8
typedef int mal_result;
#define MAL_SUCCESS 0
#define MAL_ERROR -1 // A generic error.
#define MAL_INVALID_ARGS -2
#define MAL_OUT_OF_MEMORY -3
#define MAL_FORMAT_NOT_SUPPORTED -4
#define MAL_NO_BACKEND -5
#define MAL_NO_DEVICE -6
#define MAL_API_NOT_FOUND -7
#define MAL_DEVICE_BUSY -8
#define MAL_DEVICE_NOT_INITIALIZED -9
#define MAL_DEVICE_ALREADY_STARTED -10
#define MAL_DEVICE_ALREADY_STARTING -11
#define MAL_DEVICE_ALREADY_STOPPED -12
#define MAL_DEVICE_ALREADY_STOPPING -13
#define MAL_FAILED_TO_MAP_DEVICE_BUFFER -14
#define MAL_FAILED_TO_INIT_BACKEND -15
#define MAL_FAILED_TO_READ_DATA_FROM_CLIENT -16
#define MAL_FAILED_TO_READ_DATA_FROM_DEVICE -17
#define MAL_FAILED_TO_SEND_DATA_TO_CLIENT -18
#define MAL_FAILED_TO_SEND_DATA_TO_DEVICE -19
#define MAL_FAILED_TO_OPEN_BACKEND_DEVICE -20
#define MAL_FAILED_TO_START_BACKEND_DEVICE -21
#define MAL_FAILED_TO_STOP_BACKEND_DEVICE -22
#define MAL_FAILED_TO_CREATE_MUTEX -23
#define MAL_FAILED_TO_CREATE_EVENT -24
#define MAL_FAILED_TO_CREATE_THREAD -25
#define MAL_INVALID_DEVICE_CONFIG -26
#define MAL_ACCESS_DENIED -27
#define MAL_DSOUND_FAILED_TO_CREATE_DEVICE -1024
#define MAL_DSOUND_FAILED_TO_SET_COOP_LEVEL -1025
#define MAL_DSOUND_FAILED_TO_CREATE_BUFFER -1026
#define MAL_DSOUND_FAILED_TO_QUERY_INTERFACE -1027
#define MAL_DSOUND_FAILED_TO_SET_NOTIFICATIONS -1028
#define MAL_ALSA_FAILED_TO_OPEN_DEVICE -2048
#define MAL_ALSA_FAILED_TO_SET_HW_PARAMS -2049
#define MAL_ALSA_FAILED_TO_SET_SW_PARAMS -2050
#define MAL_ALSA_FAILED_TO_PREPARE_DEVICE -2051
#define MAL_ALSA_FAILED_TO_RECOVER_DEVICE -2052
#define MAL_WASAPI_FAILED_TO_CREATE_DEVICE_ENUMERATOR -3072
#define MAL_WASAPI_FAILED_TO_CREATE_DEVICE -3073
#define MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE -3074
#define MAL_WASAPI_FAILED_TO_INITIALIZE_DEVICE -3075
#define MAL_WASAPI_FAILED_TO_FIND_BEST_FORMAT -3076
#define MAL_WASAPI_FAILED_TO_GET_INTERNAL_BUFFER -3077
#define MAL_WASAPI_FAILED_TO_RELEASE_INTERNAL_BUFFER -3078
#define MAL_WINMM_FAILED_TO_GET_DEVICE_CAPS -4096
#define MAL_WINMM_FAILED_TO_GET_SUPPORTED_FORMATS -4097
typedef void (* mal_log_proc) (mal_context* pContext, mal_device* pDevice, const char* message);
typedef void (* mal_recv_proc)(mal_device* pDevice, mal_uint32 frameCount, const void* pSamples);
typedef mal_uint32 (* mal_send_proc)(mal_device* pDevice, mal_uint32 frameCount, void* pSamples);
typedef void (* mal_stop_proc)(mal_device* pDevice);
typedef enum
{
mal_backend_null,
mal_backend_wasapi,
mal_backend_dsound,
mal_backend_winmm,
mal_backend_alsa,
mal_backend_oss,
mal_backend_opensl,
mal_backend_openal,
mal_backend_sdl
} mal_backend;
typedef enum
{
mal_device_type_playback,
mal_device_type_capture
} mal_device_type;
typedef enum
{
// I like to keep these explicitly defined because they're used as a key into a lookup table. When items are
// added to this, make sure there are no gaps and that they're added to the lookup table in mal_get_sample_size_in_bytes().
mal_format_unknown = 0, // Mainly used for indicating an error.
mal_format_u8 = 1,
mal_format_s16 = 2, // Seems to be the most widely supported format.
mal_format_s24 = 3, // Tightly packed. 3 bytes per sample.
mal_format_s32 = 4,
mal_format_f32 = 5,
} mal_format;
typedef enum
{
mal_channel_mix_mode_basic, // Drop excess channels; zeroed out extra channels.
mal_channel_mix_mode_blend, // Blend channels based on locality.
} mal_channel_mix_mode;
typedef union
{
#ifdef MAL_SUPPORT_WASAPI
wchar_t wasapi[64]; // WASAPI uses a wchar_t string for identification.
#endif
#ifdef MAL_SUPPORT_DSOUND
mal_uint8 dsound[16]; // DirectSound uses a GUID for identification.
#endif
#ifdef MAL_SUPPORT_WINMM
/*UINT_PTR*/ mal_uint32 winmm; // When creating a device, WinMM expects a Win32 UINT_PTR for device identification. In practice it's actually just a UINT.
#endif
#ifdef MAL_SUPPORT_ALSA
char alsa[256]; // ALSA uses a name string for identification.
#endif
#ifdef MAL_SUPPORT_COREAUDIO
// TODO: Implement me.
#endif
#ifdef MAL_SUPPORT_OSS
char oss[64]; // "dev/dsp0", etc. "dev/dsp" for the default device.
#endif
#ifdef MAL_SUPPORT_OPENSL
mal_uint32 opensl; // OpenSL|ES uses a 32-bit unsigned integer for identification.
#endif
#ifdef MAL_SUPPORT_OPENAL
char openal[256]; // OpenAL seems to use human-readable device names as the ID.
#endif
#ifdef MAL_SUPPORT_SDL
int sdl; // SDL devices are identified with an index.
#endif
#ifdef MAL_SUPPORT_NULL
int nullbackend; // Always 0.
#endif
} mal_device_id;
typedef struct
{
mal_device_id id;
char name[256];
} mal_device_info;
typedef struct
{
mal_int64 counter;
} mal_timer;
typedef struct mal_src mal_src;
typedef mal_uint32 (* mal_src_read_proc)(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, void* pUserData); // Returns the number of frames that were read.
typedef enum
{
mal_src_algorithm_none,
mal_src_algorithm_linear
} mal_src_algorithm;
#define MAL_SRC_CACHE_SIZE_IN_FRAMES 512
typedef struct
{
mal_src* pSRC;
float pCachedFrames[MAL_MAX_CHANNELS * MAL_SRC_CACHE_SIZE_IN_FRAMES];
mal_uint32 cachedFrameCount;
mal_uint32 iNextFrame;
} mal_src_cache;
typedef struct
{
mal_uint32 sampleRateIn;
mal_uint32 sampleRateOut;
mal_format formatIn;
mal_format formatOut;
mal_uint32 channels;
mal_src_algorithm algorithm;
mal_uint32 cacheSizeInFrames; // The number of frames to read from the client at a time.
} mal_src_config;
struct mal_src
{
mal_src_config config;
mal_src_read_proc onRead;
void* pUserData;
float bin[256];
mal_src_cache cache; // <-- For simplifying and optimizing client -> memory reading.
union
{
struct
{
float alpha;
mal_bool32 isPrevFramesLoaded : 1;
mal_bool32 isNextFramesLoaded : 1;
} linear;
};
};
typedef struct mal_dsp mal_dsp;
typedef mal_uint32 (* mal_dsp_read_proc)(mal_dsp* pDSP, mal_uint32 frameCount, void* pSamplesOut, void* pUserData);
typedef struct
{
mal_format formatIn;
mal_uint32 channelsIn;
mal_uint32 sampleRateIn;
mal_channel channelMapIn[MAL_MAX_CHANNELS];
mal_format formatOut;
mal_uint32 channelsOut;
mal_uint32 sampleRateOut;
mal_channel channelMapOut[MAL_MAX_CHANNELS];
mal_uint32 cacheSizeInFrames; // Applications should set this to 0 for now.
} mal_dsp_config;
struct mal_dsp
{
mal_dsp_config config;
mal_dsp_read_proc onRead;
void* pUserDataForOnRead;
mal_src src; // For sample rate conversion.
mal_channel channelMapInPostMix[MAL_MAX_CHANNELS]; // <-- When mixing, new channels may need to be created. This represents the channel map after mixing.
mal_channel channelShuffleTable[MAL_MAX_CHANNELS];
mal_bool32 isChannelMappingRequired : 1;
mal_bool32 isSRCRequired : 1;
mal_bool32 isPassthrough : 1; // <-- Will be set to true when the DSP pipeline is an optimized passthrough.
};
typedef struct
{
mal_format format;
mal_uint32 channels;
mal_uint32 sampleRate;
mal_channel channelMap[MAL_MAX_CHANNELS];
mal_uint32 bufferSizeInFrames;
mal_uint32 periods;
mal_bool32 preferExclusiveMode;
mal_recv_proc onRecvCallback;
mal_send_proc onSendCallback;
mal_stop_proc onStopCallback;
struct
{
mal_bool32 noMMap; // Disables MMap mode.
} alsa;
} mal_device_config;
typedef struct
{
mal_log_proc onLog;
struct
{
mal_bool32 useVerboseDeviceEnumeration;
mal_bool32 excludeNullDevice;
} alsa;
} mal_context_config;
struct mal_context
{
mal_backend backend; // DirectSound, ALSA, etc.
mal_context_config config;
union
{
#ifdef MAL_SUPPORT_WASAPI
struct
{
int _unused;
} wasapi;
#endif
#ifdef MAL_SUPPORT_DSOUND
struct
{
/*HMODULE*/ mal_handle hDSoundDLL;
} dsound;
#endif
#ifdef MAL_SUPPORT_WINMM
struct
{
/*HMODULE*/ mal_handle hWinMM;
mal_proc waveOutGetNumDevs;
mal_proc waveOutGetDevCapsA;
mal_proc waveOutOpen;
mal_proc waveOutClose;
mal_proc waveOutPrepareHeader;
mal_proc waveOutUnprepareHeader;
mal_proc waveOutWrite;
mal_proc waveOutReset;
mal_proc waveInGetNumDevs;
mal_proc waveInGetDevCapsA;
mal_proc waveInOpen;
mal_proc waveInClose;
mal_proc waveInPrepareHeader;
mal_proc waveInUnprepareHeader;
mal_proc waveInAddBuffer;
mal_proc waveInStart;
mal_proc waveInReset;
} winmm;
#endif
#ifdef MAL_SUPPORT_ALSA
struct
{
mal_handle asoundSO;
mal_proc snd_pcm_open;
mal_proc snd_pcm_close;
mal_proc snd_pcm_hw_params_sizeof;
mal_proc snd_pcm_hw_params_any;
mal_proc snd_pcm_hw_params_set_format;
mal_proc snd_pcm_hw_params_set_format_first;
mal_proc snd_pcm_hw_params_get_format_mask;
mal_proc snd_pcm_hw_params_set_channels_near;
mal_proc snd_pcm_hw_params_set_rate_resample;
mal_proc snd_pcm_hw_params_set_rate_near;
mal_proc snd_pcm_hw_params_set_buffer_size_near;
mal_proc snd_pcm_hw_params_set_periods_near;
mal_proc snd_pcm_hw_params_set_access;
mal_proc snd_pcm_hw_params_get_format;
mal_proc snd_pcm_hw_params_get_channels;
mal_proc snd_pcm_hw_params_get_rate;
mal_proc snd_pcm_hw_params_get_buffer_size;
mal_proc snd_pcm_hw_params_get_periods;
mal_proc snd_pcm_hw_params_get_access;
mal_proc snd_pcm_hw_params;
mal_proc snd_pcm_sw_params_sizeof;
mal_proc snd_pcm_sw_params_current;
mal_proc snd_pcm_sw_params_set_avail_min;
mal_proc snd_pcm_sw_params_set_start_threshold;
mal_proc snd_pcm_sw_params;
mal_proc snd_pcm_format_mask_sizeof;
mal_proc snd_pcm_format_mask_test;
mal_proc snd_pcm_get_chmap;
mal_proc snd_pcm_prepare;
mal_proc snd_pcm_start;
mal_proc snd_pcm_drop;
mal_proc snd_device_name_hint;
mal_proc snd_device_name_get_hint;
mal_proc snd_card_get_index;
mal_proc snd_device_name_free_hint;
mal_proc snd_pcm_mmap_begin;
mal_proc snd_pcm_mmap_commit;
mal_proc snd_pcm_recover;
mal_proc snd_pcm_readi;
mal_proc snd_pcm_writei;
mal_proc snd_pcm_avail;
mal_proc snd_pcm_avail_update;
mal_proc snd_pcm_wait;
mal_proc snd_pcm_info;
mal_proc snd_pcm_info_sizeof;
mal_proc snd_pcm_info_get_name;
} alsa;
#endif
#ifdef MAL_SUPPORT_COREAUDIO
struct
{
int _unused;
} coreaudio;
#endif
#ifdef MAL_SUPPORT_OSS
struct
{
int versionMajor;
int versionMinor;
} oss;
#endif
#ifdef MAL_SUPPORT_OPENSL
struct
{
int _unused;
} opensl;
#endif
#ifdef MAL_SUPPORT_OPENAL
struct
{
/*HMODULE*/ mal_handle hOpenAL; // OpenAL32.dll, etc.
mal_proc alcCreateContext;
mal_proc alcMakeContextCurrent;
mal_proc alcProcessContext;
mal_proc alcSuspendContext;
mal_proc alcDestroyContext;
mal_proc alcGetCurrentContext;
mal_proc alcGetContextsDevice;
mal_proc alcOpenDevice;
mal_proc alcCloseDevice;
mal_proc alcGetError;
mal_proc alcIsExtensionPresent;
mal_proc alcGetProcAddress;
mal_proc alcGetEnumValue;
mal_proc alcGetString;
mal_proc alcGetIntegerv;
mal_proc alcCaptureOpenDevice;
mal_proc alcCaptureCloseDevice;
mal_proc alcCaptureStart;
mal_proc alcCaptureStop;
mal_proc alcCaptureSamples;
mal_proc alEnable;
mal_proc alDisable;
mal_proc alIsEnabled;
mal_proc alGetString;
mal_proc alGetBooleanv;
mal_proc alGetIntegerv;
mal_proc alGetFloatv;
mal_proc alGetDoublev;
mal_proc alGetBoolean;
mal_proc alGetInteger;
mal_proc alGetFloat;
mal_proc alGetDouble;
mal_proc alGetError;
mal_proc alIsExtensionPresent;
mal_proc alGetProcAddress;
mal_proc alGetEnumValue;
mal_proc alGenSources;
mal_proc alDeleteSources;
mal_proc alIsSource;
mal_proc alSourcef;
mal_proc alSource3f;
mal_proc alSourcefv;
mal_proc alSourcei;
mal_proc alSource3i;
mal_proc alSourceiv;
mal_proc alGetSourcef;
mal_proc alGetSource3f;
mal_proc alGetSourcefv;
mal_proc alGetSourcei;
mal_proc alGetSource3i;
mal_proc alGetSourceiv;
mal_proc alSourcePlayv;
mal_proc alSourceStopv;
mal_proc alSourceRewindv;
mal_proc alSourcePausev;
mal_proc alSourcePlay;
mal_proc alSourceStop;
mal_proc alSourceRewind;
mal_proc alSourcePause;
mal_proc alSourceQueueBuffers;
mal_proc alSourceUnqueueBuffers;
mal_proc alGenBuffers;
mal_proc alDeleteBuffers;
mal_proc alIsBuffer;
mal_proc alBufferData;
mal_proc alBufferf;
mal_proc alBuffer3f;
mal_proc alBufferfv;
mal_proc alBufferi;
mal_proc alBuffer3i;
mal_proc alBufferiv;
mal_proc alGetBufferf;
mal_proc alGetBuffer3f;
mal_proc alGetBufferfv;
mal_proc alGetBufferi;
mal_proc alGetBuffer3i;
mal_proc alGetBufferiv;
mal_bool32 isEnumerationSupported : 1;
mal_bool32 isFloat32Supported : 1;
mal_bool32 isMCFormatsSupported : 1;
} openal;
#endif
#ifdef MAL_SUPPORT_SDL
struct
{
mal_handle hSDL; // SDL
mal_proc SDL_InitSubSystem;
mal_proc SDL_QuitSubSystem;
mal_proc SDL_CloseAudio;
mal_proc SDL_OpenAudio;
mal_proc SDL_PauseAudio;
mal_proc SDL_GetNumAudioDevices;
mal_proc SDL_GetAudioDeviceName;
mal_proc SDL_CloseAudioDevice;
mal_proc SDL_OpenAudioDevice;
mal_proc SDL_PauseAudioDevice;
mal_bool32 usingSDL1;
} sdl;
#endif
#ifdef MAL_SUPPORT_NULL
struct
{
int _unused;
} null_backend;
#endif
};
union
{
#ifdef MAL_WIN32
struct
{
/*HMODULE*/ mal_handle hOle32DLL;
mal_proc CoInitializeEx;
mal_proc CoUninitialize;
mal_proc CoCreateInstance;
mal_proc CoTaskMemFree;
mal_proc PropVariantClear;
/*HMODULE*/ mal_handle hUser32DLL;
mal_proc GetForegroundWindow;
mal_proc GetDesktopWindow;
} win32;
#endif
#ifdef MAL_POSIX
struct
{
mal_handle pthreadSO;
mal_proc pthread_create;
mal_proc pthread_join;
mal_proc pthread_mutex_init;
mal_proc pthread_mutex_destroy;
mal_proc pthread_mutex_lock;
mal_proc pthread_mutex_unlock;
mal_proc pthread_cond_init;
mal_proc pthread_cond_destroy;
mal_proc pthread_cond_wait;
mal_proc pthread_cond_signal;
} posix;
#endif
int _unused;
};
};
struct mal_device
{
mal_context* pContext;
mal_device_type type;
mal_format format;
mal_uint32 channels;
mal_uint32 sampleRate;
mal_uint8 channelMap[MAL_MAX_CHANNELS];
mal_uint32 bufferSizeInFrames;
mal_uint32 periods;
mal_uint32 state;
mal_recv_proc onRecv;
mal_send_proc onSend;
mal_stop_proc onStop;
void* pUserData; // Application defined data.
char name[256];
mal_mutex lock;
mal_event wakeupEvent;
mal_event startEvent;
mal_event stopEvent;
mal_thread thread;
mal_result workResult; // This is set by the worker thread after it's finished doing a job.
mal_bool32 usingDefaultBufferSize : 1;
mal_bool32 usingDefaultPeriods : 1;
mal_bool32 exclusiveMode : 1;
mal_format internalFormat;
mal_uint32 internalChannels;
mal_uint32 internalSampleRate;
mal_uint8 internalChannelMap[MAL_MAX_CHANNELS];
mal_dsp dsp; // Samples run through this to convert samples to a format suitable for use by the backend.
mal_uint32 _dspFrameCount; // Internal use only. Used when running the device -> DSP -> client pipeline. See mal_device__on_read_from_device().
const mal_uint8* _dspFrames; // ^^^ AS ABOVE ^^^
union
{
#ifdef MAL_SUPPORT_WASAPI
struct
{
/*IAudioClient**/ mal_ptr pAudioClient;
/*IAudioRenderClient**/ mal_ptr pRenderClient;
/*IAudioCaptureClient**/ mal_ptr pCaptureClient;
/*HANDLE*/ mal_handle hEvent;
/*HANDLE*/ mal_handle hStopEvent;
mal_bool32 breakFromMainLoop;
} wasapi;
#endif
#ifdef MAL_SUPPORT_DSOUND
struct
{
/*HMODULE*/ mal_handle hDSoundDLL;
/*LPDIRECTSOUND*/ mal_ptr pPlayback;
/*LPDIRECTSOUNDBUFFER*/ mal_ptr pPlaybackPrimaryBuffer;
/*LPDIRECTSOUNDBUFFER*/ mal_ptr pPlaybackBuffer;
/*LPDIRECTSOUNDCAPTURE*/ mal_ptr pCapture;
/*LPDIRECTSOUNDCAPTUREBUFFER*/ mal_ptr pCaptureBuffer;
/*LPDIRECTSOUNDNOTIFY*/ mal_ptr pNotify;
/*HANDLE*/ mal_handle pNotifyEvents[MAL_MAX_PERIODS_DSOUND]; // One event handle for each period.
/*HANDLE*/ mal_handle hStopEvent;
mal_uint32 lastProcessedFrame; // This is circular.
mal_bool32 breakFromMainLoop;
} dsound;
#endif
#ifdef MAL_SUPPORT_WINMM
struct
{
/*HWAVEOUT, HWAVEIN*/ mal_handle hDevice;
/*HANDLE*/ mal_handle hEvent;
mal_uint32 fragmentSizeInFrames;
mal_uint32 fragmentSizeInBytes;
mal_uint32 iNextHeader; // [0,periods). Used as an index into pWAVEHDR.
/*WAVEHDR**/ mal_uint8* pWAVEHDR; // One instantiation for each period.
mal_uint8* pIntermediaryBuffer;
mal_uint8* _pHeapData; // Used internally and is used for the heap allocated data for the intermediary buffer and the WAVEHDR structures.
mal_bool32 breakFromMainLoop;
} winmm;
#endif
#ifdef MAL_SUPPORT_ALSA
struct
{
/*snd_pcm_t**/ mal_ptr pPCM;
mal_bool32 isUsingMMap : 1;
mal_bool32 breakFromMainLoop : 1;
void* pIntermediaryBuffer;
} alsa;
#endif
#ifdef MAL_SUPPORT_COREAUDIO
struct
{
int _unused;
} coreaudio;
#endif
#ifdef MAL_SUPPORT_OSS
struct
{
int fd;
mal_uint32 fragmentSizeInFrames;
mal_bool32 breakFromMainLoop;
void* pIntermediaryBuffer;
} oss;
#endif
#ifdef MAL_SUPPORT_OPENSL
struct
{
/*SLObjectItf*/ mal_ptr pOutputMixObj;
/*SLOutputMixItf*/ mal_ptr pOutputMix;
/*SLObjectItf*/ mal_ptr pAudioPlayerObj;
/*SLPlayItf*/ mal_ptr pAudioPlayer;
/*SLObjectItf*/ mal_ptr pAudioRecorderObj;
/*SLRecordItf*/ mal_ptr pAudioRecorder;
/*SLAndroidSimpleBufferQueueItf*/ mal_ptr pBufferQueue;
mal_uint32 periodSizeInFrames;
mal_uint32 currentBufferIndex;
mal_uint8* pBuffer; // This is malloc()'d and is used for storing audio data. Typed as mal_uint8 for easy offsetting.
} opensl;
#endif
#ifdef MAL_SUPPORT_OPENAL
struct
{
/*ALCcontext**/ mal_ptr pContextALC;
/*ALCdevice**/ mal_ptr pDeviceALC;
/*ALuint*/ mal_uint32 sourceAL;
/*ALuint*/ mal_uint32 buffersAL[MAL_MAX_PERIODS_OPENAL];
/*ALenum*/ mal_uint32 formatAL;
mal_uint32 subBufferSizeInFrames; // This is the size of each of the OpenAL buffers (buffersAL).
mal_uint8* pIntermediaryBuffer; // This is malloc()'d and is used as the destination for reading from the client. Typed as mal_uint8 for easy offsetting.
mal_uint32 iNextBuffer; // The next buffer to unenqueue and then re-enqueue as new data is read.
mal_bool32 breakFromMainLoop;
} openal;
#endif
#ifdef MAL_SUPPORT_SDL
struct
{
mal_uint32 deviceID;
} sdl;
#endif
#ifdef MAL_SUPPORT_NULL
struct
{
mal_timer timer;
mal_uint32 lastProcessedFrame; // This is circular.
mal_bool32 breakFromMainLoop;
mal_uint8* pBuffer; // This is malloc()'d and is used as the destination for reading from the client. Typed as mal_uint8 for easy offsetting.
} null_device;
#endif
};
};
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// Initializes a context.
//
// The context is used for selecting and initializing the relevant backends.
//
// Note that the location of the device cannot change throughout it's lifetime. Consider allocating
// the mal_context object with malloc() if this is an issue. The reason for this is that a pointer
// to the context is stored in the mal_device structure.
//
// <backends> is used to allow the application to prioritize backends depending on it's specific
// requirements. This can be null in which case it uses the default priority, which is as follows:
// - WASAPI
// - DirectSound
// - WinMM
// - ALSA
// - OSS
// - OpenSL|ES
// - OpenAL
// - SDL
// - Null
//
// The onLog callback is used for posting log messages back to the client for diagnostics, debugging,
// etc. You can pass NULL for this if you do not need it.
//
// Return Value:
// MAL_SUCCESS if successful; any other error code otherwise.
//
// Thread Safety: UNSAFE
//
// Effeciency: LOW
// This will dynamically load backends DLLs/SOs (such as dsound.dll).
mal_result mal_context_init(mal_backend backends[], mal_uint32 backendCount, const mal_context_config* pConfig, mal_context* pContext);
// Uninitializes a context.
//
// Results are undefined if you call this while any device created by this context is still active.
//
// Return Value:
// MAL_SUCCESS if successful; any other error code otherwise.
//
// Thread Safety: UNSAFE
//
// Efficiency: LOW
// This will unload the backend DLLs/SOs.
mal_result mal_context_uninit(mal_context* pContext);
// Enumerates over each device of the given type (playback or capture).
//
// It is _not_ safe to assume the first enumerated device is the default device.
//
// Some backends and platforms may only support default playback and capture devices.
//
// Return Value:
// MAL_SUCCESS if successful; any other error code otherwise.
//
// Thread Safety: SAFE, SEE NOTES.
// This API uses an application-defined buffer for output. This is thread-safe so long as the
// application ensures mutal exclusion to the output buffer at their level.
//
// Efficiency: LOW
mal_result mal_enumerate_devices(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo);
// Initializes a device.
//
// The device ID (pDeviceID) can be null, in which case the default device is used. Otherwise, you
// can retrieve the ID by calling mal_enumerate_devices() and using the ID from the returned data.
// Set pDeviceID to NULL to use the default device. Do _not_ rely on the first device ID returned
// by mal_enumerate_devices() to be the default device.
//
// This will try it's hardest to create a valid device, even if it means adjusting input arguments.
// Look at pDevice->internalChannels, pDevice->internalSampleRate, etc. to determine the actual
// properties after initialization.
//
// If <bufferSizeInFrames> is 0, it will default to MAL_DEFAULT_BUFFER_SIZE_IN_MILLISECONDS. If
// <periods> is set to 0 it will default to MAL_DEFAULT_PERIODS.
//
// The <periods> property controls how frequently the background thread is woken to check for more
// data. It's tied to the buffer size, so as an example, if your buffer size is equivalent to 10
// milliseconds and you have 2 periods, the CPU will wake up approximately every 5 milliseconds.
//
// Use mal_device_config_init(), mal_device_config_init_playback(), etc. to initialize a
// mal_device_config object.
//
// When compiling for UWP you must ensure you call this function on the main UI thread because the
// operating system may need to present the user with a message asking for permissions. Please refer
// to the official documentation for ActivateAudioInterfaceAsync() for more information.
//
// Return Value:
// MAL_SUCCESS if successful; any other error code otherwise.
//
// Thread Safety: UNSAFE
// It is not safe to call this function simultaneously for different devices because some backends
// depend on and mutate global state (such as OpenSL|ES). The same applies to calling this as the
// same time as mal_device_uninit().
//
// Results are undefined if you try using a device before this function has returned.
//
// Efficiency: LOW
// This is just slow due to the nature of it being an initialization API.
mal_result mal_device_init(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, void* pUserData, mal_device* pDevice);
// Uninitializes a device.
//
// This will explicitly stop the device. You do not need to call mal_device_stop() beforehand, but it's
// harmless if you do.
//
// Return Value:
// MAL_SUCCESS if successful; any other error code otherwise.
//
// Thread Safety: UNSAFE
// As soon as this API is called the device should be considered undefined. All bets are off if you
// try using the device at the same time as uninitializing it.
//
// Efficiency: LOW
// This will stop the device with mal_device_stop() which is a slow, synchronized call. It also needs
// to destroy internal objects like the backend-specific objects and the background thread.
void mal_device_uninit(mal_device* pDevice);
// Sets the callback to use when the application has received data from the device.
//
// Thread Safety: SAFE
// This API is implemented as a simple atomic assignment.
//
// Efficiency: HIGH
// This is just an atomic assignment.
void mal_device_set_recv_callback(mal_device* pDevice, mal_recv_proc proc);
// Sets the callback to use when the application needs to send data to the device for playback.
//
// Note that the implementation of this callback must copy over as many samples as is available. The
// return value specifies how many samples were written to the output buffer. The backend will fill
// any leftover samples with silence.
//
// Thread Safety: SAFE
// This API is implemented as a simple atomic assignment.
//
// Efficiency: HIGH
// This is just an atomic assignment.
void mal_device_set_send_callback(mal_device* pDevice, mal_send_proc proc);
// Sets the callback to use when the device has stopped, either explicitly or as a result of an error.
//
// Thread Safety: SAFE
// This API is implemented as a simple atomic assignment.
//
// Efficiency: HIGH
// This is just an atomic assignment.
void mal_device_set_stop_callback(mal_device* pDevice, mal_stop_proc proc);
// Activates the device. For playback devices this begins playback. For capture devices it begins
// recording.
//
// For a playback device, this will retrieve an initial chunk of audio data from the client before
// returning. The reason for this is to ensure there is valid audio data in the buffer, which needs
// to be done _before_ the device begins playback.
//
// Return Value:
// - MAL_SUCCESS if successful; any other error code otherwise.
// - MAL_INVALID_ARGS
// One or more of the input arguments is invalid.
// - MAL_DEVICE_NOT_INITIALIZED
// The device is not currently or was never initialized.
// - MAL_DEVICE_BUSY
// The device is in the process of stopping. This will only happen if mal_device_start() and
// mal_device_stop() is called simultaneous on separate threads. This will never be returned in
// single-threaded applications.
// - MAL_DEVICE_ALREADY_STARTING
// The device is already in the process of starting. This will never be returned in single-threaded
// applications.
// - MAL_DEVICE_ALREADY_STARTED
// The device is already started.
// - MAL_FAILED_TO_READ_DATA_FROM_CLIENT
// Failed to read the initial chunk of audio data from the client. This initial chunk of data is
// required so that the device has valid audio data as soon as it starts playing. This will never
// be returned for capture devices.
// - MAL_FAILED_TO_START_BACKEND_DEVICE
// There was a backend-specific error starting the device.
//
// Thread Safety: SAFE
//
// Efficiency: LOW
// This API waits until the backend device has been started for real by the worker thread. It also
// waits on a mutex for thread-safety.
mal_result mal_device_start(mal_device* pDevice);
// Puts the device to sleep, but does not uninitialize it. Use mal_device_start() to start it up again.
//
// Return Value:
// - MAL_SUCCESS if successful; any other error code otherwise.
// - MAL_INVALID_ARGS
// One or more of the input arguments is invalid.
// - MAL_DEVICE_NOT_INITIALIZED
// The device is not currently or was never initialized.
// - MAL_DEVICE_BUSY
// The device is in the process of starting. This will only happen if mal_device_start() and
// mal_device_stop() is called simultaneous on separate threads. This will never be returned in
// single-threaded applications.
// - MAL_DEVICE_ALREADY_STOPPING
// The device is already in the process of stopping. This will never be returned in single-threaded
// applications.
// - MAL_DEVICE_ALREADY_STOPPED
// The device is already stopped.
// - MAL_FAILED_TO_STOP_BACKEND_DEVICE
// There was a backend-specific error stopping the device.
//
// Thread Safety: SAFE
//
// Efficiency: LOW
// This API needs to wait on the worker thread to stop the backend device properly before returning. It
// also waits on a mutex for thread-safety.
//
// In addition, some backends need to wait for the device to finish playback/recording of the current
// fragment which can take some time (usually proportionate to the buffer size used when initializing
// the device).
mal_result mal_device_stop(mal_device* pDevice);
// Determines whether or not the device is started.
//
// Return Value:
// True if the device is started, false otherwise.
//
// Thread Safety: SAFE
// If another thread calls mal_device_start() or mal_device_stop() at this same time as this function
// is called, there's a very small chance the return value will be out of sync.
//
// Efficiency: HIGH
// This is implemented with a simple accessor.
mal_bool32 mal_device_is_started(mal_device* pDevice);
// Retrieves the size of the buffer in bytes for the given device.
//
// Thread Safety: SAFE
// This is calculated from constant values which are set at initialization time and never change.
//
// Efficiency: HIGH
// This is implemented with just a few 32-bit integer multiplications.
mal_uint32 mal_device_get_buffer_size_in_bytes(mal_device* pDevice);
// Retrieves the size of a sample in bytes for the given format.
//
// Thread Safety: SAFE
// This is API is pure.
//
// Efficiency: HIGH
// This is implemented with a lookup table.
mal_uint32 mal_get_sample_size_in_bytes(mal_format format);
// Helper function for initializing a mal_context_config object.
mal_context_config mal_context_config_init(mal_log_proc onLog);
// Helper function for initializing a mal_device_config object.
//
// This is just a helper API, and as such the returned object can be safely modified as needed.
//
// The default channel mapping is based on the channel count, as per the table below. Note that these
// can be freely changed after this function returns if you are needing something in particular.
//
// |---------------|------------------------------|
// | Channel Count | Mapping |
// |---------------|------------------------------|
// | 1 (Mono) | 0: MAL_CHANNEL_FRONT_CENTER |
// |---------------|------------------------------|
// | 2 (Stereo) | 0: MAL_CHANNEL_FRONT_LEFT |
// | | 1: MAL_CHANNEL_FRONT_RIGHT |
// |---------------|------------------------------|
// | 3 (2.1) | 0: MAL_CHANNEL_FRONT_LEFT |
// | | 1: MAL_CHANNEL_FRONT_RIGHT |
// | | 2: MAL_CHANNEL_LFE |
// |---------------|------------------------------|
// | 4 (Quad) | 0: MAL_CHANNEL_FRONT_LEFT |
// | | 1: MAL_CHANNEL_FRONT_RIGHT |
// | | 2: MAL_CHANNEL_BACK_LEFT |
// | | 3: MAL_CHANNEL_BACK_RIGHT |
// |---------------|------------------------------|
// | 5 (4.1) | 0: MAL_CHANNEL_FRONT_LEFT |
// | | 1: MAL_CHANNEL_FRONT_RIGHT |
// | | 2: MAL_CHANNEL_BACK_LEFT |
// | | 3: MAL_CHANNEL_BACK_RIGHT |
// | | 4: MAL_CHANNEL_LFE |
// |---------------|------------------------------|
// | 6 (5.1) | 0: MAL_CHANNEL_FRONT_LEFT |
// | | 1: MAL_CHANNEL_FRONT_RIGHT |
// | | 2: MAL_CHANNEL_FRONT_CENTER |
// | | 3: MAL_CHANNEL_LFE |
// | | 4: MAL_CHANNEL_BACK_LEFT |
// | | 5: MAL_CHANNEL_BACK_RIGHT |
// |---------------|------------------------------|
// | 8 (7.1) | 0: MAL_CHANNEL_FRONT_LEFT |
// | | 1: MAL_CHANNEL_FRONT_RIGHT |
// | | 2: MAL_CHANNEL_FRONT_CENTER |
// | | 3: MAL_CHANNEL_LFE |
// | | 4: MAL_CHANNEL_BACK_LEFT |
// | | 5: MAL_CHANNEL_BACK_RIGHT |
// | | 6: MAL_CHANNEL_SIDE_LEFT |
// | | 7: MAL_CHANNEL_SIDE_RIGHT |
// |---------------|------------------------------|
// | Other | All channels set to 0. This |
// | | is equivalent to the same |
// | | mapping as the device. |
// |---------------|------------------------------|
//
// Thread Safety: SAFE
//
// Efficiency: HIGH
// This just returns a stack allocated object and consists of just a few assignments.
mal_device_config mal_device_config_init(mal_format format, mal_uint32 channels, mal_uint32 sampleRate, mal_recv_proc onRecvCallback, mal_send_proc onSendCallback);
// A simplified version of mal_device_config_init() for capture devices.
static inline mal_device_config mal_device_config_init_capture(mal_format format, mal_uint32 channels, mal_uint32 sampleRate, mal_recv_proc onRecvCallback) { return mal_device_config_init(format, channels, sampleRate, onRecvCallback, NULL); }
// A simplified version of mal_device_config_init() for playback devices.
static inline mal_device_config mal_device_config_init_playback(mal_format format, mal_uint32 channels, mal_uint32 sampleRate, mal_send_proc onSendCallback) { return mal_device_config_init(format, channels, sampleRate, NULL, onSendCallback); }
///////////////////////////////////////////////////////////////////////////////
//
// SRC
//
///////////////////////////////////////////////////////////////////////////////
// Initializes a sample rate conversion object.
mal_result mal_src_init(mal_src_config* pConfig, mal_src_read_proc onRead, void* pUserData, mal_src* pSRC);
// Dynamically adjusts the output sample rate.
//
// This is useful for dynamically adjust pitch. Keep in mind, however, that this will speed up or slow down the sound. If this
// is not acceptable you will need to use your own algorithm.
mal_result mal_src_set_output_sample_rate(mal_src* pSRC, mal_uint32 sampleRateOut);
// Reads a number of frames.
//
// Returns the number of frames actually read.
mal_uint32 mal_src_read_frames(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut);
// The same mal_src_read_frames() with extra control over whether or not the internal buffers should be flushed at the end.
//
// Internally there exists a buffer that keeps track of the previous and next samples for sample rate conversion. The simple
// version of this function does _not_ flush this buffer because otherwise it causes glitches for streaming based conversion
// pipelines. The problem, however, is that sometimes you need those last few samples (such as if you're doing a bulk conversion
// of a static file). Enabling flushing will fix this for you.
mal_uint32 mal_src_read_frames_ex(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush);
///////////////////////////////////////////////////////////////////////////////
//
// DSP
//
///////////////////////////////////////////////////////////////////////////////
// Initializes a DSP object.
mal_result mal_dsp_init(mal_dsp_config* pConfig, mal_dsp_read_proc onRead, void* pUserData, mal_dsp* pDSP);
// Dynamically adjusts the output sample rate.
//
// This is useful for dynamically adjust pitch. Keep in mind, however, that this will speed up or slow down the sound. If this
// is not acceptable you will need to use your own algorithm.
mal_result mal_dsp_set_output_sample_rate(mal_dsp* pDSP, mal_uint32 sampleRateOut);
// Reads a number of frames and runs them through the DSP processor.
//
// This this _not_ flush the internal buffers which means you may end up with a few less frames than you may expect. Look at
// mal_dsp_read_frames_ex() if you want to flush the buffers at the end of the read.
mal_uint32 mal_dsp_read_frames(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut);
// The same mal_dsp_read_frames() with extra control over whether or not the internal buffers should be flushed at the end.
//
// See documentation for mal_src_read_frames_ex() for an explanation on flushing.
mal_uint32 mal_dsp_read_frames_ex(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush);
// High-level helper for doing a full format conversion in one go. Returns the number of output frames. Call this with pOut set to NULL to
// determine the required size of the output buffer.
//
// A return value of 0 indicates an error.
//
// This function is useful for one-off bulk conversions, but if you're streaming data you should use the DSP APIs instead.
mal_uint32 mal_convert_frames(void* pOut, mal_format formatOut, mal_uint32 channelsOut, mal_uint32 sampleRateOut, const void* pIn, mal_format formatIn, mal_uint32 channelsIn, mal_uint32 sampleRateIn, mal_uint32 frameCountIn);
// Helper for initializing a mal_dsp_config object.
mal_dsp_config mal_dsp_config_init(mal_format formatIn, mal_uint32 channelsIn, mal_uint32 sampleRateIn, mal_format formatOut, mal_uint32 channelsOut, mal_uint32 sampleRateOut);
///////////////////////////////////////////////////////////////////////////////
//
// Utiltities
//
///////////////////////////////////////////////////////////////////////////////
// Creates a mutex.
//
// A mutex must be created from a valid context. A mutex is initially unlocked.
mal_result mal_mutex_init(mal_context* pContext, mal_mutex* pMutex);
// Deletes a mutex.
void mal_mutex_uninit(mal_mutex* pMutex);
// Locks a mutex with an infinite timeout.
void mal_mutex_lock(mal_mutex* pMutex);
// Unlocks a mutex.
void mal_mutex_unlock(mal_mutex* pMutex);
///////////////////////////////////////////////////////////////////////////////
//
// Miscellaneous Helpers
//
///////////////////////////////////////////////////////////////////////////////
// Retrieves a friendly name for a backend.
const char* mal_get_backend_name(mal_backend backend);
// Retrieves a friendly name for a format.
const char* mal_get_format_name(mal_format format);
// Blends two frames in floating point format.
void mal_blend_f32(float* pOut, float* pInA, float* pInB, float factor, mal_uint32 channels);
///////////////////////////////////////////////////////////////////////////////
//
// Format Conversion
//
///////////////////////////////////////////////////////////////////////////////
void mal_pcm_u8_to_s16(short* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_u8_to_s24(void* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_u8_to_s32(int* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_u8_to_f32(float* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_s16_to_u8(unsigned char* pOut, const short* pIn, unsigned int count);
void mal_pcm_s16_to_s24(void* pOut, const short* pIn, unsigned int count);
void mal_pcm_s16_to_s32(int* pOut, const short* pIn, unsigned int count);
void mal_pcm_s16_to_f32(float* pOut, const short* pIn, unsigned int count);
void mal_pcm_s24_to_u8(unsigned char* pOut, const void* pIn, unsigned int count);
void mal_pcm_s24_to_s16(short* pOut, const void* pIn, unsigned int count);
void mal_pcm_s24_to_s32(int* pOut, const void* pIn, unsigned int count);
void mal_pcm_s24_to_f32(float* pOut, const void* pIn, unsigned int count);
void mal_pcm_s32_to_u8(unsigned char* pOut, const int* pIn, unsigned int count);
void mal_pcm_s32_to_s16(short* pOut, const int* pIn, unsigned int count);
void mal_pcm_s32_to_s24(void* pOut, const int* pIn, unsigned int count);
void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count);
void mal_pcm_f32_to_u8(unsigned char* pOut, const float* pIn, unsigned int count);
void mal_pcm_f32_to_s16(short* pOut, const float* pIn, unsigned int count);
void mal_pcm_f32_to_s24(void* pOut, const float* pIn, unsigned int count);
void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count);
void mal_pcm_convert(void* pOut, mal_format formatOut, const void* pIn, mal_format formatIn, unsigned int sampleCount);
#ifdef __cplusplus
}
#endif
#endif //mini_al_h
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// IMPLEMENTATION
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_IMPLEMENTATION
#include <assert.h>
#ifdef MAL_WIN32
#include <windows.h>
#else
#include <stdlib.h> // For malloc()/free()
#include <string.h> // For memset()
#endif
#if defined(MAL_APPLE) && (__MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
#include <mach/mach_time.h> // For mach_absolute_time()
#endif
#ifdef MAL_POSIX
#include <unistd.h>
#include <dlfcn.h>
#endif
#if !defined(MAL_64BIT) && !defined(MAL_32BIT)
#ifdef _WIN32
#ifdef _WIN64
#define MAL_64BIT
#else
#define MAL_32BIT
#endif
#endif
#endif
#if !defined(MAL_64BIT) && !defined(MAL_32BIT)
#ifdef __GNUC__
#ifdef __LP64__
#define MAL_64BIT
#else
#define MAL_32BIT
#endif
#endif
#endif
#if !defined(MAL_64BIT) && !defined(MAL_32BIT)
#include <stdint.h>
#if INTPTR_MAX == INT64_MAX
#define MAL_64BIT
#else
#define MAL_32BIT
#endif
#endif
// Disable run-time linking on certain backends.
#ifndef MAL_NO_RUNTIME_LINKING
#if defined(MAL_ANDROID) || defined(MAL_EMSCRIPTEN)
#define MAL_NO_RUNTIME_LINKING
#endif
#endif
// Check if we have the necessary development packages for each backend at the top so we can use this to determine whether or not
// certain unused functions and variables can be excluded from the build to avoid warnings.
#ifdef MAL_ENABLE_WASAPI
#define MAL_HAS_WASAPI
#ifdef __has_include
#if !__has_include(<audioclient.h>)
#undef MAL_HAS_WASAPI
#endif
#endif
#endif
#ifdef MAL_ENABLE_DSOUND
#define MAL_HAS_DSOUND
#ifdef __has_include
#if !__has_include(<dsound.h>)
#undef MAL_HAS_DSOUND
#endif
#endif
#endif
#ifdef MAL_ENABLE_WINMM
#define MAL_HAS_WINMM // Every compiler I'm aware of supports WinMM.
#endif
#ifdef MAL_ENABLE_ALSA
#define MAL_HAS_ALSA
#ifdef __has_include
#if !__has_include(<alsa/asoundlib.h>)
#undef MAL_HAS_ALSA
#endif
#endif
#endif
#ifdef MAL_ENABLE_COREAUDIO
#define MAL_HAS_COREAUDIO
#endif
#ifdef MAL_ENABLE_OSS
#define MAL_HAS_OSS // OSS is the only supported backend for Unix and BSD, so it must be present else this library is useless.
#endif
#ifdef MAL_ENABLE_OPENSL
#define MAL_HAS_OPENSL // Like OSS, OpenSL is the only supported backend for Android. It must be present.
#endif
#ifdef MAL_ENABLE_OPENAL
#define MAL_HAS_OPENAL
#ifdef MAL_NO_RUNTIME_LINKING
#ifdef __has_include
#if !__has_include(<AL/al.h>)
#undef MAL_HAS_OPENAL
#endif
#endif
#endif
#endif
#ifdef MAL_ENABLE_SDL
#define MAL_HAS_SDL
// SDL headers are necessary if using compile-time linking.
#ifdef MAL_NO_RUNTIME_LINKING
#ifdef __has_include
#ifdef MAL_EMSCRIPTEN
#if !__has_include(<SDL/SDL_audio.h>)
#undef MAL_HAS_SDL
#endif
#else
#if !__has_include(<SDL2/SDL_audio.h>)
#undef MAL_HAS_SDL
#endif
#endif
#endif
#endif
#endif
#ifdef MAL_ENABLE_NULL
#define MAL_HAS_NULL // Everything supports the null backend.
#endif
#ifdef MAL_WIN32
#define MAL_THREADCALL WINAPI
typedef unsigned long mal_thread_result;
#else
#define MAL_THREADCALL
typedef void* mal_thread_result;
#endif
typedef mal_thread_result (MAL_THREADCALL * mal_thread_entry_proc)(void* pData);
#ifdef MAL_WIN32
typedef HRESULT (WINAPI * MAL_PFN_CoInitializeEx)(LPVOID pvReserved, DWORD dwCoInit);
typedef void (WINAPI * MAL_PFN_CoUninitialize)();
typedef HRESULT (WINAPI * MAL_PFN_CoCreateInstance)(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv);
typedef void (WINAPI * MAL_PFN_CoTaskMemFree)(LPVOID pv);
typedef HRESULT (WINAPI * MAL_PFN_PropVariantClear)(PROPVARIANT *pvar);
typedef HWND (WINAPI * MAL_PFN_GetForegroundWindow)();
typedef HWND (WINAPI * MAL_PFN_GetDesktopWindow)();
#endif
#define MAL_STATE_UNINITIALIZED 0
#define MAL_STATE_STOPPED 1 // The device's default state after initialization.
#define MAL_STATE_STARTED 2 // The worker thread is in it's main loop waiting for the driver to request or deliver audio data.
#define MAL_STATE_STARTING 3 // Transitioning from a stopped state to started.
#define MAL_STATE_STOPPING 4 // Transitioning from a started state to stopped.
// The default size of the device's buffer in milliseconds.
//
// If this is too small you may get underruns and overruns in which case you'll need to either increase
// this value or use an explicit buffer size.
#ifndef MAL_DEFAULT_BUFFER_SIZE_IN_MILLISECONDS
#define MAL_DEFAULT_BUFFER_SIZE_IN_MILLISECONDS 25
#endif
// Default periods when none is specified in mal_device_init(). More periods means more work on the CPU.
#ifndef MAL_DEFAULT_PERIODS
#define MAL_DEFAULT_PERIODS 2
#endif
///////////////////////////////////////////////////////////////////////////////
//
// Standard Library Stuff
//
///////////////////////////////////////////////////////////////////////////////
#ifndef mal_zero_memory
#ifdef MAL_WIN32
#define mal_zero_memory(p, sz) ZeroMemory((p), (sz))
#else
#define mal_zero_memory(p, sz) memset((p), 0, (sz))
#endif
#endif
#define mal_zero_object(p) mal_zero_memory((p), sizeof(*(p)))
#ifndef mal_copy_memory
#ifdef MAL_WIN32
#define mal_copy_memory(dst, src, sz) CopyMemory((dst), (src), (sz))
#else
#define mal_copy_memory(dst, src, sz) memcpy((dst), (src), (sz))
#endif
#endif
#ifndef mal_malloc
#ifdef MAL_WIN32
#define mal_malloc(sz) HeapAlloc(GetProcessHeap(), 0, (sz))
#else
#define mal_malloc(sz) malloc((sz))
#endif
#endif
#ifndef mal_realloc
#ifdef MAL_WIN32
#define mal_realloc(p, sz) (((sz) > 0) ? ((p) ? HeapReAlloc(GetProcessHeap(), 0, (p), (sz)) : HeapAlloc(GetProcessHeap(), 0, (sz))) : ((VOID*)(SIZE_T)(HeapFree(GetProcessHeap(), 0, (p)) & 0)))
#else
#define mal_realloc(p, sz) realloc((p), (sz))
#endif
#endif
#ifndef mal_free
#ifdef MAL_WIN32
#define mal_free(p) HeapFree(GetProcessHeap(), 0, (p))
#else
#define mal_free(p) free((p))
#endif
#endif
#ifndef mal_assert
#ifdef MAL_WIN32
#define mal_assert(condition) assert(condition)
#else
#define mal_assert(condition) assert(condition)
#endif
#endif
#define mal_countof(x) (sizeof(x) / sizeof(x[0]))
#define mal_max(x, y) (((x) > (y)) ? (x) : (y))
#define mal_min(x, y) (((x) < (y)) ? (x) : (y))
#define mal_buffer_frame_capacity(buffer, channels, format) (sizeof(buffer) / mal_get_sample_size_in_bytes(format) / (channels))
// Some of these string utility functions are unused on some platforms.
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4505)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
// Return Values:
// 0: Success
// 22: EINVAL
// 34: ERANGE
//
// Not using symbolic constants for errors because I want to avoid #including errno.h
static int mal_strcpy_s(char* dst, size_t dstSizeInBytes, const char* src)
{
if (dst == 0) {
return 22;
}
if (dstSizeInBytes == 0) {
return 34;
}
if (src == 0) {
dst[0] = '\0';
return 22;
}
size_t i;
for (i = 0; i < dstSizeInBytes && src[i] != '\0'; ++i) {
dst[i] = src[i];
}
if (i < dstSizeInBytes) {
dst[i] = '\0';
return 0;
}
dst[0] = '\0';
return 34;
}
static int mal_strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t count)
{
if (dst == 0) {
return 22;
}
if (dstSizeInBytes == 0) {
return 34;
}
if (src == 0) {
dst[0] = '\0';
return 22;
}
size_t maxcount = count;
if (count == ((size_t)-1) || count >= dstSizeInBytes) { // -1 = _TRUNCATE
maxcount = dstSizeInBytes - 1;
}
size_t i;
for (i = 0; i < maxcount && src[i] != '\0'; ++i) {
dst[i] = src[i];
}
if (src[i] == '\0' || i == count || count == ((size_t)-1)) {
dst[i] = '\0';
return 0;
}
dst[0] = '\0';
return 34;
}
static int mal_strcat_s(char* dst, size_t dstSizeInBytes, const char* src)
{
if (dst == 0) {
return 22;
}
if (dstSizeInBytes == 0) {
return 34;
}
if (src == 0) {
dst[0] = '\0';
return 22;
}
char* dstorig = dst;
while (dstSizeInBytes > 0 && dst[0] != '\0') {
dst += 1;
dstSizeInBytes -= 1;
}
if (dstSizeInBytes == 0) {
return 22; // Unterminated.
}
while (dstSizeInBytes > 0 && src[0] != '\0') {
*dst++ = *src++;
dstSizeInBytes -= 1;
}
if (dstSizeInBytes > 0) {
dst[0] = '\0';
} else {
dstorig[0] = '\0';
return 34;
}
return 0;
}
static int mal_itoa_s(int value, char* dst, size_t dstSizeInBytes, int radix)
{
if (dst == NULL || dstSizeInBytes == 0) {
return 22;
}
if (radix < 2 || radix > 36) {
dst[0] = '\0';
return 22;
}
int sign = (value < 0 && radix == 10) ? -1 : 1; // The negative sign is only used when the base is 10.
unsigned int valueU;
if (value < 0) {
valueU = -value;
} else {
valueU = value;
}
char* dstEnd = dst;
do
{
int remainder = valueU % radix;
if (remainder > 9) {
*dstEnd = (char)((remainder - 10) + 'a');
} else {
*dstEnd = (char)(remainder + '0');
}
dstEnd += 1;
dstSizeInBytes -= 1;
valueU /= radix;
} while (dstSizeInBytes > 0 && valueU > 0);
if (dstSizeInBytes == 0) {
dst[0] = '\0';
return 22; // Ran out of room in the output buffer.
}
if (sign < 0) {
*dstEnd++ = '-';
dstSizeInBytes -= 1;
}
if (dstSizeInBytes == 0) {
dst[0] = '\0';
return 22; // Ran out of room in the output buffer.
}
*dstEnd = '\0';
// At this point the string will be reversed.
dstEnd -= 1;
while (dst < dstEnd) {
char temp = *dst;
*dst = *dstEnd;
*dstEnd = temp;
dst += 1;
dstEnd -= 1;
}
return 0;
}
static int mal_strcmp(const char* str1, const char* str2)
{
if (str1 == str2) return 0;
// These checks differ from the standard implementation. It's not important, but I prefer
// it just for sanity.
if (str1 == NULL) return -1;
if (str2 == NULL) return 1;
for (;;) {
if (str1[0] == '\0') {
break;
}
if (str1[0] != str2[0]) {
break;
}
str1 += 1;
str2 += 1;
}
return ((unsigned char*)str1)[0] - ((unsigned char*)str2)[0];
}
#if defined(_MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
// Thanks to good old Bit Twiddling Hacks for this one: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
static inline unsigned int mal_next_power_of_2(unsigned int x)
{
x--;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
x++;
return x;
}
static inline unsigned int mal_prev_power_of_2(unsigned int x)
{
return mal_next_power_of_2(x) >> 1;
}
static inline unsigned int mal_round_to_power_of_2(unsigned int x)
{
unsigned int prev = mal_prev_power_of_2(x);
unsigned int next = mal_next_power_of_2(x);
if ((next - x) > (x - prev)) {
return prev;
} else {
return next;
}
}
// Clamps an f32 sample to -1..1
static inline float mal_clip_f32(float x)
{
if (x < -1) return -1;
if (x > +1) return +1;
return x;
}
static inline float mal_mix_f32(float x, float y, float a)
{
return x*(1-a) + y*a;
}
///////////////////////////////////////////////////////////////////////////////
//
// Atomics
//
///////////////////////////////////////////////////////////////////////////////
#if defined(_WIN32) && !defined(__GNUC__)
#define mal_memory_barrier() MemoryBarrier()
#define mal_atomic_exchange_32(a, b) InterlockedExchange((LONG*)a, (LONG)b)
#define mal_atomic_exchange_64(a, b) InterlockedExchange64((LONGLONG*)a, (LONGLONG)b)
#define mal_atomic_increment_32(a) InterlockedIncrement((LONG*)a)
#define mal_atomic_decrement_32(a) InterlockedDecrement((LONG*)a)
#else
#define mal_memory_barrier() __sync_synchronize()
#define mal_atomic_exchange_32(a, b) (void)__sync_lock_test_and_set(a, b); __sync_synchronize()
#define mal_atomic_exchange_64(a, b) (void)__sync_lock_test_and_set(a, b); __sync_synchronize()
#define mal_atomic_increment_32(a) __sync_add_and_fetch(a, 1)
#define mal_atomic_decrement_32(a) __sync_sub_and_fetch(a, 1)
#endif
#ifdef MAL_64BIT
#define mal_atomic_exchange_ptr mal_atomic_exchange_64
#endif
#ifdef MAL_32BIT
#define mal_atomic_exchange_ptr mal_atomic_exchange_32
#endif
///////////////////////////////////////////////////////////////////////////////
//
// Timing
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_WIN32
static LARGE_INTEGER g_mal_TimerFrequency = {{0}};
void mal_timer_init(mal_timer* pTimer)
{
if (g_mal_TimerFrequency.QuadPart == 0) {
QueryPerformanceFrequency(&g_mal_TimerFrequency);
}
LARGE_INTEGER counter;
QueryPerformanceCounter(&counter);
pTimer->counter = (mal_uint64)counter.QuadPart;
}
double mal_timer_get_time_in_seconds(mal_timer* pTimer)
{
LARGE_INTEGER counter;
if (!QueryPerformanceCounter(&counter)) {
return 0;
}
return (counter.QuadPart - pTimer->counter) / (double)g_mal_TimerFrequency.QuadPart;
}
#elif defined(MAL_APPLE) && (__MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
static uint64_t g_mal_TimerFrequency = 0;
void mal_timer_init(mal_timer* pTimer)
{
mach_timebase_info_data_t baseTime;
mach_timebase_info(&baseTime);
g_mal_TimerFrequency = (baseTime.denom * 1e9) / baseTime.numer;
pTimer->counter = mach_absolute_time();
}
double mal_timer_get_time_in_seconds(mal_timer* pTimer)
{
uint64_t newTimeCounter = mach_absolute_time();
uint64_t oldTimeCounter = pTimer->counter;
return (newTimeCounter - oldTimeCounter) / g_mal_TimerFrequency;
}
#else
void mal_timer_init(mal_timer* pTimer)
{
struct timespec newTime;
clock_gettime(CLOCK_MONOTONIC, &newTime);
pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;
}
double mal_timer_get_time_in_seconds(mal_timer* pTimer)
{
struct timespec newTime;
clock_gettime(CLOCK_MONOTONIC, &newTime);
uint64_t newTimeCounter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;
uint64_t oldTimeCounter = pTimer->counter;
return (newTimeCounter - oldTimeCounter) / 1000000000.0;
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// Dynamic Linking
//
///////////////////////////////////////////////////////////////////////////////
mal_handle mal_dlopen(const char* filename)
{
#ifdef _WIN32
#ifdef MAL_WIN32_DESKTOP
return (mal_handle)LoadLibraryA(filename);
#else
// *sigh* It appears there is no ANSI version of LoadPackagedLibrary()...
WCHAR filenameW[4096];
if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, sizeof(filenameW)) == 0) {
return NULL;
}
return (mal_handle)LoadPackagedLibrary(filenameW, 0);
#endif
#else
return (mal_handle)dlopen(filename, RTLD_NOW);
#endif
}
void mal_dlclose(mal_handle handle)
{
#ifdef _WIN32
FreeLibrary((HMODULE)handle);
#else
dlclose((void*)handle);
#endif
}
mal_proc mal_dlsym(mal_handle handle, const char* symbol)
{
#ifdef _WIN32
return (mal_proc)GetProcAddress((HMODULE)handle, symbol);
#else
return (mal_proc)dlsym((void*)handle, symbol);
#endif
}
///////////////////////////////////////////////////////////////////////////////
//
// Threading
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_WIN32
mal_result mal_thread_create__win32(mal_context* pContext, mal_thread* pThread, mal_thread_entry_proc entryProc, void* pData)
{
(void)pContext;
pThread->win32.hThread = CreateThread(NULL, 0, entryProc, pData, 0, NULL);
if (pThread->win32.hThread == NULL) {
return MAL_FAILED_TO_CREATE_THREAD;
}
return MAL_SUCCESS;
}
void mal_thread_wait__win32(mal_thread* pThread)
{
WaitForSingleObject(pThread->win32.hThread, INFINITE);
}
void mal_sleep__win32(mal_uint32 milliseconds)
{
Sleep((DWORD)milliseconds);
}
mal_result mal_mutex_init__win32(mal_context* pContext, mal_mutex* pMutex)
{
(void)pContext;
pMutex->win32.hMutex = CreateEventA(NULL, FALSE, TRUE, NULL);
if (pMutex->win32.hMutex == NULL) {
return MAL_FAILED_TO_CREATE_MUTEX;
}
return MAL_SUCCESS;
}
void mal_mutex_uninit__win32(mal_mutex* pMutex)
{
CloseHandle(pMutex->win32.hMutex);
}
void mal_mutex_lock__win32(mal_mutex* pMutex)
{
WaitForSingleObject(pMutex->win32.hMutex, INFINITE);
}
void mal_mutex_unlock__win32(mal_mutex* pMutex)
{
SetEvent(pMutex->win32.hMutex);
}
mal_result mal_event_init__win32(mal_context* pContext, mal_event* pEvent)
{
(void)pContext;
pEvent->win32.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
if (pEvent->win32.hEvent == NULL) {
return MAL_FAILED_TO_CREATE_EVENT;
}
return MAL_SUCCESS;
}
void mal_event_uninit__win32(mal_event* pEvent)
{
CloseHandle(pEvent->win32.hEvent);
}
mal_bool32 mal_event_wait__win32(mal_event* pEvent)
{
return WaitForSingleObject(pEvent->win32.hEvent, INFINITE) == WAIT_OBJECT_0;
}
mal_bool32 mal_event_signal__win32(mal_event* pEvent)
{
return SetEvent(pEvent->win32.hEvent);
}
#endif
#ifdef MAL_POSIX
typedef int (* mal_pthread_create_proc)(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg);
typedef int (* mal_pthread_join_proc)(pthread_t thread, void **retval);
typedef int (* mal_pthread_mutex_init_proc)(pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr);
typedef int (* mal_pthread_mutex_destroy_proc)(pthread_mutex_t *__mutex);
typedef int (* mal_pthread_mutex_lock_proc)(pthread_mutex_t *__mutex);
typedef int (* mal_pthread_mutex_unlock_proc)(pthread_mutex_t *__mutex);
typedef int (* mal_pthread_cond_init_proc)(pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr);
typedef int (* mal_pthread_cond_destroy_proc)(pthread_cond_t *__cond);
typedef int (* mal_pthread_cond_signal_proc)(pthread_cond_t *__cond);
typedef int (* mal_pthread_cond_wait_proc)(pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex);
mal_bool32 mal_thread_create__posix(mal_context* pContext, mal_thread* pThread, mal_thread_entry_proc entryProc, void* pData)
{
int result = ((mal_pthread_create_proc)pContext->posix.pthread_create)(&pThread->posix.thread, NULL, entryProc, pData);
if (result != 0) {
return MAL_FAILED_TO_CREATE_THREAD;
}
return MAL_SUCCESS;
}
void mal_thread_wait__posix(mal_thread* pThread)
{
((mal_pthread_join_proc)pThread->pContext->posix.pthread_join)(pThread->posix.thread, NULL);
}
void mal_sleep__posix(mal_uint32 milliseconds)
{
usleep(milliseconds * 1000); // <-- usleep is in microseconds.
}
mal_result mal_mutex_init__posix(mal_context* pContext, mal_mutex* pMutex)
{
int result = ((mal_pthread_mutex_init_proc)pContext->posix.pthread_mutex_init)(&pMutex->posix.mutex, NULL);
if (result != 0) {
return MAL_FAILED_TO_CREATE_MUTEX;
}
return MAL_SUCCESS;
}
void mal_mutex_uninit__posix(mal_mutex* pMutex)
{
((mal_pthread_mutex_destroy_proc)pMutex->pContext->posix.pthread_mutex_destroy)(&pMutex->posix.mutex);
}
void mal_mutex_lock__posix(mal_mutex* pMutex)
{
((mal_pthread_mutex_lock_proc)pMutex->pContext->posix.pthread_mutex_lock)(&pMutex->posix.mutex);
}
void mal_mutex_unlock__posix(mal_mutex* pMutex)
{
((mal_pthread_mutex_unlock_proc)pMutex->pContext->posix.pthread_mutex_unlock)(&pMutex->posix.mutex);
}
mal_result mal_event_init__posix(mal_context* pContext, mal_event* pEvent)
{
if (((mal_pthread_mutex_init_proc)pContext->posix.pthread_mutex_init)(&pEvent->posix.mutex, NULL) != 0) {
return MAL_FAILED_TO_CREATE_MUTEX;
}
if (((mal_pthread_cond_init_proc)pContext->posix.pthread_cond_init)(&pEvent->posix.condition, NULL) != 0) {
return MAL_FAILED_TO_CREATE_EVENT;
}
pEvent->posix.value = 0;
return MAL_SUCCESS;
}
void mal_event_uninit__posix(mal_event* pEvent)
{
((mal_pthread_cond_destroy_proc)pEvent->pContext->posix.pthread_cond_destroy)(&pEvent->posix.condition);
((mal_pthread_mutex_destroy_proc)pEvent->pContext->posix.pthread_mutex_destroy)(&pEvent->posix.mutex);
}
mal_bool32 mal_event_wait__posix(mal_event* pEvent)
{
((mal_pthread_mutex_lock_proc)pEvent->pContext->posix.pthread_mutex_lock)(&pEvent->posix.mutex);
{
while (pEvent->posix.value == 0) {
((mal_pthread_cond_wait_proc)pEvent->pContext->posix.pthread_cond_wait)(&pEvent->posix.condition, &pEvent->posix.mutex);
}
pEvent->posix.value = 0; // Auto-reset.
}
((mal_pthread_mutex_unlock_proc)pEvent->pContext->posix.pthread_mutex_unlock)(&pEvent->posix.mutex);
return MAL_TRUE;
}
mal_bool32 mal_event_signal__posix(mal_event* pEvent)
{
((mal_pthread_mutex_lock_proc)pEvent->pContext->posix.pthread_mutex_lock)(&pEvent->posix.mutex);
{
pEvent->posix.value = 1;
((mal_pthread_cond_signal_proc)pEvent->pContext->posix.pthread_cond_signal)(&pEvent->posix.condition);
}
((mal_pthread_mutex_unlock_proc)pEvent->pContext->posix.pthread_mutex_unlock)(&pEvent->posix.mutex);
return MAL_TRUE;
}
#endif
mal_result mal_thread_create(mal_context* pContext, mal_thread* pThread, mal_thread_entry_proc entryProc, void* pData)
{
if (pContext == NULL || pThread == NULL || entryProc == NULL) return MAL_FALSE;
pThread->pContext = pContext;
#ifdef MAL_WIN32
return mal_thread_create__win32(pContext, pThread, entryProc, pData);
#endif
#ifdef MAL_POSIX
return mal_thread_create__posix(pContext, pThread, entryProc, pData);
#endif
}
void mal_thread_wait(mal_thread* pThread)
{
if (pThread == NULL) return;
#ifdef MAL_WIN32
mal_thread_wait__win32(pThread);
#endif
#ifdef MAL_POSIX
mal_thread_wait__posix(pThread);
#endif
}
void mal_sleep(mal_uint32 milliseconds)
{
#ifdef MAL_WIN32
mal_sleep__win32(milliseconds);
#endif
#ifdef MAL_POSIX
mal_sleep__posix(milliseconds);
#endif
}
mal_result mal_mutex_init(mal_context* pContext, mal_mutex* pMutex)
{
if (pContext == NULL || pMutex == NULL) return MAL_INVALID_ARGS;
pMutex->pContext = pContext;
#ifdef MAL_WIN32
return mal_mutex_init__win32(pContext, pMutex);
#endif
#ifdef MAL_POSIX
return mal_mutex_init__posix(pContext, pMutex);
#endif
}
void mal_mutex_uninit(mal_mutex* pMutex)
{
if (pMutex == NULL || pMutex->pContext == NULL) return;
#ifdef MAL_WIN32
mal_mutex_uninit__win32(pMutex);
#endif
#ifdef MAL_POSIX
mal_mutex_uninit__posix(pMutex);
#endif
}
void mal_mutex_lock(mal_mutex* pMutex)
{
if (pMutex == NULL || pMutex->pContext == NULL) return;
#ifdef MAL_WIN32
mal_mutex_lock__win32(pMutex);
#endif
#ifdef MAL_POSIX
mal_mutex_lock__posix(pMutex);
#endif
}
void mal_mutex_unlock(mal_mutex* pMutex)
{
if (pMutex == NULL || pMutex->pContext == NULL) return;
#ifdef MAL_WIN32
mal_mutex_unlock__win32(pMutex);
#endif
#ifdef MAL_POSIX
mal_mutex_unlock__posix(pMutex);
#endif
}
mal_result mal_event_init(mal_context* pContext, mal_event* pEvent)
{
if (pContext == NULL || pEvent == NULL) return MAL_FALSE;
pEvent->pContext = pContext;
#ifdef MAL_WIN32
return mal_event_init__win32(pContext, pEvent);
#endif
#ifdef MAL_POSIX
return mal_event_init__posix(pContext, pEvent);
#endif
}
void mal_event_uninit(mal_event* pEvent)
{
if (pEvent == NULL || pEvent->pContext == NULL) return;
#ifdef MAL_WIN32
mal_event_uninit__win32(pEvent);
#endif
#ifdef MAL_POSIX
mal_event_uninit__posix(pEvent);
#endif
}
mal_bool32 mal_event_wait(mal_event* pEvent)
{
if (pEvent == NULL || pEvent->pContext == NULL) return MAL_FALSE;
#ifdef MAL_WIN32
return mal_event_wait__win32(pEvent);
#endif
#ifdef MAL_POSIX
return mal_event_wait__posix(pEvent);
#endif
}
mal_bool32 mal_event_signal(mal_event* pEvent)
{
if (pEvent == NULL || pEvent->pContext == NULL) return MAL_FALSE;
#ifdef MAL_WIN32
return mal_event_signal__win32(pEvent);
#endif
#ifdef MAL_POSIX
return mal_event_signal__posix(pEvent);
#endif
}
// Posts a log message.
static void mal_log(mal_context* pContext, mal_device* pDevice, const char* message)
{
if (pContext == NULL) return;
mal_log_proc onLog = pContext->config.onLog;
if (onLog) {
onLog(pContext, pDevice, message);
}
}
// Posts an error. Throw a breakpoint in here if you're needing to debug. The return value is always "resultCode".
static mal_result mal_context_post_error(mal_context* pContext, mal_device* pDevice, const char* message, mal_result resultCode)
{
// Derive the context from the device if necessary.
if (pContext == NULL) {
if (pDevice != NULL) {
pContext = pDevice->pContext;
}
}
mal_log(pContext, pDevice, message);
return resultCode;
}
static mal_result mal_post_error(mal_device* pDevice, const char* message, mal_result resultCode)
{
return mal_context_post_error(NULL, pDevice, message, resultCode);
}
#if !defined(MAL_ANDROID)
static void mal_get_default_channel_mapping(mal_backend backend, mal_uint32 channels, mal_channel channelMap[MAL_MAX_CHANNELS])
{
if (channels == 1) { // Mono
channelMap[0] = MAL_CHANNEL_FRONT_CENTER;
} else if (channels == 2) { // Stereo
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
} else if (channels == 3) { // 2.1
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
channelMap[2] = MAL_CHANNEL_LFE;
} else if (channels == 4) { // 4.0
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
channelMap[2] = MAL_CHANNEL_SIDE_LEFT;
channelMap[3] = MAL_CHANNEL_SIDE_RIGHT;
} else if (channels == 5) { // Not sure about this one. 4.1?
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
channelMap[2] = MAL_CHANNEL_SIDE_LEFT;
channelMap[3] = MAL_CHANNEL_SIDE_RIGHT;
channelMap[4] = MAL_CHANNEL_LFE;
} else if (channels >= 6) { // 5.1
// Some backends use different default layouts.
if (backend == mal_backend_wasapi || backend == mal_backend_dsound || backend == mal_backend_winmm || backend == mal_backend_oss) {
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
channelMap[2] = MAL_CHANNEL_FRONT_CENTER;
channelMap[3] = MAL_CHANNEL_LFE;
channelMap[4] = MAL_CHANNEL_SIDE_LEFT;
channelMap[5] = MAL_CHANNEL_SIDE_RIGHT;
} else {
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
channelMap[2] = MAL_CHANNEL_SIDE_LEFT;
channelMap[3] = MAL_CHANNEL_SIDE_RIGHT;
channelMap[4] = MAL_CHANNEL_FRONT_CENTER;
channelMap[5] = MAL_CHANNEL_LFE;
}
if (channels == 7) { // Not sure about this one.
channelMap[6] = MAL_CHANNEL_BACK_CENTER;
} else {
// I don't know what mapping to use in this case, but I'm making it upwards compatible with 7.1. Good luck!
mal_assert(channels >= 8);
channelMap[6] = MAL_CHANNEL_BACK_LEFT;
channelMap[7] = MAL_CHANNEL_BACK_RIGHT;
// Beyond 7.1 I'm just guessing...
if (channels == 9) {
channelMap[8] = MAL_CHANNEL_BACK_CENTER;
} else if (channels == 10) {
channelMap[8] = MAL_CHANNEL_FRONT_LEFT_CENTER;
channelMap[9] = MAL_CHANNEL_FRONT_RIGHT_CENTER;
} else if (channels == 11) {
channelMap[ 8] = MAL_CHANNEL_FRONT_LEFT_CENTER;
channelMap[ 9] = MAL_CHANNEL_FRONT_RIGHT_CENTER;
channelMap[10] = MAL_CHANNEL_BACK_CENTER;
} else {
mal_assert(channels >= 12);
for (mal_uint8 iChannel = 11; iChannel < channels && iChannel < MAL_MAX_CHANNELS; ++iChannel) {
channelMap[iChannel] = iChannel + 1;
}
}
}
}
}
#endif
// The callback for reading from the client -> DSP -> device.
static inline mal_uint32 mal_device__on_read_from_client(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut, void* pUserData)
{
(void)pDSP;
mal_device* pDevice = (mal_device*)pUserData;
mal_assert(pDevice != NULL);
mal_send_proc onSend = pDevice->onSend;
if (onSend) {
return onSend(pDevice, frameCount, pFramesOut);
}
return 0;
}
// The callback for reading from the device -> DSP -> client.
static inline mal_uint32 mal_device__on_read_from_device(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut, void* pUserData)
{
(void)pDSP;
mal_device* pDevice = (mal_device*)pUserData;
mal_assert(pDevice != NULL);
if (pDevice->_dspFrameCount == 0) {
return 0; // Nothing left.
}
mal_uint32 framesToRead = frameCount;
if (framesToRead > pDevice->_dspFrameCount) {
framesToRead = pDevice->_dspFrameCount;
}
mal_uint32 bytesToRead = framesToRead * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
mal_copy_memory(pFramesOut, pDevice->_dspFrames, bytesToRead);
pDevice->_dspFrameCount -= framesToRead;
pDevice->_dspFrames += bytesToRead;
return framesToRead;
}
// A helper function for reading sample data from the client. Returns the number of samples read from the client. Remaining samples
// are filled with silence.
static inline mal_uint32 mal_device__read_frames_from_client(mal_device* pDevice, mal_uint32 frameCount, void* pSamples)
{
mal_assert(pDevice != NULL);
mal_assert(frameCount > 0);
mal_assert(pSamples != NULL);
mal_uint32 framesRead = mal_dsp_read_frames(&pDevice->dsp, frameCount, pSamples);
mal_uint32 samplesRead = framesRead * pDevice->internalChannels;
mal_uint32 sampleSize = mal_get_sample_size_in_bytes(pDevice->internalFormat);
mal_uint32 consumedBytes = samplesRead*sampleSize;
mal_uint32 remainingBytes = ((frameCount * pDevice->internalChannels) - samplesRead)*sampleSize;
mal_zero_memory((mal_uint8*)pSamples + consumedBytes, remainingBytes);
return samplesRead;
}
// A helper for sending sample data to the client.
static inline void mal_device__send_frames_to_client(mal_device* pDevice, mal_uint32 frameCount, const void* pSamples)
{
mal_assert(pDevice != NULL);
mal_assert(frameCount > 0);
mal_assert(pSamples != NULL);
mal_recv_proc onRecv = pDevice->onRecv;
if (onRecv) {
pDevice->_dspFrameCount = frameCount;
pDevice->_dspFrames = (const mal_uint8*)pSamples;
mal_uint8 chunkBuffer[4096];
mal_uint32 chunkFrameCount = sizeof(chunkBuffer) / mal_get_sample_size_in_bytes(pDevice->format) / pDevice->channels;
for (;;) {
mal_uint32 framesJustRead = mal_dsp_read_frames(&pDevice->dsp, chunkFrameCount, chunkBuffer);
if (framesJustRead == 0) {
break;
}
onRecv(pDevice, framesJustRead, chunkBuffer);
if (framesJustRead < chunkFrameCount) {
break;
}
}
}
}
// A helper for changing the state of the device.
static inline void mal_device__set_state(mal_device* pDevice, mal_uint32 newState)
{
mal_atomic_exchange_32(&pDevice->state, newState);
}
// A helper for getting the state of the device.
static inline mal_uint32 mal_device__get_state(mal_device* pDevice)
{
return pDevice->state;
}
#ifdef MAL_WIN32
#if defined(MAL_HAS_WASAPI) || defined(MAL_HAS_DSOUND)
static GUID MAL_GUID_KSDATAFORMAT_SUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
static GUID MAL_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = {0x00000003, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
//static GUID MAL_GUID_KSDATAFORMAT_SUBTYPE_ALAW = {0x00000006, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
//static GUID MAL_GUID_KSDATAFORMAT_SUBTYPE_MULAW = {0x00000007, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
#endif
#endif
// Generic function for retrieving the name of a device by it's ID.
//
// This function simply enumerates every device and then retrieves the name of the first device that has the same ID.
static mal_result mal_context__try_get_device_name_by_id(mal_context* pContext, mal_device_type type, const mal_device_id* pDeviceID, char* pName, size_t nameBufferSize)
{
mal_assert(pContext != NULL);
mal_assert(pName != NULL);
if (pDeviceID == NULL) {
return MAL_NO_DEVICE;
}
mal_uint32 deviceCount;
mal_result result = mal_enumerate_devices(pContext, type, &deviceCount, NULL);
if (result != MAL_SUCCESS) {
return result;
}
mal_device_info* pInfos = (mal_device_info*)mal_malloc(sizeof(*pInfos) * deviceCount);
if (pInfos == NULL) {
return MAL_OUT_OF_MEMORY;
}
result = mal_enumerate_devices(pContext, type, &deviceCount, pInfos);
if (result != MAL_SUCCESS) {
mal_free(pInfos);
return result;
}
mal_bool32 found = MAL_FALSE;
for (mal_uint32 iDevice = 0; iDevice < deviceCount; ++iDevice) {
// Prefer backend specific comparisons for efficiency and accuracy, but fall back to a generic method if a backend-specific comparison
// is not implemented.
switch (pContext->backend)
{
#ifdef MAL_HAS_WASAPI
case mal_backend_wasapi:
{
if (memcmp(pDeviceID->wasapi, &pInfos[iDevice].id.wasapi, sizeof(pDeviceID->wasapi)) == 0) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_DSOUND
case mal_backend_dsound:
{
if (memcmp(pDeviceID->dsound, &pInfos[iDevice].id.dsound, sizeof(pDeviceID->dsound)) == 0) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_WINMM
case mal_backend_winmm:
{
if (pInfos[iDevice].id.winmm == pDeviceID->winmm) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_ALSA
case mal_backend_alsa:
{
if (mal_strcmp(pInfos[iDevice].id.alsa, pDeviceID->alsa) == 0) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_COREAUDIO
//case mal_backend_coreaudio:
//{
// // TODO: Implement me.
//} break;
#endif
#ifdef MAL_HAS_OSS
case mal_backend_oss:
{
if (mal_strcmp(pInfos[iDevice].id.oss, pDeviceID->oss) == 0) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_OPENSL
case mal_backend_opensl:
{
if (pInfos[iDevice].id.opensl == pDeviceID->opensl) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_OPENAL
case mal_backend_openal:
{
if (mal_strcmp(pInfos[iDevice].id.openal, pDeviceID->openal) == 0) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_SDL
case mal_backend_sdl:
{
if (pInfos[iDevice].id.sdl == pDeviceID->sdl) {
found = MAL_TRUE;
}
} break;
#endif
#ifdef MAL_HAS_NULL
case mal_backend_null:
{
if (pInfos[iDevice].id.nullbackend == pDeviceID->nullbackend) {
found = MAL_TRUE;
}
} break;
#endif
// Fall back to a generic memory comparison.
default:
{
if (memcmp(pDeviceID, &pInfos[iDevice].id, sizeof(*pDeviceID)) == 0) {
found = MAL_TRUE;
}
} break;
}
if (found) {
mal_strncpy_s(pName, nameBufferSize, pInfos[iDevice].name, (size_t)-1);
result = MAL_SUCCESS;
break;
}
}
mal_free(pInfos);
return result;
}
///////////////////////////////////////////////////////////////////////////////
//
// Null Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_NULL
mal_result mal_context_init__null(mal_context* pContext)
{
mal_assert(pContext != NULL);
// The null backend always works.
(void)pContext;
return MAL_SUCCESS;
}
mal_result mal_context_uninit__null(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_null);
(void)pContext;
return MAL_SUCCESS;
}
static mal_result mal_enumerate_devices__null(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 1; // There's only one "device" each for playback and recording for the null backend.
if (pInfo != NULL && infoSize > 0) {
mal_zero_object(pInfo);
if (type == mal_device_type_playback) {
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "NULL Playback Device", (size_t)-1);
} else {
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "NULL Capture Device", (size_t)-1);
}
}
return MAL_SUCCESS;
}
static void mal_device_uninit__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_free(pDevice->null_device.pBuffer);
}
static mal_result mal_device_init__null(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
(void)type;
(void)pDeviceID;
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->null_device);
pDevice->bufferSizeInFrames = pConfig->bufferSizeInFrames;
pDevice->periods = pConfig->periods;
pDevice->null_device.pBuffer = (mal_uint8*)mal_malloc(pDevice->bufferSizeInFrames * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format));
if (pDevice->null_device.pBuffer == NULL) {
return MAL_OUT_OF_MEMORY;
}
mal_zero_memory(pDevice->null_device.pBuffer, mal_device_get_buffer_size_in_bytes(pDevice));
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_timer_init(&pDevice->null_device.timer);
pDevice->null_device.lastProcessedFrame = 0;
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
(void)pDevice;
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->null_device.breakFromMainLoop = MAL_TRUE;
return MAL_SUCCESS;
}
static mal_bool32 mal_device__get_current_frame__null(mal_device* pDevice, mal_uint32* pCurrentPos)
{
mal_assert(pDevice != NULL);
mal_assert(pCurrentPos != NULL);
*pCurrentPos = 0;
mal_uint64 currentFrameAbs = (mal_uint64)(mal_timer_get_time_in_seconds(&pDevice->null_device.timer) * pDevice->sampleRate) / pDevice->channels;
*pCurrentPos = (mal_uint32)(currentFrameAbs % pDevice->bufferSizeInFrames);
return MAL_TRUE;
}
static mal_uint32 mal_device__get_available_frames__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_uint32 currentFrame;
if (!mal_device__get_current_frame__null(pDevice, ¤tFrame)) {
return 0;
}
// In a playback device the last processed frame should always be ahead of the current frame. The space between
// the last processed and current frame (moving forward, starting from the last processed frame) is the amount
// of space available to write.
//
// For a recording device it's the other way around - the last processed frame is always _behind_ the current
// frame and the space between is the available space.
mal_uint32 totalFrameCount = pDevice->bufferSizeInFrames;
if (pDevice->type == mal_device_type_playback) {
mal_uint32 committedBeg = currentFrame;
mal_uint32 committedEnd = pDevice->null_device.lastProcessedFrame;
if (committedEnd <= committedBeg) {
committedEnd += totalFrameCount; // Wrap around.
}
mal_uint32 committedSize = (committedEnd - committedBeg);
mal_assert(committedSize <= totalFrameCount);
return totalFrameCount - committedSize;
} else {
mal_uint32 validBeg = pDevice->null_device.lastProcessedFrame;
mal_uint32 validEnd = currentFrame;
if (validEnd < validBeg) {
validEnd += totalFrameCount; // Wrap around.
}
mal_uint32 validSize = (validEnd - validBeg);
mal_assert(validSize <= totalFrameCount);
return validSize;
}
}
static mal_uint32 mal_device__wait_for_frames__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
while (!pDevice->null_device.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__get_available_frames__null(pDevice);
if (framesAvailable > 0) {
return framesAvailable;
}
mal_sleep(16);
}
// We'll get here if the loop was terminated. Just return whatever's available.
return mal_device__get_available_frames__null(pDevice);
}
static mal_result mal_device__main_loop__null(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->null_device.breakFromMainLoop = MAL_FALSE;
while (!pDevice->null_device.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__wait_for_frames__null(pDevice);
if (framesAvailable == 0) {
continue;
}
// If it's a playback device, don't bother grabbing more data if the device is being stopped.
if (pDevice->null_device.breakFromMainLoop && pDevice->type == mal_device_type_playback) {
return MAL_FALSE;
}
if (framesAvailable + pDevice->null_device.lastProcessedFrame > pDevice->bufferSizeInFrames) {
framesAvailable = pDevice->bufferSizeInFrames - pDevice->null_device.lastProcessedFrame;
}
mal_uint32 sampleCount = framesAvailable * pDevice->channels;
mal_uint32 lockOffset = pDevice->null_device.lastProcessedFrame * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format);
mal_uint32 lockSize = sampleCount * mal_get_sample_size_in_bytes(pDevice->format);
if (pDevice->type == mal_device_type_playback) {
if (pDevice->null_device.breakFromMainLoop) {
return MAL_FALSE;
}
mal_device__read_frames_from_client(pDevice, framesAvailable, pDevice->null_device.pBuffer + lockOffset);
} else {
mal_zero_memory(pDevice->null_device.pBuffer + lockOffset, lockSize);
mal_device__send_frames_to_client(pDevice, framesAvailable, pDevice->null_device.pBuffer + lockOffset);
}
pDevice->null_device.lastProcessedFrame = (pDevice->null_device.lastProcessedFrame + framesAvailable) % pDevice->bufferSizeInFrames;
}
return MAL_SUCCESS;
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// WIN32 COMMON
//
///////////////////////////////////////////////////////////////////////////////
#if defined(MAL_WIN32)
#include "objbase.h"
#if defined(MAL_WIN32_DESKTOP)
#define mal_CoInitializeEx(pContext, pvReserved, dwCoInit) ((MAL_PFN_CoInitializeEx)pContext->win32.CoInitializeEx)(pvReserved, dwCoInit)
#define mal_CoUninitialize(pContext) ((MAL_PFN_CoUninitialize)pContext->win32.CoUninitialize)()
#define mal_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv) ((MAL_PFN_CoCreateInstance)pContext->win32.CoCreateInstance)(rclsid, pUnkOuter, dwClsContext, riid, ppv)
#define mal_CoTaskMemFree(pContext, pv) ((MAL_PFN_CoTaskMemFree)pContext->win32.CoTaskMemFree)(pv)
#define mal_PropVariantClear(pContext, pvar) ((MAL_PFN_PropVariantClear)pContext->win32.PropVariantClear)(pvar)
#else
#define mal_CoInitializeEx(pContext, pvReserved, dwCoInit) CoInitializeEx(pvReserved, dwCoInit)
#define mal_CoUninitialize(pContext) CoUninitialize()
#define mal_CoCreateInstance(pContext, rclsid, pUnkOuter, dwClsContext, riid, ppv) CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv)
#define mal_CoTaskMemFree(pContext, pv) CoTaskMemFree(pv)
#define mal_PropVariantClear(pContext, pvar) PropVariantClear(pvar)
#endif
#endif
#if defined(MAL_HAS_WASAPI) || defined(MAL_HAS_DSOUND)
#include <mmreg.h>
#ifndef SPEAKER_FRONT_LEFT
#define SPEAKER_FRONT_LEFT 0x1
#define SPEAKER_FRONT_RIGHT 0x2
#define SPEAKER_FRONT_CENTER 0x4
#define SPEAKER_LOW_FREQUENCY 0x8
#define SPEAKER_BACK_LEFT 0x10
#define SPEAKER_BACK_RIGHT 0x20
#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
#define SPEAKER_BACK_CENTER 0x100
#define SPEAKER_SIDE_LEFT 0x200
#define SPEAKER_SIDE_RIGHT 0x400
#define SPEAKER_TOP_CENTER 0x800
#define SPEAKER_TOP_FRONT_LEFT 0x1000
#define SPEAKER_TOP_FRONT_CENTER 0x2000
#define SPEAKER_TOP_FRONT_RIGHT 0x4000
#define SPEAKER_TOP_BACK_LEFT 0x8000
#define SPEAKER_TOP_BACK_CENTER 0x10000
#define SPEAKER_TOP_BACK_RIGHT 0x20000
#endif
// The SDK that comes with old versions of MSVC (VC6, for example) does not appear to define WAVEFORMATEXTENSIBLE. We
// define our own implementation in this case.
#if defined(_MSC_VER) && !defined(_WAVEFORMATEXTENSIBLE_)
typedef struct
{
WAVEFORMATEX Format;
union
{
WORD wValidBitsPerSample;
WORD wSamplesPerBlock;
WORD wReserved;
} Samples;
DWORD dwChannelMask;
GUID SubFormat;
} WAVEFORMATEXTENSIBLE;
#endif
#ifndef WAVE_FORMAT_EXTENSIBLE
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
#endif
// Converts an individual Win32-style channel identifier (SPEAKER_FRONT_LEFT, etc.) to mini_al.
static mal_uint8 mal_channel_id_to_mal__win32(DWORD id)
{
switch (id)
{
case SPEAKER_FRONT_LEFT: return MAL_CHANNEL_FRONT_LEFT;
case SPEAKER_FRONT_RIGHT: return MAL_CHANNEL_FRONT_RIGHT;
case SPEAKER_FRONT_CENTER: return MAL_CHANNEL_FRONT_CENTER;
case SPEAKER_LOW_FREQUENCY: return MAL_CHANNEL_LFE;
case SPEAKER_BACK_LEFT: return MAL_CHANNEL_BACK_LEFT;
case SPEAKER_BACK_RIGHT: return MAL_CHANNEL_BACK_RIGHT;
case SPEAKER_FRONT_LEFT_OF_CENTER: return MAL_CHANNEL_FRONT_LEFT_CENTER;
case SPEAKER_FRONT_RIGHT_OF_CENTER: return MAL_CHANNEL_FRONT_RIGHT_CENTER;
case SPEAKER_BACK_CENTER: return MAL_CHANNEL_BACK_CENTER;
case SPEAKER_SIDE_LEFT: return MAL_CHANNEL_SIDE_LEFT;
case SPEAKER_SIDE_RIGHT: return MAL_CHANNEL_SIDE_RIGHT;
case SPEAKER_TOP_CENTER: return MAL_CHANNEL_TOP_CENTER;
case SPEAKER_TOP_FRONT_LEFT: return MAL_CHANNEL_TOP_FRONT_LEFT;
case SPEAKER_TOP_FRONT_CENTER: return MAL_CHANNEL_TOP_FRONT_CENTER;
case SPEAKER_TOP_FRONT_RIGHT: return MAL_CHANNEL_TOP_FRONT_RIGHT;
case SPEAKER_TOP_BACK_LEFT: return MAL_CHANNEL_TOP_BACK_LEFT;
case SPEAKER_TOP_BACK_CENTER: return MAL_CHANNEL_TOP_BACK_CENTER;
case SPEAKER_TOP_BACK_RIGHT: return MAL_CHANNEL_TOP_BACK_RIGHT;
default: return 0;
}
}
// Converts an individual mini_al channel identifier (MAL_CHANNEL_FRONT_LEFT, etc.) to Win32-style.
static DWORD mal_channel_id_to_win32(DWORD id)
{
switch (id)
{
case MAL_CHANNEL_FRONT_LEFT: return SPEAKER_FRONT_LEFT;
case MAL_CHANNEL_FRONT_RIGHT: return SPEAKER_FRONT_RIGHT;
case MAL_CHANNEL_FRONT_CENTER: return SPEAKER_FRONT_CENTER;
case MAL_CHANNEL_LFE: return SPEAKER_LOW_FREQUENCY;
case MAL_CHANNEL_BACK_LEFT: return SPEAKER_BACK_LEFT;
case MAL_CHANNEL_BACK_RIGHT: return SPEAKER_BACK_RIGHT;
case MAL_CHANNEL_FRONT_LEFT_CENTER: return SPEAKER_FRONT_LEFT_OF_CENTER;
case MAL_CHANNEL_FRONT_RIGHT_CENTER: return SPEAKER_FRONT_RIGHT_OF_CENTER;
case MAL_CHANNEL_BACK_CENTER: return SPEAKER_BACK_CENTER;
case MAL_CHANNEL_SIDE_LEFT: return SPEAKER_SIDE_LEFT;
case MAL_CHANNEL_SIDE_RIGHT: return SPEAKER_SIDE_RIGHT;
case MAL_CHANNEL_TOP_CENTER: return SPEAKER_TOP_CENTER;
case MAL_CHANNEL_TOP_FRONT_LEFT: return SPEAKER_TOP_FRONT_LEFT;
case MAL_CHANNEL_TOP_FRONT_CENTER: return SPEAKER_TOP_FRONT_CENTER;
case MAL_CHANNEL_TOP_FRONT_RIGHT: return SPEAKER_TOP_FRONT_RIGHT;
case MAL_CHANNEL_TOP_BACK_LEFT: return SPEAKER_TOP_BACK_LEFT;
case MAL_CHANNEL_TOP_BACK_CENTER: return SPEAKER_TOP_BACK_CENTER;
case MAL_CHANNEL_TOP_BACK_RIGHT: return SPEAKER_TOP_BACK_RIGHT;
default: return 0;
}
}
// Converts a channel mapping to a Win32-style channel mask.
static DWORD mal_channel_map_to_channel_mask__win32(const mal_uint8 channelMap[MAL_MAX_CHANNELS], mal_uint32 channels)
{
DWORD dwChannelMask = 0;
for (mal_uint32 iChannel = 0; iChannel < channels; ++iChannel) {
dwChannelMask |= mal_channel_id_to_win32(channelMap[iChannel]);
}
return dwChannelMask;
}
// Converts a Win32-style channel mask to a mini_al channel map.
static void mal_channel_mask_to_channel_map__win32(DWORD dwChannelMask, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS])
{
if (channels == 1 && dwChannelMask == 0) {
channelMap[0] = MAL_CHANNEL_FRONT_CENTER;
} else if (channels == 2 && dwChannelMask == 0) {
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
} else {
// Just iterate over each bit.
mal_uint32 iChannel = 0;
for (mal_uint32 iBit = 0; iBit < 32; ++iBit) {
DWORD bitValue = (dwChannelMask & (1 << iBit));
if (bitValue != 0) {
// The bit is set.
channelMap[iChannel] = mal_channel_id_to_mal__win32(bitValue);
iChannel += 1;
}
}
}
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// WASAPI Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_WASAPI
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4091) // 'typedef ': ignored on left of '' when no variable is declared
#endif
#include <audioclient.h>
#include <audiopolicy.h>
#include <mmdeviceapi.h>
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
const PROPERTYKEY g_malPKEY_Device_FriendlyName = {{0xa45c254e, 0xdf1c, 0x4efd, {0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0}}, 14};
const PROPERTYKEY g_malPKEY_AudioEngine_DeviceFormat = {{0xf19f064d, 0x82c, 0x4e27, {0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c}}, 0};
const IID g_malCLSID_MMDeviceEnumerator_Instance = {0xBCDE0395, 0xE52F, 0x467C, {0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E}}; // BCDE0395-E52F-467C-8E3D-C4579291692E = __uuidof(MMDeviceEnumerator)
const IID g_malIID_IMMDeviceEnumerator_Instance = {0xA95664D2, 0x9614, 0x4F35, {0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6}}; // A95664D2-9614-4F35-A746-DE8DB63617E6 = __uuidof(IMMDeviceEnumerator)
const IID g_malIID_IAudioClient_Instance = {0x1CB9AD4C, 0xDBFA, 0x4C32, {0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2}}; // 1CB9AD4C-DBFA-4C32-B178-C2F568A703B2 = __uuidof(IAudioClient)
const IID g_malIID_IAudioRenderClient_Instance = {0xF294ACFC, 0x3146, 0x4483, {0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2}}; // F294ACFC-3146-4483-A7BF-ADDCA7C260E2 = __uuidof(IAudioRenderClient)
const IID g_malIID_IAudioCaptureClient_Instance = {0xC8ADBD64, 0xE71E, 0x48A0, {0xA4, 0xDE, 0x18, 0x5C, 0x39, 0x5C, 0xD3, 0x17}}; // C8ADBD64-E71E-48A0-A4DE-185C395CD317 = __uuidof(IAudioCaptureClient)
#ifndef MAL_WIN32_DESKTOP
const IID g_malIID_DEVINTERFACE_AUDIO_RENDER = {0xE6327CAD, 0xDCEC, 0x4949, {0xAE, 0x8A, 0x99, 0x1E, 0x97, 0x6A, 0x79, 0xD2}}; // E6327CAD-DCEC-4949-AE8A-991E976A79D2
const IID g_malIID_DEVINTERFACE_AUDIO_CAPTURE = {0x2EEF81BE, 0x33FA, 0x4800, {0x96, 0x70, 0x1C, 0xD4, 0x74, 0x97, 0x2C, 0x3F}}; // 2EEF81BE-33FA-4800-9670-1CD474972C3F
#endif
#ifdef __cplusplus
#define g_malCLSID_MMDeviceEnumerator g_malCLSID_MMDeviceEnumerator_Instance
#define g_malIID_IMMDeviceEnumerator g_malIID_IMMDeviceEnumerator_Instance
#define g_malIID_IAudioClient g_malIID_IAudioClient_Instance
#define g_malIID_IAudioRenderClient g_malIID_IAudioRenderClient_Instance
#define g_malIID_IAudioCaptureClient g_malIID_IAudioCaptureClient_Instance
#else
#define g_malCLSID_MMDeviceEnumerator &g_malCLSID_MMDeviceEnumerator_Instance
#define g_malIID_IMMDeviceEnumerator &g_malIID_IMMDeviceEnumerator_Instance
#define g_malIID_IAudioClient &g_malIID_IAudioClient_Instance
#define g_malIID_IAudioRenderClient &g_malIID_IAudioRenderClient_Instance
#define g_malIID_IAudioCaptureClient &g_malIID_IAudioCaptureClient_Instance
#endif
#ifdef __cplusplus
#define mal_is_guid_equal(a, b) IsEqualGUID(a, b)
#else
#define mal_is_guid_equal(a, b) IsEqualGUID(&a, &b)
#endif
#ifdef MAL_WIN32_DESKTOP
// IMMDeviceEnumerator
#ifdef __cplusplus
#define IMMDeviceEnumerator_Release(p) ((IMMDeviceEnumerator*)p)->Release()
#else
#define IMMDeviceEnumerator_Release(p) ((IMMDeviceEnumerator*)p)->lpVtbl->Release((IMMDeviceEnumerator*)p)
#endif
#ifdef __cplusplus
#define IMMDeviceEnumerator_EnumAudioEndpoints(p, a, b, c) ((IMMDeviceEnumerator*)p)->EnumAudioEndpoints(a, b, c)
#else
#define IMMDeviceEnumerator_EnumAudioEndpoints(p, a, b, c) ((IMMDeviceEnumerator*)p)->lpVtbl->EnumAudioEndpoints(p, a, b, c)
#endif
#ifdef __cplusplus
#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(p, a, b, c) ((IMMDeviceEnumerator*)p)->GetDefaultAudioEndpoint(a, b, c)
#else
#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(p, a, b, c) ((IMMDeviceEnumerator*)p)->lpVtbl->GetDefaultAudioEndpoint(p, a, b, c)
#endif
#ifdef __cplusplus
#define IMMDeviceEnumerator_GetDevice(p, a, b) ((IMMDeviceEnumerator*)p)->GetDevice(a, b)
#else
#define IMMDeviceEnumerator_GetDevice(p, a, b) ((IMMDeviceEnumerator*)p)->lpVtbl->GetDevice(p, a, b)
#endif
// IMMDeviceCollection
#ifdef __cplusplus
#define IMMDeviceCollection_Release(p) ((IMMDeviceCollection*)p)->Release()
#else
#define IMMDeviceCollection_Release(p) ((IMMDeviceCollection*)p)->lpVtbl->Release((IMMDeviceCollection*)p)
#endif
#ifdef __cplusplus
#define IMMDeviceCollection_GetCount(p, a) ((IMMDeviceCollection*)p)->GetCount(a)
#else
#define IMMDeviceCollection_GetCount(p, a) ((IMMDeviceCollection*)p)->lpVtbl->GetCount((IMMDeviceCollection*)p, a)
#endif
#ifdef __cplusplus
#define IMMDeviceCollection_Item(p, a, b) ((IMMDeviceCollection*)p)->Item(a, b)
#else
#define IMMDeviceCollection_Item(p, a, b) ((IMMDeviceCollection*)p)->lpVtbl->Item((IMMDeviceCollection*)p, a, b)
#endif
// IMMDevice
#ifdef __cplusplus
#define IMMDevice_Release(p) ((IMMDevice*)p)->Release()
#else
#define IMMDevice_Release(p) ((IMMDevice*)p)->lpVtbl->Release((IMMDevice*)p)
#endif
#ifdef __cplusplus
#define IMMDevice_GetId(p, a) ((IMMDevice*)p)->GetId(a)
#else
#define IMMDevice_GetId(p, a) ((IMMDevice*)p)->lpVtbl->GetId((IMMDevice*)p, a)
#endif
#ifdef __cplusplus
#define IMMDevice_OpenPropertyStore(p, a, b) ((IMMDevice*)p)->OpenPropertyStore(a, b)
#else
#define IMMDevice_OpenPropertyStore(p, a, b) ((IMMDevice*)p)->lpVtbl->OpenPropertyStore((IMMDevice*)p, a, b)
#endif
#ifdef __cplusplus
#define IMMDevice_Activate(p, a, b, c, d) ((IMMDevice*)p)->Activate(a, b, c, d)
#else
#define IMMDevice_Activate(p, a, b, c, d) ((IMMDevice*)p)->lpVtbl->Activate((IMMDevice*)p, a, b, c, d)
#endif
#else
// IActivateAudioInterfaceAsyncOperation
#ifdef __cplusplus
#define IActivateAudioInterfaceAsyncOperation_Release(p) ((IActivateAudioInterfaceAsyncOperation*)p)->Release()
#else
#define IActivateAudioInterfaceAsyncOperation_Release(p) ((IActivateAudioInterfaceAsyncOperation*)p)->lpVtbl->Release((IActivateAudioInterfaceAsyncOperation*)p)
#endif
#ifdef __cplusplus
#define IActivateAudioInterfaceAsyncOperation_GetActivateResult(p, a, b) ((IActivateAudioInterfaceAsyncOperation*)p)->GetActivateResult(a, b)
#else
#define IActivateAudioInterfaceAsyncOperation_GetActivateResult(p, a, b) ((IActivateAudioInterfaceAsyncOperation*)p)->lpVtbl->GetActivateResult((IActivateAudioInterfaceAsyncOperation*)p, a, b)
#endif
#endif
// IPropertyStore
#ifdef __cplusplus
#define IPropertyStore_Release(p) ((IPropertyStore*)p)->Release()
#else
#define IPropertyStore_Release(p) ((IPropertyStore*)p)->lpVtbl->Release((IPropertyStore*)p)
#endif
#ifdef __cplusplus
#define IPropertyStore_GetValue(p, a, b) ((IPropertyStore*)p)->GetValue(a, b)
#else
#define IPropertyStore_GetValue(p, a, b) ((IPropertyStore*)p)->lpVtbl->GetValue((IPropertyStore*)p, &a, b)
#endif
// IAudioClient
#ifdef __cplusplus
#define IAudioClient_Release(p) ((IAudioClient*)p)->Release()
#else
#define IAudioClient_Release(p) ((IAudioClient*)p)->lpVtbl->Release((IAudioClient*)p)
#endif
#ifdef __cplusplus
#define IAudioClient_IsFormatSupported(p, a, b, c) ((IAudioClient*)p)->IsFormatSupported(a, b, c)
#else
#define IAudioClient_IsFormatSupported(p, a, b, c) ((IAudioClient*)p)->lpVtbl->IsFormatSupported((IAudioClient*)p, a, b, c)
#endif
#ifdef __cplusplus
#define IAudioClient_GetMixFormat(p, a) ((IAudioClient*)p)->GetMixFormat(a)
#else
#define IAudioClient_GetMixFormat(p, a) ((IAudioClient*)p)->lpVtbl->GetMixFormat((IAudioClient*)p, a)
#endif
#ifdef __cplusplus
#define IAudioClient_Initialize(p, a, b, c, d, e, f) ((IAudioClient*)p)->Initialize(a, b, c, d, e, f)
#else
#define IAudioClient_Initialize(p, a, b, c, d, e, f) ((IAudioClient*)p)->lpVtbl->Initialize((IAudioClient*)p, a, b, c, d, e, f)
#endif
#ifdef __cplusplus
#define IAudioClient_GetBufferSize(p, a) ((IAudioClient*)p)->GetBufferSize(a)
#else
#define IAudioClient_GetBufferSize(p, a) ((IAudioClient*)p)->lpVtbl->GetBufferSize((IAudioClient*)p, a)
#endif
#ifdef __cplusplus
#define IAudioClient_GetService(p, a, b) ((IAudioClient*)p)->GetService(a, b)
#else
#define IAudioClient_GetService(p, a, b) ((IAudioClient*)p)->lpVtbl->GetService((IAudioClient*)p, a, b)
#endif
#ifdef __cplusplus
#define IAudioClient_Start(p) ((IAudioClient*)p)->Start()
#else
#define IAudioClient_Start(p) ((IAudioClient*)p)->lpVtbl->Start((IAudioClient*)p)
#endif
#ifdef __cplusplus
#define IAudioClient_Stop(p) ((IAudioClient*)p)->Stop()
#else
#define IAudioClient_Stop(p) ((IAudioClient*)p)->lpVtbl->Stop((IAudioClient*)p)
#endif
#ifdef __cplusplus
#define IAudioClient_GetCurrentPadding(p, a) ((IAudioClient*)p)->GetCurrentPadding(a)
#else
#define IAudioClient_GetCurrentPadding(p, a) ((IAudioClient*)p)->lpVtbl->GetCurrentPadding((IAudioClient*)p, a)
#endif
#ifdef __cplusplus
#define IAudioClient_SetEventHandle(p, a) ((IAudioClient*)p)->SetEventHandle(a)
#else
#define IAudioClient_SetEventHandle(p, a) ((IAudioClient*)p)->lpVtbl->SetEventHandle((IAudioClient*)p, a)
#endif
// IAudioRenderClient
#ifdef __cplusplus
#define IAudioRenderClient_Release(p) ((IAudioRenderClient*)p)->Release()
#else
#define IAudioRenderClient_Release(p) ((IAudioRenderClient*)p)->lpVtbl->Release((IAudioRenderClient*)p)
#endif
#ifdef __cplusplus
#define IAudioRenderClient_GetBuffer(p, a, b) ((IAudioRenderClient*)p)->GetBuffer(a, b)
#else
#define IAudioRenderClient_GetBuffer(p, a, b) ((IAudioRenderClient*)p)->lpVtbl->GetBuffer((IAudioRenderClient*)p, a, b)
#endif
#ifdef __cplusplus
#define IAudioRenderClient_ReleaseBuffer(p, a, b) ((IAudioRenderClient*)p)->ReleaseBuffer(a, b)
#else
#define IAudioRenderClient_ReleaseBuffer(p, a, b) ((IAudioRenderClient*)p)->lpVtbl->ReleaseBuffer((IAudioRenderClient*)p, a, b)
#endif
// IAudioCaptureClient
#ifdef __cplusplus
#define IAudioCaptureClient_Release(p) ((IAudioCaptureClient*)p)->Release()
#else
#define IAudioCaptureClient_Release(p) ((IAudioCaptureClient*)p)->lpVtbl->Release((IAudioCaptureClient*)p)
#endif
#ifdef __cplusplus
#define IAudioCaptureClient_GetNextPacketSize(p, a) ((IAudioCaptureClient*)p)->GetNextPacketSize(a)
#else
#define IAudioCaptureClient_GetNextPacketSize(p, a) ((IAudioCaptureClient*)p)->lpVtbl->GetNextPacketSize((IAudioCaptureClient*)p, a)
#endif
#ifdef __cplusplus
#define IAudioCaptureClient_GetBuffer(p, a, b, c, d, e) ((IAudioCaptureClient*)p)->GetBuffer(a, b, c, d, e)
#else
#define IAudioCaptureClient_GetBuffer(p, a, b, c, d, e) ((IAudioCaptureClient*)p)->lpVtbl->GetBuffer((IAudioCaptureClient*)p, a, b, c, d, e)
#endif
#ifdef __cplusplus
#define IAudioCaptureClient_ReleaseBuffer(p, a) ((IAudioCaptureClient*)p)->ReleaseBuffer(a)
#else
#define IAudioCaptureClient_ReleaseBuffer(p, a) ((IAudioCaptureClient*)p)->lpVtbl->ReleaseBuffer((IAudioCaptureClient*)p, a)
#endif
mal_result mal_context_init__wasapi(mal_context* pContext)
{
mal_assert(pContext != NULL);
(void)pContext;
#ifdef MAL_WIN32_DESKTOP
// WASAPI is only supported in Vista SP1 and newer. The reason for SP1 and not the base version of Vista is that event-driven
// exclusive mode does not work until SP1.
OSVERSIONINFOEXW osvi;
mal_zero_object(&osvi);
osvi.dwOSVersionInfoSize = sizeof(osvi);
osvi.dwMajorVersion = HIBYTE(_WIN32_WINNT_VISTA);
osvi.dwMinorVersion = LOBYTE(_WIN32_WINNT_VISTA);
osvi.wServicePackMajor = 1;
if (VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL))) {
return MAL_SUCCESS;
} else {
return MAL_NO_BACKEND;
}
#else
return MAL_SUCCESS;
#endif
}
mal_result mal_context_uninit__wasapi(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_wasapi);
(void)pContext;
return MAL_SUCCESS;
}
static mal_result mal_enumerate_devices__wasapi(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
mal_uint32 infoSize = *pCount;
*pCount = 0;
#ifdef MAL_WIN32_DESKTOP
IMMDeviceEnumerator* pDeviceEnumerator;
HRESULT hr = mal_CoCreateInstance(pContext, g_malCLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, g_malIID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
if (FAILED(hr)) {
return mal_context_post_error(pContext, NULL, "[WASAPI] Failed to create device enumerator.", MAL_WASAPI_FAILED_TO_CREATE_DEVICE_ENUMERATOR);
}
IMMDeviceCollection* pDeviceCollection;
hr = IMMDeviceEnumerator_EnumAudioEndpoints(pDeviceEnumerator, (type == mal_device_type_playback) ? eRender : eCapture, DEVICE_STATE_ACTIVE, &pDeviceCollection);
if (FAILED(hr)) {
IMMDeviceEnumerator_Release(pDeviceEnumerator);
return mal_context_post_error(pContext, NULL, "[WASAPI] Failed to enumerate audio endpoints.", MAL_NO_DEVICE);
}
IMMDeviceEnumerator_Release(pDeviceEnumerator);
UINT count;
hr = IMMDeviceCollection_GetCount(pDeviceCollection, &count);
if (FAILED(hr)) {
IMMDeviceCollection_Release(pDeviceCollection);
return mal_context_post_error(pContext, NULL, "[WASAPI] Failed to get device count.", MAL_NO_DEVICE);
}
for (mal_uint32 iDevice = 0; iDevice < count; ++iDevice) {
if (pInfo != NULL) {
if (infoSize > 0) {
mal_zero_object(pInfo);
IMMDevice* pDevice;
hr = IMMDeviceCollection_Item(pDeviceCollection, iDevice, &pDevice);
if (SUCCEEDED(hr)) {
// ID.
LPWSTR id;
hr = IMMDevice_GetId(pDevice, &id);
if (SUCCEEDED(hr)) {
size_t idlen = wcslen(id);
if (idlen+sizeof(wchar_t) > sizeof(pInfo->id.wasapi)) {
mal_CoTaskMemFree(pContext, id);
mal_assert(MAL_FALSE); // NOTE: If this is triggered, please report it. It means the format of the ID must haved change and is too long to fit in our fixed sized buffer.
continue;
}
memcpy(pInfo->id.wasapi, id, idlen * sizeof(wchar_t));
pInfo->id.wasapi[idlen] = '\0';
mal_CoTaskMemFree(pContext, id);
}
// Description / Friendly Name.
IPropertyStore *pProperties;
hr = IMMDevice_OpenPropertyStore(pDevice, STGM_READ, &pProperties);
if (SUCCEEDED(hr)) {
PROPVARIANT varName;
PropVariantInit(&varName);
hr = IPropertyStore_GetValue(pProperties, g_malPKEY_Device_FriendlyName, &varName);
if (SUCCEEDED(hr)) {
WideCharToMultiByte(CP_UTF8, 0, varName.pwszVal, -1, pInfo->name, sizeof(pInfo->name), 0, FALSE);
mal_PropVariantClear(pContext, &varName);
}
IPropertyStore_Release(pProperties);
}
}
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
IMMDeviceCollection_Release(pDeviceCollection);
#else
// The MMDevice API is only supported on desktop applications. For now, while I'm still figuring out how to properly enumerate
// over devices without using MMDevice, I'm restricting devices to defaults.
if (pInfo != NULL) {
if (infoSize > 0) {
if (type == mal_device_type_playback) {
mal_copy_memory(pInfo->id.wasapi, &g_malIID_DEVINTERFACE_AUDIO_RENDER, sizeof(g_malIID_DEVINTERFACE_AUDIO_RENDER));
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Playback Device", (size_t)-1);
} else {
mal_copy_memory(pInfo->id.wasapi, &g_malIID_DEVINTERFACE_AUDIO_CAPTURE, sizeof(g_malIID_DEVINTERFACE_AUDIO_CAPTURE));
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Capture Device", (size_t)-1);
}
pInfo += 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
#endif
return MAL_SUCCESS;
}
static void mal_device_uninit__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->wasapi.pRenderClient) {
IAudioRenderClient_Release(pDevice->wasapi.pRenderClient);
}
if (pDevice->wasapi.pCaptureClient) {
IAudioCaptureClient_Release(pDevice->wasapi.pCaptureClient);
}
if (pDevice->wasapi.pAudioClient) {
IAudioClient_Release(pDevice->wasapi.pAudioClient);
}
if (pDevice->wasapi.hEvent) {
CloseHandle(pDevice->wasapi.hEvent);
}
if (pDevice->wasapi.hStopEvent) {
CloseHandle(pDevice->wasapi.hStopEvent);
}
}
#ifndef MAL_WIN32_DESKTOP
#ifdef __cplusplus
#include <wrl\implements.h>
class malCompletionHandler : public Microsoft::WRL::RuntimeClass< Microsoft::WRL::RuntimeClassFlags< Microsoft::WRL::ClassicCom >, Microsoft::WRL::FtmBase, IActivateAudioInterfaceCompletionHandler >
{
public:
malCompletionHandler()
: m_hEvent(NULL)
{
}
mal_result Init()
{
m_hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
if (m_hEvent == NULL) {
return MAL_ERROR;
}
return MAL_SUCCESS;
}
void Uninit()
{
if (m_hEvent != NULL) {
CloseHandle(m_hEvent);
}
}
void Wait()
{
WaitForSingleObject(m_hEvent, INFINITE);
}
HRESULT STDMETHODCALLTYPE ActivateCompleted(IActivateAudioInterfaceAsyncOperation *activateOperation)
{
(void)activateOperation;
SetEvent(m_hEvent);
return S_OK;
}
private:
HANDLE m_hEvent; // This is created in Init(), deleted in Uninit(), waited on in Wait() and signaled in ActivateCompleted().
};
#else
#error "The UWP build is currently only supported in C++."
#endif
#endif // !MAL_WIN32_DESKTOP
static mal_result mal_device_init__wasapi(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->wasapi);
HRESULT hr;
mal_result result = MAL_SUCCESS;
const char* errorMsg = "";
AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
WAVEFORMATEXTENSIBLE wf;
mal_zero_object(&wf);
wf.Format.cbSize = sizeof(wf);
wf.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
wf.Format.nChannels = (WORD)pDevice->channels;
wf.Format.nSamplesPerSec = (DWORD)pDevice->sampleRate;
wf.Format.wBitsPerSample = (WORD)mal_get_sample_size_in_bytes(pDevice->format)*8;
wf.Format.nBlockAlign = (wf.Format.nChannels * wf.Format.wBitsPerSample) / 8;
wf.Format.nAvgBytesPerSec = wf.Format.nBlockAlign * wf.Format.nSamplesPerSec;
wf.Samples.wValidBitsPerSample = wf.Format.wBitsPerSample;
wf.dwChannelMask = mal_channel_map_to_channel_mask__win32(pDevice->channelMap, pDevice->channels);
if (pDevice->format == mal_format_f32) {
wf.SubFormat = MAL_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
} else {
wf.SubFormat = MAL_GUID_KSDATAFORMAT_SUBTYPE_PCM;
}
#ifdef MAL_WIN32_DESKTOP
IMMDevice* pMMDevice = NULL;
IMMDeviceEnumerator* pDeviceEnumerator;
hr = mal_CoCreateInstance(pContext, g_malCLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, g_malIID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to create IMMDeviceEnumerator.", result = MAL_WASAPI_FAILED_TO_CREATE_DEVICE_ENUMERATOR;
goto done;
}
if (pDeviceID == NULL) {
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(pDeviceEnumerator, (type == mal_device_type_playback) ? eRender : eCapture, eConsole, &pMMDevice);
if (FAILED(hr)) {
IMMDeviceEnumerator_Release(pDeviceEnumerator);
errorMsg = "[WASAPI] Failed to create default backend device.", result = MAL_WASAPI_FAILED_TO_CREATE_DEVICE;
goto done;
}
} else {
hr = IMMDeviceEnumerator_GetDevice(pDeviceEnumerator, pDeviceID->wasapi, &pMMDevice);
if (FAILED(hr)) {
IMMDeviceEnumerator_Release(pDeviceEnumerator);
errorMsg = "[WASAPI] Failed to create backend device.", result = MAL_WASAPI_FAILED_TO_CREATE_DEVICE;
goto done;
}
}
IMMDeviceEnumerator_Release(pDeviceEnumerator);
hr = IMMDevice_Activate(pMMDevice, g_malIID_IAudioClient, CLSCTX_ALL, NULL, &pDevice->wasapi.pAudioClient);
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to activate device.", result = MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE;
goto done;
}
#else
IActivateAudioInterfaceAsyncOperation *pAsyncOp = NULL;
malCompletionHandler completionHandler;
IID iid;
if (pDeviceID != NULL) {
mal_copy_memory(&iid, pDeviceID->wasapi, sizeof(iid));
} else {
if (type == mal_device_type_playback) {
iid = g_malIID_DEVINTERFACE_AUDIO_RENDER;
} else {
iid = g_malIID_DEVINTERFACE_AUDIO_CAPTURE;
}
}
LPOLESTR iidStr;
hr = StringFromIID(iid, &iidStr);
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to convert device IID to string for ActivateAudioInterfaceAsync(). Out of memory.", result = MAL_OUT_OF_MEMORY;
goto done;
}
result = completionHandler.Init();
if (result != MAL_SUCCESS) {
mal_CoTaskMemFree(pContext, iidStr);
errorMsg = "[WASAPI] Failed to create event for waiting for ActivateAudioInterfaceAsync().", result = MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE;
goto done;
}
hr = ActivateAudioInterfaceAsync(iidStr, g_malIID_IAudioClient, NULL, &completionHandler, &pAsyncOp);
if (FAILED(hr)) {
completionHandler.Uninit();
mal_CoTaskMemFree(pContext, iidStr);
errorMsg = "[WASAPI] ActivateAudioInterfaceAsync() failed.", result = MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE;
goto done;
}
mal_CoTaskMemFree(pContext, iidStr);
// Wait for the async operation for finish.
completionHandler.Wait();
completionHandler.Uninit();
HRESULT activateResult;
IUnknown* pActivatedInterface;
hr = IActivateAudioInterfaceAsyncOperation_GetActivateResult(pAsyncOp, &activateResult, &pActivatedInterface);
if (FAILED(hr) || FAILED(activateResult)) {
errorMsg = "[WASAPI] Failed to activate device.", result = MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE;
goto done;
}
// Here is where we grab the IAudioClient interface.
hr = pActivatedInterface->QueryInterface(g_malIID_IAudioClient, &pDevice->wasapi.pAudioClient);
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to query IAudioClient interface.", result = MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE;
goto done;
}
#endif
// Here is where we try to determine the best format to use with the device. If the client if wanting exclusive mode, first try finding the best format for that. If this fails, fall back to shared mode.
WAVEFORMATEXTENSIBLE* pBestFormatTemp = NULL;
result = MAL_FORMAT_NOT_SUPPORTED;
if (pConfig->preferExclusiveMode) {
hr = IAudioClient_IsFormatSupported(pDevice->wasapi.pAudioClient, AUDCLNT_SHAREMODE_EXCLUSIVE, (WAVEFORMATEX*)&wf, NULL);
#ifdef MAL_WIN32_DESKTOP
if (hr == AUDCLNT_E_UNSUPPORTED_FORMAT) {
// The format isn't supported, so retrieve the actual format from the property store and try that.
IPropertyStore* pStore = NULL;
hr = IMMDevice_OpenPropertyStore(pMMDevice, STGM_READ, &pStore);
if (SUCCEEDED(hr)) {
PROPVARIANT prop;
PropVariantInit(&prop);
hr = IPropertyStore_GetValue(pStore, g_malPKEY_AudioEngine_DeviceFormat, &prop);
if (SUCCEEDED(hr)) {
WAVEFORMATEX* pActualFormat = (WAVEFORMATEX*)prop.blob.pBlobData;
hr = IAudioClient_IsFormatSupported(pDevice->wasapi.pAudioClient, AUDCLNT_SHAREMODE_EXCLUSIVE, pActualFormat, NULL);
if (SUCCEEDED(hr)) {
mal_copy_memory(&wf, pActualFormat, sizeof(WAVEFORMATEXTENSIBLE));
}
mal_PropVariantClear(pDevice->pContext, &prop);
}
IPropertyStore_Release(pStore);
}
}
#endif
if (hr == S_OK) {
shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
result = MAL_SUCCESS;
}
}
// Fall back to shared mode if necessary.
if (result != MAL_SUCCESS) {
hr = IAudioClient_IsFormatSupported(pDevice->wasapi.pAudioClient, AUDCLNT_SHAREMODE_SHARED, (WAVEFORMATEX*)&wf, (WAVEFORMATEX**)&pBestFormatTemp);
if (hr != S_OK && hr != S_FALSE) {
hr = IAudioClient_GetMixFormat(pDevice->wasapi.pAudioClient, (WAVEFORMATEX**)&pBestFormatTemp);
if (hr != S_OK) {
result = MAL_WASAPI_FAILED_TO_FIND_BEST_FORMAT;
} else {
result = MAL_SUCCESS;
}
} else {
result = MAL_SUCCESS;
}
shareMode = AUDCLNT_SHAREMODE_SHARED;
}
// Return an error if we still haven't found a format.
if (result != MAL_SUCCESS) {
errorMsg = "[WASAPI] Failed to find best device mix format.", result = MAL_WASAPI_FAILED_TO_ACTIVATE_DEVICE;
goto done;
}
if (pBestFormatTemp != NULL) {
mal_copy_memory(&wf, pBestFormatTemp, sizeof(wf));
mal_CoTaskMemFree(pDevice->pContext, pBestFormatTemp);
}
REFERENCE_TIME bufferDurationInMicroseconds = ((mal_uint64)pDevice->bufferSizeInFrames * 1000 * 1000) / pConfig->sampleRate;
if (mal_is_guid_equal(wf.SubFormat, MAL_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)) {
pDevice->internalFormat = mal_format_f32;
} else {
if (wf.Format.wBitsPerSample == 32) {
pDevice->internalFormat = mal_format_s32;
} else if (wf.Format.wBitsPerSample == 24) {
pDevice->internalFormat = mal_format_s24;
} else if (wf.Format.wBitsPerSample == 16) {
pDevice->internalFormat = mal_format_s16;
} else if (wf.Format.wBitsPerSample == 8) {
pDevice->internalFormat = mal_format_u8;
} else {
errorMsg = "[WASAPI] Device's native format is not supported.", result = MAL_FORMAT_NOT_SUPPORTED;
goto done;
}
}
pDevice->internalChannels = wf.Format.nChannels;
pDevice->internalSampleRate = wf.Format.nSamplesPerSec;
// Get the internal channel map based on the channel mask.
mal_channel_mask_to_channel_map__win32(wf.dwChannelMask, pDevice->internalChannels, pDevice->internalChannelMap);
// Slightly different initialization for shared and exclusive modes.
if (shareMode == AUDCLNT_SHAREMODE_SHARED) {
// Shared.
REFERENCE_TIME bufferDuration = bufferDurationInMicroseconds*10;
hr = IAudioClient_Initialize(pDevice->wasapi.pAudioClient, shareMode, AUDCLNT_STREAMFLAGS_EVENTCALLBACK, bufferDuration, 0, (WAVEFORMATEX*)&wf, NULL);
if (FAILED(hr)) {
if (hr == E_ACCESSDENIED) {
errorMsg = "[WASAPI] Failed to initialize device. Access denied.", result = MAL_ACCESS_DENIED;
} else {
errorMsg = "[WASAPI] Failed to initialize device.", result = MAL_WASAPI_FAILED_TO_INITIALIZE_DEVICE;
}
goto done;
}
} else {
// Exclusive.
REFERENCE_TIME bufferDuration = bufferDurationInMicroseconds*10;
hr = IAudioClient_Initialize(pDevice->wasapi.pAudioClient, shareMode, AUDCLNT_STREAMFLAGS_EVENTCALLBACK, bufferDuration, bufferDuration, (WAVEFORMATEX*)&wf, NULL);
if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED) {
UINT bufferSizeInFrames;
hr = IAudioClient_GetBufferSize(pDevice->wasapi.pAudioClient, &bufferSizeInFrames);
if (SUCCEEDED(hr)) {
bufferDuration = (REFERENCE_TIME)((10000.0 * 1000 / wf.Format.nSamplesPerSec * bufferSizeInFrames) + 0.5);
// Unfortunately we need to release and re-acquire the audio client according to MSDN. Seems silly - why not just call IAudioClient_Initialize() again?!
IAudioClient_Release(pDevice->wasapi.pAudioClient);
#ifdef MAL_WIN32_DESKTOP
hr = IMMDevice_Activate(pMMDevice, g_malIID_IAudioClient, CLSCTX_ALL, NULL, &pDevice->wasapi.pAudioClient);
#else
hr = pActivatedInterface->QueryInterface(g_malIID_IAudioClient, &pDevice->wasapi.pAudioClient);
#endif
if (SUCCEEDED(hr)) {
hr = IAudioClient_Initialize(pDevice->wasapi.pAudioClient, shareMode, AUDCLNT_STREAMFLAGS_EVENTCALLBACK, bufferDuration, bufferDuration, (WAVEFORMATEX*)&wf, NULL);
}
}
}
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to initialize device.", result = MAL_WASAPI_FAILED_TO_INITIALIZE_DEVICE;
goto done;
}
}
hr = IAudioClient_GetBufferSize(pDevice->wasapi.pAudioClient, &pDevice->bufferSizeInFrames);
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to get audio client's actual buffer size.", result = MAL_WASAPI_FAILED_TO_INITIALIZE_DEVICE;
goto done;
}
if (type == mal_device_type_playback) {
hr = IAudioClient_GetService((IAudioClient*)pDevice->wasapi.pAudioClient, g_malIID_IAudioRenderClient, &pDevice->wasapi.pRenderClient);
} else {
hr = IAudioClient_GetService((IAudioClient*)pDevice->wasapi.pAudioClient, g_malIID_IAudioCaptureClient, &pDevice->wasapi.pCaptureClient);
}
if (FAILED(hr)) {
errorMsg = "[WASAPI] Failed to get audio client service.", result = MAL_WASAPI_FAILED_TO_INITIALIZE_DEVICE;
goto done;
}
if (shareMode == AUDCLNT_SHAREMODE_SHARED) {
pDevice->exclusiveMode = MAL_FALSE;
} else /*if (shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)*/ {
pDevice->exclusiveMode = MAL_TRUE;
}
// We need to create and set the event for event-driven mode. This event is signalled whenever a new chunk of audio
// data needs to be written or read from the device.
pDevice->wasapi.hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
if (pDevice->wasapi.hEvent == NULL) {
errorMsg = "[WASAPI] Failed to create main event for main loop.", result = MAL_FAILED_TO_CREATE_EVENT;
goto done;
}
IAudioClient_SetEventHandle(pDevice->wasapi.pAudioClient, pDevice->wasapi.hEvent);
// When the device is playing the worker thread will be waiting on a bunch of notification events. To return from
// this wait state we need to signal a special event.
pDevice->wasapi.hStopEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
if (pDevice->wasapi.hStopEvent == NULL) {
errorMsg = "[WASAPI] Failed to create stop event for main loop break notification.", result = MAL_FAILED_TO_CREATE_EVENT;
goto done;
}
result = MAL_SUCCESS;
done:
// Clean up.
#ifdef MAL_WIN32_DESKTOP
if (pMMDevice != NULL) {
IMMDevice_Release(pMMDevice);
}
#else
if (pAsyncOp != NULL) {
IActivateAudioInterfaceAsyncOperation_Release(pAsyncOp);
}
#endif
if (result != MAL_SUCCESS) {
mal_device_uninit__wasapi(pDevice);
return mal_post_error(pDevice, errorMsg, result);
} else {
return MAL_SUCCESS;
}
}
static mal_result mal_device__start_backend__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// Playback devices need to have an initial chunk of data loaded.
if (pDevice->type == mal_device_type_playback) {
BYTE* pData;
HRESULT hr = IAudioRenderClient_GetBuffer(pDevice->wasapi.pRenderClient, pDevice->bufferSizeInFrames, &pData);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to retrieve buffer from internal playback device.", MAL_WASAPI_FAILED_TO_GET_INTERNAL_BUFFER);
}
mal_device__read_frames_from_client(pDevice, pDevice->bufferSizeInFrames, pData);
hr = IAudioRenderClient_ReleaseBuffer(pDevice->wasapi.pRenderClient, pDevice->bufferSizeInFrames, 0);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to release internal buffer for playback device.", MAL_WASAPI_FAILED_TO_RELEASE_INTERNAL_BUFFER);
}
}
HRESULT hr = IAudioClient_Start(pDevice->wasapi.pAudioClient);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to start internal device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
HRESULT hr = IAudioClient_Stop(pDevice->wasapi.pAudioClient);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to stop internal device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// The main loop will be waiting on a bunch of events via the WaitForMultipleObjects() API. One of those events
// is a special event we use for forcing that function to return.
pDevice->wasapi.breakFromMainLoop = MAL_TRUE;
SetEvent(pDevice->wasapi.hStopEvent);
return MAL_SUCCESS;
}
static mal_uint32 mal_device__get_available_frames__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
#if 1
if (pDevice->type == mal_device_type_playback) {
UINT32 paddingFramesCount;
HRESULT hr = IAudioClient_GetCurrentPadding(pDevice->wasapi.pAudioClient, &paddingFramesCount);
if (FAILED(hr)) {
return 0;
}
if (pDevice->exclusiveMode) {
return paddingFramesCount;
} else {
return pDevice->bufferSizeInFrames - paddingFramesCount;
}
} else {
UINT32 framesAvailable;
HRESULT hr = IAudioCaptureClient_GetNextPacketSize(pDevice->wasapi.pCaptureClient, &framesAvailable);
if (FAILED(hr)) {
return 0;
}
return framesAvailable;
}
#else
UINT32 paddingFramesCount;
HRESULT hr = IAudioClient_GetCurrentPadding(pDevice->wasapi.pAudioClient, &paddingFramesCount);
if (FAILED(hr)) {
return 0;
}
if (pDevice->exclusiveMode) {
return paddingFramesCount;
} else {
return pDevice->bufferSizeInFrames - paddingFramesCount;
}
#endif
}
static mal_uint32 mal_device__wait_for_frames__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
while (!pDevice->wasapi.breakFromMainLoop) {
// Wait for a buffer to become available or for the stop event to be signalled.
HANDLE hEvents[2];
hEvents[0] = (HANDLE)pDevice->wasapi.hEvent;
hEvents[1] = (HANDLE)pDevice->wasapi.hStopEvent;
if (WaitForMultipleObjects(mal_countof(hEvents), hEvents, FALSE, INFINITE) == WAIT_FAILED) {
break;
}
// Break from the main loop if the device isn't started anymore. Likely what's happened is the application
// has requested that the device be stopped.
if (!mal_device_is_started(pDevice)) {
break;
}
mal_uint32 framesAvailable = mal_device__get_available_frames__wasapi(pDevice);
if (framesAvailable > 0) {
return framesAvailable;
}
}
// We'll get here if the loop was terminated. Just return whatever's available.
return mal_device__get_available_frames__wasapi(pDevice);
}
static mal_result mal_device__main_loop__wasapi(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// Make sure the stop event is not signaled to ensure we don't end up immediately returning from WaitForMultipleObjects().
ResetEvent(pDevice->wasapi.hStopEvent);
pDevice->wasapi.breakFromMainLoop = MAL_FALSE;
while (!pDevice->wasapi.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__wait_for_frames__wasapi(pDevice);
if (framesAvailable == 0) {
continue;
}
// If it's a playback device, don't bother grabbing more data if the device is being stopped.
if (pDevice->wasapi.breakFromMainLoop && pDevice->type == mal_device_type_playback) {
return MAL_FALSE;
}
if (pDevice->type == mal_device_type_playback) {
BYTE* pData;
HRESULT hr = IAudioRenderClient_GetBuffer(pDevice->wasapi.pRenderClient, framesAvailable, &pData);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to retrieve internal buffer from playback device in preparation for sending new data to the device.", MAL_WASAPI_FAILED_TO_GET_INTERNAL_BUFFER);
}
mal_device__read_frames_from_client(pDevice, framesAvailable, pData);
hr = IAudioRenderClient_ReleaseBuffer(pDevice->wasapi.pRenderClient, framesAvailable, 0);
if (FAILED(hr)) {
return mal_post_error(pDevice, "[WASAPI] Failed to release internal buffer from playback device in preparation for sending new data to the device.", MAL_WASAPI_FAILED_TO_RELEASE_INTERNAL_BUFFER);
}
} else {
UINT32 framesRemaining = framesAvailable;
while (framesRemaining > 0) {
BYTE* pData;
UINT32 framesToSend;
DWORD flags;
HRESULT hr = IAudioCaptureClient_GetBuffer(pDevice->wasapi.pCaptureClient, &pData, &framesToSend, &flags, NULL, NULL);
if (FAILED(hr)) {
mal_post_error(pDevice, "[WASAPI] WARNING: Failed to retrieve internal buffer from capture device in preparation for sending new data to the client.", MAL_WASAPI_FAILED_TO_GET_INTERNAL_BUFFER);
break;
}
if (hr != AUDCLNT_S_BUFFER_EMPTY) {
mal_device__send_frames_to_client(pDevice, framesToSend, pData);
hr = IAudioCaptureClient_ReleaseBuffer(pDevice->wasapi.pCaptureClient, framesToSend);
if (FAILED(hr)) {
mal_post_error(pDevice, "[WASAPI] WARNING: Failed to release internal buffer from capture device in preparation for sending new data to the client.", MAL_WASAPI_FAILED_TO_RELEASE_INTERNAL_BUFFER);
break;
}
if (framesRemaining >= framesToSend) {
framesRemaining -= framesToSend;
} else {
framesRemaining = 0;
}
}
}
}
}
return MAL_SUCCESS;
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// DirectSound Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_DSOUND
#include <dsound.h>
#if 0 // MAL_GUID_NULL is not currently used, but leaving it here in case I need to add it back again.
static GUID MAL_GUID_NULL = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
#endif
static GUID MAL_GUID_IID_DirectSoundNotify = {0xb0210783, 0x89cd, 0x11d0, {0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16}};
static GUID MAL_GUID_IID_IDirectSoundCaptureBuffer = {0xb0210782, 0x89cd, 0x11d0, {0xaf, 0x08, 0x00, 0xa0, 0xc9, 0x25, 0xcd, 0x16}};
typedef HRESULT (WINAPI * mal_DirectSoundCreateProc)(const GUID* pcGuidDevice, LPDIRECTSOUND *ppDS8, LPUNKNOWN pUnkOuter);
typedef HRESULT (WINAPI * mal_DirectSoundEnumerateAProc)(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext);
typedef HRESULT (WINAPI * mal_DirectSoundCaptureCreateProc)(const GUID* pcGuidDevice, LPDIRECTSOUNDCAPTURE *ppDSC8, LPUNKNOWN pUnkOuter);
typedef HRESULT (WINAPI * mal_DirectSoundCaptureEnumerateAProc)(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext);
static HMODULE mal_open_dsound_dll()
{
return LoadLibraryW(L"dsound.dll");
}
static void mal_close_dsound_dll(HMODULE hModule)
{
FreeLibrary(hModule);
}
mal_result mal_context_init__dsound(mal_context* pContext)
{
mal_assert(pContext != NULL);
(void)pContext;
return MAL_SUCCESS;
}
mal_result mal_context_uninit__dsound(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_dsound);
(void)pContext;
return MAL_SUCCESS;
}
typedef struct
{
mal_uint32 deviceCount;
mal_uint32 infoCount;
mal_device_info* pInfo;
} mal_device_enum_data__dsound;
static BOOL CALLBACK mal_enum_devices_callback__dsound(LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext)
{
(void)lpcstrModule;
mal_device_enum_data__dsound* pData = (mal_device_enum_data__dsound*)lpContext;
mal_assert(pData != NULL);
if (pData->pInfo != NULL) {
if (pData->infoCount > 0) {
mal_zero_object(pData->pInfo);
mal_strncpy_s(pData->pInfo->name, sizeof(pData->pInfo->name), lpcstrDescription, (size_t)-1);
if (lpGuid != NULL) {
mal_copy_memory(pData->pInfo->id.dsound, lpGuid, 16);
} else {
mal_zero_memory(pData->pInfo->id.dsound, 16);
}
pData->pInfo += 1;
pData->infoCount -= 1;
pData->deviceCount += 1;
}
} else {
pData->deviceCount += 1;
}
return TRUE;
}
static mal_result mal_enumerate_devices__dsound(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 0;
mal_device_enum_data__dsound enumData;
enumData.deviceCount = 0;
enumData.infoCount = infoSize;
enumData.pInfo = pInfo;
HMODULE dsoundDLL = mal_open_dsound_dll();
if (dsoundDLL == NULL) {
return MAL_NO_BACKEND;
}
if (type == mal_device_type_playback) {
mal_DirectSoundEnumerateAProc pDirectSoundEnumerateA = (mal_DirectSoundEnumerateAProc)GetProcAddress(dsoundDLL, "DirectSoundEnumerateA");
if (pDirectSoundEnumerateA) {
pDirectSoundEnumerateA(mal_enum_devices_callback__dsound, &enumData);
}
} else {
mal_DirectSoundCaptureEnumerateAProc pDirectSoundCaptureEnumerateA = (mal_DirectSoundCaptureEnumerateAProc)GetProcAddress(dsoundDLL, "DirectSoundCaptureEnumerateA");
if (pDirectSoundCaptureEnumerateA) {
pDirectSoundCaptureEnumerateA(mal_enum_devices_callback__dsound, &enumData);
}
}
mal_close_dsound_dll(dsoundDLL);
*pCount = enumData.deviceCount;
return MAL_SUCCESS;
}
static void mal_device_uninit__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->dsound.hDSoundDLL != NULL) {
if (pDevice->dsound.pNotify) {
IDirectSoundNotify_Release((LPDIRECTSOUNDNOTIFY)pDevice->dsound.pNotify);
}
if (pDevice->dsound.hStopEvent) {
CloseHandle(pDevice->dsound.hStopEvent);
}
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
if (pDevice->dsound.pNotifyEvents[i]) {
CloseHandle(pDevice->dsound.pNotifyEvents[i]);
}
}
if (pDevice->dsound.pCaptureBuffer) {
IDirectSoundCaptureBuffer_Release((LPDIRECTSOUNDBUFFER)pDevice->dsound.pCaptureBuffer);
}
if (pDevice->dsound.pCapture) {
IDirectSoundCapture_Release((LPDIRECTSOUNDCAPTURE)pDevice->dsound.pCapture);
}
if (pDevice->dsound.pPlaybackBuffer) {
IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer);
}
if (pDevice->dsound.pPlaybackPrimaryBuffer) {
IDirectSoundBuffer_Release((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackPrimaryBuffer);
}
if (pDevice->dsound.pPlayback != NULL) {
IDirectSound_Release((LPDIRECTSOUND)pDevice->dsound.pPlayback);
}
mal_close_dsound_dll((HMODULE)pDevice->dsound.hDSoundDLL);
}
}
static mal_result mal_device_init__dsound(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
#ifdef __cplusplus
GUID _MAL_GUID_IID_DirectSoundNotify = MAL_GUID_IID_DirectSoundNotify;
GUID _MAL_GUID_IID_IDirectSoundCaptureBuffer = MAL_GUID_IID_IDirectSoundCaptureBuffer;
#else
GUID* _MAL_GUID_IID_DirectSoundNotify = &MAL_GUID_IID_DirectSoundNotify;
GUID* _MAL_GUID_IID_IDirectSoundCaptureBuffer = &MAL_GUID_IID_IDirectSoundCaptureBuffer;
#endif
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->dsound);
pDevice->dsound.hDSoundDLL = (mal_handle)mal_open_dsound_dll();
if (pDevice->dsound.hDSoundDLL == NULL) {
return MAL_NO_BACKEND;
}
// Check that we have a valid format.
GUID subformat;
switch (pConfig->format)
{
case mal_format_u8:
case mal_format_s16:
case mal_format_s24:
case mal_format_s32:
{
subformat = MAL_GUID_KSDATAFORMAT_SUBTYPE_PCM;
} break;
case mal_format_f32:
{
subformat = MAL_GUID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
} break;
default:
return MAL_FORMAT_NOT_SUPPORTED;
}
WAVEFORMATEXTENSIBLE wf;
mal_zero_object(&wf);
wf.Format.cbSize = sizeof(wf);
wf.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
wf.Format.nChannels = (WORD)pConfig->channels;
wf.Format.nSamplesPerSec = (DWORD)pConfig->sampleRate;
wf.Format.wBitsPerSample = (WORD)mal_get_sample_size_in_bytes(pConfig->format)*8;
wf.Format.nBlockAlign = (wf.Format.nChannels * wf.Format.wBitsPerSample) / 8;
wf.Format.nAvgBytesPerSec = wf.Format.nBlockAlign * wf.Format.nSamplesPerSec;
wf.Samples.wValidBitsPerSample = wf.Format.wBitsPerSample;
wf.dwChannelMask = mal_channel_map_to_channel_mask__win32(pConfig->channelMap, pConfig->channels);
wf.SubFormat = subformat;
DWORD bufferSizeInBytes = 0;
// Unfortunately DirectSound uses different APIs and data structures for playback and catpure devices :(
if (type == mal_device_type_playback) {
mal_DirectSoundCreateProc pDirectSoundCreate = (mal_DirectSoundCreateProc)GetProcAddress((HMODULE)pDevice->dsound.hDSoundDLL, "DirectSoundCreate");
if (pDirectSoundCreate == NULL) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Could not find DirectSoundCreate().", MAL_API_NOT_FOUND);
}
if (FAILED(pDirectSoundCreate((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, (LPDIRECTSOUND*)&pDevice->dsound.pPlayback, NULL))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] DirectSoundCreate() failed for playback device.", MAL_DSOUND_FAILED_TO_CREATE_DEVICE);
}
// The cooperative level must be set before doing anything else.
HWND hWnd = ((MAL_PFN_GetForegroundWindow)pContext->win32.GetForegroundWindow)();
if (hWnd == NULL) {
hWnd = ((MAL_PFN_GetDesktopWindow)pContext->win32.GetDesktopWindow)();
}
if (FAILED(IDirectSound_SetCooperativeLevel((LPDIRECTSOUND)pDevice->dsound.pPlayback, hWnd, (pConfig->preferExclusiveMode) ? DSSCL_EXCLUSIVE : DSSCL_PRIORITY))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSound_SetCooperateiveLevel() failed for playback device.", MAL_DSOUND_FAILED_TO_SET_COOP_LEVEL);
}
DSBUFFERDESC descDSPrimary;
mal_zero_object(&descDSPrimary);
descDSPrimary.dwSize = sizeof(DSBUFFERDESC);
descDSPrimary.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLVOLUME;
if (FAILED(IDirectSound_CreateSoundBuffer((LPDIRECTSOUND)pDevice->dsound.pPlayback, &descDSPrimary, (LPDIRECTSOUNDBUFFER*)&pDevice->dsound.pPlaybackPrimaryBuffer, NULL))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's primary buffer.", MAL_DSOUND_FAILED_TO_CREATE_BUFFER);
}
// From MSDN:
//
// The method succeeds even if the hardware does not support the requested format; DirectSound sets the buffer to the closest
// supported format. To determine whether this has happened, an application can call the GetFormat method for the primary buffer
// and compare the result with the format that was requested with the SetFormat method.
if (FAILED(IDirectSoundBuffer_SetFormat((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackPrimaryBuffer, (WAVEFORMATEX*)&wf))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Failed to set format of playback device's primary buffer.", MAL_FORMAT_NOT_SUPPORTED);
}
// Get the _actual_ properties of the buffer. This is silly API design...
DWORD requiredSize;
if (FAILED(IDirectSoundBuffer_GetFormat((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackPrimaryBuffer, NULL, 0, &requiredSize))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Failed to retrieve the actual format of the playback device's primary buffer.", MAL_FORMAT_NOT_SUPPORTED);
}
char rawdata[1024];
WAVEFORMATEXTENSIBLE* pActualFormat = (WAVEFORMATEXTENSIBLE*)rawdata;
if (FAILED(IDirectSoundBuffer_GetFormat((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackPrimaryBuffer, (WAVEFORMATEX*)pActualFormat, requiredSize, NULL))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Failed to retrieve the actual format of the playback device's primary buffer.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->internalChannels = pActualFormat->Format.nChannels;
pDevice->internalSampleRate = pActualFormat->Format.nSamplesPerSec;
bufferSizeInBytes = pDevice->bufferSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->format);
// Get the internal channel map based on the channel mask.
mal_channel_mask_to_channel_map__win32(pActualFormat->dwChannelMask, pDevice->internalChannels, pDevice->internalChannelMap);
// Meaning of dwFlags (from MSDN):
//
// DSBCAPS_CTRLPOSITIONNOTIFY
// The buffer has position notification capability.
//
// DSBCAPS_GLOBALFOCUS
// With this flag set, an application using DirectSound can continue to play its buffers if the user switches focus to
// another application, even if the new application uses DirectSound.
//
// DSBCAPS_GETCURRENTPOSITION2
// In the first version of DirectSound, the play cursor was significantly ahead of the actual playing sound on emulated
// sound cards; it was directly behind the write cursor. Now, if the DSBCAPS_GETCURRENTPOSITION2 flag is specified, the
// application can get a more accurate play cursor.
DSBUFFERDESC descDS;
mal_zero_object(&descDS);
descDS.dwSize = sizeof(DSBUFFERDESC);
descDS.dwFlags = DSBCAPS_CTRLPOSITIONNOTIFY | DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;
descDS.dwBufferBytes = bufferSizeInBytes;
descDS.lpwfxFormat = (WAVEFORMATEX*)&wf;
if (FAILED(IDirectSound_CreateSoundBuffer((LPDIRECTSOUND)pDevice->dsound.pPlayback, &descDS, (LPDIRECTSOUNDBUFFER*)&pDevice->dsound.pPlaybackBuffer, NULL))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSound_CreateSoundBuffer() failed for playback device's secondary buffer.", MAL_DSOUND_FAILED_TO_CREATE_BUFFER);
}
// Notifications are set up via a DIRECTSOUNDNOTIFY object which is retrieved from the buffer.
if (FAILED(IDirectSoundBuffer_QueryInterface((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, _MAL_GUID_IID_DirectSoundNotify, (void**)&pDevice->dsound.pNotify))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSoundBuffer_QueryInterface() failed for playback device's IDirectSoundNotify object.", MAL_DSOUND_FAILED_TO_QUERY_INTERFACE);
}
} else {
// The default buffer size is treated slightly differently for DirectSound which, for some reason, seems to
// have worse latency with capture than playback (sometimes _much_ worse).
if (pDevice->usingDefaultBufferSize) {
pDevice->bufferSizeInFrames *= 2; // <-- Might need to fiddle with this to find a more ideal value. May even be able to just add a fixed amount rather than scaling.
}
mal_DirectSoundCaptureCreateProc pDirectSoundCaptureCreate = (mal_DirectSoundCaptureCreateProc)GetProcAddress((HMODULE)pDevice->dsound.hDSoundDLL, "DirectSoundCaptureCreate");
if (pDirectSoundCaptureCreate == NULL) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Could not find DirectSoundCreate().", MAL_API_NOT_FOUND);
}
if (FAILED(pDirectSoundCaptureCreate((pDeviceID == NULL) ? NULL : (const GUID*)pDeviceID->dsound, (LPDIRECTSOUNDCAPTURE*)&pDevice->dsound.pCapture, NULL))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] DirectSoundCaptureCreate() failed for capture device.", MAL_DSOUND_FAILED_TO_CREATE_DEVICE);
}
bufferSizeInBytes = pDevice->bufferSizeInFrames * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format);
DSCBUFFERDESC descDS;
mal_zero_object(&descDS);
descDS.dwSize = sizeof(descDS);
descDS.dwFlags = 0;
descDS.dwBufferBytes = bufferSizeInBytes;
descDS.lpwfxFormat = (WAVEFORMATEX*)&wf;
LPDIRECTSOUNDCAPTUREBUFFER pDSCB_Temp;
if (FAILED(IDirectSoundCapture_CreateCaptureBuffer((LPDIRECTSOUNDCAPTURE)pDevice->dsound.pCapture, &descDS, &pDSCB_Temp, NULL))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSoundCapture_CreateCaptureBuffer() failed for capture device.", MAL_DSOUND_FAILED_TO_CREATE_BUFFER);
}
HRESULT hr = IDirectSoundCapture_QueryInterface(pDSCB_Temp, _MAL_GUID_IID_IDirectSoundCaptureBuffer, (LPVOID*)&pDevice->dsound.pCaptureBuffer);
IDirectSoundCaptureBuffer_Release(pDSCB_Temp);
if (FAILED(hr)) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSoundCapture_QueryInterface() failed for capture device's IDirectSoundCaptureBuffer8 object.", MAL_DSOUND_FAILED_TO_QUERY_INTERFACE);
}
// Notifications are set up via a DIRECTSOUNDNOTIFY object which is retrieved from the buffer.
if (FAILED(IDirectSoundCaptureBuffer_QueryInterface((LPDIRECTSOUNDCAPTUREBUFFER)pDevice->dsound.pCaptureBuffer, _MAL_GUID_IID_DirectSoundNotify, (void**)&pDevice->dsound.pNotify))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSoundCaptureBuffer_QueryInterface() failed for capture device's IDirectSoundNotify object.", MAL_DSOUND_FAILED_TO_QUERY_INTERFACE);
}
}
// We need a notification for each period. The notification offset is slightly different depending on whether or not the
// device is a playback or capture device. For a playback device we want to be notified when a period just starts playing,
// whereas for a capture device we want to be notified when a period has just _finished_ capturing.
mal_uint32 periodSizeInBytes = pDevice->bufferSizeInFrames / pDevice->periods;
DSBPOSITIONNOTIFY notifyPoints[MAL_MAX_PERIODS_DSOUND]; // One notification event for each period.
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
pDevice->dsound.pNotifyEvents[i] = CreateEventA(NULL, FALSE, FALSE, NULL);
if (pDevice->dsound.pNotifyEvents[i] == NULL) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Failed to create event for buffer notifications.", MAL_FAILED_TO_CREATE_EVENT);
}
// The notification offset is in bytes.
notifyPoints[i].dwOffset = i * periodSizeInBytes;
notifyPoints[i].hEventNotify = pDevice->dsound.pNotifyEvents[i];
}
if (FAILED(IDirectSoundNotify_SetNotificationPositions((LPDIRECTSOUNDNOTIFY)pDevice->dsound.pNotify, pDevice->periods, notifyPoints))) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] IDirectSoundNotify_SetNotificationPositions() failed.", MAL_DSOUND_FAILED_TO_SET_NOTIFICATIONS);
}
// When the device is playing the worker thread will be waiting on a bunch of notification events. To return from
// this wait state we need to signal a special event.
pDevice->dsound.hStopEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
if (pDevice->dsound.hStopEvent == NULL) {
mal_device_uninit__dsound(pDevice);
return mal_post_error(pDevice, "[DirectSound] Failed to create event for main loop break notification.", MAL_FAILED_TO_CREATE_EVENT);
}
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
// Before playing anything we need to grab an initial group of samples from the client.
mal_uint32 framesToRead = pDevice->bufferSizeInFrames / pDevice->periods;
mal_uint32 desiredLockSize = framesToRead * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format);
void* pLockPtr;
DWORD actualLockSize;
void* pLockPtr2;
DWORD actualLockSize2;
if (SUCCEEDED(IDirectSoundBuffer_Lock((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, 0, desiredLockSize, &pLockPtr, &actualLockSize, &pLockPtr2, &actualLockSize2, 0))) {
framesToRead = actualLockSize / mal_get_sample_size_in_bytes(pDevice->format) / pDevice->channels;
mal_device__read_frames_from_client(pDevice, framesToRead, pLockPtr);
IDirectSoundBuffer_Unlock((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, pLockPtr, actualLockSize, pLockPtr2, actualLockSize2);
pDevice->dsound.lastProcessedFrame = framesToRead;
if (FAILED(IDirectSoundBuffer_Play((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, 0, 0, DSBPLAY_LOOPING))) {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundBuffer_Play() failed.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
} else {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundBuffer_Lock() failed.", MAL_FAILED_TO_MAP_DEVICE_BUFFER);
}
} else {
if (FAILED(IDirectSoundCaptureBuffer_Start((LPDIRECTSOUNDCAPTUREBUFFER)pDevice->dsound.pCaptureBuffer, DSCBSTART_LOOPING))) {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundCaptureBuffer_Start() failed.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
if (FAILED(IDirectSoundBuffer_Stop((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer))) {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundBuffer_Stop() failed.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
IDirectSoundBuffer_SetCurrentPosition((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, 0);
} else {
if (FAILED(IDirectSoundCaptureBuffer_Stop((LPDIRECTSOUNDCAPTUREBUFFER)pDevice->dsound.pCaptureBuffer))) {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundCaptureBuffer_Stop() failed.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
}
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// The main loop will be waiting on a bunch of events via the WaitForMultipleObjects() API. One of those events
// is a special event we use for forcing that function to return.
pDevice->dsound.breakFromMainLoop = MAL_TRUE;
SetEvent(pDevice->dsound.hStopEvent);
return MAL_SUCCESS;
}
static mal_bool32 mal_device__get_current_frame__dsound(mal_device* pDevice, mal_uint32* pCurrentPos)
{
mal_assert(pDevice != NULL);
mal_assert(pCurrentPos != NULL);
*pCurrentPos = 0;
DWORD dwCurrentPosition;
if (pDevice->type == mal_device_type_playback) {
if (FAILED(IDirectSoundBuffer_GetCurrentPosition((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, NULL, &dwCurrentPosition))) {
return MAL_FALSE;
}
} else {
if (FAILED(IDirectSoundCaptureBuffer_GetCurrentPosition((LPDIRECTSOUNDCAPTUREBUFFER)pDevice->dsound.pCaptureBuffer, &dwCurrentPosition, NULL))) {
return MAL_FALSE;
}
}
*pCurrentPos = (mal_uint32)dwCurrentPosition / mal_get_sample_size_in_bytes(pDevice->format) / pDevice->channels;
return MAL_TRUE;
}
static mal_uint32 mal_device__get_available_frames__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_uint32 currentFrame;
if (!mal_device__get_current_frame__dsound(pDevice, ¤tFrame)) {
return 0;
}
// In a playback device the last processed frame should always be ahead of the current frame. The space between
// the last processed and current frame (moving forward, starting from the last processed frame) is the amount
// of space available to write.
//
// For a recording device it's the other way around - the last processed frame is always _behind_ the current
// frame and the space between is the available space.
mal_uint32 totalFrameCount = pDevice->bufferSizeInFrames;
if (pDevice->type == mal_device_type_playback) {
mal_uint32 committedBeg = currentFrame;
mal_uint32 committedEnd;
committedEnd = pDevice->dsound.lastProcessedFrame;
if (committedEnd <= committedBeg) {
committedEnd += totalFrameCount;
}
mal_uint32 committedSize = (committedEnd - committedBeg);
mal_assert(committedSize <= totalFrameCount);
return totalFrameCount - committedSize;
} else {
mal_uint32 validBeg = pDevice->dsound.lastProcessedFrame;
mal_uint32 validEnd = currentFrame;
if (validEnd < validBeg) {
validEnd += totalFrameCount; // Wrap around.
}
mal_uint32 validSize = (validEnd - validBeg);
mal_assert(validSize <= totalFrameCount);
return validSize;
}
}
static mal_uint32 mal_device__wait_for_frames__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// The timeout to use for putting the thread to sleep is based on the size of the buffer and the period count.
DWORD timeoutInMilliseconds = (pDevice->bufferSizeInFrames / (pDevice->sampleRate/1000)) / pDevice->periods;
if (timeoutInMilliseconds < 1) {
timeoutInMilliseconds = 1;
}
unsigned int eventCount = pDevice->periods + 1;
HANDLE pEvents[MAL_MAX_PERIODS_DSOUND + 1]; // +1 for the stop event.
mal_copy_memory(pEvents, pDevice->dsound.pNotifyEvents, sizeof(HANDLE) * pDevice->periods);
pEvents[eventCount-1] = pDevice->dsound.hStopEvent;
while (!pDevice->dsound.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__get_available_frames__dsound(pDevice);
if (framesAvailable > 0) {
return framesAvailable;
}
// If we get here it means we weren't able to find any frames. We'll just wait here for a bit.
WaitForMultipleObjects(eventCount, pEvents, FALSE, timeoutInMilliseconds);
}
// We'll get here if the loop was terminated. Just return whatever's available.
return mal_device__get_available_frames__dsound(pDevice);
}
static mal_result mal_device__main_loop__dsound(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// Make sure the stop event is not signaled to ensure we don't end up immediately returning from WaitForMultipleObjects().
ResetEvent(pDevice->dsound.hStopEvent);
pDevice->dsound.breakFromMainLoop = MAL_FALSE;
while (!pDevice->dsound.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__wait_for_frames__dsound(pDevice);
if (framesAvailable == 0) {
continue;
}
// If it's a playback device, don't bother grabbing more data if the device is being stopped.
if (pDevice->dsound.breakFromMainLoop && pDevice->type == mal_device_type_playback) {
return MAL_FALSE;
}
DWORD lockOffset = pDevice->dsound.lastProcessedFrame * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format);
DWORD lockSize = framesAvailable * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format);
if (pDevice->type == mal_device_type_playback) {
void* pLockPtr;
DWORD actualLockSize;
void* pLockPtr2;
DWORD actualLockSize2;
if (FAILED(IDirectSoundBuffer_Lock((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, lockOffset, lockSize, &pLockPtr, &actualLockSize, &pLockPtr2, &actualLockSize2, 0))) {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundBuffer_Lock() failed.", MAL_FAILED_TO_MAP_DEVICE_BUFFER);
}
mal_uint32 frameCount = actualLockSize / mal_get_sample_size_in_bytes(pDevice->format) / pDevice->channels;
mal_device__read_frames_from_client(pDevice, frameCount, pLockPtr);
pDevice->dsound.lastProcessedFrame = (pDevice->dsound.lastProcessedFrame + frameCount) % pDevice->bufferSizeInFrames;
IDirectSoundBuffer_Unlock((LPDIRECTSOUNDBUFFER)pDevice->dsound.pPlaybackBuffer, pLockPtr, actualLockSize, pLockPtr2, actualLockSize2);
} else {
void* pLockPtr;
DWORD actualLockSize;
void* pLockPtr2;
DWORD actualLockSize2;
if (FAILED(IDirectSoundCaptureBuffer_Lock((LPDIRECTSOUNDCAPTUREBUFFER)pDevice->dsound.pCaptureBuffer, lockOffset, lockSize, &pLockPtr, &actualLockSize, &pLockPtr2, &actualLockSize2, 0))) {
return mal_post_error(pDevice, "[DirectSound] IDirectSoundCaptureBuffer_Lock() failed.", MAL_FAILED_TO_MAP_DEVICE_BUFFER);
}
mal_uint32 frameCount = actualLockSize / mal_get_sample_size_in_bytes(pDevice->format) / pDevice->channels;
mal_device__send_frames_to_client(pDevice, frameCount, pLockPtr);
pDevice->dsound.lastProcessedFrame = (pDevice->dsound.lastProcessedFrame + frameCount) % pDevice->bufferSizeInFrames;
IDirectSoundCaptureBuffer_Unlock((LPDIRECTSOUNDCAPTUREBUFFER)pDevice->dsound.pCaptureBuffer, pLockPtr, actualLockSize, pLockPtr2, actualLockSize2);
}
}
return MAL_SUCCESS;
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// WinMM Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_WINMM
#include <mmsystem.h>
#if !defined(MAXULONG_PTR)
typedef size_t DWORD_PTR;
#endif
#if !defined(WAVE_FORMAT_44M08)
#define WAVE_FORMAT_44M08 0x00000100
#define WAVE_FORMAT_44S08 0x00000200
#define WAVE_FORMAT_44M16 0x00000400
#define WAVE_FORMAT_44S16 0x00000800
#define WAVE_FORMAT_48M08 0x00001000
#define WAVE_FORMAT_48S08 0x00002000
#define WAVE_FORMAT_48M16 0x00004000
#define WAVE_FORMAT_48S16 0x00008000
#define WAVE_FORMAT_96M08 0x00010000
#define WAVE_FORMAT_96S08 0x00020000
#define WAVE_FORMAT_96M16 0x00040000
#define WAVE_FORMAT_96S16 0x00080000
#endif
typedef UINT (WINAPI * MAL_PFN_waveOutGetNumDevs)(void);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutGetDevCapsA)(UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutOpen)(LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutClose)(HWAVEOUT hwo);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutPrepareHeader)(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutUnprepareHeader)(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutWrite)(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
typedef MMRESULT (WINAPI * MAL_PFN_waveOutReset)(HWAVEOUT hwo);
typedef UINT (WINAPI * MAL_PFN_waveInGetNumDevs)(void);
typedef MMRESULT (WINAPI * MAL_PFN_waveInGetDevCapsA)(UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic);
typedef MMRESULT (WINAPI * MAL_PFN_waveInOpen)(LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
typedef MMRESULT (WINAPI * MAL_PFN_waveInClose)(HWAVEIN hwi);
typedef MMRESULT (WINAPI * MAL_PFN_waveInPrepareHeader)(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
typedef MMRESULT (WINAPI * MAL_PFN_waveInUnprepareHeader)(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
typedef MMRESULT (WINAPI * MAL_PFN_waveInAddBuffer)(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
typedef MMRESULT (WINAPI * MAL_PFN_waveInStart)(HWAVEIN hwi);
typedef MMRESULT (WINAPI * MAL_PFN_waveInReset)(HWAVEIN hwi);
mal_result mal_result_from_MMRESULT(MMRESULT resultMM)
{
switch (resultMM) {
case MMSYSERR_NOERROR: return MAL_SUCCESS;
case MMSYSERR_BADDEVICEID: return MAL_INVALID_ARGS;
case MMSYSERR_INVALHANDLE: return MAL_INVALID_ARGS;
case MMSYSERR_NOMEM: return MAL_OUT_OF_MEMORY;
case MMSYSERR_INVALFLAG: return MAL_INVALID_ARGS;
case MMSYSERR_INVALPARAM: return MAL_INVALID_ARGS;
case MMSYSERR_HANDLEBUSY: return MAL_DEVICE_BUSY;
case MMSYSERR_ERROR: return MAL_ERROR;
default: return MAL_ERROR;
}
}
mal_result mal_context_init__winmm(mal_context* pContext)
{
mal_assert(pContext != NULL);
pContext->winmm.hWinMM = mal_dlopen("winmm.dll");
if (pContext->winmm.hWinMM == NULL) {
return MAL_NO_BACKEND;
}
pContext->winmm.waveOutGetNumDevs = mal_dlsym(pContext->winmm.hWinMM, "waveOutGetNumDevs");
pContext->winmm.waveOutGetDevCapsA = mal_dlsym(pContext->winmm.hWinMM, "waveOutGetDevCapsA");
pContext->winmm.waveOutOpen = mal_dlsym(pContext->winmm.hWinMM, "waveOutOpen");
pContext->winmm.waveOutClose = mal_dlsym(pContext->winmm.hWinMM, "waveOutClose");
pContext->winmm.waveOutPrepareHeader = mal_dlsym(pContext->winmm.hWinMM, "waveOutPrepareHeader");
pContext->winmm.waveOutUnprepareHeader = mal_dlsym(pContext->winmm.hWinMM, "waveOutUnprepareHeader");
pContext->winmm.waveOutWrite = mal_dlsym(pContext->winmm.hWinMM, "waveOutWrite");
pContext->winmm.waveOutReset = mal_dlsym(pContext->winmm.hWinMM, "waveOutReset");
pContext->winmm.waveInGetNumDevs = mal_dlsym(pContext->winmm.hWinMM, "waveInGetNumDevs");
pContext->winmm.waveInGetDevCapsA = mal_dlsym(pContext->winmm.hWinMM, "waveInGetDevCapsA");
pContext->winmm.waveInOpen = mal_dlsym(pContext->winmm.hWinMM, "waveInOpen");
pContext->winmm.waveInClose = mal_dlsym(pContext->winmm.hWinMM, "waveInClose");
pContext->winmm.waveInPrepareHeader = mal_dlsym(pContext->winmm.hWinMM, "waveInPrepareHeader");
pContext->winmm.waveInUnprepareHeader = mal_dlsym(pContext->winmm.hWinMM, "waveInUnprepareHeader");
pContext->winmm.waveInAddBuffer = mal_dlsym(pContext->winmm.hWinMM, "waveInAddBuffer");
pContext->winmm.waveInStart = mal_dlsym(pContext->winmm.hWinMM, "waveInStart");
pContext->winmm.waveInReset = mal_dlsym(pContext->winmm.hWinMM, "waveInReset");
return MAL_SUCCESS;
}
mal_result mal_context_uninit__winmm(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_winmm);
mal_dlclose(pContext->winmm.hWinMM);
return MAL_SUCCESS;
}
static mal_result mal_enumerate_devices__winmm(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 0;
if (type == mal_device_type_playback) {
UINT deviceCount = ((MAL_PFN_waveOutGetNumDevs)pContext->winmm.waveOutGetNumDevs)();
for (UINT iDevice = 0; iDevice < deviceCount; ++iDevice) {
if (pInfo != NULL) {
if (infoSize > 0) {
WAVEOUTCAPSA caps;
MMRESULT result = ((MAL_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(iDevice, &caps, sizeof(caps));
if (result == MMSYSERR_NOERROR) {
pInfo->id.winmm = iDevice;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), caps.szPname, (size_t)-1);
}
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
} else {
UINT deviceCount = ((MAL_PFN_waveInGetNumDevs)pContext->winmm.waveInGetNumDevs)();
for (UINT iDevice = 0; iDevice < deviceCount; ++iDevice) {
if (pInfo != NULL) {
if (infoSize > 0) {
WAVEINCAPSA caps;
MMRESULT result = ((MAL_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(iDevice, &caps, sizeof(caps));
if (result == MMSYSERR_NOERROR) {
pInfo->id.winmm = iDevice;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), caps.szPname, (size_t)-1);
}
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
}
return MAL_SUCCESS;
}
static void mal_device_uninit__winmm(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
((MAL_PFN_waveOutClose)pDevice->pContext->winmm.waveOutClose)((HWAVEOUT)pDevice->winmm.hDevice);
} else {
((MAL_PFN_waveInClose)pDevice->pContext->winmm.waveInClose)((HWAVEIN)pDevice->winmm.hDevice);
}
mal_free(pDevice->winmm._pHeapData);
CloseHandle((HANDLE)pDevice->winmm.hEvent);
}
static mal_result mal_device_init__winmm(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
mal_uint32 heapSize;
mal_uint32 iBit;
WORD closestBitsPerSample = 0;
WORD closestChannels = 0;
DWORD closestSampleRate = 0;
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->winmm);
UINT winMMDeviceID = 0;
if (pDeviceID != NULL) {
winMMDeviceID = (UINT)pDeviceID->winmm;
}
const char* errorMsg = "";
mal_result errorCode = MAL_ERROR;
// WinMM doesn't seem to have a good way to query the format of the device. Therefore, we'll restrict the formats to the
// standard formats documented here https://msdn.microsoft.com/en-us/library/windows/desktop/dd743855(v=vs.85).aspx. If
// that link goes stale, just look up the documentation for WAVEOUTCAPS or WAVEINCAPS.
WAVEFORMATEX wf;
mal_zero_object(&wf);
wf.cbSize = sizeof(wf);
wf.wFormatTag = WAVE_FORMAT_PCM;
wf.nChannels = (WORD)pConfig->channels;
wf.nSamplesPerSec = (DWORD)pConfig->sampleRate;
wf.wBitsPerSample = (WORD)mal_get_sample_size_in_bytes(pConfig->format)*8;
if (wf.nChannels > 2) {
wf.nChannels = 2;
}
if (wf.wBitsPerSample != 8 && wf.wBitsPerSample != 16) {
if (wf.wBitsPerSample <= 8) {
wf.wBitsPerSample = 8;
} else {
wf.wBitsPerSample = 16;
}
}
if (wf.nSamplesPerSec <= 11025) {
wf.nSamplesPerSec = 11025;
} else if (wf.nSamplesPerSec <= 22050) {
wf.nSamplesPerSec = 22050;
} else if (wf.nSamplesPerSec <= 44100) {
wf.nSamplesPerSec = 44100;
} else if (wf.nSamplesPerSec <= 48000) {
wf.nSamplesPerSec = 48000;
} else {
wf.nSamplesPerSec = 96000;
}
// Change the format based on the closest match of the supported standard formats.
DWORD dwFormats = 0;
if (type == mal_device_type_playback) {
WAVEOUTCAPSA caps;
if (((MAL_PFN_waveOutGetDevCapsA)pContext->winmm.waveOutGetDevCapsA)(winMMDeviceID, &caps, sizeof(caps)) == MMSYSERR_NOERROR) {
dwFormats = caps.dwFormats;
} else {
errorMsg = "[WinMM] Failed to retrieve internal device caps.", errorCode = MAL_WINMM_FAILED_TO_GET_DEVICE_CAPS;
goto on_error;
}
} else {
WAVEINCAPSA caps;
if (((MAL_PFN_waveInGetDevCapsA)pContext->winmm.waveInGetDevCapsA)(winMMDeviceID, &caps, sizeof(caps)) == MMSYSERR_NOERROR) {
dwFormats = caps.dwFormats;
} else {
errorMsg = "[WinMM] Failed to retrieve internal device caps.", errorCode = MAL_WINMM_FAILED_TO_GET_DEVICE_CAPS;
goto on_error;
}
}
if (dwFormats == 0) {
errorMsg = "[WinMM] Failed to retrieve the supported formats for the internal device.", errorCode = MAL_WINMM_FAILED_TO_GET_SUPPORTED_FORMATS;
goto on_error;
}
for (iBit = 0; iBit < 32; ++iBit) {
WORD formatBitsPerSample = 0;
WORD formatChannels = 0;
DWORD formatSampleRate = 0;
DWORD format = (dwFormats & (1 << iBit));
if (format != 0) {
switch (format)
{
case WAVE_FORMAT_1M08:
{
formatBitsPerSample = 8;
formatChannels = 1;
formatSampleRate = 110025;
} break;
case WAVE_FORMAT_1M16:
{
formatBitsPerSample = 16;
formatChannels = 1;
formatSampleRate = 110025;
} break;
case WAVE_FORMAT_1S08:
{
formatBitsPerSample = 8;
formatChannels = 2;
formatSampleRate = 110025;
} break;
case WAVE_FORMAT_1S16:
{
formatBitsPerSample = 16;
formatChannels = 2;
formatSampleRate = 110025;
} break;
case WAVE_FORMAT_2M08:
{
formatBitsPerSample = 8;
formatChannels = 1;
formatSampleRate = 22050;
} break;
case WAVE_FORMAT_2M16:
{
formatBitsPerSample = 16;
formatChannels = 1;
formatSampleRate = 22050;
} break;
case WAVE_FORMAT_2S08:
{
formatBitsPerSample = 8;
formatChannels = 2;
formatSampleRate = 22050;
} break;
case WAVE_FORMAT_2S16:
{
formatBitsPerSample = 16;
formatChannels = 2;
formatSampleRate = 22050;
} break;
case WAVE_FORMAT_44M08:
{
formatBitsPerSample = 8;
formatChannels = 1;
formatSampleRate = 44100;
} break;
case WAVE_FORMAT_44M16:
{
formatBitsPerSample = 16;
formatChannels = 1;
formatSampleRate = 44100;
} break;
case WAVE_FORMAT_44S08:
{
formatBitsPerSample = 8;
formatChannels = 2;
formatSampleRate = 44100;
} break;
case WAVE_FORMAT_44S16:
{
formatBitsPerSample = 16;
formatChannels = 2;
formatSampleRate = 44100;
} break;
case WAVE_FORMAT_48M08:
{
formatBitsPerSample = 8;
formatChannels = 1;
formatSampleRate = 48000;
} break;
case WAVE_FORMAT_48M16:
{
formatBitsPerSample = 16;
formatChannels = 1;
formatSampleRate = 48000;
} break;
case WAVE_FORMAT_48S08:
{
formatBitsPerSample = 8;
formatChannels = 2;
formatSampleRate = 48000;
} break;
case WAVE_FORMAT_48S16:
{
formatBitsPerSample = 16;
formatChannels = 2;
formatSampleRate = 48000;
} break;
case WAVE_FORMAT_96M08:
{
formatBitsPerSample = 8;
formatChannels = 1;
formatSampleRate = 96000;
} break;
case WAVE_FORMAT_96M16:
{
formatBitsPerSample = 16;
formatChannels = 1;
formatSampleRate = 96000;
} break;
case WAVE_FORMAT_96S08:
{
formatBitsPerSample = 8;
formatChannels = 2;
formatSampleRate = 96000;
} break;
case WAVE_FORMAT_96S16:
{
formatBitsPerSample = 16;
formatChannels = 2;
formatSampleRate = 96000;
} break;
default:
{
errorMsg = "[WinMM] The internal device does not support any of the standard formats.", errorCode = MAL_ERROR; // <-- Should never hit this.
goto on_error;
} break;
}
if (formatBitsPerSample == wf.wBitsPerSample && formatChannels == wf.nChannels && formatSampleRate == wf.nSamplesPerSec) {
break; // It's an exact match.
} else {
// It's not an exact match. Compare it with the closest match.
if (closestBitsPerSample == 0) {
// This is the first format, so nothing to compare against.
closestBitsPerSample = formatBitsPerSample;
closestChannels = formatChannels;
closestSampleRate = formatSampleRate;
} else {
// Prefer the channel count be the same over the others.
if (formatChannels != closestChannels) {
// Channels aren't equal. Favour the one equal to our desired channel count.
if (formatChannels == wf.nChannels) {
closestBitsPerSample = formatBitsPerSample;
closestChannels = formatChannels;
closestSampleRate = formatSampleRate;
}
} else {
// The channels are equal. Look at the format now.
if (formatBitsPerSample != closestBitsPerSample) {
if (formatBitsPerSample == wf.wBitsPerSample) {
closestBitsPerSample = formatBitsPerSample;
closestChannels = formatChannels;
closestSampleRate = formatSampleRate;
}
} else {
// Both the channels and formats are the same, so now just favour whichever's sample rate is closest to the requested rate.
mal_uint32 closestRateDiff = (closestSampleRate > wf.nSamplesPerSec) ? (closestSampleRate - wf.nSamplesPerSec) : (wf.nSamplesPerSec - closestSampleRate);
mal_uint32 formatRateDiff = (formatSampleRate > wf.nSamplesPerSec) ? (formatSampleRate - wf.nSamplesPerSec) : (wf.nSamplesPerSec - formatSampleRate);
if (formatRateDiff < closestRateDiff) {
closestBitsPerSample = formatBitsPerSample;
closestChannels = formatChannels;
closestSampleRate = formatSampleRate;
}
}
}
}
}
}
}
wf.wBitsPerSample = closestBitsPerSample;
wf.nChannels = closestChannels;
wf.nSamplesPerSec = closestSampleRate;
wf.nBlockAlign = (wf.nChannels * wf.wBitsPerSample) / 8;
wf.nAvgBytesPerSec = wf.nBlockAlign * wf.nSamplesPerSec;
// We use an event to know when a new fragment needs to be enqueued.
pDevice->winmm.hEvent = (mal_handle)CreateEvent(NULL, TRUE, TRUE, NULL);
if (pDevice->winmm.hEvent == NULL) {
errorMsg = "[WinMM] Failed to create event for fragment enqueing.", errorCode = MAL_FAILED_TO_CREATE_EVENT;
goto on_error;
}
if (type == mal_device_type_playback) {
MMRESULT result = ((MAL_PFN_waveOutOpen)pContext->winmm.waveOutOpen)((LPHWAVEOUT)&pDevice->winmm.hDevice, winMMDeviceID, &wf, (DWORD_PTR)pDevice->winmm.hEvent, (DWORD_PTR)pDevice, CALLBACK_EVENT | WAVE_ALLOWSYNC);
if (result != MMSYSERR_NOERROR) {
errorMsg = "[WinMM] Failed to open playback device.", errorCode = MAL_FAILED_TO_OPEN_BACKEND_DEVICE;
goto on_error;
}
} else {
MMRESULT result = ((MAL_PFN_waveInOpen)pDevice->pContext->winmm.waveInOpen)((LPHWAVEIN)&pDevice->winmm.hDevice, winMMDeviceID, &wf, (DWORD_PTR)pDevice->winmm.hEvent, (DWORD_PTR)pDevice, CALLBACK_EVENT | WAVE_ALLOWSYNC);
if (result != MMSYSERR_NOERROR) {
errorMsg = "[WinMM] Failed to open capture device.", errorCode = MAL_FAILED_TO_OPEN_BACKEND_DEVICE;
goto on_error;
}
}
// The internal formats need to be set based on the wf object.
if (wf.wFormatTag == WAVE_FORMAT_PCM) {
switch (wf.wBitsPerSample) {
case 8: pDevice->internalFormat = mal_format_u8; break;
case 16: pDevice->internalFormat = mal_format_s16; break;
case 24: pDevice->internalFormat = mal_format_s24; break;
case 32: pDevice->internalFormat = mal_format_s32; break;
default: mal_post_error(pDevice, "[WinMM] The device's internal format is not supported by mini_al.", MAL_FORMAT_NOT_SUPPORTED);
}
} else {
errorMsg = "[WinMM] The device's internal format is not supported by mini_al.", errorCode = MAL_FORMAT_NOT_SUPPORTED;
goto on_error;
}
pDevice->internalChannels = wf.nChannels;
pDevice->internalSampleRate = wf.nSamplesPerSec;
// Just use the default channel mapping. WinMM only supports mono or stereo anyway so it'll reliably be left/right order for stereo.
mal_get_default_channel_mapping(pDevice->pContext->backend, pDevice->internalChannels, pDevice->internalChannelMap);
// Latency with WinMM seems pretty bad from my testing... Need to increase the default buffer size.
if (pDevice->usingDefaultBufferSize) {
if (pDevice->type == mal_device_type_playback) {
pDevice->bufferSizeInFrames *= 4; // <-- Might need to fiddle with this to find a more ideal value. May even be able to just add a fixed amount rather than scaling.
} else {
pDevice->bufferSizeInFrames *= 2;
}
}
// The size of the intermediary buffer needs to be able to fit every fragment.
pDevice->winmm.fragmentSizeInFrames = pDevice->bufferSizeInFrames / pDevice->periods;
pDevice->winmm.fragmentSizeInBytes = pDevice->winmm.fragmentSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
heapSize = (sizeof(WAVEHDR) * pDevice->periods) + (pDevice->winmm.fragmentSizeInBytes * pDevice->periods);
pDevice->winmm._pHeapData = (mal_uint8*)mal_malloc(heapSize);
if (pDevice->winmm._pHeapData == NULL) {
errorMsg = "[WinMM] Failed to allocate memory for the intermediary buffer.", errorCode = MAL_OUT_OF_MEMORY;
goto on_error;
}
mal_zero_memory(pDevice->winmm._pHeapData, pDevice->winmm.fragmentSizeInBytes * pDevice->periods);
pDevice->winmm.pWAVEHDR = pDevice->winmm._pHeapData;
pDevice->winmm.pIntermediaryBuffer = pDevice->winmm._pHeapData + (sizeof(WAVEHDR) * pDevice->periods);
return MAL_SUCCESS;
on_error:
if (pDevice->type == mal_device_type_playback) {
((MAL_PFN_waveOutClose)pContext->winmm.waveOutClose)((HWAVEOUT)pDevice->winmm.hDevice);
} else {
((MAL_PFN_waveInClose)pContext->winmm.waveInClose)((HWAVEIN)pDevice->winmm.hDevice);
}
mal_free(pDevice->winmm._pHeapData);
return mal_post_error(pDevice, errorMsg, errorCode);
}
static mal_result mal_device__start_backend__winmm(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
// Playback. The device is started when we call waveOutWrite() with a block of data. From MSDN:
//
// Unless the device is paused by calling the waveOutPause function, playback begins when the first data block is sent to the device.
//
// When starting the device we commit every fragment. We signal the event before calling waveOutWrite().
mal_uint32 i;
for (i = 0; i < pDevice->periods; ++i) {
mal_zero_object(&((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i]);
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData = (LPSTR)(pDevice->winmm.pIntermediaryBuffer + (pDevice->winmm.fragmentSizeInBytes * i));
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwBufferLength = pDevice->winmm.fragmentSizeInBytes;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwFlags = 0L;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwLoops = 0L;
mal_device__read_frames_from_client(pDevice, pDevice->winmm.fragmentSizeInFrames, ((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData);
if (((MAL_PFN_waveOutPrepareHeader)pDevice->pContext->winmm.waveOutPrepareHeader)((HWAVEOUT)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR)) != MMSYSERR_NOERROR) {
return mal_post_error(pDevice, "[WinMM] Failed to start backend device. Failed to prepare header.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
ResetEvent(pDevice->winmm.hEvent);
for (i = 0; i < pDevice->periods; ++i) {
if (((MAL_PFN_waveOutWrite)pDevice->pContext->winmm.waveOutWrite)((HWAVEOUT)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR)) != MMSYSERR_NOERROR) {
return mal_post_error(pDevice, "[WinMM] Failed to start backend device. Failed to send data to the backend device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
} else {
// Capture.
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
mal_zero_object(&((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i]);
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData = (LPSTR)(pDevice->winmm.pIntermediaryBuffer + (pDevice->winmm.fragmentSizeInBytes * i));
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwBufferLength = pDevice->winmm.fragmentSizeInBytes;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwFlags = 0L;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwLoops = 0L;
MMRESULT resultMM = ((MAL_PFN_waveInPrepareHeader)pDevice->pContext->winmm.waveInPrepareHeader)((HWAVEIN)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to prepare header for capture device in preparation for adding a new capture buffer for the device.", mal_result_from_MMRESULT(resultMM));
break;
}
resultMM = ((MAL_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((HWAVEIN)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to add new capture buffer to the internal capture device.", mal_result_from_MMRESULT(resultMM));
break;
}
}
ResetEvent(pDevice->winmm.hEvent);
if (((MAL_PFN_waveInStart)pDevice->pContext->winmm.waveInStart)((HWAVEIN)pDevice->winmm.hDevice) != MMSYSERR_NOERROR) {
return mal_post_error(pDevice, "[WinMM] Failed to start backend device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
pDevice->winmm.iNextHeader = 0;
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__winmm(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
MMRESULT resultMM = ((MAL_PFN_waveOutReset)pDevice->pContext->winmm.waveOutReset)((HWAVEOUT)pDevice->winmm.hDevice);
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] WARNING: Failed to reset playback device.", mal_result_from_MMRESULT(resultMM));
}
// Unprepare all WAVEHDR structures.
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
resultMM = ((MAL_PFN_waveOutUnprepareHeader)pDevice->pContext->winmm.waveOutUnprepareHeader)((HWAVEOUT)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] WARNING: Failed to unprepare header for playback device.", mal_result_from_MMRESULT(resultMM));
}
}
} else {
MMRESULT resultMM = ((MAL_PFN_waveInReset)pDevice->pContext->winmm.waveInReset)((HWAVEIN)pDevice->winmm.hDevice);
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] WARNING: Failed to reset capture device.", mal_result_from_MMRESULT(resultMM));
}
// Unprepare all WAVEHDR structures.
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
resultMM = ((MAL_PFN_waveInUnprepareHeader)pDevice->pContext->winmm.waveInUnprepareHeader)((HWAVEIN)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] WARNING: Failed to unprepare header for playback device.", mal_result_from_MMRESULT(resultMM));
}
}
}
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__winmm(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->winmm.breakFromMainLoop = MAL_TRUE;
SetEvent((HANDLE)pDevice->winmm.hEvent);
return MAL_SUCCESS;
}
static mal_result mal_device__main_loop__winmm(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_uint32 counter;
pDevice->winmm.breakFromMainLoop = MAL_FALSE;
while (!pDevice->winmm.breakFromMainLoop) {
// Wait for a block of data to finish processing...
if (WaitForSingleObject((HANDLE)pDevice->winmm.hEvent, INFINITE) != WAIT_OBJECT_0) {
break;
}
// Break from the main loop if the device isn't started anymore. Likely what's happened is the application
// has requested that the device be stopped.
if (!mal_device_is_started(pDevice)) {
break;
}
// Any headers that are marked as done need to be handled. We start by processing the completed blocks. Then we reset the event
// and then write or add replacement buffers to the device.
mal_uint32 iFirstHeader = pDevice->winmm.iNextHeader;
for (counter = 0; counter < pDevice->periods; ++counter) {
mal_uint32 i = pDevice->winmm.iNextHeader;
if ((((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwFlags & WHDR_DONE) == 0) {
break;
}
if (pDevice->type == mal_device_type_playback) {
// Playback.
MMRESULT resultMM = ((MAL_PFN_waveOutUnprepareHeader)pDevice->pContext->winmm.waveOutUnprepareHeader)((HWAVEOUT)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to unprepare header for playback device in preparation for sending a new block of data to the device for playback.", mal_result_from_MMRESULT(resultMM));
break;
}
mal_zero_object(&((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i]);
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData = (LPSTR)(pDevice->winmm.pIntermediaryBuffer + (pDevice->winmm.fragmentSizeInBytes * i));
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwBufferLength = pDevice->winmm.fragmentSizeInBytes;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwFlags = 0L;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwLoops = 0L;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwUser = 1; // <-- Used in the next section to identify the buffers that needs to be re-written to the device.
mal_device__read_frames_from_client(pDevice, pDevice->winmm.fragmentSizeInFrames, ((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData);
resultMM = ((MAL_PFN_waveOutPrepareHeader)pDevice->pContext->winmm.waveOutPrepareHeader)((HWAVEOUT)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to prepare header for playback device in preparation for sending a new block of data to the device for playback.", mal_result_from_MMRESULT(resultMM));
break;
}
} else {
// Capture.
mal_uint32 framesCaptured = (mal_uint32)(((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwBytesRecorded) / pDevice->internalChannels / mal_get_sample_size_in_bytes(pDevice->internalFormat);
if (framesCaptured > 0) {
mal_device__send_frames_to_client(pDevice, framesCaptured, ((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData);
}
MMRESULT resultMM = ((MAL_PFN_waveInUnprepareHeader)pDevice->pContext->winmm.waveInUnprepareHeader)((HWAVEIN)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to unprepare header for capture device in preparation for adding a new capture buffer for the device.", mal_result_from_MMRESULT(resultMM));
break;
}
mal_zero_object(&((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i]);
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].lpData = (LPSTR)(pDevice->winmm.pIntermediaryBuffer + (pDevice->winmm.fragmentSizeInBytes * i));
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwBufferLength = pDevice->winmm.fragmentSizeInBytes;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwFlags = 0L;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwLoops = 0L;
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwUser = 1; // <-- Used in the next section to identify the buffers that needs to be re-added to the device.
resultMM = ((MAL_PFN_waveInPrepareHeader)pDevice->pContext->winmm.waveInPrepareHeader)((HWAVEIN)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to prepare header for capture device in preparation for adding a new capture buffer for the device.", mal_result_from_MMRESULT(resultMM));
break;
}
}
pDevice->winmm.iNextHeader = (pDevice->winmm.iNextHeader + 1) % pDevice->periods;
}
ResetEvent((HANDLE)pDevice->winmm.hEvent);
for (counter = 0; counter < pDevice->periods; ++counter) {
mal_uint32 i = (iFirstHeader + counter) % pDevice->periods;
if (((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwUser == 1) {
((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i].dwUser = 0;
if (pDevice->type == mal_device_type_playback) {
// Playback.
MMRESULT resultMM = ((MAL_PFN_waveOutWrite)pDevice->pContext->winmm.waveOutWrite)((HWAVEOUT)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to write data to the internal playback device.", mal_result_from_MMRESULT(resultMM));
break;
}
} else {
// Capture.
MMRESULT resultMM = ((MAL_PFN_waveInAddBuffer)pDevice->pContext->winmm.waveInAddBuffer)((HWAVEIN)pDevice->winmm.hDevice, &((LPWAVEHDR)pDevice->winmm.pWAVEHDR)[i], sizeof(WAVEHDR));
if (resultMM != MMSYSERR_NOERROR) {
mal_post_error(pDevice, "[WinMM] Failed to add new capture buffer to the internal capture device.", mal_result_from_MMRESULT(resultMM));
break;
}
}
}
}
}
return MAL_SUCCESS;
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// ALSA Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_ALSA
#include <alsa/asoundlib.h>
// This array allows mini_al to control device-specific default buffer sizes. This uses a scaling factor. Order is important. If
// any part of the string is present in the device's name, the associated scale will be used.
struct
{
const char* name;
float scale;
} g_malDefaultBufferSizeScalesALSA[] = {
{"bcm2835 IEC958/HDMI", 20},
{"bcm2835 ALSA", 20}
};
static float mal_find_default_buffer_size_scale__alsa(const char* deviceName)
{
if (deviceName == NULL) {
return 1;
}
for (size_t i = 0; i < mal_countof(g_malDefaultBufferSizeScalesALSA); ++i) {
if (strstr(g_malDefaultBufferSizeScalesALSA[i].name, deviceName) != NULL) {
return g_malDefaultBufferSizeScalesALSA[i].scale;
}
}
return 1;
}
typedef int (* mal_snd_pcm_open_proc) (snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode);
typedef int (* mal_snd_pcm_close_proc) (snd_pcm_t *pcm);
typedef size_t (* mal_snd_pcm_hw_params_sizeof_proc) (void);
typedef int (* mal_snd_pcm_hw_params_any_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
typedef int (* mal_snd_pcm_hw_params_set_format_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
typedef int (* mal_snd_pcm_hw_params_set_format_first_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t *format);
typedef void (* mal_snd_pcm_hw_params_get_format_mask_proc) (snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
typedef int (* mal_snd_pcm_hw_params_set_channels_near_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
typedef int (* mal_snd_pcm_hw_params_set_rate_resample_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
typedef int (* mal_snd_pcm_hw_params_set_rate_near_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
typedef int (* mal_snd_pcm_hw_params_set_buffer_size_near_proc)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
typedef int (* mal_snd_pcm_hw_params_set_periods_near_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
typedef int (* mal_snd_pcm_hw_params_set_access_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access);
typedef int (* mal_snd_pcm_hw_params_get_format_proc) (snd_pcm_hw_params_t *params, snd_pcm_format_t *format);
typedef int (* mal_snd_pcm_hw_params_get_channels_proc) (snd_pcm_hw_params_t *params, unsigned int *val);
typedef int (* mal_snd_pcm_hw_params_get_rate_proc) (snd_pcm_hw_params_t *params, unsigned int *rate, int *dir);
typedef int (* mal_snd_pcm_hw_params_get_buffer_size_proc) (snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
typedef int (* mal_snd_pcm_hw_params_get_periods_proc) (snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
typedef int (* mal_snd_pcm_hw_params_get_access_proc) (snd_pcm_hw_params_t *params, snd_pcm_access_t *_access);
typedef int (* mal_snd_pcm_hw_params_proc) (snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
typedef size_t (* mal_snd_pcm_sw_params_sizeof_proc) (void);
typedef int (* mal_snd_pcm_sw_params_current_proc) (snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
typedef int (* mal_snd_pcm_sw_params_set_avail_min_proc) (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
typedef int (* mal_snd_pcm_sw_params_set_start_threshold_proc) (snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_uframes_t val);
typedef int (* mal_snd_pcm_sw_params_proc) (snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
typedef size_t (* mal_snd_pcm_format_mask_sizeof_proc) (void);
typedef int (* mal_snd_pcm_format_mask_test_proc) (const snd_pcm_format_mask_t *mask, snd_pcm_format_t val);
typedef snd_pcm_chmap_t * (* mal_snd_pcm_get_chmap_proc) (snd_pcm_t *pcm);
typedef int (* mal_snd_pcm_prepare_proc) (snd_pcm_t *pcm);
typedef int (* mal_snd_pcm_start_proc) (snd_pcm_t *pcm);
typedef int (* mal_snd_pcm_drop_proc) (snd_pcm_t *pcm);
typedef int (* mal_snd_device_name_hint_proc) (int card, const char *iface, void ***hints);
typedef char * (* mal_snd_device_name_get_hint_proc) (const void *hint, const char *id);
typedef int (* mal_snd_card_get_index_proc) (const char *name);
typedef int (* mal_snd_device_name_free_hint_proc) (void **hints);
typedef int (* mal_snd_pcm_mmap_begin_proc) (snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas, snd_pcm_uframes_t *offset, snd_pcm_uframes_t *frames);
typedef snd_pcm_sframes_t (* mal_snd_pcm_mmap_commit_proc) (snd_pcm_t *pcm, snd_pcm_uframes_t offset, snd_pcm_uframes_t frames);
typedef int (* mal_snd_pcm_recover_proc) (snd_pcm_t *pcm, int err, int silent);
typedef snd_pcm_sframes_t (* mal_snd_pcm_readi_proc) (snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
typedef snd_pcm_sframes_t (* mal_snd_pcm_writei_proc) (snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
typedef snd_pcm_sframes_t (* mal_snd_pcm_avail_proc) (snd_pcm_t *pcm);
typedef snd_pcm_sframes_t (* mal_snd_pcm_avail_update_proc) (snd_pcm_t *pcm);
typedef int (* mal_snd_pcm_wait_proc) (snd_pcm_t *pcm, int timeout);
typedef int (* mal_snd_pcm_info) (snd_pcm_t *pcm, snd_pcm_info_t* info);
typedef size_t (* mal_snd_pcm_info_sizeof) ();
typedef const char* (* mal_snd_pcm_info_get_name) (const snd_pcm_info_t* info);
static snd_pcm_format_t g_mal_ALSAFormats[] = {
SND_PCM_FORMAT_UNKNOWN, // mal_format_unknown
SND_PCM_FORMAT_U8, // mal_format_u8
SND_PCM_FORMAT_S16_LE, // mal_format_s16
SND_PCM_FORMAT_S24_3LE, // mal_format_s24
SND_PCM_FORMAT_S32_LE, // mal_format_s32
SND_PCM_FORMAT_FLOAT_LE // mal_format_f32
};
snd_pcm_format_t mal_convert_mal_format_to_alsa_format(mal_format format)
{
return g_mal_ALSAFormats[format];
}
mal_format mal_convert_alsa_format_to_mal_format(snd_pcm_format_t formatALSA)
{
switch (formatALSA)
{
case SND_PCM_FORMAT_U8: return mal_format_u8;
case SND_PCM_FORMAT_S16_LE: return mal_format_s16;
case SND_PCM_FORMAT_S24_3LE: return mal_format_s24;
case SND_PCM_FORMAT_S32_LE: return mal_format_s32;
case SND_PCM_FORMAT_FLOAT_LE: return mal_format_f32;
default: return mal_format_unknown;
}
}
mal_channel mal_convert_alsa_channel_position_to_mal_channel(unsigned int alsaChannelPos)
{
switch (alsaChannelPos)
{
case SND_CHMAP_FL: return MAL_CHANNEL_FRONT_LEFT;
case SND_CHMAP_FR: return MAL_CHANNEL_FRONT_RIGHT;
case SND_CHMAP_RL: return MAL_CHANNEL_BACK_LEFT;
case SND_CHMAP_RR: return MAL_CHANNEL_BACK_RIGHT;
case SND_CHMAP_FC: return MAL_CHANNEL_FRONT_CENTER;
case SND_CHMAP_LFE: return MAL_CHANNEL_LFE;
case SND_CHMAP_SL: return MAL_CHANNEL_SIDE_LEFT;
case SND_CHMAP_SR: return MAL_CHANNEL_SIDE_RIGHT;
case SND_CHMAP_RC: return MAL_CHANNEL_BACK_CENTER;
case SND_CHMAP_FLC: return MAL_CHANNEL_FRONT_LEFT_CENTER;
case SND_CHMAP_FRC: return MAL_CHANNEL_FRONT_RIGHT_CENTER;
case SND_CHMAP_RLC: return 0;
case SND_CHMAP_RRC: return 0;
case SND_CHMAP_FLW: return 0;
case SND_CHMAP_FRW: return 0;
case SND_CHMAP_FLH: return 0;
case SND_CHMAP_FCH: return 0;
case SND_CHMAP_FRH: return 0;
case SND_CHMAP_TC: return MAL_CHANNEL_TOP_CENTER;
case SND_CHMAP_TFL: return MAL_CHANNEL_TOP_FRONT_LEFT;
case SND_CHMAP_TFR: return MAL_CHANNEL_TOP_FRONT_RIGHT;
case SND_CHMAP_TFC: return MAL_CHANNEL_TOP_FRONT_CENTER;
case SND_CHMAP_TRL: return MAL_CHANNEL_TOP_BACK_LEFT;
case SND_CHMAP_TRR: return MAL_CHANNEL_TOP_BACK_RIGHT;
case SND_CHMAP_TRC: return MAL_CHANNEL_TOP_BACK_CENTER;
default: break;
}
return 0;
}
mal_result mal_context_init__alsa(mal_context* pContext)
{
mal_assert(pContext != NULL);
pContext->alsa.asoundSO = mal_dlopen("libasound.so");
if (pContext->alsa.asoundSO == NULL) {
return MAL_NO_BACKEND;
}
pContext->alsa.snd_pcm_open = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_open");
pContext->alsa.snd_pcm_close = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_close");
pContext->alsa.snd_pcm_hw_params_sizeof = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_sizeof");
pContext->alsa.snd_pcm_hw_params_any = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_any");
pContext->alsa.snd_pcm_hw_params_set_format = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_format");
pContext->alsa.snd_pcm_hw_params_set_format_first = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_format_first");
pContext->alsa.snd_pcm_hw_params_get_format_mask = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_format_mask");
pContext->alsa.snd_pcm_hw_params_set_channels_near = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_channels_near");
pContext->alsa.snd_pcm_hw_params_set_rate_resample = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate_resample");
pContext->alsa.snd_pcm_hw_params_set_rate_near = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_rate_near");
pContext->alsa.snd_pcm_hw_params_set_buffer_size_near = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_buffer_size_near");
pContext->alsa.snd_pcm_hw_params_set_periods_near = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_periods_near");
pContext->alsa.snd_pcm_hw_params_set_access = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_set_access");
pContext->alsa.snd_pcm_hw_params_get_format = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_format");
pContext->alsa.snd_pcm_hw_params_get_channels = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_channels");
pContext->alsa.snd_pcm_hw_params_get_rate = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_rate");
pContext->alsa.snd_pcm_hw_params_get_buffer_size = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_buffer_size");
pContext->alsa.snd_pcm_hw_params_get_periods = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_periods");
pContext->alsa.snd_pcm_hw_params_get_access = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params_get_access");
pContext->alsa.snd_pcm_hw_params = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_hw_params");
pContext->alsa.snd_pcm_sw_params_sizeof = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_sw_params_sizeof");
pContext->alsa.snd_pcm_sw_params_current = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_sw_params_current");
pContext->alsa.snd_pcm_sw_params_set_avail_min = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_sw_params_set_avail_min");
pContext->alsa.snd_pcm_sw_params_set_start_threshold = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_sw_params_set_start_threshold");
pContext->alsa.snd_pcm_sw_params = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_sw_params");
pContext->alsa.snd_pcm_format_mask_sizeof = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_format_mask_sizeof");
pContext->alsa.snd_pcm_format_mask_test = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_format_mask_test");
pContext->alsa.snd_pcm_get_chmap = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_get_chmap");
pContext->alsa.snd_pcm_prepare = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_prepare");
pContext->alsa.snd_pcm_start = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_start");
pContext->alsa.snd_pcm_drop = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_drop");
pContext->alsa.snd_device_name_hint = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_device_name_hint");
pContext->alsa.snd_device_name_get_hint = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_device_name_get_hint");
pContext->alsa.snd_card_get_index = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_card_get_index");
pContext->alsa.snd_device_name_free_hint = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_device_name_free_hint");
pContext->alsa.snd_pcm_mmap_begin = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_mmap_begin");
pContext->alsa.snd_pcm_mmap_commit = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_mmap_commit");
pContext->alsa.snd_pcm_recover = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_recover");
pContext->alsa.snd_pcm_readi = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_readi");
pContext->alsa.snd_pcm_writei = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_writei");
pContext->alsa.snd_pcm_avail = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_avail");
pContext->alsa.snd_pcm_avail_update = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_avail_update");
pContext->alsa.snd_pcm_wait = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_wait");
pContext->alsa.snd_pcm_info = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_info");
pContext->alsa.snd_pcm_info_sizeof = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_info_sizeof");
pContext->alsa.snd_pcm_info_get_name = (mal_proc)mal_dlsym(pContext->alsa.asoundSO, "snd_pcm_info_get_name");
return MAL_SUCCESS;
}
mal_result mal_context_uninit__alsa(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_alsa);
(void)pContext;
return MAL_SUCCESS;
}
static const char* mal_find_char(const char* str, char c, int* index)
{
int i = 0;
for (;;) {
if (str[i] == '\0') {
if (index) *index = -1;
return NULL;
}
if (str[i] == c) {
if (index) *index = i;
return str + i;
}
i += 1;
}
// Should never get here, but treat it as though the character was not found to make me feel
// better inside.
if (index) *index = -1;
return NULL;
}
// Waits for a number of frames to become available for either capture or playback. The return
// value is the number of frames available.
//
// This will return early if the main loop is broken with mal_device__break_main_loop().
static mal_uint32 mal_device__wait_for_frames__alsa(mal_device* pDevice, mal_bool32* pRequiresRestart)
{
mal_assert(pDevice != NULL);
if (pRequiresRestart) *pRequiresRestart = MAL_FALSE;
mal_uint32 periodSizeInFrames = pDevice->bufferSizeInFrames / pDevice->periods;
while (!pDevice->alsa.breakFromMainLoop) {
// Wait for something to become available. The timeout should not affect latency - it's only used to break from the wait
// so we can check whether or not the device has been stopped.
const int timeoutInMilliseconds = 10;
int waitResult = ((mal_snd_pcm_wait_proc)pDevice->pContext->alsa.snd_pcm_wait)((snd_pcm_t*)pDevice->alsa.pPCM, timeoutInMilliseconds);
if (waitResult < 0) {
if (waitResult == -EPIPE) {
if (((mal_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((snd_pcm_t*)pDevice->alsa.pPCM, waitResult, MAL_TRUE) < 0) {
return 0;
}
if (pRequiresRestart) *pRequiresRestart = MAL_TRUE; // A device recovery means a restart for mmap mode.
}
}
if (pDevice->alsa.breakFromMainLoop) {
return 0;
}
snd_pcm_sframes_t framesAvailable = ((mal_snd_pcm_avail_update_proc)pDevice->pContext->alsa.snd_pcm_avail_update)((snd_pcm_t*)pDevice->alsa.pPCM);
if (framesAvailable < 0) {
if (framesAvailable == -EPIPE) {
if (((mal_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((snd_pcm_t*)pDevice->alsa.pPCM, framesAvailable, MAL_TRUE) < 0) {
return 0;
}
if (pRequiresRestart) *pRequiresRestart = MAL_TRUE; // A device recovery means a restart for mmap mode.
// Try again, but if it fails this time just return an error.
framesAvailable = ((mal_snd_pcm_avail_update_proc)pDevice->pContext->alsa.snd_pcm_avail_update)((snd_pcm_t*)pDevice->alsa.pPCM);
if (framesAvailable < 0) {
return 0;
}
}
}
// Keep the returned number of samples consistent and based on the period size.
if (framesAvailable >= periodSizeInFrames) {
return periodSizeInFrames;
}
}
// We'll get here if the loop was terminated. Just return whatever's available.
snd_pcm_sframes_t framesAvailable = ((mal_snd_pcm_avail_update_proc)pDevice->pContext->alsa.snd_pcm_avail_update)((snd_pcm_t*)pDevice->alsa.pPCM);
if (framesAvailable < 0) {
return 0;
}
return framesAvailable;
}
static mal_bool32 mal_device_write__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (!mal_device_is_started(pDevice) && mal_device__get_state(pDevice) != MAL_STATE_STARTING) {
return MAL_FALSE;
}
if (pDevice->alsa.breakFromMainLoop) {
return MAL_FALSE;
}
if (pDevice->alsa.isUsingMMap) {
// mmap.
mal_bool32 requiresRestart;
mal_uint32 framesAvailable = mal_device__wait_for_frames__alsa(pDevice, &requiresRestart);
if (framesAvailable == 0) {
return MAL_FALSE;
}
// Don't bother asking the client for more audio data if we're just stopping the device anyway.
if (pDevice->alsa.breakFromMainLoop) {
return MAL_FALSE;
}
const snd_pcm_channel_area_t* pAreas;
snd_pcm_uframes_t mappedOffset;
snd_pcm_uframes_t mappedFrames = framesAvailable;
while (framesAvailable > 0) {
int result = ((mal_snd_pcm_mmap_begin_proc)pDevice->pContext->alsa.snd_pcm_mmap_begin)((snd_pcm_t*)pDevice->alsa.pPCM, &pAreas, &mappedOffset, &mappedFrames);
if (result < 0) {
return MAL_FALSE;
}
if (mappedFrames > 0) {
void* pBuffer = (mal_uint8*)pAreas[0].addr + ((pAreas[0].first + (mappedOffset * pAreas[0].step)) / 8);
mal_device__read_frames_from_client(pDevice, mappedFrames, pBuffer);
}
result = ((mal_snd_pcm_mmap_commit_proc)pDevice->pContext->alsa.snd_pcm_mmap_commit)((snd_pcm_t*)pDevice->alsa.pPCM, mappedOffset, mappedFrames);
if (result < 0 || (snd_pcm_uframes_t)result != mappedFrames) {
((mal_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((snd_pcm_t*)pDevice->alsa.pPCM, result, MAL_TRUE);
return MAL_FALSE;
}
if (requiresRestart) {
if (((mal_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((snd_pcm_t*)pDevice->alsa.pPCM) < 0) {
return MAL_FALSE;
}
}
framesAvailable -= mappedFrames;
}
} else {
// readi/writei.
while (!pDevice->alsa.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__wait_for_frames__alsa(pDevice, NULL);
if (framesAvailable == 0) {
continue;
}
// Don't bother asking the client for more audio data if we're just stopping the device anyway.
if (pDevice->alsa.breakFromMainLoop) {
return MAL_FALSE;
}
mal_device__read_frames_from_client(pDevice, framesAvailable, pDevice->alsa.pIntermediaryBuffer);
snd_pcm_sframes_t framesWritten = ((mal_snd_pcm_writei_proc)pDevice->pContext->alsa.snd_pcm_writei)((snd_pcm_t*)pDevice->alsa.pPCM, pDevice->alsa.pIntermediaryBuffer, framesAvailable);
if (framesWritten < 0) {
if (framesWritten == -EAGAIN) {
continue; // Just keep trying...
} else if (framesWritten == -EPIPE) {
// Underrun. Just recover and try writing again.
if (((mal_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((snd_pcm_t*)pDevice->alsa.pPCM, framesWritten, MAL_TRUE) < 0) {
mal_post_error(pDevice, "[ALSA] Failed to recover device after underrun.", MAL_ALSA_FAILED_TO_RECOVER_DEVICE);
return MAL_FALSE;
}
framesWritten = ((mal_snd_pcm_writei_proc)pDevice->pContext->alsa.snd_pcm_writei)((snd_pcm_t*)pDevice->alsa.pPCM, pDevice->alsa.pIntermediaryBuffer, framesAvailable);
if (framesWritten < 0) {
mal_post_error(pDevice, "[ALSA] Failed to write data to the internal device.", MAL_FAILED_TO_SEND_DATA_TO_DEVICE);
return MAL_FALSE;
}
break; // Success.
} else {
mal_post_error(pDevice, "[ALSA] snd_pcm_writei() failed when writing initial data.", MAL_FAILED_TO_SEND_DATA_TO_DEVICE);
return MAL_FALSE;
}
} else {
break; // Success.
}
}
}
return MAL_TRUE;
}
static mal_bool32 mal_device_read__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (!mal_device_is_started(pDevice)) {
return MAL_FALSE;
}
if (pDevice->alsa.breakFromMainLoop) {
return MAL_FALSE;
}
mal_uint32 framesToSend = 0;
void* pBuffer = NULL;
if (pDevice->alsa.pIntermediaryBuffer == NULL) {
// mmap.
mal_bool32 requiresRestart;
mal_uint32 framesAvailable = mal_device__wait_for_frames__alsa(pDevice, &requiresRestart);
if (framesAvailable == 0) {
return MAL_FALSE;
}
const snd_pcm_channel_area_t* pAreas;
snd_pcm_uframes_t mappedOffset;
snd_pcm_uframes_t mappedFrames = framesAvailable;
while (framesAvailable > 0) {
int result = ((mal_snd_pcm_mmap_begin_proc)pDevice->pContext->alsa.snd_pcm_mmap_begin)((snd_pcm_t*)pDevice->alsa.pPCM, &pAreas, &mappedOffset, &mappedFrames);
if (result < 0) {
return MAL_FALSE;
}
if (mappedFrames > 0) {
void* pBuffer = (mal_uint8*)pAreas[0].addr + ((pAreas[0].first + (mappedOffset * pAreas[0].step)) / 8);
mal_device__send_frames_to_client(pDevice, mappedFrames, pBuffer);
}
result = ((mal_snd_pcm_mmap_commit_proc)pDevice->pContext->alsa.snd_pcm_mmap_commit)((snd_pcm_t*)pDevice->alsa.pPCM, mappedOffset, mappedFrames);
if (result < 0 || (snd_pcm_uframes_t)result != mappedFrames) {
((mal_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((snd_pcm_t*)pDevice->alsa.pPCM, result, MAL_TRUE);
return MAL_FALSE;
}
if (requiresRestart) {
if (((mal_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((snd_pcm_t*)pDevice->alsa.pPCM) < 0) {
return MAL_FALSE;
}
}
framesAvailable -= mappedFrames;
}
} else {
// readi/writei.
snd_pcm_sframes_t framesRead = 0;
while (!pDevice->alsa.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__wait_for_frames__alsa(pDevice, NULL);
if (framesAvailable == 0) {
continue;
}
framesRead = ((mal_snd_pcm_readi_proc)pDevice->pContext->alsa.snd_pcm_readi)((snd_pcm_t*)pDevice->alsa.pPCM, pDevice->alsa.pIntermediaryBuffer, framesAvailable);
if (framesRead < 0) {
if (framesRead == -EAGAIN) {
continue; // Just keep trying...
} else if (framesRead == -EPIPE) {
// Overrun. Just recover and try reading again.
if (((mal_snd_pcm_recover_proc)pDevice->pContext->alsa.snd_pcm_recover)((snd_pcm_t*)pDevice->alsa.pPCM, framesRead, MAL_TRUE) < 0) {
mal_post_error(pDevice, "[ALSA] Failed to recover device after overrun.", MAL_ALSA_FAILED_TO_RECOVER_DEVICE);
return MAL_FALSE;
}
framesRead = ((mal_snd_pcm_readi_proc)pDevice->pContext->alsa.snd_pcm_readi)((snd_pcm_t*)pDevice->alsa.pPCM, pDevice->alsa.pIntermediaryBuffer, framesAvailable);
if (framesRead < 0) {
mal_post_error(pDevice, "[ALSA] Failed to read data from the internal device.", MAL_FAILED_TO_READ_DATA_FROM_DEVICE);
return MAL_FALSE;
}
break; // Success.
} else {
return MAL_FALSE;
}
} else {
break; // Success.
}
}
framesToSend = framesRead;
pBuffer = pDevice->alsa.pIntermediaryBuffer;
}
if (framesToSend > 0) {
mal_device__send_frames_to_client(pDevice, framesToSend, pBuffer);
}
return MAL_TRUE;
}
static mal_bool32 mal_is_device_name_in_hw_format__alsa(const char* hwid)
{
// This function is just checking whether or not hwid is in "hw:%d,%d" format.
if (hwid == NULL) {
return MAL_FALSE;
}
if (hwid[0] != 'h' || hwid[1] != 'w' || hwid[2] != ':') {
return MAL_FALSE;
}
hwid += 3;
int commaPos;
const char* dev = mal_find_char(hwid, ',', &commaPos);
if (dev == NULL) {
return MAL_FALSE;
} else {
dev += 1; // Skip past the ",".
}
// Check if the part between the ":" and the "," contains only numbers. If not, return false.
for (int i = 0; i < commaPos; ++i) {
if (hwid[i] < '0' || hwid[i] > '9') {
return MAL_FALSE;
}
}
// Check if everything after the "," is numeric. If not, return false.
int i = 0;
while (dev[i] != '\0') {
if (dev[i] < '0' || dev[i] > '9') {
return MAL_FALSE;
}
i += 1;
}
return MAL_TRUE;
}
static int mal_convert_device_name_to_hw_format__alsa(mal_context* pContext, char* dst, size_t dstSize, const char* src) // Returns 0 on success, non-0 on error.
{
// src should look something like this: "hw:CARD=I82801AAICH,DEV=0"
if (dst == NULL) return -1;
if (dstSize < 7) return -1; // Absolute minimum size of the output buffer is 7 bytes.
*dst = '\0'; // Safety.
if (src == NULL) return -1;
// If the input name is already in "hw:%d,%d" format, just return that verbatim.
if (mal_is_device_name_in_hw_format__alsa(src)) {
return mal_strcpy_s(dst, dstSize, src);
}
int colonPos;
src = mal_find_char(src, ':', &colonPos);
if (src == NULL) {
return -1; // Couldn't find a colon
}
char card[256];
int commaPos;
const char* dev = mal_find_char(src, ',', &commaPos);
if (dev == NULL) {
dev = "0";
mal_strncpy_s(card, sizeof(card), src+6, (size_t)-1); // +6 = ":CARD="
} else {
dev = dev + 5; // +5 = ",DEV="
mal_strncpy_s(card, sizeof(card), src+6, commaPos-6); // +6 = ":CARD="
}
int cardIndex = ((mal_snd_card_get_index_proc)pContext->alsa.snd_card_get_index)(card);
if (cardIndex < 0) {
return -2; // Failed to retrieve the card index.
}
//printf("TESTING: CARD=%s,DEV=%s\n", card, dev);
// Construction.
dst[0] = 'h'; dst[1] = 'w'; dst[2] = ':';
if (mal_itoa_s(cardIndex, dst+3, dstSize-3, 10) != 0) {
return -3;
}
if (mal_strcat_s(dst, dstSize, ",") != 0) {
return -3;
}
if (mal_strcat_s(dst, dstSize, dev) != 0) {
return -3;
}
return 0;
}
static mal_bool32 mal_does_id_exist_in_list__alsa(mal_device_id* pUniqueIDs, mal_uint32 count, const char* pHWID)
{
mal_assert(pHWID != NULL);
for (mal_uint32 i = 0; i < count; ++i) {
if (mal_strcmp(pUniqueIDs[i].alsa, pHWID) == 0) {
return MAL_TRUE;
}
}
return MAL_FALSE;
}
static mal_result mal_enumerate_devices__alsa(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 0;
char** ppDeviceHints;
if (((mal_snd_device_name_hint_proc)pContext->alsa.snd_device_name_hint)(-1, "pcm", (void***)&ppDeviceHints) < 0) {
return MAL_NO_BACKEND;
}
mal_device_id* pUniqueIDs = NULL;
mal_uint32 uniqueIDCount = 0;
char** ppNextDeviceHint = ppDeviceHints;
while (*ppNextDeviceHint != NULL) {
char* NAME = ((mal_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "NAME");
char* DESC = ((mal_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "DESC");
char* IOID = ((mal_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "IOID");
// Only include devices if they are of the correct type. Special cases for "default", "null" and "pulse" - these are included for both playback and capture
// regardless of the IOID setting.
mal_bool32 includeThisDevice = MAL_FALSE;
if (strcmp(NAME, "default") == 0 || strcmp(NAME, "pulse") == 0 || strcmp(NAME, "null") == 0) {
includeThisDevice = MAL_TRUE;
// Exclude the "null" device if requested.
if (strcmp(NAME, "null") == 0 && pContext->config.alsa.excludeNullDevice) {
includeThisDevice = MAL_FALSE;
}
} else {
if ((type == mal_device_type_playback && (IOID == NULL || strcmp(IOID, "Output") == 0)) ||
(type == mal_device_type_capture && (IOID != NULL && strcmp(IOID, "Input" ) == 0))) {
includeThisDevice = MAL_TRUE;
}
}
if (includeThisDevice) {
#if 0
printf("NAME: %s\n", NAME);
printf("DESC: %s\n", DESC);
printf("IOID: %s\n", IOID);
char hwid2[256];
mal_convert_device_name_to_hw_format__alsa(pContext, hwid2, sizeof(hwid2), NAME);
printf("DEVICE ID: %s (%d)\n\n", hwid2, *pCount);
#endif
char hwid[sizeof(pUniqueIDs->alsa)];
if (NAME != NULL) {
if (pContext->config.alsa.useVerboseDeviceEnumeration) {
// Verbose mode. Use the name exactly as-is.
mal_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1);
} else {
// Simplified mode. Use ":%d,%d" format.
if (mal_convert_device_name_to_hw_format__alsa(pContext, hwid, sizeof(hwid), NAME) == 0) {
// At this point, hwid looks like "hw:0,0". In simplified enumeration mode, we actually want to strip off the
// plugin name so it looks like ":0,0". The reason for this is that this special format is detected at device
// initialization time and is used as an indicator to try and use the most appropriate plugin depending on the
// device type and sharing mode.
char* dst = hwid;
char* src = hwid+2;
while ((*dst++ = *src++));
} else {
// Conversion to "hw:%d,%d" failed. Just use the name as-is.
mal_strncpy_s(hwid, sizeof(hwid), NAME, (size_t)-1);
}
if (mal_does_id_exist_in_list__alsa(pUniqueIDs, uniqueIDCount, hwid)) {
goto next_device; // The device has already been enumerated. Move on to the next one.
} else {
// The device has not yet been enumerated. Make sure it's added to our list so that it's not enumerated again.
mal_device_id* pNewUniqueIDs = mal_realloc(pUniqueIDs, sizeof(*pUniqueIDs) * (uniqueIDCount + 1));
if (pNewUniqueIDs == NULL) {
goto next_device; // Failed to allocate memory.
}
pUniqueIDs = pNewUniqueIDs;
mal_copy_memory(pUniqueIDs[uniqueIDCount].alsa, hwid, sizeof(hwid));
uniqueIDCount += 1;
}
}
} else {
mal_zero_memory(hwid, sizeof(hwid));
}
if (pInfo != NULL) {
if (infoSize > 0) {
mal_zero_object(pInfo);
mal_strncpy_s(pInfo->id.alsa, sizeof(pInfo->id.alsa), hwid, (size_t)-1);
// DESC is the friendly name. We treat this slightly differently depending on whether or not we are using verbose
// device enumeration. In verbose mode we want to take the entire description so that the end-user can distinguish
// between the subdevices of each card/dev pair. In simplified mode, however, we only want the first part of the
// description.
//
// The value in DESC seems to be split into two lines, with the first line being the name of the device and the
// second line being a description of the device. I don't like having the description be across two lines because
// it makes formatting ugly and annoying. I'm therefore deciding to put it all on a single line with the second line
// being put into parentheses. In simplified mode I'm just stripping the second line entirely.
if (DESC != NULL) {
int lfPos;
const char* line2 = mal_find_char(DESC, '\n', &lfPos);
if (line2 != NULL) {
line2 += 1; // Skip past the new-line character.
if (pContext->config.alsa.useVerboseDeviceEnumeration) {
// Verbose mode. Put the second line in brackets.
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), DESC, lfPos);
mal_strcat_s (pInfo->name, sizeof(pInfo->name), " (");
mal_strcat_s (pInfo->name, sizeof(pInfo->name), line2);
mal_strcat_s (pInfo->name, sizeof(pInfo->name), ")");
} else {
// Simplified mode. Strip the second line entirely.
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), DESC, lfPos);
}
} else {
// There's no second line. Just copy the whole description.
mal_strcpy_s(pInfo->name, sizeof(pInfo->name), DESC);
}
}
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
next_device:
free(NAME);
free(DESC);
free(IOID);
ppNextDeviceHint += 1;
}
mal_free(pUniqueIDs);
((mal_snd_device_name_free_hint_proc)pContext->alsa.snd_device_name_free_hint)((void**)ppDeviceHints);
return MAL_SUCCESS;
}
static void mal_device_uninit__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if ((snd_pcm_t*)pDevice->alsa.pPCM) {
((mal_snd_pcm_close_proc)pDevice->pContext->alsa.snd_pcm_close)((snd_pcm_t*)pDevice->alsa.pPCM);
if (pDevice->alsa.pIntermediaryBuffer != NULL) {
mal_free(pDevice->alsa.pIntermediaryBuffer);
}
}
}
static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->alsa);
snd_pcm_format_t formatALSA = mal_convert_mal_format_to_alsa_format(pConfig->format);
snd_pcm_stream_t stream = (type == mal_device_type_playback) ? SND_PCM_STREAM_PLAYBACK : SND_PCM_STREAM_CAPTURE;
if (pDeviceID == NULL) {
// We're opening the default device. I don't know if trying anything other than "default" is necessary, but it makes
// me feel better to try as hard as we can get to get _something_ working.
const char* defaultDeviceNames[] = {
"default",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
if (pConfig->preferExclusiveMode) {
defaultDeviceNames[1] = "hw";
defaultDeviceNames[2] = "hw:0";
defaultDeviceNames[3] = "hw:0,0";
} else {
if (type == mal_device_type_playback) {
defaultDeviceNames[1] = "dmix";
defaultDeviceNames[2] = "dmix:0";
defaultDeviceNames[3] = "dmix:0,0";
} else {
defaultDeviceNames[1] = "dsnoop";
defaultDeviceNames[2] = "dsnoop:0";
defaultDeviceNames[3] = "dsnoop:0,0";
}
defaultDeviceNames[4] = "hw";
defaultDeviceNames[5] = "hw:0";
defaultDeviceNames[6] = "hw:0,0";
}
mal_bool32 isDeviceOpen = MAL_FALSE;
for (size_t i = 0; i < mal_countof(defaultDeviceNames); ++i) {
if (defaultDeviceNames[i] != NULL && defaultDeviceNames[i][0] != '\0') {
if (((mal_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)((snd_pcm_t**)&pDevice->alsa.pPCM, defaultDeviceNames[i], stream, 0) == 0) {
isDeviceOpen = MAL_TRUE;
break;
}
}
}
if (!isDeviceOpen) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] snd_pcm_open() failed when trying to open an appropriate default device.", MAL_ALSA_FAILED_TO_OPEN_DEVICE);
}
} else {
// We're trying to open a specific device. There's a few things to consider here:
//
// mini_al recongnizes a special format of device id that excludes the "hw", "dmix", etc. prefix. It looks like this: ":0,0", ":0,1", etc. When
// an ID of this format is specified, it indicates to mini_al that it can try different combinations of plugins ("hw", "dmix", etc.) until it
// finds an appropriate one that works. This comes in very handy when trying to open a device in shared mode ("dmix"), vs exclusive mode ("hw").
mal_bool32 isDeviceOpen = MAL_FALSE;
if (pDeviceID->alsa[0] != ':') {
// The ID is not in ":0,0" format. Use the ID exactly as-is.
if (((mal_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)((snd_pcm_t**)&pDevice->alsa.pPCM, pDeviceID->alsa, stream, 0) == 0) {
isDeviceOpen = MAL_TRUE;
}
} else {
// The ID is in ":0,0" format. Try different plugins depending on the shared mode.
if (pDeviceID->alsa[1] == '\0') {
pDeviceID->alsa[0] = '\0'; // An ID of ":" should be converted to "".
}
char hwid[256];
if (!pConfig->preferExclusiveMode) {
if (type == mal_device_type_playback) {
mal_strcpy_s(hwid, sizeof(hwid), "dmix");
} else {
mal_strcpy_s(hwid, sizeof(hwid), "dsnoop");
}
if (mal_strcat_s(hwid, sizeof(hwid), pDeviceID->alsa) == 0) {
if (((mal_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)((snd_pcm_t**)&pDevice->alsa.pPCM, hwid, stream, 0) == 0) {
isDeviceOpen = MAL_TRUE;
}
}
}
// If at this point we still don't have an open device it means we're either preferencing exclusive mode or opening with "dmix"/"dsnoop" failed.
if (!isDeviceOpen) {
mal_strcpy_s(hwid, sizeof(hwid), "hw");
if (mal_strcat_s(hwid, sizeof(hwid), pDeviceID->alsa) == 0) {
if (((mal_snd_pcm_open_proc)pContext->alsa.snd_pcm_open)((snd_pcm_t**)&pDevice->alsa.pPCM, hwid, stream, 0) == 0) {
isDeviceOpen = MAL_TRUE;
}
}
}
}
if (!isDeviceOpen) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] snd_pcm_open() failed.", MAL_ALSA_FAILED_TO_OPEN_DEVICE);
}
}
// We may need to scale the size of the buffer depending on the device.
if (pDevice->usingDefaultBufferSize) {
float bufferSizeScale = 1;
snd_pcm_info_t* pInfo = (snd_pcm_info_t*)alloca(((mal_snd_pcm_info_sizeof)pContext->alsa.snd_pcm_info_sizeof)());
mal_zero_memory(pInfo, ((mal_snd_pcm_info_sizeof)pContext->alsa.snd_pcm_info_sizeof)());
if (((mal_snd_pcm_info)pContext->alsa.snd_pcm_info)((snd_pcm_t*)pDevice->alsa.pPCM, pInfo) == 0) {
const char* deviceName = ((mal_snd_pcm_info_get_name)pContext->alsa.snd_pcm_info_get_name)(pInfo);
if (deviceName != NULL) {
if (strcmp(deviceName, "default") == 0) {
// It's the default device. We need to use DESC from snd_device_name_hint().
char** ppDeviceHints;
if (((mal_snd_device_name_hint_proc)pContext->alsa.snd_device_name_hint)(-1, "pcm", (void***)&ppDeviceHints) < 0) {
return MAL_NO_BACKEND;
}
char** ppNextDeviceHint = ppDeviceHints;
while (*ppNextDeviceHint != NULL) {
char* NAME = ((mal_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "NAME");
char* DESC = ((mal_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "DESC");
char* IOID = ((mal_snd_device_name_get_hint_proc)pContext->alsa.snd_device_name_get_hint)(*ppNextDeviceHint, "IOID");
mal_bool32 foundDevice = MAL_FALSE;
if ((type == mal_device_type_playback && (IOID == NULL || strcmp(IOID, "Output") == 0)) ||
(type == mal_device_type_capture && (IOID != NULL && strcmp(IOID, "Input" ) == 0))) {
if (strcmp(NAME, deviceName) == 0) {
bufferSizeScale = mal_find_default_buffer_size_scale__alsa(DESC);
foundDevice = MAL_TRUE;
}
}
free(NAME);
free(DESC);
free(IOID);
ppNextDeviceHint += 1;
if (foundDevice) {
break;
}
}
((mal_snd_device_name_free_hint_proc)pContext->alsa.snd_device_name_free_hint)((void**)ppDeviceHints);
} else {
bufferSizeScale = mal_find_default_buffer_size_scale__alsa(deviceName);
}
}
pDevice->bufferSizeInFrames = (mal_uint32)(pDevice->bufferSizeInFrames * bufferSizeScale);
}
}
// Hardware parameters.
snd_pcm_hw_params_t* pHWParams = (snd_pcm_hw_params_t*)alloca(((mal_snd_pcm_hw_params_sizeof_proc)pContext->alsa.snd_pcm_hw_params_sizeof)());
mal_zero_memory(pHWParams, ((mal_snd_pcm_hw_params_sizeof_proc)pContext->alsa.snd_pcm_hw_params_sizeof)());
if (((mal_snd_pcm_hw_params_any_proc)pContext->alsa.snd_pcm_hw_params_any)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to initialize hardware parameters. snd_pcm_hw_params_any() failed.", MAL_ALSA_FAILED_TO_SET_HW_PARAMS);
}
// MMAP Mode
//
// Try using interleaved MMAP access. If this fails, fall back to standard readi/writei.
pDevice->alsa.isUsingMMap = MAL_FALSE;
if (!pConfig->alsa.noMMap && pDevice->type != mal_device_type_capture) { // <-- Disabling MMAP mode for capture devices because I apparently do not have a device that supports it so I can test it... Contributions welcome.
if (((mal_snd_pcm_hw_params_set_access_proc)pContext->alsa.snd_pcm_hw_params_set_access)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, SND_PCM_ACCESS_MMAP_INTERLEAVED) == 0) {
pDevice->alsa.isUsingMMap = MAL_TRUE;
}
}
if (!pDevice->alsa.isUsingMMap) {
if (((mal_snd_pcm_hw_params_set_access_proc)pContext->alsa.snd_pcm_hw_params_set_access)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, SND_PCM_ACCESS_RW_INTERLEAVED) < 0) {;
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set access mode to neither SND_PCM_ACCESS_MMAP_INTERLEAVED nor SND_PCM_ACCESS_RW_INTERLEAVED. snd_pcm_hw_params_set_access() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
}
// Most important properties first. The documentation for OSS (yes, I know this is ALSA!) recommends format, channels, then sample rate. I can't
// find any documentation for ALSA specifically, so I'm going to copy the recommendation for OSS.
// Format.
// Try getting every supported format.
snd_pcm_format_mask_t* pFormatMask = (snd_pcm_format_mask_t*)alloca(((mal_snd_pcm_format_mask_sizeof_proc)pContext->alsa.snd_pcm_format_mask_sizeof)());
mal_zero_memory(pFormatMask, ((mal_snd_pcm_format_mask_sizeof_proc)pContext->alsa.snd_pcm_format_mask_sizeof)());
((mal_snd_pcm_hw_params_get_format_mask_proc)pContext->alsa.snd_pcm_hw_params_get_format_mask)(pHWParams, pFormatMask);
// At this point we should have a list of supported formats, so now we need to find the best one. We first check if the requested format is
// supported, and if so, use that one. If it's not supported, we just run though a list of formats and try to find the best one.
if (!((mal_snd_pcm_format_mask_test_proc)pContext->alsa.snd_pcm_format_mask_test)(pFormatMask, formatALSA)) {
// The requested format is not supported so now try running through the list of formats and return the best one.
snd_pcm_format_t preferredFormatsALSA[] = {
SND_PCM_FORMAT_FLOAT_LE, // mal_format_f32
SND_PCM_FORMAT_S32_LE, // mal_format_s32
SND_PCM_FORMAT_S24_3LE, // mal_format_s24
SND_PCM_FORMAT_S16_LE, // mal_format_s16
SND_PCM_FORMAT_U8 // mal_format_u8
};
formatALSA = SND_PCM_FORMAT_UNKNOWN;
for (size_t i = 0; i < (sizeof(preferredFormatsALSA) / sizeof(preferredFormatsALSA[0])); ++i) {
if (((mal_snd_pcm_format_mask_test_proc)pContext->alsa.snd_pcm_format_mask_test)(pFormatMask, preferredFormatsALSA[i])) {
formatALSA = preferredFormatsALSA[i];
break;
}
}
if (formatALSA == SND_PCM_FORMAT_UNKNOWN) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Format not supported. The device does not support any mini_al formats.", MAL_FORMAT_NOT_SUPPORTED);
}
}
if (((mal_snd_pcm_hw_params_set_format_proc)pContext->alsa.snd_pcm_hw_params_set_format)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, formatALSA) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Format not supported. snd_pcm_hw_params_set_format() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->internalFormat = mal_convert_alsa_format_to_mal_format(formatALSA);
if (pDevice->internalFormat == mal_format_unknown) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] The chosen format is not supported by mini_al.", MAL_FORMAT_NOT_SUPPORTED);
}
// Channels.
mal_uint32 channels = pConfig->channels;
if (((mal_snd_pcm_hw_params_set_channels_near_proc)pContext->alsa.snd_pcm_hw_params_set_channels_near)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, &channels) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set channel count. snd_pcm_hw_params_set_channels_near() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->internalChannels = channels;
// Sample Rate. It appears there's either a bug in ALSA, a bug in some drivers, or I'm doing something silly; but having resampling
// enabled causes problems with some device configurations when used in conjunction with MMAP access mode. To fix this problem we
// need to disable resampling.
//
// To reproduce this problem, open the "plug:dmix" device, and set the sample rate to 44100. Internally, it looks like dmix uses a
// sample rate of 48000. The hardware parameters will get set correctly with no errors, but it looks like the 44100 -> 48000 resampling
// doesn't work properly - but only with MMAP access mode. You will notice skipping/crackling in the audio, and it'll run at a slightly
// faster rate.
//
// mini_al has built-in support for sample rate conversion (albeit low quality at the moment), so disabling resampling should be fine
// for us. The only problem is that it won't be taking advantage of any kind of hardware-accelerated resampling and it won't be very
// good quality until I get a chance to improve the quality of mini_al's software sample rate conversion.
//
// I don't currently know if the dmix plugin is the only one with this error. Indeed, this is the only one I've been able to reproduce
// this error with. In the future, we may want to restrict the disabling of resampling to only known bad plugins.
((mal_snd_pcm_hw_params_set_rate_resample_proc)pContext->alsa.snd_pcm_hw_params_set_rate_resample)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, 0);
mal_uint32 sampleRate = pConfig->sampleRate;
if (((mal_snd_pcm_hw_params_set_rate_near_proc)pContext->alsa.snd_pcm_hw_params_set_rate_near)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, &sampleRate, 0) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Sample rate not supported. snd_pcm_hw_params_set_rate_near() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->internalSampleRate = sampleRate;
// Periods.
mal_uint32 periods = pConfig->periods;
int dir = 0;
if (((mal_snd_pcm_hw_params_set_periods_near_proc)pContext->alsa.snd_pcm_hw_params_set_periods_near)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, &periods, &dir) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set period count. snd_pcm_hw_params_set_periods_near() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->periods = periods;
// Buffer Size
snd_pcm_uframes_t actualBufferSize = pDevice->bufferSizeInFrames;
if (((mal_snd_pcm_hw_params_set_buffer_size_near_proc)pContext->alsa.snd_pcm_hw_params_set_buffer_size_near)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams, &actualBufferSize) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set buffer size for device. snd_pcm_hw_params_set_buffer_size() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->bufferSizeInFrames = actualBufferSize;
// Apply hardware parameters.
if (((mal_snd_pcm_hw_params_proc)pContext->alsa.snd_pcm_hw_params)((snd_pcm_t*)pDevice->alsa.pPCM, pHWParams) < 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set hardware parameters. snd_pcm_hw_params() failed.", MAL_ALSA_FAILED_TO_SET_HW_PARAMS);
}
// Software parameters.
snd_pcm_sw_params_t* pSWParams = (snd_pcm_sw_params_t*)alloca(((mal_snd_pcm_sw_params_sizeof_proc)pContext->alsa.snd_pcm_sw_params_sizeof)());
mal_zero_memory(pSWParams, ((mal_snd_pcm_sw_params_sizeof_proc)pContext->alsa.snd_pcm_sw_params_sizeof)());
if (((mal_snd_pcm_sw_params_current_proc)pContext->alsa.snd_pcm_sw_params_current)((snd_pcm_t*)pDevice->alsa.pPCM, pSWParams) != 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to initialize software parameters. snd_pcm_sw_params_current() failed.", MAL_ALSA_FAILED_TO_SET_SW_PARAMS);
}
if (((mal_snd_pcm_sw_params_set_avail_min_proc)pContext->alsa.snd_pcm_sw_params_set_avail_min)((snd_pcm_t*)pDevice->alsa.pPCM, pSWParams, (pDevice->sampleRate/1000) * 1) != 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] snd_pcm_sw_params_set_avail_min() failed.", MAL_FORMAT_NOT_SUPPORTED);
}
if (type == mal_device_type_playback && !pDevice->alsa.isUsingMMap) { // Only playback devices in writei/readi mode need a start threshold.
if (((mal_snd_pcm_sw_params_set_start_threshold_proc)pContext->alsa.snd_pcm_sw_params_set_start_threshold)((snd_pcm_t*)pDevice->alsa.pPCM, pSWParams, (pDevice->sampleRate/1000) * 1) != 0) { //mal_prev_power_of_2(pDevice->bufferSizeInFrames/pDevice->periods)
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set start threshold for playback device. snd_pcm_sw_params_set_start_threshold() failed.", MAL_ALSA_FAILED_TO_SET_SW_PARAMS);
}
}
if (((mal_snd_pcm_sw_params_proc)pContext->alsa.snd_pcm_sw_params)((snd_pcm_t*)pDevice->alsa.pPCM, pSWParams) != 0) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to set software parameters. snd_pcm_sw_params() failed.", MAL_ALSA_FAILED_TO_SET_SW_PARAMS);
}
// If we're _not_ using mmap we need to use an intermediary buffer.
if (!pDevice->alsa.isUsingMMap) {
pDevice->alsa.pIntermediaryBuffer = mal_malloc(pDevice->bufferSizeInFrames * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format));
if (pDevice->alsa.pIntermediaryBuffer == NULL) {
mal_device_uninit__alsa(pDevice);
return mal_post_error(pDevice, "[ALSA] Failed to allocate memory for intermediary buffer.", MAL_OUT_OF_MEMORY);
}
}
// Grab the internal channel map. For now we're not going to bother trying to change the channel map and
// instead just do it ourselves.
snd_pcm_chmap_t* pChmap = ((mal_snd_pcm_get_chmap_proc)pContext->alsa.snd_pcm_get_chmap)((snd_pcm_t*)pDevice->alsa.pPCM);
if (pChmap != NULL) {
// There are cases where the returned channel map can have a different channel count than was returned by snd_pcm_hw_params_set_channels_near().
if (pChmap->channels >= pDevice->internalChannels) {
// Drop excess channels.
for (mal_uint32 iChannel = 0; iChannel < pDevice->internalChannels; ++iChannel) {
pDevice->internalChannelMap[iChannel] = mal_convert_alsa_channel_position_to_mal_channel(pChmap->pos[iChannel]);
}
} else {
// Excess channels use defaults. Do an initial fill with defaults, overwrite the first pChmap->channels, validate to ensure there are no duplicate
// channels. If validation fails, fall back to defaults.
// Fill with defaults.
mal_get_default_channel_mapping(pDevice->pContext->backend, pDevice->internalChannels, pDevice->internalChannelMap);
// Overwrite first pChmap->channels channels.
for (mal_uint32 iChannel = 0; iChannel < pChmap->channels; ++iChannel) {
pDevice->internalChannelMap[iChannel] = mal_convert_alsa_channel_position_to_mal_channel(pChmap->pos[iChannel]);
}
// Validate.
mal_bool32 isValid = MAL_TRUE;
for (mal_uint32 i = 0; i < pDevice->internalChannels && isValid; ++i) {
for (mal_uint32 j = i+1; j < pDevice->internalChannels; ++j) {
if (pDevice->internalChannelMap[i] == pDevice->internalChannelMap[j]) {
isValid = MAL_FALSE;
break;
}
}
}
// If our channel map is invalid, fall back to defaults.
if (!isValid) {
mal_get_default_channel_mapping(pDevice->pContext->backend, pDevice->internalChannels, pDevice->internalChannelMap);
}
}
free(pChmap);
pChmap = NULL;
} else {
// Could not retrieve the channel map. Fall back to a hard-coded assumption.
mal_get_default_channel_mapping(pDevice->pContext->backend, pDevice->internalChannels, pDevice->internalChannelMap);
}
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// Prepare the device first...
if (((mal_snd_pcm_prepare_proc)pDevice->pContext->alsa.snd_pcm_prepare)((snd_pcm_t*)pDevice->alsa.pPCM) < 0) {
return mal_post_error(pDevice, "[ALSA] Failed to prepare device.", MAL_ALSA_FAILED_TO_PREPARE_DEVICE);
}
// ... and then grab an initial chunk from the client. After this is done, the device should
// automatically start playing, since that's how we configured the software parameters.
if (pDevice->type == mal_device_type_playback) {
if (!mal_device_write__alsa(pDevice)) {
return mal_post_error(pDevice, "[ALSA] Failed to write initial chunk of data to the playback device.", MAL_FAILED_TO_SEND_DATA_TO_DEVICE);
}
// mmap mode requires an explicit start.
if (pDevice->alsa.isUsingMMap) {
if (((mal_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((snd_pcm_t*)pDevice->alsa.pPCM) < 0) {
return mal_post_error(pDevice, "[ALSA] Failed to start capture device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
} else {
if (((mal_snd_pcm_start_proc)pDevice->pContext->alsa.snd_pcm_start)((snd_pcm_t*)pDevice->alsa.pPCM) < 0) {
return mal_post_error(pDevice, "[ALSA] Failed to start capture device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
((mal_snd_pcm_drop_proc)pDevice->pContext->alsa.snd_pcm_drop)((snd_pcm_t*)pDevice->alsa.pPCM);
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// Fallback. We just set a variable to tell the worker thread to terminate after handling the
// next bunch of frames. This is a slow way of handling this.
pDevice->alsa.breakFromMainLoop = MAL_TRUE;
return MAL_SUCCESS;
}
static mal_result mal_device__main_loop__alsa(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->alsa.breakFromMainLoop = MAL_FALSE;
if (pDevice->type == mal_device_type_playback) {
// Playback. Read from client, write to device.
while (!pDevice->alsa.breakFromMainLoop && mal_device_write__alsa(pDevice)) {
}
} else {
// Capture. Read from device, write to client.
while (!pDevice->alsa.breakFromMainLoop && mal_device_read__alsa(pDevice)) {
}
}
return MAL_SUCCESS;
}
#endif // ALSA
///////////////////////////////////////////////////////////////////////////////
//
// OSS Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_OSS
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/soundcard.h>
#ifndef SNDCTL_DSP_HALT
#define SNDCTL_DSP_HALT SNDCTL_DSP_RESET
#endif
int mal_open_temp_device__oss()
{
// The OSS sample code uses "/dev/mixer" as the device for getting system properties so I'm going to do the same.
int fd = open("/dev/mixer", O_RDONLY, 0);
if (fd >= 0) {
return fd;
}
return -1;
}
mal_result mal_context_init__oss(mal_context* pContext)
{
mal_assert(pContext != NULL);
// Try opening a temporary device first so we can get version information. This is closed at the end.
int fd = mal_open_temp_device__oss();
if (fd == -1) {
return mal_context_post_error(pContext, NULL, "[OSS] Failed to open temporary device for retrieving system properties.", MAL_NO_BACKEND); // Looks liks OSS isn't installed, or there are no available devices.
}
// Grab the OSS version.
int ossVersion = 0;
int result = ioctl(fd, OSS_GETVERSION, &ossVersion);
if (result == -1) {
close(fd);
return mal_context_post_error(pContext, NULL, "[OSS] Failed to retrieve OSS version.", MAL_NO_BACKEND);
}
pContext->oss.versionMajor = ((ossVersion & 0xFF0000) >> 16);
pContext->oss.versionMinor = ((ossVersion & 0x00FF00) >> 8);
close(fd);
return MAL_SUCCESS;
}
mal_result mal_context_uninit__oss(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_oss);
(void)pContext;
return MAL_SUCCESS;
}
static mal_result mal_enumerate_devices__oss(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 0;
// The object returned by SNDCTL_SYSINFO will have the information we're after.
int fd = mal_open_temp_device__oss();
if (fd == -1) {
return mal_context_post_error(pContext, NULL, "[OSS] Failed to open a temporary device for retrieving system information used for device enumeration.", MAL_NO_BACKEND);
}
oss_sysinfo si;
int result = ioctl(fd, SNDCTL_SYSINFO, &si);
if (result != -1) {
for (int iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) {
oss_audioinfo ai;
ai.dev = iAudioDevice;
result = ioctl(fd, SNDCTL_AUDIOINFO, &ai);
if (result != -1) {
mal_bool32 includeThisDevice = MAL_FALSE;
if (type == mal_device_type_playback && (ai.caps & PCM_CAP_OUTPUT) != 0) {
includeThisDevice = MAL_TRUE;
} else if (type == mal_device_type_capture && (ai.caps & PCM_CAP_INPUT) != 0) {
includeThisDevice = MAL_TRUE;
}
if (includeThisDevice) {
if (ai.devnode[0] != '\0') { // <-- Can be blank, according to documentation.
if (pInfo != NULL) {
if (infoSize > 0) {
mal_strncpy_s(pInfo->id.oss, sizeof(pInfo->id.oss), ai.devnode, (size_t)-1);
// The human readable device name should be in the "ai.handle" variable, but it can
// sometimes be empty in which case we just fall back to "ai.name" which is less user
// friendly, but usually has a value.
if (ai.handle[0] != '\0') {
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), ai.handle, (size_t)-1);
} else {
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), ai.name, (size_t)-1);
}
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
}
}
}
} else {
// Failed to retrieve the system information. Just return a default device for both playback and capture.
if (pInfo != NULL) {
if (infoSize > 0) {
mal_strncpy_s(pInfo[0].id.oss, sizeof(pInfo[0].id.oss), "/dev/dsp", (size_t)-1);
if (type == mal_device_type_playback) {
mal_strncpy_s(pInfo[0].name, sizeof(pInfo[0].name), "Default Playback Device", (size_t)-1);
} else {
mal_strncpy_s(pInfo[0].name, sizeof(pInfo[0].name), "Default Capture Device", (size_t)-1);
}
*pCount = 1;
}
} else {
*pCount = 1;
}
}
close(fd);
return MAL_SUCCESS;
}
static void mal_device_uninit__oss(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
close(pDevice->oss.fd);
mal_free(pDevice->oss.pIntermediaryBuffer);
}
static mal_result mal_device_init__oss(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->oss);
char deviceName[64];
if (pDeviceID != NULL) {
mal_strncpy_s(deviceName, sizeof(deviceName), pDeviceID->oss, (size_t)-1);
} else {
mal_strncpy_s(deviceName, sizeof(deviceName), "/dev/dsp", (size_t)-1);
}
pDevice->oss.fd = open(deviceName, (type == mal_device_type_playback) ? O_WRONLY : O_RDONLY, 0);
if (pDevice->oss.fd == -1) {
return mal_post_error(pDevice, "[OSS] Failed to open device.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
// The OSS documantation is very clear about the order we should be initializing the device's properties:
// 1) Format
// 2) Channels
// 3) Sample rate.
// Format.
int ossFormat = AFMT_U8;
switch (pDevice->format) {
case mal_format_s16: ossFormat = AFMT_S16_LE; break;
case mal_format_s24: ossFormat = AFMT_S32_LE; break;
case mal_format_s32: ossFormat = AFMT_S32_LE; break;
case mal_format_f32: ossFormat = AFMT_S32_LE; break;
case mal_format_u8:
default: ossFormat = AFMT_U8; break;
}
int result = ioctl(pDevice->oss.fd, SNDCTL_DSP_SETFMT, &ossFormat);
if (result == -1) {
close(pDevice->oss.fd);
return mal_post_error(pDevice, "[OSS] Failed to set format.", MAL_FORMAT_NOT_SUPPORTED);
}
switch (ossFormat) {
case AFMT_U8: pDevice->internalFormat = mal_format_u8; break;
case AFMT_S16_LE: pDevice->internalFormat = mal_format_s16; break;
case AFMT_S32_LE: pDevice->internalFormat = mal_format_s32; break;
default: mal_post_error(pDevice, "[OSS] The device's internal format is not supported by mini_al.", MAL_FORMAT_NOT_SUPPORTED);
}
// Channels.
int ossChannels = (int)pConfig->channels;
result = ioctl(pDevice->oss.fd, SNDCTL_DSP_CHANNELS, &ossChannels);
if (result == -1) {
close(pDevice->oss.fd);
return mal_post_error(pDevice, "[OSS] Failed to set channel count.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->internalChannels = ossChannels;
// Sample rate.
int ossSampleRate = (int)pConfig->sampleRate;
result = ioctl(pDevice->oss.fd, SNDCTL_DSP_SPEED, &ossSampleRate);
if (result == -1) {
close(pDevice->oss.fd);
return mal_post_error(pDevice, "[OSS] Failed to set sample rate.", MAL_FORMAT_NOT_SUPPORTED);
}
pDevice->sampleRate = ossSampleRate;
// The documentation says that the fragment settings should be set as soon as possible, but I'm not sure if
// it should be done before or after format/channels/rate.
//
// OSS wants the fragment size in bytes and a power of 2. When setting, we specify the power, not the actual
// value.
mal_uint32 fragmentSizeInBytes = mal_round_to_power_of_2(pDevice->bufferSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat));
if (fragmentSizeInBytes < 16) {
fragmentSizeInBytes = 16;
}
mal_uint32 ossFragmentSizePower = 4;
fragmentSizeInBytes >>= 4;
while (fragmentSizeInBytes >>= 1) {
ossFragmentSizePower += 1;
}
int ossFragment = (int)((pDevice->periods << 16) | ossFragmentSizePower);
result = ioctl(pDevice->oss.fd, SNDCTL_DSP_SETFRAGMENT, &ossFragment);
if (result == -1) {
close(pDevice->oss.fd);
return mal_post_error(pDevice, "[OSS] Failed to set fragment size and period count.", MAL_FORMAT_NOT_SUPPORTED);
}
int actualFragmentSizeInBytes = 1 << (ossFragment & 0xFFFF);
pDevice->oss.fragmentSizeInFrames = actualFragmentSizeInBytes / mal_get_sample_size_in_bytes(pDevice->internalFormat) / pDevice->internalChannels;
pDevice->periods = (mal_uint32)(ossFragment >> 16);
pDevice->bufferSizeInFrames = (mal_uint32)(pDevice->oss.fragmentSizeInFrames * pDevice->periods);
// Set the internal channel map. Not sure if this can be queried. For now just using our default assumptions.
mal_get_default_channel_mapping(pDevice->pContext->backend, pDevice->internalChannels, pDevice->internalChannelMap);
// When not using MMAP mode, we need to use an intermediary buffer for the client <-> device transfer. We do
// everything by the size of a fragment.
pDevice->oss.pIntermediaryBuffer = mal_malloc(actualFragmentSizeInBytes);
if (pDevice->oss.pIntermediaryBuffer == NULL) {
close(pDevice->oss.fd);
return mal_post_error(pDevice, "[OSS] Failed to allocate memory for intermediary buffer.", MAL_OUT_OF_MEMORY);
}
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__oss(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// The device is started by the next calls to read() and write(). For playback it's simple - just read
// data from the client, then write it to the device with write() which will in turn start the device.
// For capture it's a bit less intuitive - we do nothing (it'll be started automatically by the first
// call to read().
if (pDevice->type == mal_device_type_playback) {
// Playback.
mal_device__read_frames_from_client(pDevice, pDevice->oss.fragmentSizeInFrames, pDevice->oss.pIntermediaryBuffer);
int bytesWritten = write(pDevice->oss.fd, pDevice->oss.pIntermediaryBuffer, pDevice->oss.fragmentSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat));
if (bytesWritten == -1) {
return mal_post_error(pDevice, "[OSS] Failed to send initial chunk of data to the device.", MAL_FAILED_TO_SEND_DATA_TO_DEVICE);
}
} else {
// Capture. Do nothing.
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__oss(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// We want to use SNDCTL_DSP_HALT. From the documentation:
//
// In multithreaded applications SNDCTL_DSP_HALT (SNDCTL_DSP_RESET) must only be called by the thread
// that actually reads/writes the audio device. It must not be called by some master thread to kill the
// audio thread. The audio thread will not stop or get any kind of notification that the device was
// stopped by the master thread. The device gets stopped but the next read or write call will silently
// restart the device.
//
// This is actually safe in our case, because this function is only ever called from within our worker
// thread anyway. Just keep this in mind, though...
int result = ioctl(pDevice->oss.fd, SNDCTL_DSP_HALT, 0);
if (result == -1) {
return mal_post_error(pDevice, "[OSS] Failed to stop device. SNDCTL_DSP_HALT failed.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__oss(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->oss.breakFromMainLoop = MAL_TRUE;
return MAL_SUCCESS;
}
static mal_result mal_device__main_loop__oss(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->oss.breakFromMainLoop = MAL_FALSE;
while (!pDevice->oss.breakFromMainLoop) {
// Break from the main loop if the device isn't started anymore. Likely what's happened is the application
// has requested that the device be stopped.
if (!mal_device_is_started(pDevice)) {
break;
}
if (pDevice->type == mal_device_type_playback) {
// Playback.
mal_device__read_frames_from_client(pDevice, pDevice->oss.fragmentSizeInFrames, pDevice->oss.pIntermediaryBuffer);
int bytesWritten = write(pDevice->oss.fd, pDevice->oss.pIntermediaryBuffer, pDevice->oss.fragmentSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat));
if (bytesWritten < 0) {
return mal_post_error(pDevice, "[OSS] Failed to send data from the client to the device.", MAL_FAILED_TO_SEND_DATA_TO_DEVICE);
}
} else {
// Capture.
int bytesRead = read(pDevice->oss.fd, pDevice->oss.pIntermediaryBuffer, pDevice->oss.fragmentSizeInFrames * mal_get_sample_size_in_bytes(pDevice->internalFormat));
if (bytesRead < 0) {
return mal_post_error(pDevice, "[OSS] Failed to read data from the device to be sent to the client.", MAL_FAILED_TO_READ_DATA_FROM_DEVICE);
}
mal_uint32 framesRead = (mal_uint32)bytesRead / pDevice->internalChannels / mal_get_sample_size_in_bytes(pDevice->internalFormat);
mal_device__send_frames_to_client(pDevice, framesRead, pDevice->oss.pIntermediaryBuffer);
}
}
return MAL_SUCCESS;
}
#endif // OSS
///////////////////////////////////////////////////////////////////////////////
//
// OpenSL|ES Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_OPENSL
#include <SLES/OpenSLES.h>
#ifdef MAL_ANDROID
#include <SLES/OpenSLES_Android.h>
#endif
// Converts an individual OpenSL-style channel identifier (SL_SPEAKER_FRONT_LEFT, etc.) to mini_al.
static mal_uint8 mal_channel_id_to_mal__opensl(SLuint32 id)
{
switch (id)
{
case SL_SPEAKER_FRONT_LEFT: return MAL_CHANNEL_FRONT_LEFT;
case SL_SPEAKER_FRONT_RIGHT: return MAL_CHANNEL_FRONT_RIGHT;
case SL_SPEAKER_FRONT_CENTER: return MAL_CHANNEL_FRONT_CENTER;
case SL_SPEAKER_LOW_FREQUENCY: return MAL_CHANNEL_LFE;
case SL_SPEAKER_BACK_LEFT: return MAL_CHANNEL_BACK_LEFT;
case SL_SPEAKER_BACK_RIGHT: return MAL_CHANNEL_BACK_RIGHT;
case SL_SPEAKER_FRONT_LEFT_OF_CENTER: return MAL_CHANNEL_FRONT_LEFT_CENTER;
case SL_SPEAKER_FRONT_RIGHT_OF_CENTER: return MAL_CHANNEL_FRONT_RIGHT_CENTER;
case SL_SPEAKER_BACK_CENTER: return MAL_CHANNEL_BACK_CENTER;
case SL_SPEAKER_SIDE_LEFT: return MAL_CHANNEL_SIDE_LEFT;
case SL_SPEAKER_SIDE_RIGHT: return MAL_CHANNEL_SIDE_RIGHT;
case SL_SPEAKER_TOP_CENTER: return MAL_CHANNEL_TOP_CENTER;
case SL_SPEAKER_TOP_FRONT_LEFT: return MAL_CHANNEL_TOP_FRONT_LEFT;
case SL_SPEAKER_TOP_FRONT_CENTER: return MAL_CHANNEL_TOP_FRONT_CENTER;
case SL_SPEAKER_TOP_FRONT_RIGHT: return MAL_CHANNEL_TOP_FRONT_RIGHT;
case SL_SPEAKER_TOP_BACK_LEFT: return MAL_CHANNEL_TOP_BACK_LEFT;
case SL_SPEAKER_TOP_BACK_CENTER: return MAL_CHANNEL_TOP_BACK_CENTER;
case SL_SPEAKER_TOP_BACK_RIGHT: return MAL_CHANNEL_TOP_BACK_RIGHT;
default: return 0;
}
}
// Converts an individual mini_al channel identifier (MAL_CHANNEL_FRONT_LEFT, etc.) to OpenSL-style.
static SLuint32 mal_channel_id_to_opensl(mal_uint8 id)
{
switch (id)
{
case MAL_CHANNEL_FRONT_LEFT: return SL_SPEAKER_FRONT_LEFT;
case MAL_CHANNEL_FRONT_RIGHT: return SL_SPEAKER_FRONT_RIGHT;
case MAL_CHANNEL_FRONT_CENTER: return SL_SPEAKER_FRONT_CENTER;
case MAL_CHANNEL_LFE: return SL_SPEAKER_LOW_FREQUENCY;
case MAL_CHANNEL_BACK_LEFT: return SL_SPEAKER_BACK_LEFT;
case MAL_CHANNEL_BACK_RIGHT: return SL_SPEAKER_BACK_RIGHT;
case MAL_CHANNEL_FRONT_LEFT_CENTER: return SL_SPEAKER_FRONT_LEFT_OF_CENTER;
case MAL_CHANNEL_FRONT_RIGHT_CENTER: return SL_SPEAKER_FRONT_RIGHT_OF_CENTER;
case MAL_CHANNEL_BACK_CENTER: return SL_SPEAKER_BACK_CENTER;
case MAL_CHANNEL_SIDE_LEFT: return SL_SPEAKER_SIDE_LEFT;
case MAL_CHANNEL_SIDE_RIGHT: return SL_SPEAKER_SIDE_RIGHT;
case MAL_CHANNEL_TOP_CENTER: return SL_SPEAKER_TOP_CENTER;
case MAL_CHANNEL_TOP_FRONT_LEFT: return SL_SPEAKER_TOP_FRONT_LEFT;
case MAL_CHANNEL_TOP_FRONT_CENTER: return SL_SPEAKER_TOP_FRONT_CENTER;
case MAL_CHANNEL_TOP_FRONT_RIGHT: return SL_SPEAKER_TOP_FRONT_RIGHT;
case MAL_CHANNEL_TOP_BACK_LEFT: return SL_SPEAKER_TOP_BACK_LEFT;
case MAL_CHANNEL_TOP_BACK_CENTER: return SL_SPEAKER_TOP_BACK_CENTER;
case MAL_CHANNEL_TOP_BACK_RIGHT: return SL_SPEAKER_TOP_BACK_RIGHT;
default: return 0;
}
}
// Converts a channel mapping to an OpenSL-style channel mask.
static SLuint32 mal_channel_map_to_channel_mask__opensl(const mal_uint8 channelMap[MAL_MAX_CHANNELS], mal_uint32 channels)
{
SLuint32 channelMask = 0;
for (mal_uint32 iChannel = 0; iChannel < channels; ++iChannel) {
channelMask |= mal_channel_id_to_opensl(channelMap[iChannel]);
}
return channelMask;
}
// Converts an OpenSL-style channel mask to a mini_al channel map.
static void mal_channel_mask_to_channel_map__opensl(SLuint32 channelMask, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS])
{
if (channels == 2 && channelMask == 0) {
channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
} else {
// Just iterate over each bit.
mal_uint32 iChannel = 0;
for (mal_uint32 iBit = 0; iBit < 32; ++iBit) {
SLuint32 bitValue = (channelMask & (1 << iBit));
if (bitValue != 0) {
// The bit is set.
channelMap[iChannel] = mal_channel_id_to_mal__opensl(bitValue);
iChannel += 1;
}
}
}
}
SLuint32 mal_round_to_standard_sample_rate__opensl(SLuint32 samplesPerSec)
{
if (samplesPerSec <= SL_SAMPLINGRATE_8) {
return SL_SAMPLINGRATE_8;
}
if (samplesPerSec <= SL_SAMPLINGRATE_11_025) {
return SL_SAMPLINGRATE_11_025;
}
if (samplesPerSec <= SL_SAMPLINGRATE_12) {
return SL_SAMPLINGRATE_12;
}
if (samplesPerSec <= SL_SAMPLINGRATE_16) {
return SL_SAMPLINGRATE_16;
}
if (samplesPerSec <= SL_SAMPLINGRATE_22_05) {
return SL_SAMPLINGRATE_22_05;
}
if (samplesPerSec <= SL_SAMPLINGRATE_24) {
return SL_SAMPLINGRATE_24;
}
if (samplesPerSec <= SL_SAMPLINGRATE_32) {
return SL_SAMPLINGRATE_32;
}
if (samplesPerSec <= SL_SAMPLINGRATE_44_1) {
return SL_SAMPLINGRATE_44_1;
}
if (samplesPerSec <= SL_SAMPLINGRATE_48) {
return SL_SAMPLINGRATE_48;
}
// Android doesn't support more than 48000.
#ifndef MAL_ANDROID
if (samplesPerSec <= SL_SAMPLINGRATE_64) {
return SL_SAMPLINGRATE_64;
}
if (samplesPerSec <= SL_SAMPLINGRATE_88_2) {
return SL_SAMPLINGRATE_88_2;
}
if (samplesPerSec <= SL_SAMPLINGRATE_96) {
return SL_SAMPLINGRATE_96;
}
if (samplesPerSec <= SL_SAMPLINGRATE_192) {
return SL_SAMPLINGRATE_192;
}
#endif
return SL_SAMPLINGRATE_16;
}
mal_result mal_context_init__opensl(mal_context* pContext)
{
mal_assert(pContext != NULL);
(void)pContext;
return MAL_SUCCESS;
}
mal_result mal_context_uninit__opensl(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_opensl);
(void)pContext;
return MAL_SUCCESS;
}
mal_result mal_enumerate_devices__opensl(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 0;
SLObjectItf engineObj;
SLresult resultSL = slCreateEngine(&engineObj, 0, NULL, 0, NULL, NULL);
if (resultSL != SL_RESULT_SUCCESS) {
return MAL_NO_BACKEND;
}
(*engineObj)->Realize(engineObj, SL_BOOLEAN_FALSE);
// TODO: Test Me.
//
// This is currently untested, so for now we are just returning default devices.
#if 0
SLuint32 pDeviceIDs[128];
SLint32 deviceCount = sizeof(pDeviceIDs) / sizeof(pDeviceIDs[0]);
SLAudioIODeviceCapabilitiesItf deviceCaps;
resultSL = (*engineObj)->GetInterface(engineObj, SL_IID_AUDIOIODEVICECAPABILITIES, &deviceCaps);
if (resultSL != SL_RESULT_SUCCESS) {
// The interface may not be supported so just report a default device.
(*engineObj)->Destroy(engineObj);
goto return_default_device;
}
if (type == mal_device_type_playback) {
resultSL = (*deviceCaps)->GetAvailableAudioOutputs(deviceCaps, &deviceCount, pDeviceIDs);
if (resultSL != SL_RESULT_SUCCESS) {
(*engineObj)->Destroy(engineObj);
return MAL_NO_DEVICE;
}
} else {
resultSL = (*deviceCaps)->GetAvailableAudioInputs(deviceCaps, &deviceCount, pDeviceIDs);
if (resultSL != SL_RESULT_SUCCESS) {
(*engineObj)->Destroy(engineObj);
return MAL_NO_DEVICE;
}
}
for (SLint32 iDevice = 0; iDevice < deviceCount; ++iDevice) {
if (pInfo != NULL) {
if (infoSize > 0) {
mal_zero_object(pInfo);
pInfo->id.opensl = pDeviceIDs[iDevice];
mal_bool32 isValidDevice = MAL_TRUE;
if (type == mal_device_type_playback) {
SLAudioOutputDescriptor desc;
resultSL = (*deviceCaps)->QueryAudioOutputCapabilities(deviceCaps, pInfo->id.opensl, &desc);
if (resultSL != SL_RESULT_SUCCESS) {
isValidDevice = MAL_FALSE;
}
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), (const char*)desc.pDeviceName, (size_t)-1);
} else {
SLAudioInputDescriptor desc;
resultSL = (*deviceCaps)->QueryAudioInputCapabilities(deviceCaps, pInfo->id.opensl, &desc);
if (resultSL != SL_RESULT_SUCCESS) {
isValidDevice = MAL_FALSE;
}
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), (const char*)desc.deviceName, (size_t)-1);
}
if (isValidDevice) {
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
}
} else {
*pCount += 1;
}
}
(*engineObj)->Destroy(engineObj);
return MAL_SUCCESS;
#else
(*engineObj)->Destroy(engineObj);
goto return_default_device;
#endif
return_default_device:
*pCount = 1;
if (pInfo != NULL) {
if (infoSize > 0) {
if (type == mal_device_type_playback) {
pInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOOUTPUT;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Playback Device", (size_t)-1);
} else {
pInfo->id.opensl = SL_DEFAULTDEVICEID_AUDIOINPUT;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Capture Device", (size_t)-1);
}
}
}
return MAL_SUCCESS;
}
// OpenSL|ES has one-per-application objects :(
static SLObjectItf g_malEngineObjectSL = NULL;
static SLEngineItf g_malEngineSL = NULL;
static mal_uint32 g_malOpenSLInitCounter = 0;
#define MAL_OPENSL_OBJ(p) (*((SLObjectItf)(p)))
#define MAL_OPENSL_OUTPUTMIX(p) (*((SLOutputMixItf)(p)))
#define MAL_OPENSL_PLAY(p) (*((SLPlayItf)(p)))
#define MAL_OPENSL_RECORD(p) (*((SLRecordItf)(p)))
#ifdef MAL_ANDROID
#define MAL_OPENSL_BUFFERQUEUE(p) (*((SLAndroidSimpleBufferQueueItf)(p)))
#else
#define MAL_OPENSL_BUFFERQUEUE(p) (*((SLBufferQueueItf)(p)))
#endif
#ifdef MAL_ANDROID
//static void mal_buffer_queue_callback__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, SLuint32 eventFlags, const void* pBuffer, SLuint32 bufferSize, SLuint32 dataUsed, void* pContext)
static void mal_buffer_queue_callback__opensl_android(SLAndroidSimpleBufferQueueItf pBufferQueue, void* pUserData)
{
(void)pBufferQueue;
// For now, only supporting Android implementations of OpenSL|ES since that's the only one I've
// been able to test with and I currently depend on Android-specific extensions (simple buffer
// queues).
#ifndef MAL_ANDROID
return MAL_NO_BACKEND;
#endif
mal_device* pDevice = (mal_device*)pUserData;
mal_assert(pDevice != NULL);
// For now, don't do anything unless the buffer was fully processed. From what I can tell, it looks like
// OpenSL|ES 1.1 improves on buffer queues to the point that we could much more intelligently handle this,
// but unfortunately it looks like Android is only supporting OpenSL|ES 1.0.1 for now :(
if (pDevice->state != MAL_STATE_STARTED) {
return;
}
size_t periodSizeInBytes = pDevice->opensl.periodSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
mal_uint8* pBuffer = pDevice->opensl.pBuffer + (pDevice->opensl.currentBufferIndex * periodSizeInBytes);
if (pDevice->type == mal_device_type_playback) {
if (pDevice->state != MAL_STATE_STARTED) {
return;
}
mal_device__read_frames_from_client(pDevice, pDevice->opensl.periodSizeInFrames, pBuffer);
SLresult resultSL = MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue, pBuffer, periodSizeInBytes);
if (resultSL != SL_RESULT_SUCCESS) {
return;
}
} else {
mal_device__send_frames_to_client(pDevice, pDevice->opensl.periodSizeInFrames, pBuffer);
SLresult resultSL = MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue, pBuffer, periodSizeInBytes);
if (resultSL != SL_RESULT_SUCCESS) {
return;
}
}
pDevice->opensl.currentBufferIndex = (pDevice->opensl.currentBufferIndex + 1) % pDevice->periods;
}
#endif
static void mal_device_uninit__opensl(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
// Uninit device.
if (pDevice->type == mal_device_type_playback) {
if (pDevice->opensl.pAudioPlayerObj) MAL_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioPlayerObj);
if (pDevice->opensl.pOutputMixObj) MAL_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Destroy((SLObjectItf)pDevice->opensl.pOutputMixObj);
} else {
if (pDevice->opensl.pAudioRecorderObj) MAL_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Destroy((SLObjectItf)pDevice->opensl.pAudioRecorderObj);
}
mal_free(pDevice->opensl.pBuffer);
// Uninit global data.
if (g_malOpenSLInitCounter > 0) {
if (mal_atomic_decrement_32(&g_malOpenSLInitCounter) == 0) {
(*g_malEngineObjectSL)->Destroy(g_malEngineObjectSL);
}
}
}
static mal_result mal_device_init__opensl(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
(void)pContext;
// For now, only supporting Android implementations of OpenSL|ES since that's the only one I've
// been able to test with and I currently depend on Android-specific extensions (simple buffer
// queues).
#ifndef MAL_ANDROID
return MAL_NO_BACKEND;
#endif
// Use s32 as the internal format for when floating point is specified.
if (pConfig->format == mal_format_f32) {
pDevice->internalFormat = mal_format_s32;
}
// Initialize global data first if applicable.
if (mal_atomic_increment_32(&g_malOpenSLInitCounter) == 1) {
SLresult resultSL = slCreateEngine(&g_malEngineObjectSL, 0, NULL, 0, NULL, NULL);
if (resultSL != SL_RESULT_SUCCESS) {
mal_atomic_decrement_32(&g_malOpenSLInitCounter);
return mal_post_error(pDevice, "[OpenSL] slCreateEngine() failed.", MAL_NO_BACKEND);
}
(*g_malEngineObjectSL)->Realize(g_malEngineObjectSL, SL_BOOLEAN_FALSE);
resultSL = (*g_malEngineObjectSL)->GetInterface(g_malEngineObjectSL, SL_IID_ENGINE, &g_malEngineSL);
if (resultSL != SL_RESULT_SUCCESS) {
(*g_malEngineObjectSL)->Destroy(g_malEngineObjectSL);
mal_atomic_decrement_32(&g_malOpenSLInitCounter);
return mal_post_error(pDevice, "[OpenSL] Failed to retrieve SL_IID_ENGINE interface.", MAL_NO_BACKEND);
}
}
// Now we can start initializing the device properly.
mal_assert(pDevice != NULL);
mal_zero_object(&pDevice->opensl);
pDevice->opensl.currentBufferIndex = 0;
pDevice->opensl.periodSizeInFrames = pDevice->bufferSizeInFrames / pConfig->periods;
pDevice->bufferSizeInFrames = pDevice->opensl.periodSizeInFrames * pConfig->periods;
SLDataLocator_AndroidSimpleBufferQueue queue;
queue.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
queue.numBuffers = pConfig->periods;
SLDataFormat_PCM* pFormat = NULL;
#if defined(MAL_ANDROID) && __ANDROID_API__ >= 21
SLAndroidDataFormat_PCM_EX pcmEx;
if (pDevice->format == mal_format_f32 /*|| pDevice->format == mal_format_f64*/) {
pcmEx.formatType = SL_ANDROID_DATAFORMAT_PCM_EX;
pcmEx.representation = SL_ANDROID_PCM_REPRESENTATION_FLOAT;
} else {
pcmEx.formatType = SL_DATAFORMAT_PCM;
}
pFormat = (SLDataFormat_PCM*)&pcmEx;
#else
SLDataFormat_PCM pcm;
pcm.formatType = SL_DATAFORMAT_PCM;
pFormat = &pcm;
#endif
pFormat->numChannels = pDevice->channels;
pFormat->samplesPerSec = mal_round_to_standard_sample_rate__opensl(pDevice->sampleRate * 1000); // In millihertz.
pFormat->bitsPerSample = mal_get_sample_size_in_bytes(pDevice->format)*8;
pFormat->containerSize = pFormat->bitsPerSample; // Always tightly packed for now.
pFormat->channelMask = mal_channel_map_to_channel_mask__opensl(pConfig->channelMap, pFormat->numChannels);
pFormat->endianness = SL_BYTEORDER_LITTLEENDIAN;
// Android has a few restrictions on the format as documented here: https://developer.android.com/ndk/guides/audio/opensl-for-android.html
// - Only mono and stereo is supported.
// - Only u8 and s16 formats are supported.
// - Limited to a sample rate of 48000.
#ifdef MAL_ANDROID
if (pFormat->numChannels > 2) {
pFormat->numChannels = 2;
}
#if __ANDROID_API__ >= 21
if (pFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) {
// It's floating point.
mal_assert(pcmEx.representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT);
if (pFormat->bitsPerSample > 32) {
pFormat->bitsPerSample = 32;
}
} else {
if (pFormat->bitsPerSample > 16) {
pFormat->bitsPerSample = 16;
}
}
#else
if (pFormat->bitsPerSample > 16) {
pFormat->bitsPerSample = 16;
}
#endif
pFormat->containerSize = pFormat->bitsPerSample; // Always tightly packed for now.
if (pFormat->samplesPerSec > SL_SAMPLINGRATE_48) {
pFormat->samplesPerSec = SL_SAMPLINGRATE_48;
}
#endif
if (type == mal_device_type_playback) {
SLresult resultSL = (*g_malEngineSL)->CreateOutputMix(g_malEngineSL, (SLObjectItf*)&pDevice->opensl.pOutputMixObj, 0, NULL, NULL);
if (resultSL != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to create output mix.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->Realize((SLObjectItf)pDevice->opensl.pOutputMixObj, SL_BOOLEAN_FALSE)) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to realize output mix object.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pOutputMixObj)->GetInterface((SLObjectItf)pDevice->opensl.pOutputMixObj, SL_IID_OUTPUTMIX, &pDevice->opensl.pOutputMix) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to retrieve SL_IID_OUTPUTMIX interface.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
// Set the output device.
if (pDeviceID != NULL) {
MAL_OPENSL_OUTPUTMIX(pDevice->opensl.pOutputMix)->ReRoute((SLOutputMixItf)pDevice->opensl.pOutputMix, 1, &pDeviceID->opensl);
}
SLDataSource source;
source.pLocator = &queue;
source.pFormat = pFormat;
SLDataLocator_OutputMix outmixLocator;
outmixLocator.locatorType = SL_DATALOCATOR_OUTPUTMIX;
outmixLocator.outputMix = (SLObjectItf)pDevice->opensl.pOutputMixObj;
SLDataSink sink;
sink.pLocator = &outmixLocator;
sink.pFormat = NULL;
const SLInterfaceID itfIDs1[] = {SL_IID_ANDROIDSIMPLEBUFFERQUEUE};
const SLboolean itfIDsRequired1[] = {SL_BOOLEAN_TRUE};
resultSL = (*g_malEngineSL)->CreateAudioPlayer(g_malEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, 1, itfIDs1, itfIDsRequired1);
if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED) {
// Unsupported format. Fall back to something safer and try again. If this fails, just abort.
pFormat->formatType = SL_DATAFORMAT_PCM;
pFormat->numChannels = 2;
pFormat->samplesPerSec = SL_SAMPLINGRATE_16;
pFormat->bitsPerSample = 16;
pFormat->containerSize = pFormat->bitsPerSample; // Always tightly packed for now.
pFormat->channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
resultSL = (*g_malEngineSL)->CreateAudioPlayer(g_malEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioPlayerObj, &source, &sink, 1, itfIDs1, itfIDsRequired1);
}
if (resultSL != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to create audio player.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->Realize((SLObjectItf)pDevice->opensl.pAudioPlayerObj, SL_BOOLEAN_FALSE) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to realize audio player.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, SL_IID_PLAY, &pDevice->opensl.pAudioPlayer) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to retrieve SL_IID_PLAY interface.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pAudioPlayerObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioPlayerObj, SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueue) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue, mal_buffer_queue_callback__opensl_android, pDevice) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to register buffer queue callback.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
} else {
SLDataLocator_IODevice locatorDevice;
locatorDevice.locatorType = SL_DATALOCATOR_IODEVICE;
locatorDevice.deviceType = SL_IODEVICE_AUDIOINPUT;
locatorDevice.deviceID = (pDeviceID == NULL) ? SL_DEFAULTDEVICEID_AUDIOINPUT : pDeviceID->opensl;
locatorDevice.device = NULL;
SLDataSource source;
source.pLocator = &locatorDevice;
source.pFormat = NULL;
SLDataSink sink;
sink.pLocator = &queue;
sink.pFormat = pFormat;
const SLInterfaceID itfIDs1[] = {SL_IID_ANDROIDSIMPLEBUFFERQUEUE};
const SLboolean itfIDsRequired1[] = {SL_BOOLEAN_TRUE};
SLresult resultSL = (*g_malEngineSL)->CreateAudioRecorder(g_malEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, 1, itfIDs1, itfIDsRequired1);
if (resultSL == SL_RESULT_CONTENT_UNSUPPORTED) {
// Unsupported format. Fall back to something safer and try again. If this fails, just abort.
pFormat->formatType = SL_DATAFORMAT_PCM;
pFormat->numChannels = 1;
pFormat->samplesPerSec = SL_SAMPLINGRATE_16;
pFormat->bitsPerSample = 16;
pFormat->containerSize = pFormat->bitsPerSample; // Always tightly packed for now.
pFormat->channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
resultSL = (*g_malEngineSL)->CreateAudioRecorder(g_malEngineSL, (SLObjectItf*)&pDevice->opensl.pAudioRecorderObj, &source, &sink, 1, itfIDs1, itfIDsRequired1);
}
if (resultSL != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to create audio recorder.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->Realize((SLObjectItf)pDevice->opensl.pAudioRecorderObj, SL_BOOLEAN_FALSE) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to realize audio recorder.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, SL_IID_RECORD, &pDevice->opensl.pAudioRecorder) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to retrieve SL_IID_RECORD interface.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_OBJ(pDevice->opensl.pAudioRecorderObj)->GetInterface((SLObjectItf)pDevice->opensl.pAudioRecorderObj, SL_IID_ANDROIDSIMPLEBUFFERQUEUE, &pDevice->opensl.pBufferQueue) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to retrieve SL_IID_ANDROIDSIMPLEBUFFERQUEUE interface.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
if (MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->RegisterCallback((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue, mal_buffer_queue_callback__opensl_android, pDevice) != SL_RESULT_SUCCESS) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to register buffer queue callback.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
}
// The internal format is determined by the pFormat object.
mal_bool32 isFloatingPoint = MAL_FALSE;
#if defined(MAL_ANDROID) && __ANDROID_API__ >= 21
if (pFormat->formatType == SL_ANDROID_DATAFORMAT_PCM_EX) {
mal_assert(pcmEx.representation == SL_ANDROID_PCM_REPRESENTATION_FLOAT);
isFloatingPoint = MAL_TRUE;
}
#endif
if (isFloatingPoint) {
if (pFormat->bitsPerSample == 32) {
pDevice->internalFormat = mal_format_f32;
}
#if 0
if (pFormat->bitsPerSample == 64) {
pDevice->internalFormat = mal_format_f64;
}
#endif
} else {
if (pFormat->bitsPerSample == 8) {
pDevice->internalFormat = mal_format_u8;
} else if (pFormat->bitsPerSample == 16) {
pDevice->internalFormat = mal_format_s16;
} else if (pFormat->bitsPerSample == 24) {
pDevice->internalFormat = mal_format_s24;
} else if (pFormat->bitsPerSample == 32) {
pDevice->internalFormat = mal_format_s32;
}
}
pDevice->internalChannels = pFormat->numChannels;
pDevice->internalSampleRate = pFormat->samplesPerSec / 1000;
mal_channel_mask_to_channel_map__opensl(pFormat->channelMask, pDevice->internalChannels, pDevice->internalChannelMap);
size_t bufferSizeInBytes = pDevice->bufferSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
pDevice->opensl.pBuffer = (mal_uint8*)mal_malloc(bufferSizeInBytes);
if (pDevice->opensl.pBuffer == NULL) {
mal_device_uninit__opensl(pDevice);
return mal_post_error(pDevice, "[OpenSL] Failed to allocate memory for data buffer.", MAL_OUT_OF_MEMORY);
}
mal_zero_memory(pDevice->opensl.pBuffer, bufferSizeInBytes);
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__opensl(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
SLresult resultSL = MAL_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_PLAYING);
if (resultSL != SL_RESULT_SUCCESS) {
return mal_post_error(pDevice, "[OpenSL] Failed to start internal playback device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
// We need to enqueue a buffer for each period.
mal_device__read_frames_from_client(pDevice, pDevice->bufferSizeInFrames, pDevice->opensl.pBuffer);
size_t periodSizeInBytes = pDevice->opensl.periodSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
for (mal_uint32 iPeriod = 0; iPeriod < pDevice->periods; ++iPeriod) {
resultSL = MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue, pDevice->opensl.pBuffer + (periodSizeInBytes * iPeriod), periodSizeInBytes);
if (resultSL != SL_RESULT_SUCCESS) {
MAL_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED);
return mal_post_error(pDevice, "[OpenSL] Failed to enqueue buffer for playback device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
} else {
SLresult resultSL = MAL_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_RECORDING);
if (resultSL != SL_RESULT_SUCCESS) {
return mal_post_error(pDevice, "[OpenSL] Failed to start internal capture device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
size_t periodSizeInBytes = pDevice->opensl.periodSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat);
for (mal_uint32 iPeriod = 0; iPeriod < pDevice->periods; ++iPeriod) {
resultSL = MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->Enqueue((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue, pDevice->opensl.pBuffer + (periodSizeInBytes * iPeriod), periodSizeInBytes);
if (resultSL != SL_RESULT_SUCCESS) {
MAL_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED);
return mal_post_error(pDevice, "[OpenSL] Failed to enqueue buffer for capture device.", MAL_FAILED_TO_START_BACKEND_DEVICE);
}
}
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__opensl(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
SLresult resultSL = MAL_OPENSL_PLAY(pDevice->opensl.pAudioPlayer)->SetPlayState((SLPlayItf)pDevice->opensl.pAudioPlayer, SL_PLAYSTATE_STOPPED);
if (resultSL != SL_RESULT_SUCCESS) {
return mal_post_error(pDevice, "[OpenSL] Failed to stop internal playback device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
} else {
SLresult resultSL = MAL_OPENSL_RECORD(pDevice->opensl.pAudioRecorder)->SetRecordState((SLRecordItf)pDevice->opensl.pAudioRecorder, SL_RECORDSTATE_STOPPED);
if (resultSL != SL_RESULT_SUCCESS) {
return mal_post_error(pDevice, "[OpenSL] Failed to stop internal capture device.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
}
// Make sure any queued buffers are cleared.
MAL_OPENSL_BUFFERQUEUE(pDevice->opensl.pBufferQueue)->Clear((SLAndroidSimpleBufferQueueItf)pDevice->opensl.pBufferQueue);
// Make sure the client is aware that the device has stopped. There may be an OpenSL|ES callback for this, but I haven't found it.
mal_device__set_state(pDevice, MAL_STATE_STOPPED);
if (pDevice->onStop) {
pDevice->onStop(pDevice);
}
return MAL_SUCCESS;
}
#endif // OpenSL|ES
///////////////////////////////////////////////////////////////////////////////
//
// OpenAL Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_OPENAL
#ifdef MAL_WIN32
#define MAL_AL_APIENTRY __cdecl
#else
#define MAL_AL_APIENTRY
#endif
#ifdef MAL_NO_RUNTIME_LINKING
#if defined(MAL_APPLE)
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#endif
#endif
typedef struct mal_ALCdevice_struct mal_ALCdevice;
typedef struct mal_ALCcontext_struct mal_ALCcontext;
typedef char mal_ALCboolean;
typedef char mal_ALCchar;
typedef signed char mal_ALCbyte;
typedef unsigned char mal_ALCubyte;
typedef short mal_ALCshort;
typedef unsigned short mal_ALCushort;
typedef int mal_ALCint;
typedef unsigned int mal_ALCuint;
typedef int mal_ALCsizei;
typedef int mal_ALCenum;
typedef float mal_ALCfloat;
typedef double mal_ALCdouble;
typedef void mal_ALCvoid;
typedef mal_ALCboolean mal_ALboolean;
typedef mal_ALCchar mal_ALchar;
typedef mal_ALCbyte mal_ALbyte;
typedef mal_ALCubyte mal_ALubyte;
typedef mal_ALCshort mal_ALshort;
typedef mal_ALCushort mal_ALushort;
typedef mal_ALCint mal_ALint;
typedef mal_ALCuint mal_ALuint;
typedef mal_ALCsizei mal_ALsizei;
typedef mal_ALCenum mal_ALenum;
typedef mal_ALCfloat mal_ALfloat;
typedef mal_ALCdouble mal_ALdouble;
typedef mal_ALCvoid mal_ALvoid;
#define MAL_ALC_DEVICE_SPECIFIER 0x1005
#define MAL_ALC_CAPTURE_DEVICE_SPECIFIER 0x310
#define MAL_ALC_CAPTURE_SAMPLES 0x312
#define MAL_AL_SOURCE_STATE 0x1010
#define MAL_AL_INITIAL 0x1011
#define MAL_AL_PLAYING 0x1012
#define MAL_AL_PAUSED 0x1013
#define MAL_AL_STOPPED 0x1014
#define MAL_AL_BUFFERS_PROCESSED 0x1016
#define MAL_AL_FORMAT_MONO8 0x1100
#define MAL_AL_FORMAT_MONO16 0x1101
#define MAL_AL_FORMAT_STEREO8 0x1102
#define MAL_AL_FORMAT_STEREO16 0x1103
#define MAL_AL_FORMAT_MONO_FLOAT32 0x10010
#define MAL_AL_FORMAT_STEREO_FLOAT32 0x10011
#define MAL_AL_FORMAT_51CHN16 0x120B
#define MAL_AL_FORMAT_51CHN32 0x120C
#define MAL_AL_FORMAT_51CHN8 0x120A
#define MAL_AL_FORMAT_61CHN16 0x120E
#define MAL_AL_FORMAT_61CHN32 0x120F
#define MAL_AL_FORMAT_61CHN8 0x120D
#define MAL_AL_FORMAT_71CHN16 0x1211
#define MAL_AL_FORMAT_71CHN32 0x1212
#define MAL_AL_FORMAT_71CHN8 0x1210
#define MAL_AL_FORMAT_QUAD16 0x1205
#define MAL_AL_FORMAT_QUAD32 0x1206
#define MAL_AL_FORMAT_QUAD8 0x1204
#define MAL_AL_FORMAT_REAR16 0x1208
#define MAL_AL_FORMAT_REAR32 0x1209
#define MAL_AL_FORMAT_REAR8 0x1207
typedef mal_ALCcontext* (MAL_AL_APIENTRY * MAL_LPALCCREATECONTEXT) (mal_ALCdevice *device, const mal_ALCint *attrlist);
typedef mal_ALCboolean (MAL_AL_APIENTRY * MAL_LPALCMAKECONTEXTCURRENT) (mal_ALCcontext *context);
typedef void (MAL_AL_APIENTRY * MAL_LPALCPROCESSCONTEXT) (mal_ALCcontext *context);
typedef void (MAL_AL_APIENTRY * MAL_LPALCSUSPENDCONTEXT) (mal_ALCcontext *context);
typedef void (MAL_AL_APIENTRY * MAL_LPALCDESTROYCONTEXT) (mal_ALCcontext *context);
typedef mal_ALCcontext* (MAL_AL_APIENTRY * MAL_LPALCGETCURRENTCONTEXT) (void);
typedef mal_ALCdevice* (MAL_AL_APIENTRY * MAL_LPALCGETCONTEXTSDEVICE) (mal_ALCcontext *context);
typedef mal_ALCdevice* (MAL_AL_APIENTRY * MAL_LPALCOPENDEVICE) (const mal_ALCchar *devicename);
typedef mal_ALCboolean (MAL_AL_APIENTRY * MAL_LPALCCLOSEDEVICE) (mal_ALCdevice *device);
typedef mal_ALCenum (MAL_AL_APIENTRY * MAL_LPALCGETERROR) (mal_ALCdevice *device);
typedef mal_ALCboolean (MAL_AL_APIENTRY * MAL_LPALCISEXTENSIONPRESENT) (mal_ALCdevice *device, const mal_ALCchar *extname);
typedef void* (MAL_AL_APIENTRY * MAL_LPALCGETPROCADDRESS) (mal_ALCdevice *device, const mal_ALCchar *funcname);
typedef mal_ALCenum (MAL_AL_APIENTRY * MAL_LPALCGETENUMVALUE) (mal_ALCdevice *device, const mal_ALCchar *enumname);
typedef const mal_ALCchar* (MAL_AL_APIENTRY * MAL_LPALCGETSTRING) (mal_ALCdevice *device, mal_ALCenum param);
typedef void (MAL_AL_APIENTRY * MAL_LPALCGETINTEGERV) (mal_ALCdevice *device, mal_ALCenum param, mal_ALCsizei size, mal_ALCint *values);
typedef mal_ALCdevice* (MAL_AL_APIENTRY * MAL_LPALCCAPTUREOPENDEVICE) (const mal_ALCchar *devicename, mal_ALCuint frequency, mal_ALCenum format, mal_ALCsizei buffersize);
typedef mal_ALCboolean (MAL_AL_APIENTRY * MAL_LPALCCAPTURECLOSEDEVICE) (mal_ALCdevice *device);
typedef void (MAL_AL_APIENTRY * MAL_LPALCCAPTURESTART) (mal_ALCdevice *device);
typedef void (MAL_AL_APIENTRY * MAL_LPALCCAPTURESTOP) (mal_ALCdevice *device);
typedef void (MAL_AL_APIENTRY * MAL_LPALCCAPTURESAMPLES) (mal_ALCdevice *device, mal_ALCvoid *buffer, mal_ALCsizei samples);
typedef void (MAL_AL_APIENTRY * MAL_LPALENABLE) (mal_ALenum capability);
typedef void (MAL_AL_APIENTRY * MAL_LPALDISABLE) (mal_ALenum capability);
typedef mal_ALboolean (MAL_AL_APIENTRY * MAL_LPALISENABLED) (mal_ALenum capability);
typedef const mal_ALchar* (MAL_AL_APIENTRY * MAL_LPALGETSTRING) (mal_ALenum param);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBOOLEANV) (mal_ALenum param, mal_ALboolean *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETINTEGERV) (mal_ALenum param, mal_ALint *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETFLOATV) (mal_ALenum param, mal_ALfloat *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETDOUBLEV) (mal_ALenum param, mal_ALdouble *values);
typedef mal_ALboolean (MAL_AL_APIENTRY * MAL_LPALGETBOOLEAN) (mal_ALenum param);
typedef mal_ALint (MAL_AL_APIENTRY * MAL_LPALGETINTEGER) (mal_ALenum param);
typedef mal_ALfloat (MAL_AL_APIENTRY * MAL_LPALGETFLOAT) (mal_ALenum param);
typedef mal_ALdouble (MAL_AL_APIENTRY * MAL_LPALGETDOUBLE) (mal_ALenum param);
typedef mal_ALenum (MAL_AL_APIENTRY * MAL_LPALGETERROR) (void);
typedef mal_ALboolean (MAL_AL_APIENTRY * MAL_LPALISEXTENSIONPRESENT) (const mal_ALchar *extname);
typedef void* (MAL_AL_APIENTRY * MAL_LPALGETPROCADDRESS) (const mal_ALchar *fname);
typedef mal_ALenum (MAL_AL_APIENTRY * MAL_LPALGETENUMVALUE) (const mal_ALchar *ename);
typedef void (MAL_AL_APIENTRY * MAL_LPALGENSOURCES) (mal_ALsizei n, mal_ALuint *sources);
typedef void (MAL_AL_APIENTRY * MAL_LPALDELETESOURCES) (mal_ALsizei n, const mal_ALuint *sources);
typedef mal_ALboolean (MAL_AL_APIENTRY * MAL_LPALISSOURCE) (mal_ALuint source);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEF) (mal_ALuint source, mal_ALenum param, mal_ALfloat value);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCE3F) (mal_ALuint source, mal_ALenum param, mal_ALfloat value1, mal_ALfloat value2, mal_ALfloat value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEFV) (mal_ALuint source, mal_ALenum param, const mal_ALfloat *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEI) (mal_ALuint source, mal_ALenum param, mal_ALint value);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCE3I) (mal_ALuint source, mal_ALenum param, mal_ALint value1, mal_ALint value2, mal_ALint value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEIV) (mal_ALuint source, mal_ALenum param, const mal_ALint *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETSOURCEF) (mal_ALuint source, mal_ALenum param, mal_ALfloat *value);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETSOURCE3F) (mal_ALuint source, mal_ALenum param, mal_ALfloat *value1, mal_ALfloat *value2, mal_ALfloat *value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETSOURCEFV) (mal_ALuint source, mal_ALenum param, mal_ALfloat *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETSOURCEI) (mal_ALuint source, mal_ALenum param, mal_ALint *value);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETSOURCE3I) (mal_ALuint source, mal_ALenum param, mal_ALint *value1, mal_ALint *value2, mal_ALint *value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETSOURCEIV) (mal_ALuint source, mal_ALenum param, mal_ALint *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEPLAYV) (mal_ALsizei n, const mal_ALuint *sources);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCESTOPV) (mal_ALsizei n, const mal_ALuint *sources);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEREWINDV) (mal_ALsizei n, const mal_ALuint *sources);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEPAUSEV) (mal_ALsizei n, const mal_ALuint *sources);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEPLAY) (mal_ALuint source);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCESTOP) (mal_ALuint source);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEREWIND) (mal_ALuint source);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEPAUSE) (mal_ALuint source);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEQUEUEBUFFERS) (mal_ALuint source, mal_ALsizei nb, const mal_ALuint *buffers);
typedef void (MAL_AL_APIENTRY * MAL_LPALSOURCEUNQUEUEBUFFERS)(mal_ALuint source, mal_ALsizei nb, mal_ALuint *buffers);
typedef void (MAL_AL_APIENTRY * MAL_LPALGENBUFFERS) (mal_ALsizei n, mal_ALuint *buffers);
typedef void (MAL_AL_APIENTRY * MAL_LPALDELETEBUFFERS) (mal_ALsizei n, const mal_ALuint *buffers);
typedef mal_ALboolean (MAL_AL_APIENTRY * MAL_LPALISBUFFER) (mal_ALuint buffer);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFERDATA) (mal_ALuint buffer, mal_ALenum format, const mal_ALvoid *data, mal_ALsizei size, mal_ALsizei freq);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFERF) (mal_ALuint buffer, mal_ALenum param, mal_ALfloat value);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFER3F) (mal_ALuint buffer, mal_ALenum param, mal_ALfloat value1, mal_ALfloat value2, mal_ALfloat value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFERFV) (mal_ALuint buffer, mal_ALenum param, const mal_ALfloat *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFERI) (mal_ALuint buffer, mal_ALenum param, mal_ALint value);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFER3I) (mal_ALuint buffer, mal_ALenum param, mal_ALint value1, mal_ALint value2, mal_ALint value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALBUFFERIV) (mal_ALuint buffer, mal_ALenum param, const mal_ALint *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBUFFERF) (mal_ALuint buffer, mal_ALenum param, mal_ALfloat *value);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBUFFER3F) (mal_ALuint buffer, mal_ALenum param, mal_ALfloat *value1, mal_ALfloat *value2, mal_ALfloat *value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBUFFERFV) (mal_ALuint buffer, mal_ALenum param, mal_ALfloat *values);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBUFFERI) (mal_ALuint buffer, mal_ALenum param, mal_ALint *value);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBUFFER3I) (mal_ALuint buffer, mal_ALenum param, mal_ALint *value1, mal_ALint *value2, mal_ALint *value3);
typedef void (MAL_AL_APIENTRY * MAL_LPALGETBUFFERIV) (mal_ALuint buffer, mal_ALenum param, mal_ALint *values);
mal_result mal_context_init__openal(mal_context* pContext)
{
mal_assert(pContext != NULL);
#ifndef MAL_NO_RUNTIME_LINKING
const char* libName = NULL;
#ifdef MAL_WIN32
libName = "OpenAL32.dll";
#endif
#if defined(MAL_UNIX) && !defined(MAL_APPLE)
libName = "libopenal.so";
#endif
#ifdef MAL_APPLE
libName = "OpenAL.framework/OpenAL";
#endif
if (libName == NULL) {
return MAL_NO_BACKEND; // Don't know what the library name is called.
}
pContext->openal.hOpenAL = mal_dlopen(libName);
#ifdef MAL_WIN32
// Special case for Win32 - try "soft_oal.dll" for OpenAL-Soft drop-ins.
if (pContext->openal.hOpenAL == NULL) {
pContext->openal.hOpenAL = mal_dlopen("soft_oal.dll");
}
#endif
if (pContext->openal.hOpenAL == NULL) {
return MAL_FAILED_TO_INIT_BACKEND;
}
pContext->openal.alcCreateContext = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCreateContext");
pContext->openal.alcMakeContextCurrent = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcMakeContextCurrent");
pContext->openal.alcProcessContext = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcProcessContext");
pContext->openal.alcSuspendContext = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcSuspendContext");
pContext->openal.alcDestroyContext = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcDestroyContext");
pContext->openal.alcGetCurrentContext = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetCurrentContext");
pContext->openal.alcGetContextsDevice = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetContextsDevice");
pContext->openal.alcOpenDevice = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcOpenDevice");
pContext->openal.alcCloseDevice = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCloseDevice");
pContext->openal.alcGetError = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetError");
pContext->openal.alcIsExtensionPresent = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcIsExtensionPresent");
pContext->openal.alcGetProcAddress = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetProcAddress");
pContext->openal.alcGetEnumValue = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetEnumValue");
pContext->openal.alcGetString = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetString");
pContext->openal.alcGetIntegerv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcGetIntegerv");
pContext->openal.alcCaptureOpenDevice = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCaptureOpenDevice");
pContext->openal.alcCaptureCloseDevice = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCaptureCloseDevice");
pContext->openal.alcCaptureStart = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCaptureStart");
pContext->openal.alcCaptureStop = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCaptureStop");
pContext->openal.alcCaptureSamples = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alcCaptureSamples");
pContext->openal.alEnable = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alEnable");
pContext->openal.alDisable = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alDisable");
pContext->openal.alIsEnabled = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alIsEnabled");
pContext->openal.alGetString = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetString");
pContext->openal.alGetBooleanv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBooleanv");
pContext->openal.alGetIntegerv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetIntegerv");
pContext->openal.alGetFloatv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetFloatv");
pContext->openal.alGetDoublev = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetDoublev");
pContext->openal.alGetBoolean = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBoolean");
pContext->openal.alGetInteger = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetInteger");
pContext->openal.alGetFloat = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetFloat");
pContext->openal.alGetDouble = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetDouble");
pContext->openal.alGetError = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetError");
pContext->openal.alIsExtensionPresent = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alIsExtensionPresent");
pContext->openal.alGetProcAddress = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetProcAddress");
pContext->openal.alGetEnumValue = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetEnumValue");
pContext->openal.alGenSources = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGenSources");
pContext->openal.alDeleteSources = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alDeleteSources");
pContext->openal.alIsSource = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alIsSource");
pContext->openal.alSourcef = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcef");
pContext->openal.alSource3f = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSource3f");
pContext->openal.alSourcefv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcefv");
pContext->openal.alSourcei = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcei");
pContext->openal.alSource3i = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSource3i");
pContext->openal.alSourceiv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceiv");
pContext->openal.alGetSourcef = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetSourcef");
pContext->openal.alGetSource3f = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetSource3f");
pContext->openal.alGetSourcefv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetSourcefv");
pContext->openal.alGetSourcei = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetSourcei");
pContext->openal.alGetSource3i = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetSource3i");
pContext->openal.alGetSourceiv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetSourceiv");
pContext->openal.alSourcePlayv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcePlayv");
pContext->openal.alSourceStopv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceStopv");
pContext->openal.alSourceRewindv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceRewindv");
pContext->openal.alSourcePausev = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcePausev");
pContext->openal.alSourcePlay = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcePlay");
pContext->openal.alSourceStop = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceStop");
pContext->openal.alSourceRewind = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceRewind");
pContext->openal.alSourcePause = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourcePause");
pContext->openal.alSourceQueueBuffers = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceQueueBuffers");
pContext->openal.alSourceUnqueueBuffers = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alSourceUnqueueBuffers");
pContext->openal.alGenBuffers = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGenBuffers");
pContext->openal.alDeleteBuffers = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alDeleteBuffers");
pContext->openal.alIsBuffer = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alIsBuffer");
pContext->openal.alBufferData = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBufferData");
pContext->openal.alBufferf = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBufferf");
pContext->openal.alBuffer3f = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBuffer3f");
pContext->openal.alBufferfv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBufferfv");
pContext->openal.alBufferi = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBufferi");
pContext->openal.alBuffer3i = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBuffer3i");
pContext->openal.alBufferiv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alBufferiv");
pContext->openal.alGetBufferf = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBufferf");
pContext->openal.alGetBuffer3f = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBuffer3f");
pContext->openal.alGetBufferfv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBufferfv");
pContext->openal.alGetBufferi = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBufferi");
pContext->openal.alGetBuffer3i = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBuffer3i");
pContext->openal.alGetBufferiv = (mal_proc)mal_dlsym(pContext->openal.hOpenAL, "alGetBufferiv");
#else
pContext->openal.alcCreateContext = (mal_proc)alcCreateContext;
pContext->openal.alcMakeContextCurrent = (mal_proc)alcMakeContextCurrent;
pContext->openal.alcProcessContext = (mal_proc)alcProcessContext;
pContext->openal.alcSuspendContext = (mal_proc)alcSuspendContext;
pContext->openal.alcDestroyContext = (mal_proc)alcDestroyContext;
pContext->openal.alcGetCurrentContext = (mal_proc)alcGetCurrentContext;
pContext->openal.alcGetContextsDevice = (mal_proc)alcGetContextsDevice;
pContext->openal.alcOpenDevice = (mal_proc)alcOpenDevice;
pContext->openal.alcCloseDevice = (mal_proc)alcCloseDevice;
pContext->openal.alcGetError = (mal_proc)alcGetError;
pContext->openal.alcIsExtensionPresent = (mal_proc)alcIsExtensionPresent;
pContext->openal.alcGetProcAddress = (mal_proc)alcGetProcAddress;
pContext->openal.alcGetEnumValue = (mal_proc)alcGetEnumValue;
pContext->openal.alcGetString = (mal_proc)alcGetString;
pContext->openal.alcGetIntegerv = (mal_proc)alcGetIntegerv;
pContext->openal.alcCaptureOpenDevice = (mal_proc)alcCaptureOpenDevice;
pContext->openal.alcCaptureCloseDevice = (mal_proc)alcCaptureCloseDevice;
pContext->openal.alcCaptureStart = (mal_proc)alcCaptureStart;
pContext->openal.alcCaptureStop = (mal_proc)alcCaptureStop;
pContext->openal.alcCaptureSamples = (mal_proc)alcCaptureSamples;
pContext->openal.alEnable = (mal_proc)alEnable;
pContext->openal.alDisable = (mal_proc)alDisable;
pContext->openal.alIsEnabled = (mal_proc)alIsEnabled;
pContext->openal.alGetString = (mal_proc)alGetString;
pContext->openal.alGetBooleanv = (mal_proc)alGetBooleanv;
pContext->openal.alGetIntegerv = (mal_proc)alGetIntegerv;
pContext->openal.alGetFloatv = (mal_proc)alGetFloatv;
pContext->openal.alGetDoublev = (mal_proc)alGetDoublev;
pContext->openal.alGetBoolean = (mal_proc)alGetBoolean;
pContext->openal.alGetInteger = (mal_proc)alGetInteger;
pContext->openal.alGetFloat = (mal_proc)alGetFloat;
pContext->openal.alGetDouble = (mal_proc)alGetDouble;
pContext->openal.alGetError = (mal_proc)alGetError;
pContext->openal.alIsExtensionPresent = (mal_proc)alIsExtensionPresent;
pContext->openal.alGetProcAddress = (mal_proc)alGetProcAddress;
pContext->openal.alGetEnumValue = (mal_proc)alGetEnumValue;
pContext->openal.alGenSources = (mal_proc)alGenSources;
pContext->openal.alDeleteSources = (mal_proc)alDeleteSources;
pContext->openal.alIsSource = (mal_proc)alIsSource;
pContext->openal.alSourcef = (mal_proc)alSourcef;
pContext->openal.alSource3f = (mal_proc)alSource3f;
pContext->openal.alSourcefv = (mal_proc)alSourcefv;
pContext->openal.alSourcei = (mal_proc)alSourcei;
pContext->openal.alSource3i = (mal_proc)alSource3i;
pContext->openal.alSourceiv = (mal_proc)alSourceiv;
pContext->openal.alGetSourcef = (mal_proc)alGetSourcef;
pContext->openal.alGetSource3f = (mal_proc)alGetSource3f;
pContext->openal.alGetSourcefv = (mal_proc)alGetSourcefv;
pContext->openal.alGetSourcei = (mal_proc)alGetSourcei;
pContext->openal.alGetSource3i = (mal_proc)alGetSource3i;
pContext->openal.alGetSourceiv = (mal_proc)alGetSourceiv;
pContext->openal.alSourcePlayv = (mal_proc)alSourcePlayv;
pContext->openal.alSourceStopv = (mal_proc)alSourceStopv;
pContext->openal.alSourceRewindv = (mal_proc)alSourceRewindv;
pContext->openal.alSourcePausev = (mal_proc)alSourcePausev;
pContext->openal.alSourcePlay = (mal_proc)alSourcePlay;
pContext->openal.alSourceStop = (mal_proc)alSourceStop;
pContext->openal.alSourceRewind = (mal_proc)alSourceRewind;
pContext->openal.alSourcePause = (mal_proc)alSourcePause;
pContext->openal.alSourceQueueBuffers = (mal_proc)alSourceQueueBuffers;
pContext->openal.alSourceUnqueueBuffers = (mal_proc)alSourceUnqueueBuffers;
pContext->openal.alGenBuffers = (mal_proc)alGenBuffers;
pContext->openal.alDeleteBuffers = (mal_proc)alDeleteBuffers;
pContext->openal.alIsBuffer = (mal_proc)alIsBuffer;
pContext->openal.alBufferData = (mal_proc)alBufferData;
pContext->openal.alBufferf = (mal_proc)alBufferf;
pContext->openal.alBuffer3f = (mal_proc)alBuffer3f;
pContext->openal.alBufferfv = (mal_proc)alBufferfv;
pContext->openal.alBufferi = (mal_proc)alBufferi;
pContext->openal.alBuffer3i = (mal_proc)alBuffer3i;
pContext->openal.alBufferiv = (mal_proc)alBufferiv;
pContext->openal.alGetBufferf = (mal_proc)alGetBufferf;
pContext->openal.alGetBuffer3f = (mal_proc)alGetBuffer3f;
pContext->openal.alGetBufferfv = (mal_proc)alGetBufferfv;
pContext->openal.alGetBufferi = (mal_proc)alGetBufferi;
pContext->openal.alGetBuffer3i = (mal_proc)alGetBuffer3i;
pContext->openal.alGetBufferiv = (mal_proc)alGetBufferiv;
#endif
// We depend on the ALC_ENUMERATION_EXT extension for enumeration. If this is not supported we fall back to default devices.
pContext->openal.isEnumerationSupported = ((MAL_LPALCISEXTENSIONPRESENT)pContext->openal.alcIsExtensionPresent)(NULL, "ALC_ENUMERATION_EXT");
pContext->openal.isFloat32Supported = ((MAL_LPALISEXTENSIONPRESENT)pContext->openal.alIsExtensionPresent)("AL_EXT_float32");
pContext->openal.isMCFormatsSupported = ((MAL_LPALISEXTENSIONPRESENT)pContext->openal.alIsExtensionPresent)("AL_EXT_MCFORMATS");
return MAL_SUCCESS;
}
mal_result mal_context_uninit__openal(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_openal);
#ifndef MAL_NO_RUNTIME_LINKING
mal_dlclose(pContext->openal.hOpenAL);
#endif
return MAL_SUCCESS;
}
mal_result mal_enumerate_devices__openal(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
mal_uint32 infoSize = *pCount;
*pCount = 0;
if (pContext->openal.isEnumerationSupported) {
const mal_ALCchar* pDeviceNames = ((MAL_LPALCGETSTRING)pContext->openal.alcGetString)(NULL, (type == mal_device_type_playback) ? MAL_ALC_DEVICE_SPECIFIER : MAL_ALC_CAPTURE_DEVICE_SPECIFIER);
if (pDeviceNames == NULL) {
return MAL_NO_DEVICE;
}
// Each device is stored in pDeviceNames, separated by a null-terminator. The string itself is double-null-terminated.
const mal_ALCchar* pNextDeviceName = pDeviceNames;
while (pNextDeviceName[0] != '\0') {
if (pInfo != NULL) {
if (infoSize > 0) {
mal_strncpy_s(pInfo->id.openal, sizeof(pInfo->id.openal), (const char*)pNextDeviceName, (size_t)-1);
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), (const char*)pNextDeviceName, (size_t)-1);
pInfo += 1;
infoSize -= 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
// Move to the next device name.
while (*pNextDeviceName != '\0') {
pNextDeviceName += 1;
}
// Skip past the null terminator.
pNextDeviceName += 1;
};
} else {
// Enumeration is not supported. Use default devices.
if (pInfo != NULL) {
if (infoSize > 0) {
if (type == mal_device_type_playback) {
pInfo->id.sdl = 0;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Playback Device", (size_t)-1);
} else {
pInfo->id.sdl = 0;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Capture Device", (size_t)-1);
}
pInfo += 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
return MAL_SUCCESS;
}
void mal_device_uninit__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
((MAL_LPALCMAKECONTEXTCURRENT)pDevice->pContext->openal.alcMakeContextCurrent)(NULL);
((MAL_LPALCDESTROYCONTEXT)pDevice->pContext->openal.alcDestroyContext)((mal_ALCcontext*)pDevice->openal.pContextALC);
if (pDevice->type == mal_device_type_playback) {
((MAL_LPALCCLOSEDEVICE)pDevice->pContext->openal.alcCloseDevice)((mal_ALCdevice*)pDevice->openal.pDeviceALC);
} else {
((MAL_LPALCCAPTURECLOSEDEVICE)pDevice->pContext->openal.alcCaptureCloseDevice)((mal_ALCdevice*)pDevice->openal.pDeviceALC);
}
mal_free(pDevice->openal.pIntermediaryBuffer);
}
mal_result mal_device_init__openal(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
if (pDevice->periods > MAL_MAX_PERIODS_OPENAL) {
pDevice->periods = MAL_MAX_PERIODS_OPENAL;
}
// OpenAL has bad latency in my testing :(
if (pDevice->usingDefaultBufferSize) {
pDevice->bufferSizeInFrames *= 4;
}
mal_ALCsizei bufferSizeInSamplesAL = pDevice->bufferSizeInFrames;
mal_ALCuint frequencyAL = pConfig->sampleRate;
mal_uint32 channelsAL = 0;
// OpenAL currently only supports only mono and stereo. TODO: Check for the AL_EXT_MCFORMATS extension and use one of those formats for quad, 5.1, etc.
mal_ALCenum formatAL = 0;
if (pConfig->channels == 1) {
// Mono.
channelsAL = 1;
if (pConfig->format == mal_format_f32) {
if (pContext->openal.isFloat32Supported) {
formatAL = MAL_AL_FORMAT_MONO_FLOAT32;
} else {
formatAL = MAL_AL_FORMAT_MONO16;
}
} else if (pConfig->format == mal_format_s32) {
formatAL = MAL_AL_FORMAT_MONO16;
} else if (pConfig->format == mal_format_s24) {
formatAL = MAL_AL_FORMAT_MONO16;
} else if (pConfig->format == mal_format_s16) {
formatAL = MAL_AL_FORMAT_MONO16;
} else if (pConfig->format == mal_format_u8) {
formatAL = MAL_AL_FORMAT_MONO8;
}
} else {
// Stereo.
channelsAL = 2;
if (pConfig->format == mal_format_f32) {
if (pContext->openal.isFloat32Supported) {
formatAL = MAL_AL_FORMAT_STEREO_FLOAT32;
} else {
formatAL = MAL_AL_FORMAT_STEREO16;
}
} else if (pConfig->format == mal_format_s32) {
formatAL = MAL_AL_FORMAT_STEREO16;
} else if (pConfig->format == mal_format_s24) {
formatAL = MAL_AL_FORMAT_STEREO16;
} else if (pConfig->format == mal_format_s16) {
formatAL = MAL_AL_FORMAT_STEREO16;
} else if (pConfig->format == mal_format_u8) {
formatAL = MAL_AL_FORMAT_STEREO8;
}
}
if (formatAL == 0) {
return mal_context_post_error(pContext, NULL, "[OpenAL] Format not supported.", MAL_FORMAT_NOT_SUPPORTED);
}
bufferSizeInSamplesAL *= channelsAL;
// OpenAL feels a bit unintuitive to me... The global object is a device, and it would appear that each device can have
// many context's...
mal_ALCdevice* pDeviceALC = NULL;
if (type == mal_device_type_playback) {
pDeviceALC = ((MAL_LPALCOPENDEVICE)pContext->openal.alcOpenDevice)((pDeviceID == NULL) ? NULL : pDeviceID->openal);
} else {
pDeviceALC = ((MAL_LPALCCAPTUREOPENDEVICE)pContext->openal.alcCaptureOpenDevice)((pDeviceID == NULL) ? NULL : pDeviceID->openal, frequencyAL, formatAL, bufferSizeInSamplesAL);
}
if (pDeviceALC == NULL) {
return mal_context_post_error(pContext, NULL, "[OpenAL] Failed to open device.", MAL_FAILED_TO_INIT_BACKEND);
}
// A context is only required for playback.
mal_ALCcontext* pContextALC = NULL;
if (pDevice->type == mal_device_type_playback) {
pContextALC = ((MAL_LPALCCREATECONTEXT)pContext->openal.alcCreateContext)(pDeviceALC, NULL);
if (pContextALC == NULL) {
((MAL_LPALCCLOSEDEVICE)pDevice->pContext->openal.alcCloseDevice)(pDeviceALC);
return mal_context_post_error(pContext, NULL, "[OpenAL] Failed to open OpenAL context.", MAL_FAILED_TO_INIT_BACKEND);
}
((MAL_LPALCMAKECONTEXTCURRENT)pDevice->pContext->openal.alcMakeContextCurrent)(pContextALC);
mal_ALuint sourceAL;
((MAL_LPALGENSOURCES)pDevice->pContext->openal.alGenSources)(1, &sourceAL);
pDevice->openal.sourceAL = sourceAL;
// We create the buffers, but only fill and queue them when the device is started.
mal_ALuint buffersAL[MAL_MAX_PERIODS_OPENAL];
((MAL_LPALGENBUFFERS)pDevice->pContext->openal.alGenBuffers)(pDevice->periods, buffersAL);
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
pDevice->openal.buffersAL[i] = buffersAL[i];
}
}
pDevice->internalChannels = channelsAL;
pDevice->internalSampleRate = frequencyAL;
// The internal format is a little bit straight with OpenAL.
switch (formatAL)
{
case MAL_AL_FORMAT_MONO8:
case MAL_AL_FORMAT_STEREO8:
case MAL_AL_FORMAT_REAR8:
case MAL_AL_FORMAT_QUAD8:
case MAL_AL_FORMAT_51CHN8:
case MAL_AL_FORMAT_61CHN8:
case MAL_AL_FORMAT_71CHN8:
{
pDevice->internalFormat = mal_format_u8;
} break;
case MAL_AL_FORMAT_MONO16:
case MAL_AL_FORMAT_STEREO16:
case MAL_AL_FORMAT_REAR16:
case MAL_AL_FORMAT_QUAD16:
case MAL_AL_FORMAT_51CHN16:
case MAL_AL_FORMAT_61CHN16:
case MAL_AL_FORMAT_71CHN16:
{
pDevice->internalFormat = mal_format_s16;
} break;
case MAL_AL_FORMAT_REAR32:
case MAL_AL_FORMAT_QUAD32:
case MAL_AL_FORMAT_51CHN32:
case MAL_AL_FORMAT_61CHN32:
case MAL_AL_FORMAT_71CHN32:
{
pDevice->internalFormat = mal_format_s32;
} break;
case MAL_AL_FORMAT_MONO_FLOAT32:
case MAL_AL_FORMAT_STEREO_FLOAT32:
{
pDevice->internalFormat = mal_format_f32;
} break;
}
// From what I can tell, the ordering of channels is fixed for OpenAL.
switch (formatAL)
{
case MAL_AL_FORMAT_MONO8:
case MAL_AL_FORMAT_MONO16:
case MAL_AL_FORMAT_MONO_FLOAT32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_FRONT_CENTER;
} break;
case MAL_AL_FORMAT_STEREO8:
case MAL_AL_FORMAT_STEREO16:
case MAL_AL_FORMAT_STEREO_FLOAT32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_FRONT_LEFT;
pDevice->internalChannelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
} break;
case MAL_AL_FORMAT_REAR8:
case MAL_AL_FORMAT_REAR16:
case MAL_AL_FORMAT_REAR32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_BACK_LEFT;
pDevice->internalChannelMap[1] = MAL_CHANNEL_BACK_RIGHT;
} break;
case MAL_AL_FORMAT_QUAD8:
case MAL_AL_FORMAT_QUAD16:
case MAL_AL_FORMAT_QUAD32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_FRONT_LEFT;
pDevice->internalChannelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
pDevice->internalChannelMap[2] = MAL_CHANNEL_BACK_LEFT;
pDevice->internalChannelMap[3] = MAL_CHANNEL_BACK_RIGHT;
} break;
case MAL_AL_FORMAT_51CHN8:
case MAL_AL_FORMAT_51CHN16:
case MAL_AL_FORMAT_51CHN32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_FRONT_LEFT;
pDevice->internalChannelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
pDevice->internalChannelMap[2] = MAL_CHANNEL_FRONT_CENTER;
pDevice->internalChannelMap[3] = MAL_CHANNEL_LFE;
pDevice->internalChannelMap[4] = MAL_CHANNEL_BACK_LEFT;
pDevice->internalChannelMap[5] = MAL_CHANNEL_BACK_RIGHT;
} break;
case MAL_AL_FORMAT_61CHN8:
case MAL_AL_FORMAT_61CHN16:
case MAL_AL_FORMAT_61CHN32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_FRONT_LEFT;
pDevice->internalChannelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
pDevice->internalChannelMap[2] = MAL_CHANNEL_FRONT_CENTER;
pDevice->internalChannelMap[3] = MAL_CHANNEL_LFE;
pDevice->internalChannelMap[4] = MAL_CHANNEL_BACK_CENTER;
pDevice->internalChannelMap[5] = MAL_CHANNEL_SIDE_LEFT;
pDevice->internalChannelMap[6] = MAL_CHANNEL_SIDE_RIGHT;
} break;
case MAL_AL_FORMAT_71CHN8:
case MAL_AL_FORMAT_71CHN16:
case MAL_AL_FORMAT_71CHN32:
{
pDevice->internalChannelMap[0] = MAL_CHANNEL_FRONT_LEFT;
pDevice->internalChannelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
pDevice->internalChannelMap[2] = MAL_CHANNEL_FRONT_CENTER;
pDevice->internalChannelMap[3] = MAL_CHANNEL_LFE;
pDevice->internalChannelMap[4] = MAL_CHANNEL_BACK_LEFT;
pDevice->internalChannelMap[5] = MAL_CHANNEL_BACK_RIGHT;
pDevice->internalChannelMap[6] = MAL_CHANNEL_SIDE_LEFT;
pDevice->internalChannelMap[7] = MAL_CHANNEL_SIDE_RIGHT;
} break;
default: break;
}
pDevice->openal.pDeviceALC = pDeviceALC;
pDevice->openal.pContextALC = pContextALC;
pDevice->openal.formatAL = formatAL;
pDevice->openal.subBufferSizeInFrames = pDevice->bufferSizeInFrames / pDevice->periods;
pDevice->openal.pIntermediaryBuffer = (mal_uint8*)mal_malloc(pDevice->openal.subBufferSizeInFrames * channelsAL * mal_get_sample_size_in_bytes(pDevice->internalFormat));
if (pDevice->openal.pIntermediaryBuffer == NULL) {
mal_device_uninit__openal(pDevice);
return mal_context_post_error(pContext, NULL, "[OpenAL] Failed to allocate memory for intermediary buffer.", MAL_OUT_OF_MEMORY);
}
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
// Playback.
//
// When starting playback we want to ensure each buffer is filled and queued before playing the source.
pDevice->openal.iNextBuffer = 0;
((MAL_LPALCMAKECONTEXTCURRENT)pDevice->pContext->openal.alcMakeContextCurrent)((mal_ALCcontext*)pDevice->openal.pContextALC);
for (mal_uint32 i = 0; i < pDevice->periods; ++i) {
mal_device__read_frames_from_client(pDevice, pDevice->openal.subBufferSizeInFrames, pDevice->openal.pIntermediaryBuffer);
mal_ALuint bufferAL = pDevice->openal.buffersAL[i];
((MAL_LPALBUFFERDATA)pDevice->pContext->openal.alBufferData)(bufferAL, pDevice->openal.formatAL, pDevice->openal.pIntermediaryBuffer, pDevice->openal.subBufferSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat), pDevice->internalSampleRate);
((MAL_LPALSOURCEQUEUEBUFFERS)pDevice->pContext->openal.alSourceQueueBuffers)(pDevice->openal.sourceAL, 1, &bufferAL);
}
// Start the source only after filling and queueing each buffer.
((MAL_LPALSOURCEPLAY)pDevice->pContext->openal.alSourcePlay)(pDevice->openal.sourceAL);
} else {
// Capture.
((MAL_LPALCCAPTURESTART)pDevice->pContext->openal.alcCaptureStart)((mal_ALCdevice*)pDevice->openal.pDeviceALC);
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
((MAL_LPALCMAKECONTEXTCURRENT)pDevice->pContext->openal.alcMakeContextCurrent)((mal_ALCcontext*)pDevice->openal.pContextALC);
((MAL_LPALSOURCESTOP)pDevice->pContext->openal.alSourceStop)(pDevice->openal.sourceAL);
} else {
((MAL_LPALCCAPTURESTOP)pDevice->pContext->openal.alcCaptureStop)((mal_ALCdevice*)pDevice->openal.pDeviceALC);
}
return MAL_SUCCESS;
}
static mal_result mal_device__break_main_loop__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->openal.breakFromMainLoop = MAL_TRUE;
return MAL_SUCCESS;
}
static mal_uint32 mal_device__get_available_frames__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_playback) {
((MAL_LPALCMAKECONTEXTCURRENT)pDevice->pContext->openal.alcMakeContextCurrent)((mal_ALCcontext*)pDevice->openal.pContextALC);
mal_ALint processedBufferCount = 0;
((MAL_LPALGETSOURCEI)pDevice->pContext->openal.alGetSourcei)(pDevice->openal.sourceAL, MAL_AL_BUFFERS_PROCESSED, &processedBufferCount);
return processedBufferCount * pDevice->openal.subBufferSizeInFrames;
} else {
mal_ALint samplesAvailable = 0;
((MAL_LPALCGETINTEGERV)pDevice->pContext->openal.alcGetIntegerv)((mal_ALCdevice*)pDevice->openal.pDeviceALC, MAL_ALC_CAPTURE_SAMPLES, 1, &samplesAvailable);
return samplesAvailable / pDevice->channels;
}
}
static mal_uint32 mal_device__wait_for_frames__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
while (!pDevice->openal.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__get_available_frames__openal(pDevice);
if (framesAvailable > 0) {
return framesAvailable;
}
mal_sleep(1);
}
// We'll get here if the loop was terminated. When capturing we want to return whatever is available. For playback we just drop it.
if (pDevice->type == mal_device_type_playback) {
return 0;
} else {
return mal_device__get_available_frames__openal(pDevice);
}
}
static mal_result mal_device__main_loop__openal(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
pDevice->openal.breakFromMainLoop = MAL_FALSE;
while (!pDevice->openal.breakFromMainLoop) {
mal_uint32 framesAvailable = mal_device__wait_for_frames__openal(pDevice);
if (framesAvailable == 0) {
continue;
}
// If it's a playback device, don't bother grabbing more data if the device is being stopped.
if (pDevice->openal.breakFromMainLoop && pDevice->type == mal_device_type_playback) {
return MAL_FALSE;
}
if (pDevice->type == mal_device_type_playback) {
while (framesAvailable > 0) {
mal_uint32 framesToRead = (framesAvailable > pDevice->openal.subBufferSizeInFrames) ? pDevice->openal.subBufferSizeInFrames : framesAvailable;
mal_ALuint bufferAL = pDevice->openal.buffersAL[pDevice->openal.iNextBuffer];
pDevice->openal.iNextBuffer = (pDevice->openal.iNextBuffer + 1) % pDevice->periods;
mal_device__read_frames_from_client(pDevice, framesToRead, pDevice->openal.pIntermediaryBuffer);
((MAL_LPALCMAKECONTEXTCURRENT)pDevice->pContext->openal.alcMakeContextCurrent)((mal_ALCcontext*)pDevice->openal.pContextALC);
((MAL_LPALSOURCEUNQUEUEBUFFERS)pDevice->pContext->openal.alSourceUnqueueBuffers)(pDevice->openal.sourceAL, 1, &bufferAL);
((MAL_LPALBUFFERDATA)pDevice->pContext->openal.alBufferData)(bufferAL, pDevice->openal.formatAL, pDevice->openal.pIntermediaryBuffer, pDevice->openal.subBufferSizeInFrames * pDevice->internalChannels * mal_get_sample_size_in_bytes(pDevice->internalFormat), pDevice->internalSampleRate);
((MAL_LPALSOURCEQUEUEBUFFERS)pDevice->pContext->openal.alSourceQueueBuffers)(pDevice->openal.sourceAL, 1, &bufferAL);
framesAvailable -= framesToRead;
}
// There's a chance the source has stopped playing due to there not being any buffer's queue. Make sure it's restarted.
mal_ALenum state;
((MAL_LPALGETSOURCEI)pDevice->pContext->openal.alGetSourcei)(pDevice->openal.sourceAL, MAL_AL_SOURCE_STATE, &state);
if (state != MAL_AL_PLAYING) {
((MAL_LPALSOURCEPLAY)pDevice->pContext->openal.alSourcePlay)(pDevice->openal.sourceAL);
}
} else {
while (framesAvailable > 0) {
mal_uint32 framesToSend = (framesAvailable > pDevice->openal.subBufferSizeInFrames) ? pDevice->openal.subBufferSizeInFrames : framesAvailable;
((MAL_LPALCCAPTURESAMPLES)pDevice->pContext->openal.alcCaptureSamples)((mal_ALCdevice*)pDevice->openal.pDeviceALC, pDevice->openal.pIntermediaryBuffer, framesToSend);
mal_device__send_frames_to_client(pDevice, framesToSend, pDevice->openal.pIntermediaryBuffer);
framesAvailable -= framesToSend;
}
}
}
return MAL_SUCCESS;
}
#endif // OpenAL
///////////////////////////////////////////////////////////////////////////////
//
// SDL Backend
//
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_SDL
//#define MAL_USE_SDL_1
#define MAL_SDL_INIT_AUDIO 0x00000010
#define MAL_AUDIO_U8 0x0008
#define MAL_AUDIO_S16 0x8010
#define MAL_AUDIO_S32 0x8020
#define MAL_AUDIO_F32 0x8120
#define MAL_SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
#define MAL_SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
#define MAL_SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
#define MAL_SDL_AUDIO_ALLOW_ANY_CHANGE (MAL_SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | MAL_SDL_AUDIO_ALLOW_FORMAT_CHANGE | MAL_SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
// If we are linking at compile time we'll just #include SDL.h. Otherwise we can just redeclare some stuff to avoid the
// need for development packages to be installed.
#ifdef MAL_NO_RUNTIME_LINKING
#define SDL_MAIN_HANDLED
#ifdef MAL_EMSCRIPTEN
#include <SDL/SDL.h>
// For now just use SDL 1.2 with Emscripten. This avoids the need for "-s USE_SDL=2" at compile time.
#ifndef MAL_USE_SDL_1
#define MAL_USE_SDL_1
#endif
#else
#include <SDL2/SDL.h>
#endif
typedef SDL_AudioCallback MAL_SDL_AudioCallback;
typedef SDL_AudioSpec MAL_SDL_AudioSpec;
typedef SDL_AudioFormat MAL_SDL_AudioFormat;
typedef SDL_AudioDeviceID MAL_SDL_AudioDeviceID;
#else
typedef void (* MAL_SDL_AudioCallback)(void* userdata, mal_uint8* stream, int len);
typedef mal_uint16 MAL_SDL_AudioFormat;
typedef mal_uint32 MAL_SDL_AudioDeviceID;
typedef struct MAL_SDL_AudioSpec
{
int freq;
MAL_SDL_AudioFormat format;
mal_uint8 channels;
mal_uint8 silence;
mal_uint16 samples;
mal_uint16 padding;
mal_uint32 size;
MAL_SDL_AudioCallback callback;
void* userdata;
} MAL_SDL_AudioSpec;
#endif
typedef int (* MAL_PFN_SDL_InitSubSystem)(mal_uint32 flags);
typedef void (* MAL_PFN_SDL_QuitSubSystem)(mal_uint32 flags);
typedef int (* MAL_PFN_SDL_GetNumAudioDevices)(int iscapture);
typedef const char* (* MAL_PFN_SDL_GetAudioDeviceName)(int index, int iscapture);
typedef void (* MAL_PFN_SDL_CloseAudio)(void);
typedef void (* MAL_PFN_SDL_CloseAudioDevice)(MAL_SDL_AudioDeviceID dev);
typedef int (* MAL_PFN_SDL_OpenAudio)(MAL_SDL_AudioSpec* desired, MAL_SDL_AudioSpec* obtained);
typedef MAL_SDL_AudioDeviceID (* MAL_PFN_SDL_OpenAudioDevice)(const char* device, int iscapture, const MAL_SDL_AudioSpec* desired, MAL_SDL_AudioSpec* obtained, int allowed_changes);
typedef void (* MAL_PFN_SDL_PauseAudio)(int pause_on);
typedef void (* MAL_PFN_SDL_PauseAudioDevice)(MAL_SDL_AudioDeviceID dev, int pause_on);
MAL_SDL_AudioFormat mal_format_to_sdl(mal_format format)
{
switch (format)
{
case mal_format_unknown: return 0;
case mal_format_u8: return MAL_AUDIO_U8;
case mal_format_s16: return MAL_AUDIO_S16;
case mal_format_s24: return MAL_AUDIO_S32; // Closest match.
case mal_format_s32: return MAL_AUDIO_S32;
default: return 0;
}
}
mal_format mal_format_from_sdl(MAL_SDL_AudioFormat format)
{
switch (format)
{
case MAL_AUDIO_U8: return mal_format_u8;
case MAL_AUDIO_S16: return mal_format_s16;
case MAL_AUDIO_S32: return mal_format_s32;
case MAL_AUDIO_F32: return mal_format_f32;
default: return mal_format_unknown;
}
}
mal_result mal_context_init__sdl(mal_context* pContext)
{
mal_assert(pContext != NULL);
#ifndef MAL_NO_RUNTIME_LINKING
// Run-time linking.
const char* libNames[] = {
#if defined(MAL_WIN32)
"SDL2.dll",
"SDL.dll"
#elif defined(MAL_APPLE)
"libSDL2-2.0.0.dylib", // Can any Mac users out there comfirm these library names?
"libSDL-1.2.0.dylib"
#else
"libSDL2-2.0.so.0",
"libSDL-1.2.so.0"
#endif
};
for (size_t i = 0; i < mal_countof(libNames); ++i) {
pContext->sdl.hSDL = mal_dlopen(libNames[i]);
if (pContext->sdl.hSDL != NULL) {
break;
}
}
if (pContext->sdl.hSDL == NULL) {
return MAL_NO_BACKEND; // Couldn't find SDL2.dll, etc. Most likely it's not installed.
}
pContext->sdl.SDL_InitSubSystem = mal_dlsym(pContext->sdl.hSDL, "SDL_InitSubSystem");
pContext->sdl.SDL_QuitSubSystem = mal_dlsym(pContext->sdl.hSDL, "SDL_QuitSubSystem");
pContext->sdl.SDL_CloseAudio = mal_dlsym(pContext->sdl.hSDL, "SDL_CloseAudio");
pContext->sdl.SDL_OpenAudio = mal_dlsym(pContext->sdl.hSDL, "SDL_OpenAudio");
pContext->sdl.SDL_PauseAudio = mal_dlsym(pContext->sdl.hSDL, "SDL_PauseAudio");
#ifndef MAL_USE_SDL_1
pContext->sdl.SDL_GetNumAudioDevices = mal_dlsym(pContext->sdl.hSDL, "SDL_GetNumAudioDevices");
pContext->sdl.SDL_GetAudioDeviceName = mal_dlsym(pContext->sdl.hSDL, "SDL_GetAudioDeviceName");
pContext->sdl.SDL_CloseAudioDevice = mal_dlsym(pContext->sdl.hSDL, "SDL_CloseAudioDevice");
pContext->sdl.SDL_OpenAudioDevice = mal_dlsym(pContext->sdl.hSDL, "SDL_OpenAudioDevice");
pContext->sdl.SDL_PauseAudioDevice = mal_dlsym(pContext->sdl.hSDL, "SDL_PauseAudioDevice");
#endif
#else
// Compile-time linking.
pContext->sdl.SDL_InitSubSystem = (mal_proc)SDL_InitSubSystem;
pContext->sdl.SDL_QuitSubSystem = (mal_proc)SDL_QuitSubSystem;
pContext->sdl.SDL_CloseAudio = (mal_proc)SDL_CloseAudio;
pContext->sdl.SDL_OpenAudio = (mal_proc)SDL_OpenAudio;
pContext->sdl.SDL_PauseAudio = (mal_proc)SDL_PauseAudio;
#ifndef MAL_USE_SDL_1
pContext->sdl.SDL_GetNumAudioDevices = (mal_proc)SDL_GetNumAudioDevices;
pContext->sdl.SDL_GetAudioDeviceName = (mal_proc)SDL_GetAudioDeviceName;
pContext->sdl.SDL_CloseAudioDevice = (mal_proc)SDL_CloseAudioDevice;
pContext->sdl.SDL_OpenAudioDevice = (mal_proc)SDL_OpenAudioDevice;
pContext->sdl.SDL_PauseAudioDevice = (mal_proc)SDL_PauseAudioDevice;
#endif
#endif
// We need to determine whether or not we are using SDL2 or SDL1. We can know this by looking at whether or not certain
// function pointers are NULL.
if (pContext->sdl.SDL_GetNumAudioDevices == NULL ||
pContext->sdl.SDL_GetAudioDeviceName == NULL ||
pContext->sdl.SDL_CloseAudioDevice == NULL ||
pContext->sdl.SDL_OpenAudioDevice == NULL ||
pContext->sdl.SDL_PauseAudioDevice == NULL) {
pContext->sdl.usingSDL1 = MAL_TRUE;
}
int resultSDL = ((MAL_PFN_SDL_InitSubSystem)pContext->sdl.SDL_InitSubSystem)(MAL_SDL_INIT_AUDIO);
if (resultSDL != 0) {
return MAL_ERROR;
}
return MAL_SUCCESS;
}
mal_result mal_context_uninit__sdl(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_sdl);
((MAL_PFN_SDL_QuitSubSystem)pContext->sdl.SDL_QuitSubSystem)(MAL_SDL_INIT_AUDIO);
return MAL_SUCCESS;
}
mal_result mal_enumerate_devices__sdl(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
(void)pContext;
mal_uint32 infoSize = *pCount;
*pCount = 0;
#ifndef MAL_USE_SDL_1
if (!pContext->sdl.usingSDL1) {
int deviceCount = ((MAL_PFN_SDL_GetNumAudioDevices)pContext->sdl.SDL_GetNumAudioDevices)((type == mal_device_type_playback) ? 0 : 1);
for (int i = 0; i < deviceCount; ++i) {
if (pInfo != NULL) {
if (infoSize > 0) {
pInfo->id.sdl = i;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), ((MAL_PFN_SDL_GetAudioDeviceName)pContext->sdl.SDL_GetAudioDeviceName)(i, (type == mal_device_type_playback) ? 0 : 1), (size_t)-1);
pInfo += 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
} else
#endif
{
if (pInfo != NULL) {
if (infoSize > 0) {
// SDL1 uses default devices.
if (type == mal_device_type_playback) {
pInfo->id.sdl = 0;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Playback Device", (size_t)-1);
} else {
pInfo->id.sdl = 0;
mal_strncpy_s(pInfo->name, sizeof(pInfo->name), "Default Capture Device", (size_t)-1);
}
pInfo += 1;
*pCount += 1;
}
} else {
*pCount += 1;
}
}
return MAL_SUCCESS;
}
void mal_device_uninit__sdl(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
#ifndef MAL_USE_SDL_1
if (!pDevice->pContext->sdl.usingSDL1) {
((MAL_PFN_SDL_CloseAudioDevice)pDevice->pContext->sdl.SDL_CloseAudioDevice)(pDevice->sdl.deviceID);
} else
#endif
{
((MAL_PFN_SDL_CloseAudio)pDevice->pContext->sdl.SDL_CloseAudio)();
}
}
static void mal_audio_callback__sdl(void* pUserData, mal_uint8* pBuffer, int bufferSizeInBytes)
{
mal_device* pDevice = (mal_device*)pUserData;
mal_assert(pDevice != NULL);
mal_uint32 bufferSizeInFrames = (mal_uint32)bufferSizeInBytes / mal_get_sample_size_in_bytes(pDevice->internalFormat) / pDevice->internalChannels;
if (pDevice->type == mal_device_type_playback) {
mal_device__read_frames_from_client(pDevice, bufferSizeInFrames, pBuffer);
} else {
mal_device__send_frames_to_client(pDevice, bufferSizeInFrames, pBuffer);
}
}
mal_result mal_device_init__sdl(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, mal_device* pDevice)
{
mal_assert(pContext != NULL);
mal_assert(pConfig != NULL);
mal_assert(pDevice != NULL);
(void)pContext;
// SDL wants the buffer size to be a power of 2. The SDL_AudioSpec property for this is only a Uint16, so we need
// to explicitly clamp this because it will be easy to overflow.
mal_uint32 bufferSize = pConfig->bufferSizeInFrames;
if (bufferSize > 32768) {
bufferSize = 32768;
} else {
bufferSize = mal_next_power_of_2(bufferSize);
}
mal_assert(bufferSize <= 32768);
MAL_SDL_AudioSpec desiredSpec, obtainedSpec;
mal_zero_memory(&desiredSpec, sizeof(desiredSpec));
desiredSpec.freq = (int)pConfig->sampleRate;
desiredSpec.format = mal_format_to_sdl(pConfig->format);
desiredSpec.channels = (mal_uint8)pConfig->channels;
desiredSpec.samples = (mal_uint16)bufferSize;
desiredSpec.callback = mal_audio_callback__sdl;
desiredSpec.userdata = pDevice;
// Fall back to f32 if we don't have an appropriate mapping between mini_al and SDL.
if (desiredSpec.format == 0) {
desiredSpec.format = MAL_AUDIO_F32;
}
#ifndef MAL_USE_SDL_1
if (!pDevice->pContext->sdl.usingSDL1) {
int isCapture = (type == mal_device_type_playback) ? 0 : 1;
const char* pDeviceName = NULL;
if (pDeviceID != NULL) {
pDeviceName = ((MAL_PFN_SDL_GetAudioDeviceName)pDevice->pContext->sdl.SDL_GetAudioDeviceName)(pDeviceID->sdl, isCapture);
}
pDevice->sdl.deviceID = ((MAL_PFN_SDL_OpenAudioDevice)pDevice->pContext->sdl.SDL_OpenAudioDevice)(pDeviceName, isCapture, &desiredSpec, &obtainedSpec, MAL_SDL_AUDIO_ALLOW_ANY_CHANGE);
if (pDevice->sdl.deviceID == 0) {
return mal_post_error(pDevice, "Failed to open SDL device.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
} else
#endif
{
// SDL1 uses default devices.
(void)pDeviceID;
// SDL1 only supports playback as far as I can tell.
if (type != mal_device_type_playback) {
return MAL_NO_DEVICE;
}
// SDL1 does not support floating point formats.
if (desiredSpec.format == MAL_AUDIO_F32) {
desiredSpec.format = MAL_AUDIO_S16;
}
pDevice->sdl.deviceID = ((MAL_PFN_SDL_OpenAudio)pDevice->pContext->sdl.SDL_OpenAudio)(&desiredSpec, &obtainedSpec);
if (pDevice->sdl.deviceID != 0) {
return mal_post_error(pDevice, "Failed to open SDL device.", MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
}
pDevice->internalFormat = mal_format_from_sdl(obtainedSpec.format);
pDevice->internalChannels = obtainedSpec.channels;
pDevice->internalSampleRate = (mal_uint32)obtainedSpec.freq;
pDevice->bufferSizeInFrames = obtainedSpec.samples;
pDevice->periods = 1; // SDL doesn't seem to tell us what the period count is. Just set this 1.
#if 0
printf("=== SDL CONFIG ===\n");
printf("REQUESTED -> RECEIVED\n");
printf(" FORMAT: %s -> %s\n", mal_get_format_name(pConfig->format), mal_get_format_name(pDevice->internalFormat));
printf(" CHANNELS: %d -> %d\n", desiredSpec.channels, obtainedSpec.channels);
printf(" SAMPLE RATE: %d -> %d\n", desiredSpec.freq, obtainedSpec.freq);
printf(" BUFFER SIZE IN SAMPLES: %d -> %d\n", desiredSpec.samples, obtainedSpec.samples);
#endif
return MAL_SUCCESS;
}
static mal_result mal_device__start_backend__sdl(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
#ifndef MAL_USE_SDL_1
if (!pDevice->pContext->sdl.usingSDL1) {
((MAL_PFN_SDL_PauseAudioDevice)pDevice->pContext->sdl.SDL_PauseAudioDevice)(pDevice->sdl.deviceID, 0);
} else
#endif
{
((MAL_PFN_SDL_PauseAudio)pDevice->pContext->sdl.SDL_PauseAudio)(0);
}
return MAL_SUCCESS;
}
static mal_result mal_device__stop_backend__sdl(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
#ifndef MAL_USE_SDL_1
if (!pDevice->pContext->sdl.usingSDL1) {
((MAL_PFN_SDL_PauseAudioDevice)pDevice->pContext->sdl.SDL_PauseAudioDevice)(pDevice->sdl.deviceID, 1);
} else
#endif
{
((MAL_PFN_SDL_PauseAudio)pDevice->pContext->sdl.SDL_PauseAudio)(1);
}
return MAL_SUCCESS;
}
#endif // SDL
mal_bool32 mal__is_channel_map_valid(const mal_channel* channelMap, mal_uint32 channels)
{
mal_assert(channels > 0);
// A channel cannot be present in the channel map more than once.
for (mal_uint32 iChannel = 0; iChannel < channels; ++iChannel) {
for (mal_uint32 jChannel = iChannel + 1; jChannel < channels; ++jChannel) {
if (channelMap[iChannel] == channelMap[jChannel]) {
return MAL_FALSE;
}
}
}
return MAL_TRUE;
}
static mal_result mal_device__start_backend(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_result result = MAL_NO_BACKEND;
#ifdef MAL_HAS_WASAPI
if (pDevice->pContext->backend == mal_backend_wasapi) {
result = mal_device__start_backend__wasapi(pDevice);
}
#endif
#ifdef MAL_HAS_DSOUND
if (pDevice->pContext->backend == mal_backend_dsound) {
result = mal_device__start_backend__dsound(pDevice);
}
#endif
#ifdef MAL_HAS_WINMM
if (pDevice->pContext->backend == mal_backend_winmm) {
result = mal_device__start_backend__winmm(pDevice);
}
#endif
#ifdef MAL_HAS_ALSA
if (pDevice->pContext->backend == mal_backend_alsa) {
result = mal_device__start_backend__alsa(pDevice);
}
#endif
#ifdef MAL_HAS_OSS
if (pDevice->pContext->backend == mal_backend_oss) {
result = mal_device__start_backend__oss(pDevice);
}
#endif
#ifdef MAL_HAS_OPENAL
if (pDevice->pContext->backend == mal_backend_openal) {
result = mal_device__start_backend__openal(pDevice);
}
#endif
#ifdef MAL_HAS_NULL
if (pDevice->pContext->backend == mal_backend_null) {
result = mal_device__start_backend__null(pDevice);
}
#endif
return result;
}
static mal_result mal_device__stop_backend(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_result result = MAL_NO_BACKEND;
#ifdef MAL_HAS_WASAPI
if (pDevice->pContext->backend == mal_backend_wasapi) {
result = mal_device__stop_backend__wasapi(pDevice);
}
#endif
#ifdef MAL_HAS_DSOUND
if (pDevice->pContext->backend == mal_backend_dsound) {
result = mal_device__stop_backend__dsound(pDevice);
}
#endif
#ifdef MAL_HAS_WINMM
if (pDevice->pContext->backend == mal_backend_winmm) {
result = mal_device__stop_backend__winmm(pDevice);
}
#endif
#ifdef MAL_HAS_ALSA
if (pDevice->pContext->backend == mal_backend_alsa) {
result = mal_device__stop_backend__alsa(pDevice);
}
#endif
#ifdef MAL_HAS_OSS
if (pDevice->pContext->backend == mal_backend_oss) {
result = mal_device__stop_backend__oss(pDevice);
}
#endif
#ifdef MAL_HAS_OPENAL
if (pDevice->pContext->backend == mal_backend_openal) {
result = mal_device__stop_backend__openal(pDevice);
}
#endif
#ifdef MAL_HAS_NULL
if (pDevice->pContext->backend == mal_backend_null) {
result = mal_device__stop_backend__null(pDevice);
}
#endif
return result;
}
static mal_result mal_device__break_main_loop(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_result result = MAL_NO_BACKEND;
#ifdef MAL_HAS_WASAPI
if (pDevice->pContext->backend == mal_backend_wasapi) {
result = mal_device__break_main_loop__wasapi(pDevice);
}
#endif
#ifdef MAL_HAS_DSOUND
if (pDevice->pContext->backend == mal_backend_dsound) {
result = mal_device__break_main_loop__dsound(pDevice);
}
#endif
#ifdef MAL_HAS_WINMM
if (pDevice->pContext->backend == mal_backend_winmm) {
result = mal_device__break_main_loop__winmm(pDevice);
}
#endif
#ifdef MAL_HAS_ALSA
if (pDevice->pContext->backend == mal_backend_alsa) {
result = mal_device__break_main_loop__alsa(pDevice);
}
#endif
#ifdef MAL_HAS_OSS
if (pDevice->pContext->backend == mal_backend_oss) {
result = mal_device__break_main_loop__oss(pDevice);
}
#endif
#ifdef MAL_HAS_OPENAL
if (pDevice->pContext->backend == mal_backend_openal) {
result = mal_device__break_main_loop__openal(pDevice);
}
#endif
#ifdef MAL_HAS_NULL
if (pDevice->pContext->backend == mal_backend_null) {
result = mal_device__break_main_loop__null(pDevice);
}
#endif
return result;
}
static mal_result mal_device__main_loop(mal_device* pDevice)
{
mal_assert(pDevice != NULL);
mal_result result = MAL_NO_BACKEND;
#ifdef MAL_HAS_WASAPI
if (pDevice->pContext->backend == mal_backend_wasapi) {
result = mal_device__main_loop__wasapi(pDevice);
}
#endif
#ifdef MAL_HAS_DSOUND
if (pDevice->pContext->backend == mal_backend_dsound) {
result = mal_device__main_loop__dsound(pDevice);
}
#endif
#ifdef MAL_HAS_WINMM
if (pDevice->pContext->backend == mal_backend_winmm) {
result = mal_device__main_loop__winmm(pDevice);
}
#endif
#ifdef MAL_HAS_ALSA
if (pDevice->pContext->backend == mal_backend_alsa) {
result = mal_device__main_loop__alsa(pDevice);
}
#endif
#ifdef MAL_HAS_OSS
if (pDevice->pContext->backend == mal_backend_oss) {
result = mal_device__main_loop__oss(pDevice);
}
#endif
#ifdef MAL_HAS_OPENAL
if (pDevice->pContext->backend == mal_backend_openal) {
result = mal_device__main_loop__openal(pDevice);
}
#endif
#ifdef MAL_HAS_NULL
if (pDevice->pContext->backend == mal_backend_null) {
result = mal_device__main_loop__null(pDevice);
}
#endif
return result;
}
mal_thread_result MAL_THREADCALL mal_worker_thread(void* pData)
{
mal_device* pDevice = (mal_device*)pData;
mal_assert(pDevice != NULL);
#ifdef MAL_WIN32
mal_CoInitializeEx(pDevice->pContext, NULL, 0); // 0 = COINIT_MULTITHREADED
#endif
// This is only used to prevent posting onStop() when the device is first initialized.
mal_bool32 skipNextStopEvent = MAL_TRUE;
for (;;) {
// At the start of iteration the device is stopped - we must explicitly mark it as such.
mal_device__stop_backend(pDevice);
if (!skipNextStopEvent) {
mal_stop_proc onStop = pDevice->onStop;
if (onStop) {
onStop(pDevice);
}
} else {
skipNextStopEvent = MAL_FALSE;
}
// Let the other threads know that the device has stopped.
mal_device__set_state(pDevice, MAL_STATE_STOPPED);
mal_event_signal(&pDevice->stopEvent);
// We use an event to wait for a request to wake up.
mal_event_wait(&pDevice->wakeupEvent);
// Default result code.
pDevice->workResult = MAL_SUCCESS;
// Just break if we're terminating.
if (mal_device__get_state(pDevice) == MAL_STATE_UNINITIALIZED) {
break;
}
// Getting here means we just started the device and we need to wait for the device to
// either deliver us data (recording) or request more data (playback).
mal_assert(mal_device__get_state(pDevice) == MAL_STATE_STARTING);
pDevice->workResult = mal_device__start_backend(pDevice);
if (pDevice->workResult != MAL_SUCCESS) {
mal_event_signal(&pDevice->startEvent);
continue;
}
// The thread that requested the device to start playing is waiting for this thread to start the
// device for real, which is now.
mal_device__set_state(pDevice, MAL_STATE_STARTED);
mal_event_signal(&pDevice->startEvent);
// Now we just enter the main loop. The main loop can be broken with mal_device__break_main_loop().
mal_device__main_loop(pDevice);
}
// Make sure we aren't continuously waiting on a stop event.
mal_event_signal(&pDevice->stopEvent); // <-- Is this still needed?
#ifdef MAL_WIN32
mal_CoUninitialize(pDevice->pContext);
#endif
return (mal_thread_result)0;
}
// Helper for determining whether or not the given device is initialized.
mal_bool32 mal_device__is_initialized(mal_device* pDevice)
{
if (pDevice == NULL) return MAL_FALSE;
return mal_device__get_state(pDevice) != MAL_STATE_UNINITIALIZED;
}
#ifdef MAL_WIN32
mal_result mal_context_uninit_backend_apis__win32(mal_context* pContext)
{
mal_CoUninitialize(pContext);
mal_dlclose(pContext->win32.hUser32DLL);
mal_dlclose(pContext->win32.hOle32DLL);
return MAL_SUCCESS;
}
mal_result mal_context_init_backend_apis__win32(mal_context* pContext)
{
#ifdef MAL_WIN32_DESKTOP
// Ole32.dll
pContext->win32.hOle32DLL = mal_dlopen("ole32.dll");
if (pContext->win32.hOle32DLL == NULL) {
return MAL_FAILED_TO_INIT_BACKEND;
}
pContext->win32.CoInitializeEx = (mal_proc)mal_dlsym(pContext->win32.hOle32DLL, "CoInitializeEx");
pContext->win32.CoUninitialize = (mal_proc)mal_dlsym(pContext->win32.hOle32DLL, "CoUninitialize");
pContext->win32.CoCreateInstance = (mal_proc)mal_dlsym(pContext->win32.hOle32DLL, "CoCreateInstance");
pContext->win32.CoTaskMemFree = (mal_proc)mal_dlsym(pContext->win32.hOle32DLL, "CoTaskMemFree");
pContext->win32.PropVariantClear = (mal_proc)mal_dlsym(pContext->win32.hOle32DLL, "PropVariantClear");
// User32.dll
pContext->win32.hUser32DLL = mal_dlopen("user32.dll");
if (pContext->win32.hUser32DLL == NULL) {
return MAL_FAILED_TO_INIT_BACKEND;
}
pContext->win32.GetForegroundWindow = (mal_proc)mal_dlsym(pContext->win32.hUser32DLL, "GetForegroundWindow");
pContext->win32.GetDesktopWindow = (mal_proc)mal_dlsym(pContext->win32.hUser32DLL, "GetDesktopWindow");
#endif
mal_CoInitializeEx(pContext, NULL, 0); // 0 = COINIT_MULTITHREADED
return MAL_SUCCESS;
}
#else
mal_result mal_context_uninit_backend_apis__nix(mal_context* pContext)
{
mal_dlclose(pContext->posix.pthreadSO);
return MAL_SUCCESS;
}
mal_result mal_context_init_backend_apis__nix(mal_context* pContext)
{
// pthread
#if !defined(MAL_NO_RUNTIME_LINKING)
const char* libpthreadFileNames[] = {
"libpthread.so",
"libpthread.so.0",
"libpthread.dylib"
};
for (size_t i = 0; i < sizeof(libpthreadFileNames) / sizeof(libpthreadFileNames[0]); ++i) {
pContext->posix.pthreadSO = mal_dlopen(libpthreadFileNames[i]);
if (pContext->posix.pthreadSO != NULL) {
break;
}
}
if (pContext->posix.pthreadSO == NULL) {
return MAL_FAILED_TO_INIT_BACKEND;
}
pContext->posix.pthread_create = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_create");
pContext->posix.pthread_join = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_join");
pContext->posix.pthread_mutex_init = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_mutex_init");
pContext->posix.pthread_mutex_destroy = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_mutex_destroy");
pContext->posix.pthread_mutex_lock = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_mutex_lock");
pContext->posix.pthread_mutex_unlock = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_mutex_unlock");
pContext->posix.pthread_cond_init = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_cond_init");
pContext->posix.pthread_cond_destroy = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_cond_destroy");
pContext->posix.pthread_cond_wait = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_cond_wait");
pContext->posix.pthread_cond_signal = (mal_proc)mal_dlsym(pContext->posix.pthreadSO, "pthread_cond_signal");
#else
pContext->posix.pthread_create = (mal_proc)pthread_create;
pContext->posix.pthread_join = (mal_proc)pthread_join;
pContext->posix.pthread_mutex_init = (mal_proc)pthread_mutex_init;
pContext->posix.pthread_mutex_destroy = (mal_proc)pthread_mutex_destroy;
pContext->posix.pthread_mutex_lock = (mal_proc)pthread_mutex_lock;
pContext->posix.pthread_mutex_unlock = (mal_proc)pthread_mutex_unlock;
pContext->posix.pthread_cond_init = (mal_proc)pthread_cond_init;
pContext->posix.pthread_cond_destroy = (mal_proc)pthread_cond_destroy;
pContext->posix.pthread_cond_wait = (mal_proc)pthread_cond_wait;
pContext->posix.pthread_cond_signal = (mal_proc)pthread_cond_signal;
#endif
return MAL_SUCCESS;
}
#endif
mal_result mal_context_init_backend_apis(mal_context* pContext)
{
mal_result result = MAL_NO_BACKEND;
#ifdef MAL_WIN32
result = mal_context_init_backend_apis__win32(pContext);
#else
result = mal_context_init_backend_apis__nix(pContext);
#endif
return result;
}
mal_result mal_context_uninit_backend_apis(mal_context* pContext)
{
mal_result result = MAL_NO_BACKEND;
#ifdef MAL_WIN32
result = mal_context_uninit_backend_apis__win32(pContext);
#else
result = mal_context_uninit_backend_apis__nix(pContext);
#endif
return result;
}
mal_result mal_context_init(mal_backend backends[], mal_uint32 backendCount, const mal_context_config* pConfig, mal_context* pContext)
{
if (pContext == NULL) return MAL_INVALID_ARGS;
mal_zero_object(pContext);
// Always make sure the config is set first to ensure properties are available as soon as possible.
if (pConfig != NULL) {
pContext->config = *pConfig;
} else {
pContext->config = mal_context_config_init(NULL);
}
// Backend APIs need to be initialized first. This is where external libraries will be loaded and linked.
mal_result result = mal_context_init_backend_apis(pContext);
if (result != MAL_SUCCESS) {
return result;
}
static mal_backend defaultBackends[] = {
mal_backend_wasapi,
mal_backend_dsound,
mal_backend_winmm,
mal_backend_alsa,
mal_backend_oss,
mal_backend_opensl,
mal_backend_openal,
mal_backend_sdl,
mal_backend_null
};
if (backends == NULL) {
backends = defaultBackends;
backendCount = sizeof(defaultBackends) / sizeof(defaultBackends[0]);
}
mal_assert(backends != NULL);
for (mal_uint32 iBackend = 0; iBackend < backendCount; ++iBackend) {
mal_backend backend = backends[iBackend];
result = MAL_NO_BACKEND;
switch (backend) {
#ifdef MAL_HAS_WASAPI
case mal_backend_wasapi:
{
result = mal_context_init__wasapi(pContext);
} break;
#endif
#ifdef MAL_HAS_DSOUND
case mal_backend_dsound:
{
result = mal_context_init__dsound(pContext);
} break;
#endif
#ifdef MAL_HAS_WINMM
case mal_backend_winmm:
{
result = mal_context_init__winmm(pContext);
} break;
#endif
#ifdef MAL_HAS_ALSA
case mal_backend_alsa:
{
result = mal_context_init__alsa(pContext);
} break;
#endif
#ifdef MAL_HAS_OSS
case mal_backend_oss:
{
result = mal_context_init__oss(pContext);
} break;
#endif
#ifdef MAL_HAS_OPENSL
case mal_backend_opensl:
{
result = mal_context_init__opensl(pContext);
} break;
#endif
#ifdef MAL_HAS_OPENAL
case mal_backend_openal:
{
result = mal_context_init__openal(pContext);
} break;
#endif
#ifdef MAL_HAS_SDL
case mal_backend_sdl:
{
result = mal_context_init__sdl(pContext);
} break;
#endif
#ifdef MAL_HAS_NULL
case mal_backend_null:
{
result = mal_context_init__null(pContext);
} break;
#endif
default: break;
}
// If this iteration was successful, return.
if (result == MAL_SUCCESS) {
pContext->backend = backend;
return result;
}
}
mal_zero_object(pContext); // Safety.
return MAL_NO_BACKEND;
}
mal_result mal_context_uninit(mal_context* pContext)
{
if (pContext == NULL) return MAL_INVALID_ARGS;
switch (pContext->backend) {
#ifdef MAL_HAS_WASAPI
case mal_backend_wasapi:
{
return mal_context_uninit__wasapi(pContext);
} break;
#endif
#ifdef MAL_HAS_DSOUND
case mal_backend_dsound:
{
return mal_context_uninit__dsound(pContext);
} break;
#endif
#ifdef MAL_HAS_WINMM
case mal_backend_winmm:
{
return mal_context_uninit__winmm(pContext);
} break;
#endif
#ifdef MAL_HAS_ALSA
case mal_backend_alsa:
{
return mal_context_uninit__alsa(pContext);
} break;
#endif
#ifdef MAL_HAS_OSS
case mal_backend_oss:
{
return mal_context_uninit__oss(pContext);
} break;
#endif
#ifdef MAL_HAS_OPENSL
case mal_backend_opensl:
{
return mal_context_uninit__opensl(pContext);
} break;
#endif
#ifdef MAL_HAS_OPENAL
case mal_backend_openal:
{
return mal_context_uninit__openal(pContext);
} break;
#endif
#ifdef MAL_HAS_SDL
case mal_backend_sdl:
{
return mal_context_uninit__sdl(pContext);
} break;
#endif
#ifdef MAL_HAS_NULL
case mal_backend_null:
{
return mal_context_uninit__null(pContext);
} break;
#endif
default: break;
}
mal_context_uninit_backend_apis(pContext);
mal_assert(MAL_FALSE);
return MAL_NO_BACKEND;
}
mal_result mal_enumerate_devices(mal_context* pContext, mal_device_type type, mal_uint32* pCount, mal_device_info* pInfo)
{
if (pCount == NULL) return mal_post_error(NULL, "mal_enumerate_devices() called with invalid arguments (pCount == 0).", MAL_INVALID_ARGS);
// The output buffer needs to be initialized to zero.
if (pInfo != NULL) {
mal_zero_memory(pInfo, (*pCount) * sizeof(*pInfo));
}
switch (pContext->backend)
{
#ifdef MAL_HAS_WASAPI
case mal_backend_wasapi:
{
return mal_enumerate_devices__wasapi(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_DSOUND
case mal_backend_dsound:
{
return mal_enumerate_devices__dsound(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_WINMM
case mal_backend_winmm:
{
return mal_enumerate_devices__winmm(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_ALSA
case mal_backend_alsa:
{
return mal_enumerate_devices__alsa(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_OSS
case mal_backend_oss:
{
return mal_enumerate_devices__oss(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_OPENSL
case mal_backend_opensl:
{
return mal_enumerate_devices__opensl(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_OPENAL
case mal_backend_openal:
{
return mal_enumerate_devices__openal(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_SDL
case mal_backend_sdl:
{
return mal_enumerate_devices__sdl(pContext, type, pCount, pInfo);
} break;
#endif
#ifdef MAL_HAS_NULL
case mal_backend_null:
{
return mal_enumerate_devices__null(pContext, type, pCount, pInfo);
} break;
#endif
default: break;
}
mal_assert(MAL_FALSE);
return MAL_NO_BACKEND;
}
mal_result mal_device_init(mal_context* pContext, mal_device_type type, mal_device_id* pDeviceID, const mal_device_config* pConfig, void* pUserData, mal_device* pDevice)
{
if (pDevice == NULL) {
return mal_post_error(pDevice, "mal_device_init() called with invalid arguments (pDevice == NULL).", MAL_INVALID_ARGS);
}
if (pConfig == NULL) {
return mal_post_error(pDevice, "mal_device_init() called with invalid arguments (pConfig == NULL).", MAL_INVALID_ARGS);
}
// Make a copy of the config to ensure we don't override the caller's object.
mal_device_config config = *pConfig;
mal_zero_object(pDevice);
pDevice->pContext = pContext;
// Set the user data and log callback ASAP to ensure it is available for the entire initialization process.
pDevice->pUserData = pUserData;
pDevice->onStop = config.onStopCallback;
pDevice->onSend = config.onSendCallback;
pDevice->onRecv = config.onRecvCallback;
if (((size_t)pDevice % sizeof(pDevice)) != 0) {
if (pContext->config.onLog) {
pContext->config.onLog(pContext, pDevice, "WARNING: mal_device_init() called for a device that is not properly aligned. Thread safety is not supported.");
}
}
if (pContext == NULL) {
return mal_post_error(pDevice, "mal_device_init() called with invalid arguments (pContext == NULL).", MAL_INVALID_ARGS);
}
// Basic config validation.
if (config.channels == 0) {
return mal_post_error(pDevice, "mal_device_init() called with an invalid config. Channel count must be greater than 0.", MAL_INVALID_DEVICE_CONFIG);
}
if (config.channels > MAL_MAX_CHANNELS) {
return mal_post_error(pDevice, "mal_device_init() called with an invalid config. Channel count cannot exceed 18.", MAL_INVALID_DEVICE_CONFIG);
}
if (config.sampleRate == 0) {
return mal_post_error(pDevice, "mal_device_init() called with an invalid config. Sample rate must be greater than 0.", MAL_INVALID_DEVICE_CONFIG);
}
if (!mal__is_channel_map_valid(pConfig->channelMap, pConfig->channels)) {
return mal_post_error(pDevice, "mal_device_init() called with invalid arguments. Channel map is invalid.", MAL_INVALID_DEVICE_CONFIG);
}
// Default buffer size and periods.
if (config.bufferSizeInFrames == 0) {
config.bufferSizeInFrames = (config.sampleRate/1000) * MAL_DEFAULT_BUFFER_SIZE_IN_MILLISECONDS;
pDevice->usingDefaultBufferSize = MAL_TRUE;
}
if (config.periods == 0) {
config.periods = MAL_DEFAULT_PERIODS;
pDevice->usingDefaultPeriods = MAL_TRUE;
}
pDevice->type = type;
pDevice->format = config.format;
pDevice->channels = config.channels;
mal_copy_memory(config.channelMap, config.channelMap, sizeof(config.channelMap[0]) * config.channels);
pDevice->sampleRate = config.sampleRate;
pDevice->bufferSizeInFrames = config.bufferSizeInFrames;
pDevice->periods = config.periods;
// The internal format, channel count and sample rate can be modified by the backend.
pDevice->internalFormat = pDevice->format;
pDevice->internalChannels = pDevice->channels;
pDevice->internalSampleRate = pDevice->sampleRate;
mal_copy_memory(pDevice->internalChannelMap, pDevice->channelMap, sizeof(pDevice->channelMap));
if (mal_mutex_init(pContext, &pDevice->lock) != MAL_SUCCESS) {
return mal_post_error(pDevice, "Failed to create mutex.", MAL_FAILED_TO_CREATE_MUTEX);
}
// When the device is started, the worker thread is the one that does the actual startup of the backend device. We
// use a semaphore to wait for the background thread to finish the work. The same applies for stopping the device.
//
// Each of these semaphores is released internally by the worker thread when the work is completed. The start
// semaphore is also used to wake up the worker thread.
if (mal_event_init(pContext, &pDevice->wakeupEvent) != MAL_SUCCESS) {
mal_mutex_uninit(&pDevice->lock);
return mal_post_error(pDevice, "Failed to create worker thread wakeup event.", MAL_FAILED_TO_CREATE_EVENT);
}
if (mal_event_init(pContext, &pDevice->startEvent) != MAL_SUCCESS) {
mal_event_uninit(&pDevice->wakeupEvent);
mal_mutex_uninit(&pDevice->lock);
return mal_post_error(pDevice, "Failed to create worker thread start event.", MAL_FAILED_TO_CREATE_EVENT);
}
if (mal_event_init(pContext, &pDevice->stopEvent) != MAL_SUCCESS) {
mal_event_uninit(&pDevice->startEvent);
mal_event_uninit(&pDevice->wakeupEvent);
mal_mutex_uninit(&pDevice->lock);
return mal_post_error(pDevice, "Failed to create worker thread stop event.", MAL_FAILED_TO_CREATE_EVENT);
}
mal_result result = MAL_NO_BACKEND;
switch (pContext->backend)
{
#ifdef MAL_HAS_WASAPI
case mal_backend_wasapi:
{
result = mal_device_init__wasapi(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_DSOUND
case mal_backend_dsound:
{
result = mal_device_init__dsound(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_WINMM
case mal_backend_winmm:
{
result = mal_device_init__winmm(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_ALSA
case mal_backend_alsa:
{
result = mal_device_init__alsa(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_OSS
case mal_backend_oss:
{
result = mal_device_init__oss(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_OPENSL
case mal_backend_opensl:
{
result = mal_device_init__opensl(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_OPENAL
case mal_backend_openal:
{
result = mal_device_init__openal(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_SDL
case mal_backend_sdl:
{
result = mal_device_init__sdl(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
#ifdef MAL_HAS_NULL
case mal_backend_null:
{
result = mal_device_init__null(pContext, type, pDeviceID, &config, pDevice);
} break;
#endif
default: break;
}
if (result != MAL_SUCCESS) {
return MAL_NO_BACKEND; // The error message will have been posted with mal_post_error() by the source of the error so don't bother calling it here.
}
// If the backend did not fill out a name for the device, try a generic method.
if (pDevice->name[0] == '\0') {
if (mal_context__try_get_device_name_by_id(pContext, type, pDeviceID, pDevice->name, sizeof(pDevice->name)) != MAL_SUCCESS) {
// We failed to get the device name, so fall back to some generic names.
if (pDeviceID == NULL) {
if (type == mal_device_type_playback) {
mal_strncpy_s(pDevice->name, sizeof(pDevice->name), "Default Playback Device", (size_t)-1);
} else {
mal_strncpy_s(pDevice->name, sizeof(pDevice->name), "Default Capture Device", (size_t)-1);
}
} else {
if (type == mal_device_type_playback) {
mal_strncpy_s(pDevice->name, sizeof(pDevice->name), "Playback Device", (size_t)-1);
} else {
mal_strncpy_s(pDevice->name, sizeof(pDevice->name), "Capture Device", (size_t)-1);
}
}
}
}
// We need a DSP object which is where samples are moved through in order to convert them to the
// format required by the backend.
mal_dsp_config dspConfig;
dspConfig.cacheSizeInFrames = pDevice->bufferSizeInFrames;
if (type == mal_device_type_playback) {
dspConfig.formatIn = pDevice->format;
dspConfig.channelsIn = pDevice->channels;
dspConfig.sampleRateIn = pDevice->sampleRate;
mal_copy_memory(dspConfig.channelMapIn, pDevice->channelMap, sizeof(dspConfig.channelMapIn));
dspConfig.formatOut = pDevice->internalFormat;
dspConfig.channelsOut = pDevice->internalChannels;
dspConfig.sampleRateOut = pDevice->internalSampleRate;
mal_copy_memory(dspConfig.channelMapOut, pDevice->internalChannelMap, sizeof(dspConfig.channelMapOut));
mal_dsp_init(&dspConfig, mal_device__on_read_from_client, pDevice, &pDevice->dsp);
} else {
dspConfig.formatIn = pDevice->internalFormat;
dspConfig.channelsIn = pDevice->internalChannels;
dspConfig.sampleRateIn = pDevice->internalSampleRate;
mal_copy_memory(dspConfig.channelMapIn, pDevice->internalChannelMap, sizeof(dspConfig.channelMapIn));
dspConfig.formatOut = pDevice->format;
dspConfig.channelsOut = pDevice->channels;
dspConfig.sampleRateOut = pDevice->sampleRate;
mal_copy_memory(dspConfig.channelMapOut, pDevice->channelMap, sizeof(dspConfig.channelMapOut));
mal_dsp_init(&dspConfig, mal_device__on_read_from_device, pDevice, &pDevice->dsp);
}
// Some backends don't require the worker thread.
if (pContext->backend != mal_backend_opensl && pContext->backend != mal_backend_sdl) {
// The worker thread.
if (mal_thread_create(pContext, &pDevice->thread, mal_worker_thread, pDevice) != MAL_SUCCESS) {
mal_device_uninit(pDevice);
return mal_post_error(pDevice, "Failed to create worker thread.", MAL_FAILED_TO_CREATE_THREAD);
}
// Wait for the worker thread to put the device into it's stopped state for real.
mal_event_wait(&pDevice->stopEvent);
} else {
mal_device__set_state(pDevice, MAL_STATE_STOPPED);
}
mal_assert(mal_device__get_state(pDevice) == MAL_STATE_STOPPED);
return MAL_SUCCESS;
}
void mal_device_uninit(mal_device* pDevice)
{
if (!mal_device__is_initialized(pDevice)) return;
// Make sure the device is stopped first. The backends will probably handle this naturally,
// but I like to do it explicitly for my own sanity.
if (mal_device_is_started(pDevice)) {
while (mal_device_stop(pDevice) == MAL_DEVICE_BUSY) {
mal_sleep(1);
}
}
// Putting the device into an uninitialized state will make the worker thread return.
mal_device__set_state(pDevice, MAL_STATE_UNINITIALIZED);
// Wake up the worker thread and wait for it to properly terminate.
if (pDevice->pContext->backend != mal_backend_opensl && pDevice->pContext->backend != mal_backend_sdl) {
mal_event_signal(&pDevice->wakeupEvent);
mal_thread_wait(&pDevice->thread);
}
mal_event_uninit(&pDevice->stopEvent);
mal_event_uninit(&pDevice->startEvent);
mal_event_uninit(&pDevice->wakeupEvent);
mal_mutex_uninit(&pDevice->lock);
#ifdef MAL_HAS_WASAPI
if (pDevice->pContext->backend == mal_backend_wasapi) {
mal_device_uninit__wasapi(pDevice);
}
#endif
#ifdef MAL_HAS_DSOUND
if (pDevice->pContext->backend == mal_backend_dsound) {
mal_device_uninit__dsound(pDevice);
}
#endif
#ifdef MAL_HAS_WINMM
if (pDevice->pContext->backend == mal_backend_winmm) {
mal_device_uninit__winmm(pDevice);
}
#endif
#ifdef MAL_HAS_ALSA
if (pDevice->pContext->backend == mal_backend_alsa) {
mal_device_uninit__alsa(pDevice);
}
#endif
#ifdef MAL_HAS_OSS
if (pDevice->pContext->backend == mal_backend_oss) {
mal_device_uninit__oss(pDevice);
}
#endif
#ifdef MAL_HAS_OPENSL
if (pDevice->pContext->backend == mal_backend_opensl) {
mal_device_uninit__opensl(pDevice);
}
#endif
#ifdef MAL_HAS_OPENAL
if (pDevice->pContext->backend == mal_backend_openal) {
mal_device_uninit__openal(pDevice);
}
#endif
#ifdef MAL_HAS_SDL
if (pDevice->pContext->backend == mal_backend_sdl) {
mal_device_uninit__sdl(pDevice);
}
#endif
#ifdef MAL_HAS_NULL
if (pDevice->pContext->backend == mal_backend_null) {
mal_device_uninit__null(pDevice);
}
#endif
mal_zero_object(pDevice);
}
void mal_device_set_recv_callback(mal_device* pDevice, mal_recv_proc proc)
{
if (pDevice == NULL) return;
mal_atomic_exchange_ptr(&pDevice->onRecv, proc);
}
void mal_device_set_send_callback(mal_device* pDevice, mal_send_proc proc)
{
if (pDevice == NULL) return;
mal_atomic_exchange_ptr(&pDevice->onSend, proc);
}
void mal_device_set_stop_callback(mal_device* pDevice, mal_stop_proc proc)
{
if (pDevice == NULL) return;
mal_atomic_exchange_ptr(&pDevice->onStop, proc);
}
mal_result mal_device_start(mal_device* pDevice)
{
if (pDevice == NULL) return mal_post_error(pDevice, "mal_device_start() called with invalid arguments (pDevice == NULL).", MAL_INVALID_ARGS);
if (mal_device__get_state(pDevice) == MAL_STATE_UNINITIALIZED) return mal_post_error(pDevice, "mal_device_start() called for an uninitialized device.", MAL_DEVICE_NOT_INITIALIZED);
mal_result result = MAL_ERROR;
mal_mutex_lock(&pDevice->lock);
{
// Be a bit more descriptive if the device is already started or is already in the process of starting. This is likely
// a bug with the application.
if (mal_device__get_state(pDevice) == MAL_STATE_STARTING) {
mal_mutex_unlock(&pDevice->lock);
return mal_post_error(pDevice, "mal_device_start() called while another thread is already starting it.", MAL_DEVICE_ALREADY_STARTING);
}
if (mal_device__get_state(pDevice) == MAL_STATE_STARTED) {
mal_mutex_unlock(&pDevice->lock);
return mal_post_error(pDevice, "mal_device_start() called for a device that's already started.", MAL_DEVICE_ALREADY_STARTED);
}
// The device needs to be in a stopped state. If it's not, we just let the caller know the device is busy.
if (mal_device__get_state(pDevice) != MAL_STATE_STOPPED) {
mal_mutex_unlock(&pDevice->lock);
return mal_post_error(pDevice, "mal_device_start() called while another thread is in the process of stopping it.", MAL_DEVICE_BUSY);
}
mal_device__set_state(pDevice, MAL_STATE_STARTING);
// Asynchronous backends need to be handled differently.
#ifdef MAL_HAS_OPENSL
if (pDevice->pContext->backend == mal_backend_opensl) {
result = mal_device__start_backend__opensl(pDevice);
if (result == MAL_SUCCESS) {
mal_device__set_state(pDevice, MAL_STATE_STARTED);
}
} else
#endif
#ifdef MAL_HAS_SDL
if (pDevice->pContext->backend == mal_backend_sdl) {
result = mal_device__start_backend__sdl(pDevice);
if (result == MAL_SUCCESS) {
mal_device__set_state(pDevice, MAL_STATE_STARTED);
}
} else
#endif
// Synchronous backends.
{
mal_event_signal(&pDevice->wakeupEvent);
// Wait for the worker thread to finish starting the device. Note that the worker thread will be the one
// who puts the device into the started state. Don't call mal_device__set_state() here.
mal_event_wait(&pDevice->startEvent);
result = pDevice->workResult;
}
}
mal_mutex_unlock(&pDevice->lock);
return result;
}
mal_result mal_device_stop(mal_device* pDevice)
{
if (pDevice == NULL) return mal_post_error(pDevice, "mal_device_stop() called with invalid arguments (pDevice == NULL).", MAL_INVALID_ARGS);
if (mal_device__get_state(pDevice) == MAL_STATE_UNINITIALIZED) return mal_post_error(pDevice, "mal_device_stop() called for an uninitialized device.", MAL_DEVICE_NOT_INITIALIZED);
mal_result result = MAL_ERROR;
mal_mutex_lock(&pDevice->lock);
{
// Be a bit more descriptive if the device is already stopped or is already in the process of stopping. This is likely
// a bug with the application.
if (mal_device__get_state(pDevice) == MAL_STATE_STOPPING) {
mal_mutex_unlock(&pDevice->lock);
return mal_post_error(pDevice, "mal_device_stop() called while another thread is already stopping it.", MAL_DEVICE_ALREADY_STOPPING);
}
if (mal_device__get_state(pDevice) == MAL_STATE_STOPPED) {
mal_mutex_unlock(&pDevice->lock);
return mal_post_error(pDevice, "mal_device_stop() called for a device that's already stopped.", MAL_DEVICE_ALREADY_STOPPED);
}
// The device needs to be in a started state. If it's not, we just let the caller know the device is busy.
if (mal_device__get_state(pDevice) != MAL_STATE_STARTED) {
mal_mutex_unlock(&pDevice->lock);
return mal_post_error(pDevice, "mal_device_stop() called while another thread is in the process of starting it.", MAL_DEVICE_BUSY);
}
mal_device__set_state(pDevice, MAL_STATE_STOPPING);
// There's no need to wake up the thread like we do when starting.
// Asynchronous backends need to be handled differently.
#ifdef MAL_HAS_OPENSL
if (pDevice->pContext->backend == mal_backend_opensl) {
mal_device__stop_backend__opensl(pDevice);
} else
#endif
#ifdef MAL_HAS_SDL
if (pDevice->pContext->backend == mal_backend_sdl) {
mal_device__stop_backend__sdl(pDevice);
} else
#endif
// Synchronous backends.
{
// When we get here the worker thread is likely in a wait state while waiting for the backend device to deliver or request
// audio data. We need to force these to return as quickly as possible.
mal_device__break_main_loop(pDevice);
// We need to wait for the worker thread to become available for work before returning. Note that the worker thread will be
// the one who puts the device into the stopped state. Don't call mal_device__set_state() here.
mal_event_wait(&pDevice->stopEvent);
result = MAL_SUCCESS;
}
}
mal_mutex_unlock(&pDevice->lock);
return result;
}
mal_bool32 mal_device_is_started(mal_device* pDevice)
{
if (pDevice == NULL) return MAL_FALSE;
return mal_device__get_state(pDevice) == MAL_STATE_STARTED;
}
mal_uint32 mal_device_get_buffer_size_in_bytes(mal_device* pDevice)
{
if (pDevice == NULL) return 0;
return pDevice->bufferSizeInFrames * pDevice->channels * mal_get_sample_size_in_bytes(pDevice->format);
}
mal_uint32 mal_get_sample_size_in_bytes(mal_format format)
{
mal_uint32 sizes[] = {
0, // unknown
1, // u8
2, // s16
3, // s24
4, // s32
4, // f32
};
return sizes[format];
}
mal_context_config mal_context_config_init(mal_log_proc onLog)
{
mal_context_config config;
mal_zero_object(&config);
config.onLog = onLog;
return config;
}
mal_device_config mal_device_config_init(mal_format format, mal_uint32 channels, mal_uint32 sampleRate, mal_recv_proc onRecvCallback, mal_send_proc onSendCallback)
{
mal_device_config config;
mal_zero_object(&config);
config.format = format;
config.channels = channels;
config.sampleRate = sampleRate;
config.onRecvCallback = onRecvCallback;
config.onSendCallback = onSendCallback;
switch (channels)
{
case 1:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_CENTER;
} break;
case 2:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
} break;
case 3:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
config.channelMap[2] = MAL_CHANNEL_LFE;
} break;
case 4:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
config.channelMap[2] = MAL_CHANNEL_BACK_LEFT;
config.channelMap[3] = MAL_CHANNEL_BACK_RIGHT;
} break;
case 5:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
config.channelMap[2] = MAL_CHANNEL_BACK_LEFT;
config.channelMap[3] = MAL_CHANNEL_BACK_RIGHT;
config.channelMap[4] = MAL_CHANNEL_LFE;
} break;
case 6:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
config.channelMap[2] = MAL_CHANNEL_FRONT_CENTER;
config.channelMap[3] = MAL_CHANNEL_LFE;
config.channelMap[4] = MAL_CHANNEL_BACK_LEFT;
config.channelMap[5] = MAL_CHANNEL_BACK_RIGHT;
} break;
case 8:
{
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
config.channelMap[2] = MAL_CHANNEL_FRONT_CENTER;
config.channelMap[3] = MAL_CHANNEL_LFE;
config.channelMap[4] = MAL_CHANNEL_BACK_LEFT;
config.channelMap[5] = MAL_CHANNEL_BACK_RIGHT;
config.channelMap[6] = MAL_CHANNEL_SIDE_LEFT;
config.channelMap[7] = MAL_CHANNEL_SIDE_RIGHT;
} break;
default:
{
// Just leave it all blank in this case. This will use the same mapping as the device's native mapping.
} break;
}
return config;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// SRC
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void mal_src_cache_init(mal_src* pSRC, mal_src_cache* pCache)
{
mal_assert(pSRC != NULL);
mal_assert(pCache != NULL);
pCache->pSRC = pSRC;
pCache->cachedFrameCount = 0;
pCache->iNextFrame = 0;
}
mal_uint32 mal_src_cache_read_frames(mal_src_cache* pCache, mal_uint32 frameCount, float* pFramesOut)
{
mal_assert(pCache != NULL);
mal_assert(pCache->pSRC != NULL);
mal_assert(pCache->pSRC->onRead != NULL);
mal_assert(frameCount > 0);
mal_assert(pFramesOut != NULL);
mal_uint32 channels = pCache->pSRC->config.channels;
mal_uint32 totalFramesRead = 0;
while (frameCount > 0) {
// If there's anything in memory go ahead and copy that over first.
mal_uint32 framesRemainingInMemory = pCache->cachedFrameCount - pCache->iNextFrame;
mal_uint32 framesToReadFromMemory = frameCount;
if (framesToReadFromMemory > framesRemainingInMemory) {
framesToReadFromMemory = framesRemainingInMemory;
}
mal_copy_memory(pFramesOut, pCache->pCachedFrames + pCache->iNextFrame*channels, framesToReadFromMemory * channels * sizeof(float));
pCache->iNextFrame += framesToReadFromMemory;
totalFramesRead += framesToReadFromMemory;
frameCount -= framesToReadFromMemory;
if (frameCount == 0) {
break;
}
// At this point there are still more frames to read from the client, so we'll need to reload the cache with fresh data.
mal_assert(frameCount > 0);
pFramesOut += framesToReadFromMemory * channels;
pCache->iNextFrame = 0;
pCache->cachedFrameCount = 0;
if (pCache->pSRC->config.formatIn == mal_format_f32) {
// No need for a conversion - read straight into the cache.
mal_uint32 framesToReadFromClient = mal_countof(pCache->pCachedFrames) / pCache->pSRC->config.channels;
if (framesToReadFromClient > pCache->pSRC->config.cacheSizeInFrames) {
framesToReadFromClient = pCache->pSRC->config.cacheSizeInFrames;
}
pCache->cachedFrameCount = pCache->pSRC->onRead(pCache->pSRC, framesToReadFromClient, pCache->pCachedFrames, pCache->pSRC->pUserData);
} else {
// A format conversion is required which means we need to use an intermediary buffer.
mal_uint8 pIntermediaryBuffer[sizeof(pCache->pCachedFrames)];
mal_uint32 framesToReadFromClient = mal_min(mal_buffer_frame_capacity(pIntermediaryBuffer, channels, pCache->pSRC->config.formatIn), mal_buffer_frame_capacity(pCache->pCachedFrames, channels, mal_format_f32));
if (framesToReadFromClient > pCache->pSRC->config.cacheSizeInFrames) {
framesToReadFromClient = pCache->pSRC->config.cacheSizeInFrames;
}
pCache->cachedFrameCount = pCache->pSRC->onRead(pCache->pSRC, framesToReadFromClient, pIntermediaryBuffer, pCache->pSRC->pUserData);
// Convert to f32.
mal_pcm_convert(pCache->pCachedFrames, mal_format_f32, pIntermediaryBuffer, pCache->pSRC->config.formatIn, pCache->cachedFrameCount * channels);
}
// Get out of this loop if nothing was able to be retrieved.
if (pCache->cachedFrameCount == 0) {
break;
}
}
return totalFramesRead;
}
mal_uint32 mal_src_read_frames_passthrough(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush);
mal_uint32 mal_src_read_frames_linear(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush);
mal_result mal_src_init(mal_src_config* pConfig, mal_src_read_proc onRead, void* pUserData, mal_src* pSRC)
{
if (pSRC == NULL) return MAL_INVALID_ARGS;
mal_zero_object(pSRC);
if (pConfig == NULL || onRead == NULL) return MAL_INVALID_ARGS;
if (pConfig->channels == 0 || pConfig->channels > MAL_MAX_CHANNELS) return MAL_INVALID_ARGS;
pSRC->config = *pConfig;
pSRC->onRead = onRead;
pSRC->pUserData = pUserData;
if (pSRC->config.cacheSizeInFrames > MAL_SRC_CACHE_SIZE_IN_FRAMES || pSRC->config.cacheSizeInFrames == 0) {
pSRC->config.cacheSizeInFrames = MAL_SRC_CACHE_SIZE_IN_FRAMES;
}
mal_src_cache_init(pSRC, &pSRC->cache);
return MAL_SUCCESS;
}
mal_result mal_src_set_output_sample_rate(mal_src* pSRC, mal_uint32 sampleRateOut)
{
if (pSRC == NULL) return MAL_INVALID_ARGS;
// Must have a sample rate of > 0.
if (sampleRateOut == 0) {
return MAL_INVALID_ARGS;
}
pSRC->config.sampleRateOut = sampleRateOut;
return MAL_SUCCESS;
}
mal_uint32 mal_src_read_frames(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut)
{
return mal_src_read_frames_ex(pSRC, frameCount, pFramesOut, MAL_FALSE);
}
mal_uint32 mal_src_read_frames_ex(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush)
{
if (pSRC == NULL || frameCount == 0 || pFramesOut == NULL) return 0;
mal_src_algorithm algorithm = pSRC->config.algorithm;
// Always use passthrough if the sample rates are the same.
if (pSRC->config.sampleRateIn == pSRC->config.sampleRateOut) {
algorithm = mal_src_algorithm_none;
}
// Could just use a function pointer instead of a switch for this...
switch (algorithm)
{
case mal_src_algorithm_none: return mal_src_read_frames_passthrough(pSRC, frameCount, pFramesOut, flush);
case mal_src_algorithm_linear: return mal_src_read_frames_linear(pSRC, frameCount, pFramesOut, flush);
default: return 0;
}
}
mal_uint32 mal_src_read_frames_passthrough(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush)
{
mal_assert(pSRC != NULL);
mal_assert(frameCount > 0);
mal_assert(pFramesOut != NULL);
(void)flush; // Passthrough need not care about flushing.
// Fast path. No need for data conversion - just pass right through.
if (pSRC->config.formatIn == pSRC->config.formatOut) {
return pSRC->onRead(pSRC, frameCount, pFramesOut, pSRC->pUserData);
}
// Slower path. Need to do a format conversion.
mal_uint32 totalFramesRead = 0;
while (frameCount > 0) {
mal_uint8 pStagingBuffer[MAL_MAX_CHANNELS * 2048];
mal_uint32 stagingBufferSizeInFrames = sizeof(pStagingBuffer) / mal_get_sample_size_in_bytes(pSRC->config.formatIn) / pSRC->config.channels;
mal_uint32 framesToRead = stagingBufferSizeInFrames;
if (framesToRead > frameCount) {
framesToRead = frameCount;
}
mal_uint32 framesRead = pSRC->onRead(pSRC, framesToRead, pStagingBuffer, pSRC->pUserData);
if (framesRead == 0) {
break;
}
mal_pcm_convert(pFramesOut, pSRC->config.formatOut, pStagingBuffer, pSRC->config.formatIn, framesRead * pSRC->config.channels);
pFramesOut = (mal_uint8*)pFramesOut + (framesRead * pSRC->config.channels * mal_get_sample_size_in_bytes(pSRC->config.formatOut));
frameCount -= framesRead;
totalFramesRead += framesRead;
}
return totalFramesRead;
}
mal_uint32 mal_src_read_frames_linear(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush)
{
mal_assert(pSRC != NULL);
mal_assert(frameCount > 0);
mal_assert(pFramesOut != NULL);
// For linear SRC, the bin is only 2 frames: 1 prior, 1 future.
// Load the bin if necessary.
if (!pSRC->linear.isPrevFramesLoaded) {
mal_uint32 framesRead = mal_src_cache_read_frames(&pSRC->cache, 1, pSRC->bin);
if (framesRead == 0) {
return 0;
}
pSRC->linear.isPrevFramesLoaded = MAL_TRUE;
}
if (!pSRC->linear.isNextFramesLoaded) {
mal_uint32 framesRead = mal_src_cache_read_frames(&pSRC->cache, 1, pSRC->bin + pSRC->config.channels);
if (framesRead == 0) {
return 0;
}
pSRC->linear.isNextFramesLoaded = MAL_TRUE;
}
float factor = (float)pSRC->config.sampleRateIn / pSRC->config.sampleRateOut;
mal_uint32 totalFramesRead = 0;
while (frameCount > 0) {
// The bin is where the previous and next frames are located.
float* pPrevFrame = pSRC->bin;
float* pNextFrame = pSRC->bin + pSRC->config.channels;
float pFrame[MAL_MAX_CHANNELS];
mal_blend_f32(pFrame, pPrevFrame, pNextFrame, pSRC->linear.alpha, pSRC->config.channels);
pSRC->linear.alpha += factor;
// The new alpha value is how we determine whether or not we need to read fresh frames.
mal_uint32 framesToReadFromClient = (mal_uint32)pSRC->linear.alpha;
pSRC->linear.alpha = pSRC->linear.alpha - framesToReadFromClient;
for (mal_uint32 i = 0; i < framesToReadFromClient; ++i) {
for (mal_uint32 j = 0; j < pSRC->config.channels; ++j) {
pPrevFrame[j] = pNextFrame[j];
}
mal_uint32 framesRead = mal_src_cache_read_frames(&pSRC->cache, 1, pNextFrame);
if (framesRead == 0) {
for (mal_uint32 j = 0; j < pSRC->config.channels; ++j) {
pNextFrame[j] = 0;
}
if (pSRC->linear.isNextFramesLoaded) {
pSRC->linear.isNextFramesLoaded = MAL_FALSE;
} else {
if (flush) {
pSRC->linear.isPrevFramesLoaded = MAL_FALSE;
}
}
break;
}
}
mal_pcm_convert(pFramesOut, pSRC->config.formatOut, pFrame, mal_format_f32, 1 * pSRC->config.channels);
pFramesOut = (mal_uint8*)pFramesOut + (1 * pSRC->config.channels * mal_get_sample_size_in_bytes(pSRC->config.formatOut));
frameCount -= 1;
totalFramesRead += 1;
// If there's no frames available we need to get out of this loop.
if (!pSRC->linear.isNextFramesLoaded && (!flush || !pSRC->linear.isPrevFramesLoaded)) {
break;
}
}
return totalFramesRead;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// FORMAT CONVERSION
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void mal_pcm_u8_to_s16(short* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_u8_to_s24(void* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_u8_to_s32(int* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_u8_to_f32(float* pOut, const unsigned char* pIn, unsigned int count);
void mal_pcm_s16_to_u8(unsigned char* pOut, const short* pIn, unsigned int count);
void mal_pcm_s16_to_s24(void* pOut, const short* pIn, unsigned int count);
void mal_pcm_s16_to_s32(int* pOut, const short* pIn, unsigned int count);
void mal_pcm_s16_to_f32(float* pOut, const short* pIn, unsigned int count);
void mal_pcm_s24_to_u8(unsigned char* pOut, const void* pIn, unsigned int count);
void mal_pcm_s24_to_s16(short* pOut, const void* pIn, unsigned int count);
void mal_pcm_s24_to_s32(int* pOut, const void* pIn, unsigned int count);
void mal_pcm_s24_to_f32(float* pOut, const void* pIn, unsigned int count);
void mal_pcm_s32_to_u8(unsigned char* pOut, const int* pIn, unsigned int count);
void mal_pcm_s32_to_s16(short* pOut, const int* pIn, unsigned int count);
void mal_pcm_s32_to_s24(void* pOut, const int* pIn, unsigned int count);
void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count);
void mal_pcm_f32_to_u8(unsigned char* pOut, const float* pIn, unsigned int count);
void mal_pcm_f32_to_s16(short* pOut, const float* pIn, unsigned int count);
void mal_pcm_f32_to_s24(void* pOut, const float* pIn, unsigned int count);
void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count);
void mal_pcm_convert(void* pOut, mal_format formatOut, const void* pIn, mal_format formatIn, unsigned int sampleCount)
{
if (formatOut == formatIn) {
mal_copy_memory(pOut, pIn, sampleCount * mal_get_sample_size_in_bytes(formatOut));
return;
}
switch (formatIn)
{
case mal_format_u8:
{
switch (formatOut)
{
case mal_format_s16: mal_pcm_u8_to_s16((short*)pOut, (const unsigned char*)pIn, sampleCount); return;
case mal_format_s24: mal_pcm_u8_to_s24( pOut, (const unsigned char*)pIn, sampleCount); return;
case mal_format_s32: mal_pcm_u8_to_s32( (int*)pOut, (const unsigned char*)pIn, sampleCount); return;
case mal_format_f32: mal_pcm_u8_to_f32((float*)pOut, (const unsigned char*)pIn, sampleCount); return;
default: break;
}
} break;
case mal_format_s16:
{
switch (formatOut)
{
case mal_format_u8: mal_pcm_s16_to_u8( (unsigned char*)pOut, (const short*)pIn, sampleCount); return;
case mal_format_s24: mal_pcm_s16_to_s24( pOut, (const short*)pIn, sampleCount); return;
case mal_format_s32: mal_pcm_s16_to_s32( (int*)pOut, (const short*)pIn, sampleCount); return;
case mal_format_f32: mal_pcm_s16_to_f32( (float*)pOut, (const short*)pIn, sampleCount); return;
default: break;
}
} break;
case mal_format_s24:
{
switch (formatOut)
{
case mal_format_u8: mal_pcm_s24_to_u8( (unsigned char*)pOut, pIn, sampleCount); return;
case mal_format_s16: mal_pcm_s24_to_s16( (short*)pOut, pIn, sampleCount); return;
case mal_format_s32: mal_pcm_s24_to_s32( (int*)pOut, pIn, sampleCount); return;
case mal_format_f32: mal_pcm_s24_to_f32( (float*)pOut, pIn, sampleCount); return;
default: break;
}
} break;
case mal_format_s32:
{
switch (formatOut)
{
case mal_format_u8: mal_pcm_s32_to_u8( (unsigned char*)pOut, (const int*)pIn, sampleCount); return;
case mal_format_s16: mal_pcm_s32_to_s16( (short*)pOut, (const int*)pIn, sampleCount); return;
case mal_format_s24: mal_pcm_s32_to_s24( pOut, (const int*)pIn, sampleCount); return;
case mal_format_f32: mal_pcm_s32_to_f32( (float*)pOut, (const int*)pIn, sampleCount); return;
default: break;
}
} break;
case mal_format_f32:
{
switch (formatOut)
{
case mal_format_u8: mal_pcm_f32_to_u8( (unsigned char*)pOut, (const float*)pIn, sampleCount); return;
case mal_format_s16: mal_pcm_f32_to_s16( (short*)pOut, (const float*)pIn, sampleCount); return;
case mal_format_s24: mal_pcm_f32_to_s24( pOut, (const float*)pIn, sampleCount); return;
case mal_format_s32: mal_pcm_f32_to_s32( (int*)pOut, (const float*)pIn, sampleCount); return;
default: break;
}
} break;
default: break;
}
}
static void mal_rearrange_channels_u8(mal_uint8* pFrame, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS])
{
mal_uint8 temp[MAL_MAX_CHANNELS];
mal_copy_memory(temp, pFrame, sizeof(temp[0]) * channels);
switch (channels) {
case 18: pFrame[17] = temp[channelMap[17]];
case 17: pFrame[16] = temp[channelMap[16]];
case 16: pFrame[15] = temp[channelMap[15]];
case 15: pFrame[14] = temp[channelMap[14]];
case 14: pFrame[13] = temp[channelMap[13]];
case 13: pFrame[12] = temp[channelMap[12]];
case 12: pFrame[11] = temp[channelMap[11]];
case 11: pFrame[10] = temp[channelMap[10]];
case 10: pFrame[ 9] = temp[channelMap[ 9]];
case 9: pFrame[ 8] = temp[channelMap[ 8]];
case 8: pFrame[ 7] = temp[channelMap[ 7]];
case 7: pFrame[ 6] = temp[channelMap[ 6]];
case 6: pFrame[ 5] = temp[channelMap[ 5]];
case 5: pFrame[ 4] = temp[channelMap[ 4]];
case 4: pFrame[ 3] = temp[channelMap[ 3]];
case 3: pFrame[ 2] = temp[channelMap[ 2]];
case 2: pFrame[ 1] = temp[channelMap[ 1]];
case 1: pFrame[ 0] = temp[channelMap[ 0]];
}
}
static void mal_rearrange_channels_s16(mal_int16* pFrame, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS])
{
mal_int16 temp[MAL_MAX_CHANNELS];
mal_copy_memory(temp, pFrame, sizeof(temp[0]) * channels);
switch (channels) {
case 18: pFrame[17] = temp[channelMap[17]];
case 17: pFrame[16] = temp[channelMap[16]];
case 16: pFrame[15] = temp[channelMap[15]];
case 15: pFrame[14] = temp[channelMap[14]];
case 14: pFrame[13] = temp[channelMap[13]];
case 13: pFrame[12] = temp[channelMap[12]];
case 12: pFrame[11] = temp[channelMap[11]];
case 11: pFrame[10] = temp[channelMap[10]];
case 10: pFrame[ 9] = temp[channelMap[ 9]];
case 9: pFrame[ 8] = temp[channelMap[ 8]];
case 8: pFrame[ 7] = temp[channelMap[ 7]];
case 7: pFrame[ 6] = temp[channelMap[ 6]];
case 6: pFrame[ 5] = temp[channelMap[ 5]];
case 5: pFrame[ 4] = temp[channelMap[ 4]];
case 4: pFrame[ 3] = temp[channelMap[ 3]];
case 3: pFrame[ 2] = temp[channelMap[ 2]];
case 2: pFrame[ 1] = temp[channelMap[ 1]];
case 1: pFrame[ 0] = temp[channelMap[ 0]];
}
}
static void mal_rearrange_channels_s32(mal_int32* pFrame, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS])
{
mal_int32 temp[MAL_MAX_CHANNELS];
mal_copy_memory(temp, pFrame, sizeof(temp[0]) * channels);
switch (channels) {
case 18: pFrame[17] = temp[channelMap[17]];
case 17: pFrame[16] = temp[channelMap[16]];
case 16: pFrame[15] = temp[channelMap[15]];
case 15: pFrame[14] = temp[channelMap[14]];
case 14: pFrame[13] = temp[channelMap[13]];
case 13: pFrame[12] = temp[channelMap[12]];
case 12: pFrame[11] = temp[channelMap[11]];
case 11: pFrame[10] = temp[channelMap[10]];
case 10: pFrame[ 9] = temp[channelMap[ 9]];
case 9: pFrame[ 8] = temp[channelMap[ 8]];
case 8: pFrame[ 7] = temp[channelMap[ 7]];
case 7: pFrame[ 6] = temp[channelMap[ 6]];
case 6: pFrame[ 5] = temp[channelMap[ 5]];
case 5: pFrame[ 4] = temp[channelMap[ 4]];
case 4: pFrame[ 3] = temp[channelMap[ 3]];
case 3: pFrame[ 2] = temp[channelMap[ 2]];
case 2: pFrame[ 1] = temp[channelMap[ 1]];
case 1: pFrame[ 0] = temp[channelMap[ 0]];
}
}
static void mal_rearrange_channels_f32(float* pFrame, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS])
{
float temp[MAL_MAX_CHANNELS];
mal_copy_memory(temp, pFrame, sizeof(temp[0]) * channels);
switch (channels) {
case 18: pFrame[17] = temp[channelMap[17]];
case 17: pFrame[16] = temp[channelMap[16]];
case 16: pFrame[15] = temp[channelMap[15]];
case 15: pFrame[14] = temp[channelMap[14]];
case 14: pFrame[13] = temp[channelMap[13]];
case 13: pFrame[12] = temp[channelMap[12]];
case 12: pFrame[11] = temp[channelMap[11]];
case 11: pFrame[10] = temp[channelMap[10]];
case 10: pFrame[ 9] = temp[channelMap[ 9]];
case 9: pFrame[ 8] = temp[channelMap[ 8]];
case 8: pFrame[ 7] = temp[channelMap[ 7]];
case 7: pFrame[ 6] = temp[channelMap[ 6]];
case 6: pFrame[ 5] = temp[channelMap[ 5]];
case 5: pFrame[ 4] = temp[channelMap[ 4]];
case 4: pFrame[ 3] = temp[channelMap[ 3]];
case 3: pFrame[ 2] = temp[channelMap[ 2]];
case 2: pFrame[ 1] = temp[channelMap[ 1]];
case 1: pFrame[ 0] = temp[channelMap[ 0]];
}
}
static void mal_rearrange_channels_generic(void* pFrame, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS], mal_format format)
{
mal_uint32 sampleSizeInBytes = mal_get_sample_size_in_bytes(format);
mal_uint8 temp[MAL_MAX_CHANNELS * 8]; // x8 to ensure it's large enough for all formats.
mal_copy_memory(temp, pFrame, sampleSizeInBytes * channels);
switch (channels) {
case 18: mal_copy_memory((mal_uint8*)pFrame + (17 * sampleSizeInBytes), &temp[channelMap[17] * sampleSizeInBytes], sampleSizeInBytes);
case 17: mal_copy_memory((mal_uint8*)pFrame + (16 * sampleSizeInBytes), &temp[channelMap[16] * sampleSizeInBytes], sampleSizeInBytes);
case 16: mal_copy_memory((mal_uint8*)pFrame + (15 * sampleSizeInBytes), &temp[channelMap[15] * sampleSizeInBytes], sampleSizeInBytes);
case 15: mal_copy_memory((mal_uint8*)pFrame + (14 * sampleSizeInBytes), &temp[channelMap[14] * sampleSizeInBytes], sampleSizeInBytes);
case 14: mal_copy_memory((mal_uint8*)pFrame + (13 * sampleSizeInBytes), &temp[channelMap[13] * sampleSizeInBytes], sampleSizeInBytes);
case 13: mal_copy_memory((mal_uint8*)pFrame + (12 * sampleSizeInBytes), &temp[channelMap[12] * sampleSizeInBytes], sampleSizeInBytes);
case 12: mal_copy_memory((mal_uint8*)pFrame + (11 * sampleSizeInBytes), &temp[channelMap[11] * sampleSizeInBytes], sampleSizeInBytes);
case 11: mal_copy_memory((mal_uint8*)pFrame + (10 * sampleSizeInBytes), &temp[channelMap[10] * sampleSizeInBytes], sampleSizeInBytes);
case 10: mal_copy_memory((mal_uint8*)pFrame + ( 9 * sampleSizeInBytes), &temp[channelMap[ 9] * sampleSizeInBytes], sampleSizeInBytes);
case 9: mal_copy_memory((mal_uint8*)pFrame + ( 8 * sampleSizeInBytes), &temp[channelMap[ 8] * sampleSizeInBytes], sampleSizeInBytes);
case 8: mal_copy_memory((mal_uint8*)pFrame + ( 7 * sampleSizeInBytes), &temp[channelMap[ 7] * sampleSizeInBytes], sampleSizeInBytes);
case 7: mal_copy_memory((mal_uint8*)pFrame + ( 6 * sampleSizeInBytes), &temp[channelMap[ 6] * sampleSizeInBytes], sampleSizeInBytes);
case 6: mal_copy_memory((mal_uint8*)pFrame + ( 5 * sampleSizeInBytes), &temp[channelMap[ 5] * sampleSizeInBytes], sampleSizeInBytes);
case 5: mal_copy_memory((mal_uint8*)pFrame + ( 4 * sampleSizeInBytes), &temp[channelMap[ 4] * sampleSizeInBytes], sampleSizeInBytes);
case 4: mal_copy_memory((mal_uint8*)pFrame + ( 3 * sampleSizeInBytes), &temp[channelMap[ 3] * sampleSizeInBytes], sampleSizeInBytes);
case 3: mal_copy_memory((mal_uint8*)pFrame + ( 2 * sampleSizeInBytes), &temp[channelMap[ 2] * sampleSizeInBytes], sampleSizeInBytes);
case 2: mal_copy_memory((mal_uint8*)pFrame + ( 1 * sampleSizeInBytes), &temp[channelMap[ 1] * sampleSizeInBytes], sampleSizeInBytes);
case 1: mal_copy_memory((mal_uint8*)pFrame + ( 0 * sampleSizeInBytes), &temp[channelMap[ 0] * sampleSizeInBytes], sampleSizeInBytes);
}
}
static void mal_rearrange_channels(void* pFrame, mal_uint32 channels, mal_uint8 channelMap[MAL_MAX_CHANNELS], mal_format format)
{
switch (format)
{
case mal_format_u8: mal_rearrange_channels_u8( (mal_uint8*)pFrame, channels, channelMap); break;
case mal_format_s16: mal_rearrange_channels_s16((mal_int16*)pFrame, channels, channelMap); break;
case mal_format_s32: mal_rearrange_channels_s32((mal_int32*)pFrame, channels, channelMap); break;
case mal_format_f32: mal_rearrange_channels_f32( (float*)pFrame, channels, channelMap); break;
default: mal_rearrange_channels_generic(pFrame, channels, channelMap, format); break;
}
}
static void mal_dsp_mix_channels__dec(float* pFramesOut, mal_uint32 channelsOut, const mal_uint8 channelMapOut[MAL_MAX_CHANNELS], const float* pFramesIn, mal_uint32 channelsIn, const mal_uint8 channelMapIn[MAL_MAX_CHANNELS], mal_uint32 frameCount, mal_channel_mix_mode mode)
{
mal_assert(pFramesOut != NULL);
mal_assert(channelsOut > 0);
mal_assert(pFramesIn != NULL);
mal_assert(channelsIn > 0);
mal_assert(channelsOut < channelsIn);
(void)channelMapOut;
(void)channelMapIn;
if (mode == mal_channel_mix_mode_basic) {
// Basic mode is where we just drop excess channels.
for (mal_uint32 iFrame = 0; iFrame < frameCount; ++iFrame) {
switch (channelsOut) {
case 17: pFramesOut[iFrame*channelsOut+16] = pFramesIn[iFrame*channelsIn+16];
case 16: pFramesOut[iFrame*channelsOut+15] = pFramesIn[iFrame*channelsIn+15];
case 15: pFramesOut[iFrame*channelsOut+14] = pFramesIn[iFrame*channelsIn+14];
case 14: pFramesOut[iFrame*channelsOut+13] = pFramesIn[iFrame*channelsIn+13];
case 13: pFramesOut[iFrame*channelsOut+12] = pFramesIn[iFrame*channelsIn+12];
case 12: pFramesOut[iFrame*channelsOut+11] = pFramesIn[iFrame*channelsIn+11];
case 11: pFramesOut[iFrame*channelsOut+10] = pFramesIn[iFrame*channelsIn+10];
case 10: pFramesOut[iFrame*channelsOut+ 9] = pFramesIn[iFrame*channelsIn+ 9];
case 9: pFramesOut[iFrame*channelsOut+ 8] = pFramesIn[iFrame*channelsIn+ 8];
case 8: pFramesOut[iFrame*channelsOut+ 7] = pFramesIn[iFrame*channelsIn+ 7];
case 7: pFramesOut[iFrame*channelsOut+ 6] = pFramesIn[iFrame*channelsIn+ 6];
case 6: pFramesOut[iFrame*channelsOut+ 5] = pFramesIn[iFrame*channelsIn+ 5];
case 5: pFramesOut[iFrame*channelsOut+ 4] = pFramesIn[iFrame*channelsIn+ 4];
case 4: pFramesOut[iFrame*channelsOut+ 3] = pFramesIn[iFrame*channelsIn+ 3];
case 3: pFramesOut[iFrame*channelsOut+ 2] = pFramesIn[iFrame*channelsIn+ 2];
case 2: pFramesOut[iFrame*channelsOut+ 1] = pFramesIn[iFrame*channelsIn+ 1];
case 1: pFramesOut[iFrame*channelsOut+ 0] = pFramesIn[iFrame*channelsIn+ 0];
}
}
} else {
// Blend mode is where we just use simple averaging to blend based on spacial locality.
if (channelsOut == 1) {
for (mal_uint32 iFrame = 0; iFrame < frameCount; ++iFrame) {
float total = 0;
switch (channelsIn) {
case 18: total += pFramesIn[iFrame*channelsIn+17];
case 17: total += pFramesIn[iFrame*channelsIn+16];
case 16: total += pFramesIn[iFrame*channelsIn+15];
case 15: total += pFramesIn[iFrame*channelsIn+14];
case 14: total += pFramesIn[iFrame*channelsIn+13];
case 13: total += pFramesIn[iFrame*channelsIn+12];
case 12: total += pFramesIn[iFrame*channelsIn+11];
case 11: total += pFramesIn[iFrame*channelsIn+10];
case 10: total += pFramesIn[iFrame*channelsIn+ 9];
case 9: total += pFramesIn[iFrame*channelsIn+ 8];
case 8: total += pFramesIn[iFrame*channelsIn+ 7];
case 7: total += pFramesIn[iFrame*channelsIn+ 6];
case 6: total += pFramesIn[iFrame*channelsIn+ 5];
case 5: total += pFramesIn[iFrame*channelsIn+ 4];
case 4: total += pFramesIn[iFrame*channelsIn+ 3];
case 3: total += pFramesIn[iFrame*channelsIn+ 2];
case 2: total += pFramesIn[iFrame*channelsIn+ 1];
case 1: total += pFramesIn[iFrame*channelsIn+ 0];
}
pFramesOut[iFrame+0] = total / channelsIn;
}
} else if (channelsOut == 2) {
// TODO: Implement proper stereo blending.
mal_dsp_mix_channels__dec(pFramesOut, channelsOut, channelMapOut, pFramesIn, channelsIn, channelMapIn, frameCount, mal_channel_mix_mode_basic);
} else {
// Fall back to basic mode.
mal_dsp_mix_channels__dec(pFramesOut, channelsOut, channelMapOut, pFramesIn, channelsIn, channelMapIn, frameCount, mal_channel_mix_mode_basic);
}
}
}
static void mal_dsp_mix_channels__inc(float* pFramesOut, mal_uint32 channelsOut, const mal_uint8 channelMapOut[MAL_MAX_CHANNELS], const float* pFramesIn, mal_uint32 channelsIn, const mal_uint8 channelMapIn[MAL_MAX_CHANNELS], mal_uint32 frameCount, mal_channel_mix_mode mode)
{
mal_assert(pFramesOut != NULL);
mal_assert(channelsOut > 0);
mal_assert(pFramesIn != NULL);
mal_assert(channelsIn > 0);
mal_assert(channelsOut > channelsIn);
(void)channelMapOut;
(void)channelMapIn;
if (mode == mal_channel_mix_mode_basic) {
// Basic mode is where we just zero out extra channels.
for (mal_uint32 iFrame = 0; iFrame < frameCount; ++iFrame) {
switch (channelsIn) {
case 17: pFramesOut[iFrame*channelsOut+16] = pFramesIn[iFrame*channelsIn+16];
case 16: pFramesOut[iFrame*channelsOut+15] = pFramesIn[iFrame*channelsIn+15];
case 15: pFramesOut[iFrame*channelsOut+14] = pFramesIn[iFrame*channelsIn+14];
case 14: pFramesOut[iFrame*channelsOut+13] = pFramesIn[iFrame*channelsIn+13];
case 13: pFramesOut[iFrame*channelsOut+12] = pFramesIn[iFrame*channelsIn+12];
case 12: pFramesOut[iFrame*channelsOut+11] = pFramesIn[iFrame*channelsIn+11];
case 11: pFramesOut[iFrame*channelsOut+10] = pFramesIn[iFrame*channelsIn+10];
case 10: pFramesOut[iFrame*channelsOut+ 9] = pFramesIn[iFrame*channelsIn+ 9];
case 9: pFramesOut[iFrame*channelsOut+ 8] = pFramesIn[iFrame*channelsIn+ 8];
case 8: pFramesOut[iFrame*channelsOut+ 7] = pFramesIn[iFrame*channelsIn+ 7];
case 7: pFramesOut[iFrame*channelsOut+ 6] = pFramesIn[iFrame*channelsIn+ 6];
case 6: pFramesOut[iFrame*channelsOut+ 5] = pFramesIn[iFrame*channelsIn+ 5];
case 5: pFramesOut[iFrame*channelsOut+ 4] = pFramesIn[iFrame*channelsIn+ 4];
case 4: pFramesOut[iFrame*channelsOut+ 3] = pFramesIn[iFrame*channelsIn+ 3];
case 3: pFramesOut[iFrame*channelsOut+ 2] = pFramesIn[iFrame*channelsIn+ 2];
case 2: pFramesOut[iFrame*channelsOut+ 1] = pFramesIn[iFrame*channelsIn+ 1];
case 1: pFramesOut[iFrame*channelsOut+ 0] = pFramesIn[iFrame*channelsIn+ 0];
}
// Zero out extra channels.
switch (channelsOut - channelsIn) {
case 17: pFramesOut[iFrame*channelsOut+16 + channelsIn] = 0;
case 16: pFramesOut[iFrame*channelsOut+15 + channelsIn] = 0;
case 15: pFramesOut[iFrame*channelsOut+14 + channelsIn] = 0;
case 14: pFramesOut[iFrame*channelsOut+13 + channelsIn] = 0;
case 13: pFramesOut[iFrame*channelsOut+12 + channelsIn] = 0;
case 12: pFramesOut[iFrame*channelsOut+11 + channelsIn] = 0;
case 11: pFramesOut[iFrame*channelsOut+10 + channelsIn] = 0;
case 10: pFramesOut[iFrame*channelsOut+ 9 + channelsIn] = 0;
case 9: pFramesOut[iFrame*channelsOut+ 8 + channelsIn] = 0;
case 8: pFramesOut[iFrame*channelsOut+ 7 + channelsIn] = 0;
case 7: pFramesOut[iFrame*channelsOut+ 6 + channelsIn] = 0;
case 6: pFramesOut[iFrame*channelsOut+ 5 + channelsIn] = 0;
case 5: pFramesOut[iFrame*channelsOut+ 4 + channelsIn] = 0;
case 4: pFramesOut[iFrame*channelsOut+ 3 + channelsIn] = 0;
case 3: pFramesOut[iFrame*channelsOut+ 2 + channelsIn] = 0;
case 2: pFramesOut[iFrame*channelsOut+ 1 + channelsIn] = 0;
case 1: pFramesOut[iFrame*channelsOut+ 0 + channelsIn] = 0;
}
}
} else {
// Using blended mixing mode. Basically this is just the mode where audio is distributed across all channels
// based on spacial locality.
if (channelsIn == 1) {
for (mal_uint32 iFrame = 0; iFrame < frameCount; ++iFrame) {
switch (channelsOut) {
case 18: pFramesOut[iFrame*channelsOut+17] = pFramesIn[iFrame*channelsIn+0];
case 17: pFramesOut[iFrame*channelsOut+16] = pFramesIn[iFrame*channelsIn+0];
case 16: pFramesOut[iFrame*channelsOut+15] = pFramesIn[iFrame*channelsIn+0];
case 15: pFramesOut[iFrame*channelsOut+14] = pFramesIn[iFrame*channelsIn+0];
case 14: pFramesOut[iFrame*channelsOut+13] = pFramesIn[iFrame*channelsIn+0];
case 13: pFramesOut[iFrame*channelsOut+12] = pFramesIn[iFrame*channelsIn+0];
case 12: pFramesOut[iFrame*channelsOut+11] = pFramesIn[iFrame*channelsIn+0];
case 11: pFramesOut[iFrame*channelsOut+10] = pFramesIn[iFrame*channelsIn+0];
case 10: pFramesOut[iFrame*channelsOut+ 9] = pFramesIn[iFrame*channelsIn+0];
case 9: pFramesOut[iFrame*channelsOut+ 8] = pFramesIn[iFrame*channelsIn+0];
case 8: pFramesOut[iFrame*channelsOut+ 7] = pFramesIn[iFrame*channelsIn+0];
case 7: pFramesOut[iFrame*channelsOut+ 6] = pFramesIn[iFrame*channelsIn+0];
case 6: pFramesOut[iFrame*channelsOut+ 5] = pFramesIn[iFrame*channelsIn+0];
case 5: pFramesOut[iFrame*channelsOut+ 4] = pFramesIn[iFrame*channelsIn+0];
case 4: pFramesOut[iFrame*channelsOut+ 3] = pFramesIn[iFrame*channelsIn+0];
case 3: pFramesOut[iFrame*channelsOut+ 2] = pFramesIn[iFrame*channelsIn+0];
case 2: pFramesOut[iFrame*channelsOut+ 1] = pFramesIn[iFrame*channelsIn+0];
case 1: pFramesOut[iFrame*channelsOut+ 0] = pFramesIn[iFrame*channelsIn+0];
}
}
} else if (channelsIn == 2) {
// TODO: Implement an optimized stereo conversion.
mal_dsp_mix_channels__inc(pFramesOut, channelsOut, channelMapOut, pFramesIn, channelsIn, channelMapIn, frameCount, mal_channel_mix_mode_basic);
} else {
// Fall back to basic mixing mode.
mal_dsp_mix_channels__inc(pFramesOut, channelsOut, channelMapOut, pFramesIn, channelsIn, channelMapIn, frameCount, mal_channel_mix_mode_basic);
}
}
}
static void mal_dsp_mix_channels(float* pFramesOut, mal_uint32 channelsOut, const mal_uint8 channelMapOut[MAL_MAX_CHANNELS], const float* pFramesIn, mal_uint32 channelsIn, const mal_uint8 channelMapIn[MAL_MAX_CHANNELS], mal_uint32 frameCount, mal_channel_mix_mode mode)
{
if (channelsIn < channelsOut) {
// Increasing the channel count.
mal_dsp_mix_channels__inc(pFramesOut, channelsOut, channelMapOut, pFramesIn, channelsIn, channelMapIn, frameCount, mode);
} else {
// Decreasing the channel count.
mal_dsp_mix_channels__dec(pFramesOut, channelsOut, channelMapOut, pFramesIn, channelsIn, channelMapIn, frameCount, mode);
}
}
mal_uint32 mal_dsp__src_on_read(mal_src* pSRC, mal_uint32 frameCount, void* pFramesOut, void* pUserData)
{
(void)pSRC;
mal_dsp* pDSP = (mal_dsp*)pUserData;
mal_assert(pDSP != NULL);
return pDSP->onRead(pDSP, frameCount, pFramesOut, pDSP->pUserDataForOnRead);
}
mal_result mal_dsp_init(mal_dsp_config* pConfig, mal_dsp_read_proc onRead, void* pUserData, mal_dsp* pDSP)
{
if (pDSP == NULL) return MAL_INVALID_ARGS;
mal_zero_object(pDSP);
pDSP->config = *pConfig;
pDSP->onRead = onRead;
pDSP->pUserDataForOnRead = pUserData;
if (pDSP->config.cacheSizeInFrames > MAL_SRC_CACHE_SIZE_IN_FRAMES || pDSP->config.cacheSizeInFrames == 0) {
pDSP->config.cacheSizeInFrames = MAL_SRC_CACHE_SIZE_IN_FRAMES;
}
if (pConfig->sampleRateIn != pConfig->sampleRateOut) {
pDSP->isSRCRequired = MAL_TRUE;
mal_src_config srcConfig;
srcConfig.sampleRateIn = pConfig->sampleRateIn;
srcConfig.sampleRateOut = pConfig->sampleRateOut;
srcConfig.formatIn = pConfig->formatIn;
srcConfig.formatOut = mal_format_f32;
srcConfig.channels = pConfig->channelsIn;
srcConfig.algorithm = mal_src_algorithm_linear;
srcConfig.cacheSizeInFrames = pConfig->cacheSizeInFrames;
mal_result result = mal_src_init(&srcConfig, mal_dsp__src_on_read, pDSP, &pDSP->src);
if (result != MAL_SUCCESS) {
return result;
}
}
pDSP->isChannelMappingRequired = MAL_FALSE;
if (pConfig->channelMapIn[0] != MAL_CHANNEL_NONE && pConfig->channelMapOut[0] != MAL_CHANNEL_NONE) { // <-- Channel mapping will be ignored if the first channel map is MAL_CHANNEL_NONE.
// When using channel mapping we need to figure out a shuffling table. The first thing to do is convert the input channel map
// so that it contains the same number of channels as the output channel count.
mal_uint32 iChannel;
mal_uint32 channelsMin = mal_min(pConfig->channelsIn, pConfig->channelsOut);
for (iChannel = 0; iChannel < channelsMin; ++iChannel) {
pDSP->channelMapInPostMix[iChannel] = pConfig->channelMapIn[iChannel];
}
// Any excess channels need to be filled with the relevant channels from the output channel map. Currently we're justing filling it with
// the first channels that are not present in the input channel map.
if (pConfig->channelsOut > pConfig->channelsIn) {
for (iChannel = pConfig->channelsIn; iChannel < pConfig->channelsOut; ++iChannel) {
mal_uint8 newChannel = MAL_CHANNEL_NONE;
for (mal_uint32 iChannelOut = 0; iChannelOut < pConfig->channelsOut; ++iChannelOut) {
mal_bool32 exists = MAL_FALSE;
for (mal_uint32 iChannelIn = 0; iChannelIn < pConfig->channelsIn; ++iChannelIn) {
if (pConfig->channelMapOut[iChannelOut] == pConfig->channelMapIn[iChannelIn]) {
exists = MAL_TRUE;
break;
}
}
if (!exists) {
newChannel = pConfig->channelMapOut[iChannelOut];
break;
}
}
pDSP->channelMapInPostMix[iChannel] = newChannel;
}
}
// We only need to do a channel mapping if the map after mixing is different to the final output map.
for (iChannel = 0; iChannel < pConfig->channelsOut; ++iChannel) {
if (pDSP->channelMapInPostMix[iChannel] != pConfig->channelMapOut[iChannel]) {
pDSP->isChannelMappingRequired = MAL_TRUE;
break;
}
}
// Now we need to create the shuffling table.
if (pDSP->isChannelMappingRequired) {
for (mal_uint32 iChannelIn = 0; iChannelIn < pConfig->channelsOut; ++iChannelIn) {
for (mal_uint32 iChannelOut = 0; iChannelOut < pConfig->channelsOut; ++iChannelOut) {
if (pDSP->channelMapInPostMix[iChannelOut] == pConfig->channelMapOut[iChannelIn]) {
pDSP->channelShuffleTable[iChannelOut] = (mal_uint8)iChannelIn;
}
}
}
}
}
if (pConfig->formatIn == pConfig->formatOut && pConfig->channelsIn == pConfig->channelsOut && pConfig->sampleRateIn == pConfig->sampleRateOut && !pDSP->isChannelMappingRequired) {
pDSP->isPassthrough = MAL_TRUE;
} else {
pDSP->isPassthrough = MAL_FALSE;
}
return MAL_SUCCESS;
}
mal_result mal_dsp_set_output_sample_rate(mal_dsp* pDSP, mal_uint32 sampleRateOut)
{
if (pDSP == NULL) return MAL_INVALID_ARGS;
// Must have a sample rate of > 0.
if (sampleRateOut == 0) {
return MAL_INVALID_ARGS;
}
pDSP->config.sampleRateOut = sampleRateOut;
// If we already have an SRC pipeline initialized we do _not_ want to re-create it. Instead we adjust it. If we didn't previously
// have an SRC pipeline in place we'll need to initialize it.
if (pDSP->isSRCRequired) {
if (pDSP->config.sampleRateIn != pDSP->config.sampleRateOut) {
mal_src_set_output_sample_rate(&pDSP->src, sampleRateOut);
} else {
pDSP->isSRCRequired = MAL_FALSE;
}
} else {
// We may need a new SRC pipeline.
if (pDSP->config.sampleRateIn != pDSP->config.sampleRateOut) {
pDSP->isSRCRequired = MAL_TRUE;
mal_src_config srcConfig;
srcConfig.sampleRateIn = pDSP->config.sampleRateIn;
srcConfig.sampleRateOut = pDSP->config.sampleRateOut;
srcConfig.formatIn = pDSP->config.formatIn;
srcConfig.formatOut = mal_format_f32;
srcConfig.channels = pDSP->config.channelsIn;
srcConfig.algorithm = mal_src_algorithm_linear;
srcConfig.cacheSizeInFrames = pDSP->config.cacheSizeInFrames;
mal_result result = mal_src_init(&srcConfig, mal_dsp__src_on_read, pDSP, &pDSP->src);
if (result != MAL_SUCCESS) {
return result;
}
} else {
pDSP->isSRCRequired = MAL_FALSE;
}
}
// Update whether or not the pipeline is a passthrough.
if (pDSP->config.formatIn == pDSP->config.formatOut && pDSP->config.channelsIn == pDSP->config.channelsOut && pDSP->config.sampleRateIn == pDSP->config.sampleRateOut && !pDSP->isChannelMappingRequired) {
pDSP->isPassthrough = MAL_TRUE;
} else {
pDSP->isPassthrough = MAL_FALSE;
}
return MAL_SUCCESS;
}
mal_uint32 mal_dsp_read_frames(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut)
{
return mal_dsp_read_frames_ex(pDSP, frameCount, pFramesOut, MAL_FALSE);
}
mal_uint32 mal_dsp_read_frames_ex(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut, mal_bool32 flush)
{
if (pDSP == NULL || pFramesOut == NULL) return 0;
// Fast path.
if (pDSP->isPassthrough) {
return pDSP->onRead(pDSP, frameCount, pFramesOut, pDSP->pUserDataForOnRead);
}
// Slower path - where the real work is done.
mal_uint8 pFrames[2][MAL_MAX_CHANNELS * 512 * MAL_MAX_SAMPLE_SIZE_IN_BYTES];
mal_format pFramesFormat[2];
mal_uint32 iFrames = 0; // <-- Used as an index into pFrames and cycles between 0 and 1.
mal_uint32 totalFramesRead = 0;
while (frameCount > 0) {
iFrames = 0;
mal_uint32 framesToRead = mal_countof(pFrames[0]) / (mal_max(pDSP->config.channelsIn, pDSP->config.channelsOut) * MAL_MAX_SAMPLE_SIZE_IN_BYTES);
if (framesToRead > frameCount) {
framesToRead = frameCount;
}
// The initial filling of sample data depends on whether or not we are using SRC.
mal_uint32 framesRead = 0;
if (pDSP->isSRCRequired) {
framesRead = mal_src_read_frames_ex(&pDSP->src, framesToRead, pFrames[iFrames], flush);
pFramesFormat[iFrames] = pDSP->src.config.formatOut; // Should always be f32.
} else {
framesRead = pDSP->onRead(pDSP, framesToRead, pFrames[iFrames], pDSP->pUserDataForOnRead);
pFramesFormat[iFrames] = pDSP->config.formatIn;
}
if (framesRead == 0) {
break;
}
// Channel mixing. The input format must be in f32 which may require a conversion.
if (pDSP->config.channelsIn != pDSP->config.channelsOut) {
if (pFramesFormat[iFrames] != mal_format_f32) {
mal_pcm_convert(pFrames[(iFrames + 1) % 2], mal_format_f32, pFrames[iFrames], pDSP->config.formatIn, framesRead * pDSP->config.channelsIn);
iFrames = (iFrames + 1) % 2;
pFramesFormat[iFrames] = mal_format_f32;
}
mal_dsp_mix_channels((float*)(pFrames[(iFrames + 1) % 2]), pDSP->config.channelsOut, pDSP->config.channelMapOut, (const float*)(pFrames[iFrames]), pDSP->config.channelsIn, pDSP->config.channelMapIn, framesRead, mal_channel_mix_mode_blend);
iFrames = (iFrames + 1) % 2;
pFramesFormat[iFrames] = mal_format_f32;
}
// Channel mapping.
if (pDSP->isChannelMappingRequired) {
for (mal_uint32 i = 0; i < framesRead; ++i) {
mal_rearrange_channels(pFrames[iFrames] + (i * pDSP->config.channelsOut * mal_get_sample_size_in_bytes(pFramesFormat[iFrames])), pDSP->config.channelsOut, pDSP->channelShuffleTable, pFramesFormat[iFrames]);
}
}
// Final conversion to output format.
mal_pcm_convert(pFramesOut, pDSP->config.formatOut, pFrames[iFrames], pFramesFormat[iFrames], framesRead * pDSP->config.channelsOut);
pFramesOut = (mal_uint8*)pFramesOut + (framesRead * pDSP->config.channelsOut * mal_get_sample_size_in_bytes(pDSP->config.formatOut));
frameCount -= framesRead;
totalFramesRead += framesRead;
}
return totalFramesRead;
}
mal_uint32 mal_calculate_frame_count_after_src(mal_uint32 sampleRateOut, mal_uint32 sampleRateIn, mal_uint32 frameCountIn)
{
double srcRatio = (double)sampleRateOut / sampleRateIn;
double frameCountOutF = frameCountIn * srcRatio;
mal_uint32 frameCountOut = (mal_uint32)frameCountOutF;
// If the output frame count is fractional, make sure we add an extra frame to ensure there's enough room for that last sample.
if ((frameCountOutF - frameCountOut) > 0.0) {
frameCountOut += 1;
}
return frameCountOut;
}
typedef struct
{
const void* pDataIn;
mal_format formatIn;
mal_uint32 channelsIn;
mal_uint32 totalFrameCount;
mal_uint32 iNextFrame;
} mal_convert_frames__data;
mal_uint32 mal_convert_frames__on_read(mal_dsp* pDSP, mal_uint32 frameCount, void* pFramesOut, void* pUserData)
{
(void)pDSP;
mal_convert_frames__data* pData = (mal_convert_frames__data*)pUserData;
mal_assert(pData != NULL);
mal_assert(pData->totalFrameCount >= pData->iNextFrame);
mal_uint32 framesToRead = frameCount;
mal_uint32 framesRemaining = (pData->totalFrameCount - pData->iNextFrame);
if (framesToRead > framesRemaining) {
framesToRead = framesRemaining;
}
mal_uint32 frameSizeInBytes = mal_get_sample_size_in_bytes(pData->formatIn) * pData->channelsIn;
mal_copy_memory(pFramesOut, (const mal_uint8*)pData->pDataIn + (frameSizeInBytes * pData->iNextFrame), frameSizeInBytes * framesToRead);
pData->iNextFrame += framesToRead;
return framesToRead;
}
mal_uint32 mal_convert_frames(void* pOut, mal_format formatOut, mal_uint32 channelsOut, mal_uint32 sampleRateOut, const void* pIn, mal_format formatIn, mal_uint32 channelsIn, mal_uint32 sampleRateIn, mal_uint32 frameCountIn)
{
if (frameCountIn == 0) {
return 0;
}
mal_uint32 frameCountOut = mal_calculate_frame_count_after_src(sampleRateOut, sampleRateIn, frameCountIn);
if (pOut == NULL) {
return frameCountOut;
}
mal_convert_frames__data data;
data.pDataIn = pIn;
data.formatIn = formatIn;
data.channelsIn = channelsIn;
data.totalFrameCount = frameCountIn;
data.iNextFrame = 0;
mal_dsp_config config;
mal_zero_object(&config);
config.formatIn = formatIn;
config.channelsIn = channelsIn;
config.sampleRateIn = sampleRateIn;
config.formatOut = formatOut;
config.channelsOut = channelsOut;
config.sampleRateOut = sampleRateOut;
mal_dsp dsp;
if (mal_dsp_init(&config, mal_convert_frames__on_read, &data, &dsp) != MAL_SUCCESS) {
return 0;
}
return mal_dsp_read_frames_ex(&dsp, frameCountOut, pOut, MAL_TRUE);
}
mal_dsp_config mal_dsp_config_init(mal_format formatIn, mal_uint32 channelsIn, mal_uint32 sampleRateIn, mal_format formatOut, mal_uint32 channelsOut, mal_uint32 sampleRateOut)
{
mal_dsp_config config;
mal_zero_object(&config);
config.formatIn = formatIn;
config.channelsIn = channelsIn;
config.sampleRateIn = sampleRateIn;
config.formatOut = formatOut;
config.channelsOut = channelsOut;
config.sampleRateOut = sampleRateOut;
return config;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Miscellaneous Helpers
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const char* mal_get_backend_name(mal_backend backend)
{
switch (backend)
{
case mal_backend_null: return "Null";
case mal_backend_wasapi: return "WASAPI";
case mal_backend_dsound: return "DirectSound";
case mal_backend_winmm: return "WinMM";
case mal_backend_alsa: return "ALSA";
//case mal_backend_pulse: return "PulseAudio";
//case mal_backend_jack: return "JACK";
//case mal_backend_coreaudio: return "Core Audio";
case mal_backend_oss: return "OSS";
case mal_backend_opensl: return "OpenSL|ES";
case mal_backend_openal: return "OpenAL";
case mal_backend_sdl: return "SDL";
default: return "Unknown";
}
}
const char* mal_get_format_name(mal_format format)
{
switch (format)
{
case mal_format_unknown: return "Unknown";
case mal_format_u8: return "8-bit Unsigned Integer";
case mal_format_s16: return "16-bit Signed Integer";
case mal_format_s24: return "24-bit Signed Integer (Tightly Packed)";
case mal_format_s32: return "32-bit Signed Integer";
case mal_format_f32: return "32-bit IEEE Floating Point";
default: return "Invalid";
}
}
void mal_blend_f32(float* pOut, float* pInA, float* pInB, float factor, mal_uint32 channels)
{
for (mal_uint32 i = 0; i < channels; ++i) {
pOut[i] = mal_mix_f32(pInA[i], pInB[i], factor);
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
//
// AUTO-GENERATED
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// FORMAT CONVERSION
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void mal_pcm_u8_to_s16(short* pOut, const unsigned char* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x - 128;
r = r << 8;
pOut[i] = (short)r;
}
}
void mal_pcm_u8_to_s24(void* pOut, const unsigned char* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x - 128;
r = r << 16;
((unsigned char*)pOut)[(i*3)+0] = (unsigned char)(r & 0xFF); ((unsigned char*)pOut)[(i*3)+1] = (unsigned char)((r & 0xFF00) >> 8); ((unsigned char*)pOut)[(i*3)+2] = (unsigned char)((r & 0xFF0000) >> 16);
}
}
void mal_pcm_u8_to_s32(int* pOut, const unsigned char* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x - 128;
r = r << 24;
pOut[i] = (int)r;
}
}
void mal_pcm_u8_to_f32(float* pOut, const unsigned char* pIn, unsigned int count)
{
float r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x * 0.00784313725490196078f;
r = r - 1;
pOut[i] = (float)r;
}
}
void mal_pcm_s16_to_u8(unsigned char* pOut, const short* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x >> 8;
r = r + 128;
pOut[i] = (unsigned char)r;
}
}
void mal_pcm_s16_to_s24(void* pOut, const short* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x << 8;
((unsigned char*)pOut)[(i*3)+0] = (unsigned char)(r & 0xFF); ((unsigned char*)pOut)[(i*3)+1] = (unsigned char)((r & 0xFF00) >> 8); ((unsigned char*)pOut)[(i*3)+2] = (unsigned char)((r & 0xFF0000) >> 16);
}
}
void mal_pcm_s16_to_s32(int* pOut, const short* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x << 16;
pOut[i] = (int)r;
}
}
void mal_pcm_s16_to_f32(float* pOut, const short* pIn, unsigned int count)
{
float r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = (float)(x + 32768);
r = r * 0.00003051804379339284f;
r = r - 1;
pOut[i] = (float)r;
}
}
void mal_pcm_s24_to_u8(unsigned char* pOut, const void* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = ((int)(((unsigned int)(((unsigned char*)pIn)[i*3+0]) << 8) | ((unsigned int)(((unsigned char*)pIn)[i*3+1]) << 16) | ((unsigned int)(((unsigned char*)pIn)[i*3+2])) << 24)) >> 8;
r = x >> 16;
r = r + 128;
pOut[i] = (unsigned char)r;
}
}
void mal_pcm_s24_to_s16(short* pOut, const void* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = ((int)(((unsigned int)(((unsigned char*)pIn)[i*3+0]) << 8) | ((unsigned int)(((unsigned char*)pIn)[i*3+1]) << 16) | ((unsigned int)(((unsigned char*)pIn)[i*3+2])) << 24)) >> 8;
r = x >> 8;
pOut[i] = (short)r;
}
}
void mal_pcm_s24_to_s32(int* pOut, const void* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = ((int)(((unsigned int)(((unsigned char*)pIn)[i*3+0]) << 8) | ((unsigned int)(((unsigned char*)pIn)[i*3+1]) << 16) | ((unsigned int)(((unsigned char*)pIn)[i*3+2])) << 24)) >> 8;
r = x << 8;
pOut[i] = (int)r;
}
}
void mal_pcm_s24_to_f32(float* pOut, const void* pIn, unsigned int count)
{
float r;
for (unsigned int i = 0; i < count; ++i) {
int x = ((int)(((unsigned int)(((unsigned char*)pIn)[i*3+0]) << 8) | ((unsigned int)(((unsigned char*)pIn)[i*3+1]) << 16) | ((unsigned int)(((unsigned char*)pIn)[i*3+2])) << 24)) >> 8;
r = (float)(x + 8388608);
r = r * 0.00000011920929665621f;
r = r - 1;
pOut[i] = (float)r;
}
}
void mal_pcm_s32_to_u8(unsigned char* pOut, const int* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x >> 24;
r = r + 128;
pOut[i] = (unsigned char)r;
}
}
void mal_pcm_s32_to_s16(short* pOut, const int* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x >> 16;
pOut[i] = (short)r;
}
}
void mal_pcm_s32_to_s24(void* pOut, const int* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
r = x >> 8;
((unsigned char*)pOut)[(i*3)+0] = (unsigned char)(r & 0xFF); ((unsigned char*)pOut)[(i*3)+1] = (unsigned char)((r & 0xFF00) >> 8); ((unsigned char*)pOut)[(i*3)+2] = (unsigned char)((r & 0xFF0000) >> 16);
}
}
void mal_pcm_s32_to_f32(float* pOut, const int* pIn, unsigned int count)
{
float r;
for (unsigned int i = 0; i < count; ++i) {
int x = pIn[i];
double t;
t = (double)(x + 2147483647);
t = t + 1;
t = t * 0.0000000004656612873077392578125;
r = (float)(t - 1);
pOut[i] = (float)r;
}
}
void mal_pcm_f32_to_u8(unsigned char* pOut, const float* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
float x = pIn[i];
float c;
c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));
c = c + 1;
r = (int)(c * 127.5f);
pOut[i] = (unsigned char)r;
}
}
void mal_pcm_f32_to_s16(short* pOut, const float* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
float x = pIn[i];
float c;
c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));
c = c + 1;
r = (int)(c * 32767.5f);
r = r - 32768;
pOut[i] = (short)r;
}
}
void mal_pcm_f32_to_s24(void* pOut, const float* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
float x = pIn[i];
float c;
c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));
c = c + 1;
r = (int)(c * 8388607.5f);
r = r - 8388608;
((unsigned char*)pOut)[(i*3)+0] = (unsigned char)(r & 0xFF); ((unsigned char*)pOut)[(i*3)+1] = (unsigned char)((r & 0xFF00) >> 8); ((unsigned char*)pOut)[(i*3)+2] = (unsigned char)((r & 0xFF0000) >> 16);
}
}
void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
{
int r;
for (unsigned int i = 0; i < count; ++i) {
float x = pIn[i];
float c;
mal_int64 t;
c = ((x < -1) ? -1 : ((x > 1) ? 1 : x));
c = c + 1;
t = (mal_int64)(c * 2147483647.5);
t = t - 2147483647;
r = (int)(t - 1);
pOut[i] = (int)r;
}
}
#endif
// REVISION HISTORY
// ================
//
// v0.6b - 2018-02-03
// - Fix some warnings when compiling with Visual C++.
//
// v0.6a - 2018-01-26
// - Fix errors with channel mixing when increasing the channel count.
// - Improvements to the build system for the OpenAL backend.
// - Documentation fixes.
//
// v0.6 - 2017-12-08
// - API CHANGE: Expose and improve mutex APIs. If you were using the mutex APIs before this version you'll
// need to update.
// - API CHANGE: SRC and DSP callbacks now take a pointer to a mal_src and mal_dsp object respectively.
// - API CHANGE: Improvements to event and thread APIs. These changes make these APIs more consistent.
// - Add support for SDL and Emscripten.
// - Simplify the build system further for when development packages for various backends are not installed.
// With this change, when the compiler supports __has_include, backends without the relevant development
// packages installed will be ignored. This fixes the build for old versions of MinGW.
// - Fixes to the Android build.
// - Add mal_convert_frames(). This is a high-level helper API for performing a one-time, bulk conversion of
// audio data to a different format.
// - Improvements to f32 -> u8/s16/s24/s32 conversion routines.
// - Fix a bug where the wrong value is returned from mal_device_start() for the OpenSL backend.
// - Fixes and improvements for Raspberry Pi.
// - Warning fixes.
//
// v0.5 - 2017-11-11
// - API CHANGE: The mal_context_init() function now takes a pointer to a mal_context_config object for
// configuring the context. The works in the same kind of way as the device config. The rationale for this
// change is to give applications better control over context-level properties, add support for backend-
// specific configurations, and support extensibility without breaking the API.
// - API CHANGE: The alsa.preferPlugHW device config variable has been removed since it's not really useful for
// anything anymore.
// - ALSA: By default, device enumeration will now only enumerate over unique card/device pairs. Applications
// can enable verbose device enumeration by setting the alsa.useVerboseDeviceEnumeration context config
// variable.
// - ALSA: When opening a device in shared mode (the default), the dmix/dsnoop plugin will be prioritized. If
// this fails it will fall back to the hw plugin. With this change the preferExclusiveMode config is now
// honored. Note that this does not happen when alsa.useVerboseDeviceEnumeration is set to true (see above)
// which is by design.
// - ALSA: Add support for excluding the "null" device using the alsa.excludeNullDevice context config variable.
// - ALSA: Fix a bug with channel mapping which causes an assertion to fail.
// - Fix errors with enumeration when pInfo is set to NULL.
// - OSS: Fix a bug when starting a device when the client sends 0 samples for the initial buffer fill.
//
// v0.4 - 2017-11-05
// - API CHANGE: The log callback is now per-context rather than per-device and as is thus now passed to
// mal_context_init(). The rationale for this change is that it allows applications to capture diagnostic
// messages at the context level. Previously this was only available at the device level.
// - API CHANGE: The device config passed to mal_device_init() is now const.
// - Added support for OSS which enables support on BSD platforms.
// - Added support for WinMM (waveOut/waveIn).
// - Added support for UWP (Universal Windows Platform) applications. Currently C++ only.
// - Added support for exclusive mode for selected backends. Currently supported on WASAPI.
// - POSIX builds no longer require explicit linking to libpthread (-lpthread).
// - ALSA: Explicit linking to libasound (-lasound) is no longer required.
// - ALSA: Latency improvements.
// - ALSA: Use MMAP mode where available. This can be disabled with the alsa.noMMap config.
// - ALSA: Use "hw" devices instead of "plughw" devices by default. This can be disabled with the
// alsa.preferPlugHW config.
// - WASAPI is now the highest priority backend on Windows platforms.
// - Fixed an error with sample rate conversion which was causing crackling when capturing.
// - Improved error handling.
// - Improved compiler support.
// - Miscellaneous bug fixes.
//
// v0.3 - 2017-06-19
// - API CHANGE: Introduced the notion of a context. The context is the highest level object and is required for
// enumerating and creating devices. Now, applications must first create a context, and then use that to
// enumerate and create devices. The reason for this change is to ensure device enumeration and creation is
// tied to the same backend. In addition, some backends are better suited to this design.
// - API CHANGE: Removed the rewinding APIs because they're too inconsistent across the different backends, hard
// to test and maintain, and just generally unreliable.
// - Added helper APIs for initializing mal_device_config objects.
// - Null Backend: Fixed a crash when recording.
// - Fixed build for UWP.
// - Added support for f32 formats to the OpenSL|ES backend.
// - Added initial implementation of the WASAPI backend.
// - Added initial implementation of the OpenAL backend.
// - Added support for low quality linear sample rate conversion.
// - Added early support for basic channel mapping.
//
// v0.2 - 2016-10-28
// - API CHANGE: Add user data pointer as the last parameter to mal_device_init(). The rationale for this
// change is to ensure the logging callback has access to the user data during initialization.
// - API CHANGE: Have device configuration properties be passed to mal_device_init() via a structure. Rationale:
// 1) The number of parameters is just getting too much.
// 2) It makes it a bit easier to add new configuration properties in the future. In particular, there's a
// chance there will be support added for backend-specific properties.
// - Dropped support for f64, A-law and Mu-law formats since they just aren't common enough to justify the
// added maintenance cost.
// - DirectSound: Increased the default buffer size for capture devices.
// - Added initial implementation of the OpenSL|ES backend.
//
// v0.1 - 2016-10-21
// - Initial versioned release.
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
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 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.
For more information, please refer to <http://unlicense.org/>
*/
| 42.237944 | 302 | 0.654803 | [
"object"
] |
d69cb215af610a61668d5657017b4f3517f63c2b | 1,370 | h | C | src/EntityRenderer.h | VenKamikaze/BitRiot | 0b3c9cf1cebc9f60783e353b2588d17e37bd1e8a | [
"Apache-2.0"
] | 14 | 2016-02-09T13:46:18.000Z | 2021-11-26T17:04:32.000Z | src/EntityRenderer.h | VenKamikaze/BitRiot | 0b3c9cf1cebc9f60783e353b2588d17e37bd1e8a | [
"Apache-2.0"
] | 15 | 2016-04-23T10:59:28.000Z | 2016-07-23T01:41:13.000Z | src/EntityRenderer.h | VenKamikaze/BitRiot | 0b3c9cf1cebc9f60783e353b2588d17e37bd1e8a | [
"Apache-2.0"
] | 7 | 2016-06-06T09:37:45.000Z | 2020-10-18T12:31:03.000Z | // EntityRenderer.h
#ifndef _ENTITYRENDERERCLASS
#define _ENTITYRENDERERCLASS
// An EntityRender object contains all the
// data such as the DD surface and number of animation
// frames per animation sequence, as well as methods to render
//#include <ddraw.h>
//#include "ddutil.h"
#include "Map.h"
#include "DataReader.h"
#include "SDLHelper.h"
const int NUM_TEAMS = 5;
class EntityRenderer
{
public:
EntityRenderer(SDL_Surface* sdl_primary, const char * filename);
~EntityRenderer();
static const int MAX_ANIM_STATES = 5;
static const int MAX_ANIM_FRAMES = 16;
static Uint32 TEAM_HIGHLIGHT_COLOR[NUM_TEAMS];
static Uint32 TEAM_BASE_COLOR[NUM_TEAMS];
static Uint32 TEAM_SHADOW_COLOR[NUM_TEAMS];
enum ANIM_STATE
{ IDLE = 0, MOVE_UP, MOVE_DOWN, MOVE_LEFT, MOVE_RIGHT };
bool render(SDL_Surface* dest, int x, int y, int state, int animFrame, int team);
int getNumFrames(int team)
{
return m_numFrames[team];
}
bool replaceTeamSurfaceWithImage(SDL_Surface* sdl_primary, const char * filename, int team);
private:
void setupColours(SDL_Surface* sdl_primary);
SDL_Surface* m_animSurface[NUM_TEAMS]; // surface pointers for different teams
int m_numFrames[NUM_TEAMS]; // number of animation frames for each team
void changeToTeamColour(SDL_Surface* surface, int team);
};
#endif
| 25.849057 | 96 | 0.732847 | [
"render",
"object"
] |
d69f64a814eaa9c942099e93bf3af433f1f7265f | 18,490 | h | C | REDSI_1160929_1161573/boost_1_67_0/tools/build/src/engine/boehm_gc/include/private/gc_pmark.h | Wultyc/ISEP_1718_2A2S_REDSI_TrabalhoGrupo | eb0f7ef64e188fe871f47c2ef9cdef36d8a66bc8 | [
"MIT"
] | 198 | 2015-01-13T05:47:18.000Z | 2022-03-09T04:46:46.000Z | libs/boost/tools/build/src/engine/boehm_gc/include/private/gc_pmark.h | flingone/frameworks_base_cmds_remoted | 4509d9f0468137ed7fd8d100179160d167e7d943 | [
"Apache-2.0"
] | 9 | 2015-01-28T16:33:19.000Z | 2020-04-12T23:03:28.000Z | libs/boost/tools/build/src/engine/boehm_gc/include/private/gc_pmark.h | flingone/frameworks_base_cmds_remoted | 4509d9f0468137ed7fd8d100179160d167e7d943 | [
"Apache-2.0"
] | 139 | 2015-01-15T20:09:31.000Z | 2022-01-31T15:21:16.000Z | /*
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
* Copyright (c) 2001 by Hewlett-Packard Company. All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
*
* Permission is hereby granted to use or copy this program
* for any purpose, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* Private declarations of GC marker data structures and macros */
/*
* Declarations of mark stack. Needed by marker and client supplied mark
* routines. Transitively include gc_priv.h.
* (Note that gc_priv.h should not be included before this, since this
* includes dbg_mlc.h, which wants to include gc_priv.h AFTER defining
* I_HIDE_POINTERS.)
*/
#ifndef GC_PMARK_H
# define GC_PMARK_H
# if defined(KEEP_BACK_PTRS) || defined(PRINT_BLACK_LIST)
# include "dbg_mlc.h"
# endif
# ifndef GC_MARK_H
# include "../gc_mark.h"
# endif
# ifndef GC_PRIVATE_H
# include "gc_priv.h"
# endif
/* The real declarations of the following is in gc_priv.h, so that */
/* we can avoid scanning the following table. */
/*
extern mark_proc GC_mark_procs[MAX_MARK_PROCS];
*/
/*
* Mark descriptor stuff that should remain private for now, mostly
* because it's hard to export WORDSZ without including gcconfig.h.
*/
# define BITMAP_BITS (WORDSZ - GC_DS_TAG_BITS)
# define PROC(descr) \
(GC_mark_procs[((descr) >> GC_DS_TAG_BITS) & (GC_MAX_MARK_PROCS-1)])
# define ENV(descr) \
((descr) >> (GC_DS_TAG_BITS + GC_LOG_MAX_MARK_PROCS))
# define MAX_ENV \
(((word)1 << (WORDSZ - GC_DS_TAG_BITS - GC_LOG_MAX_MARK_PROCS)) - 1)
extern unsigned GC_n_mark_procs;
/* Number of mark stack entries to discard on overflow. */
#define GC_MARK_STACK_DISCARDS (INITIAL_MARK_STACK_SIZE/8)
typedef struct GC_ms_entry {
ptr_t mse_start; /* First word of object */
GC_word mse_descr; /* Descriptor; low order two bits are tags, */
/* identifying the upper 30 bits as one of the */
/* following: */
} mse;
extern size_t GC_mark_stack_size;
extern mse * GC_mark_stack_limit;
#ifdef PARALLEL_MARK
extern mse * volatile GC_mark_stack_top;
#else
extern mse * GC_mark_stack_top;
#endif
extern mse * GC_mark_stack;
#ifdef PARALLEL_MARK
/*
* Allow multiple threads to participate in the marking process.
* This works roughly as follows:
* The main mark stack never shrinks, but it can grow.
*
* The initiating threads holds the GC lock, and sets GC_help_wanted.
*
* Other threads:
* 1) update helper_count (while holding mark_lock.)
* 2) allocate a local mark stack
* repeatedly:
* 3) Steal a global mark stack entry by atomically replacing
* its descriptor with 0.
* 4) Copy it to the local stack.
* 5) Mark on the local stack until it is empty, or
* it may be profitable to copy it back.
* 6) If necessary, copy local stack to global one,
* holding mark lock.
* 7) Stop when the global mark stack is empty.
* 8) decrement helper_count (holding mark_lock).
*
* This is an experiment to see if we can do something along the lines
* of the University of Tokyo SGC in a less intrusive, though probably
* also less performant, way.
*/
void GC_do_parallel_mark();
/* inititate parallel marking. */
extern GC_bool GC_help_wanted; /* Protected by mark lock */
extern unsigned GC_helper_count; /* Number of running helpers. */
/* Protected by mark lock */
extern unsigned GC_active_count; /* Number of active helpers. */
/* Protected by mark lock */
/* May increase and decrease */
/* within each mark cycle. But */
/* once it returns to 0, it */
/* stays zero for the cycle. */
/* GC_mark_stack_top is also protected by mark lock. */
/*
* GC_notify_all_marker() is used when GC_help_wanted is first set,
* when the last helper becomes inactive,
* when something is added to the global mark stack, and just after
* GC_mark_no is incremented.
* This could be split into multiple CVs (and probably should be to
* scale to really large numbers of processors.)
*/
#endif /* PARALLEL_MARK */
/* Return a pointer to within 1st page of object. */
/* Set *new_hdr_p to corr. hdr. */
ptr_t GC_find_start(ptr_t current, hdr *hhdr, hdr **new_hdr_p);
mse * GC_signal_mark_stack_overflow(mse *msp);
/* Push the object obj with corresponding heap block header hhdr onto */
/* the mark stack. */
# define PUSH_OBJ(obj, hhdr, mark_stack_top, mark_stack_limit) \
{ \
register word _descr = (hhdr) -> hb_descr; \
\
if (_descr != 0) { \
mark_stack_top++; \
if (mark_stack_top >= mark_stack_limit) { \
mark_stack_top = GC_signal_mark_stack_overflow(mark_stack_top); \
} \
mark_stack_top -> mse_start = (obj); \
mark_stack_top -> mse_descr = _descr; \
} \
}
/* Push the contents of current onto the mark stack if it is a valid */
/* ptr to a currently unmarked object. Mark it. */
/* If we assumed a standard-conforming compiler, we could probably */
/* generate the exit_label transparently. */
# define PUSH_CONTENTS(current, mark_stack_top, mark_stack_limit, \
source, exit_label) \
{ \
hdr * my_hhdr; \
\
HC_GET_HDR(current, my_hhdr, source, exit_label); \
PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, \
source, exit_label, my_hhdr, TRUE); \
exit_label: ; \
}
/* Set mark bit, exit if it was already set. */
# ifdef USE_MARK_BITS
# ifdef PARALLEL_MARK
/* The following may fail to exit even if the bit was already set. */
/* For our uses, that's benign: */
# define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \
{ \
if (!(*(addr) & (mask))) { \
AO_or((AO_t *)(addr), (mask); \
} else { \
goto label; \
} \
}
# else
# define OR_WORD_EXIT_IF_SET(addr, bits, exit_label) \
{ \
word old = *(addr); \
word my_bits = (bits); \
if (old & my_bits) goto exit_label; \
*(addr) = (old | my_bits); \
}
# endif /* !PARALLEL_MARK */
# define SET_MARK_BIT_EXIT_IF_SET(hhdr,bit_no,exit_label) \
{ \
word * mark_word_addr = hhdr -> hb_marks + divWORDSZ(bit_no); \
\
OR_WORD_EXIT_IF_SET(mark_word_addr, (word)1 << modWORDSZ(bit_no), \
exit_label); \
}
# endif
#ifdef USE_MARK_BYTES
# if defined(I386) && defined(__GNUC__)
# define LONG_MULT(hprod, lprod, x, y) { \
asm("mull %2" : "=a"(lprod), "=d"(hprod) : "g"(y), "0"(x)); \
}
# else /* No in-line X86 assembly code */
# define LONG_MULT(hprod, lprod, x, y) { \
unsigned long long prod = (unsigned long long)x \
* (unsigned long long)y; \
hprod = prod >> 32; \
lprod = (unsigned32)prod; \
}
# endif
/* There is a race here, and we may set */
/* the bit twice in the concurrent case. This can result in the */
/* object being pushed twice. But that's only a performance issue. */
# define SET_MARK_BIT_EXIT_IF_SET(hhdr,bit_no,exit_label) \
{ \
char * mark_byte_addr = (char *)hhdr -> hb_marks + (bit_no); \
char mark_byte = *mark_byte_addr; \
\
if (mark_byte) goto exit_label; \
*mark_byte_addr = 1; \
}
#endif /* USE_MARK_BYTES */
#ifdef PARALLEL_MARK
# define INCR_MARKS(hhdr) \
AO_store(&(hhdr -> hb_n_marks), AO_load(&(hhdr -> hb_n_marks))+1);
#else
# define INCR_MARKS(hhdr) ++(hhdr -> hb_n_marks)
#endif
#ifdef ENABLE_TRACE
# define TRACE(source, cmd) \
if (GC_trace_addr != 0 && (ptr_t)(source) == GC_trace_addr) cmd
# define TRACE_TARGET(target, cmd) \
if (GC_trace_addr != 0 && (target) == *(ptr_t *)GC_trace_addr) cmd
#else
# define TRACE(source, cmd)
# define TRACE_TARGET(source, cmd)
#endif
/* If the mark bit corresponding to current is not set, set it, and */
/* push the contents of the object on the mark stack. Current points */
/* to the bginning of the object. We rely on the fact that the */
/* preceding header calculation will succeed for a pointer past the */
/* forst page of an object, only if it is in fact a valid pointer */
/* to the object. Thus we can omit the otherwise necessary tests */
/* here. Note in particular tha the "displ" value is the displacement */
/* from the beggining of the heap block, which may itself be in the */
/* interior of a large object. */
#ifdef MARK_BIT_PER_GRANULE
# define PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, \
source, exit_label, hhdr, do_offset_check) \
{ \
size_t displ = HBLKDISPL(current); /* Displacement in block; in bytes. */\
/* displ is always within range. If current doesn't point to */ \
/* first block, then we are in the all_interior_pointers case, and */ \
/* it is safe to use any displacement value. */ \
size_t gran_displ = BYTES_TO_GRANULES(displ); \
size_t gran_offset = hhdr -> hb_map[gran_displ]; \
size_t byte_offset = displ & (GRANULE_BYTES - 1); \
ptr_t base = current; \
/* The following always fails for large block references. */ \
if (EXPECT((gran_offset | byte_offset) != 0, FALSE)) { \
if (hhdr -> hb_large_block) { \
/* gran_offset is bogus. */ \
size_t obj_displ; \
base = (ptr_t)(hhdr -> hb_block); \
obj_displ = (ptr_t)(current) - base; \
if (obj_displ != displ) { \
GC_ASSERT(obj_displ < hhdr -> hb_sz); \
/* Must be in all_interior_pointer case, not first block */ \
/* already did validity check on cache miss. */ \
; \
} else { \
if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
goto exit_label; \
} \
} \
gran_displ = 0; \
GC_ASSERT(hhdr -> hb_sz > HBLKSIZE || \
hhdr -> hb_block == HBLKPTR(current)); \
GC_ASSERT((ptr_t)(hhdr -> hb_block) <= (ptr_t) current); \
} else { \
size_t obj_displ = GRANULES_TO_BYTES(gran_offset) \
+ byte_offset; \
if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
goto exit_label; \
} \
gran_displ -= gran_offset; \
base -= obj_displ; \
} \
} \
GC_ASSERT(hhdr == GC_find_header(base)); \
GC_ASSERT(gran_displ % BYTES_TO_GRANULES(hhdr -> hb_sz) == 0); \
TRACE(source, GC_log_printf("GC:%d: passed validity tests\n",GC_gc_no)); \
SET_MARK_BIT_EXIT_IF_SET(hhdr, gran_displ, exit_label); \
TRACE(source, GC_log_printf("GC:%d: previously unmarked\n",GC_gc_no)); \
TRACE_TARGET(base, \
GC_log_printf("GC:%d: marking %p from %p instead\n", GC_gc_no, \
base, source)); \
INCR_MARKS(hhdr); \
GC_STORE_BACK_PTR((ptr_t)source, base); \
PUSH_OBJ(base, hhdr, mark_stack_top, mark_stack_limit); \
}
#endif /* MARK_BIT_PER_GRANULE */
#ifdef MARK_BIT_PER_OBJ
# define PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, \
source, exit_label, hhdr, do_offset_check) \
{ \
size_t displ = HBLKDISPL(current); /* Displacement in block; in bytes. */\
unsigned32 low_prod, high_prod, offset_fraction; \
unsigned32 inv_sz = hhdr -> hb_inv_sz; \
ptr_t base = current; \
LONG_MULT(high_prod, low_prod, displ, inv_sz); \
/* product is > and within sz_in_bytes of displ * sz_in_bytes * 2**32 */ \
if (EXPECT(low_prod >> 16 != 0, FALSE)) { \
FIXME: fails if offset is a multiple of HBLKSIZE which becomes 0 \
if (inv_sz == LARGE_INV_SZ) { \
size_t obj_displ; \
base = (ptr_t)(hhdr -> hb_block); \
obj_displ = (ptr_t)(current) - base; \
if (obj_displ != displ) { \
GC_ASSERT(obj_displ < hhdr -> hb_sz); \
/* Must be in all_interior_pointer case, not first block */ \
/* already did validity check on cache miss. */ \
; \
} else { \
if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
goto exit_label; \
} \
} \
GC_ASSERT(hhdr -> hb_sz > HBLKSIZE || \
hhdr -> hb_block == HBLKPTR(current)); \
GC_ASSERT((ptr_t)(hhdr -> hb_block) < (ptr_t) current); \
} else { \
/* Accurate enough if HBLKSIZE <= 2**15. */ \
GC_ASSERT(HBLKSIZE <= (1 << 15)); \
size_t obj_displ = (((low_prod >> 16) + 1) * (hhdr -> hb_sz)) >> 16; \
if (do_offset_check && !GC_valid_offsets[obj_displ]) { \
GC_ADD_TO_BLACK_LIST_NORMAL(current, source); \
goto exit_label; \
} \
base -= obj_displ; \
} \
} \
/* May get here for pointer to start of block not at */ \
/* beginning of object. If so, it's valid, and we're fine. */ \
GC_ASSERT(high_prod >= 0 && high_prod <= HBLK_OBJS(hhdr -> hb_sz)); \
TRACE(source, GC_log_printf("GC:%d: passed validity tests\n",GC_gc_no)); \
SET_MARK_BIT_EXIT_IF_SET(hhdr, high_prod, exit_label); \
TRACE(source, GC_log_printf("GC:%d: previously unmarked\n",GC_gc_no)); \
TRACE_TARGET(base, \
GC_log_printf("GC:%d: marking %p from %p instead\n", GC_gc_no, \
base, source)); \
INCR_MARKS(hhdr); \
GC_STORE_BACK_PTR((ptr_t)source, base); \
PUSH_OBJ(base, hhdr, mark_stack_top, mark_stack_limit); \
}
#endif /* MARK_BIT_PER_OBJ */
#if defined(PRINT_BLACK_LIST) || defined(KEEP_BACK_PTRS)
# define PUSH_ONE_CHECKED_STACK(p, source) \
GC_mark_and_push_stack(p, (ptr_t)(source))
#else
# define PUSH_ONE_CHECKED_STACK(p, source) \
GC_mark_and_push_stack(p)
#endif
/*
* Push a single value onto mark stack. Mark from the object pointed to by p.
* Invoke FIXUP_POINTER(p) before any further processing.
* P is considered valid even if it is an interior pointer.
* Previously marked objects are not pushed. Hence we make progress even
* if the mark stack overflows.
*/
# if NEED_FIXUP_POINTER
/* Try both the raw version and the fixed up one. */
# define GC_PUSH_ONE_STACK(p, source) \
if ((p) >= (ptr_t)GC_least_plausible_heap_addr \
&& (p) < (ptr_t)GC_greatest_plausible_heap_addr) { \
PUSH_ONE_CHECKED_STACK(p, source); \
} \
FIXUP_POINTER(p); \
if ((p) >= (ptr_t)GC_least_plausible_heap_addr \
&& (p) < (ptr_t)GC_greatest_plausible_heap_addr) { \
PUSH_ONE_CHECKED_STACK(p, source); \
}
# else /* !NEED_FIXUP_POINTER */
# define GC_PUSH_ONE_STACK(p, source) \
if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr \
&& (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) { \
PUSH_ONE_CHECKED_STACK(p, source); \
}
# endif
/*
* As above, but interior pointer recognition as for
* normal heap pointers.
*/
# define GC_PUSH_ONE_HEAP(p,source) \
FIXUP_POINTER(p); \
if ((p) >= (ptr_t)GC_least_plausible_heap_addr \
&& (p) < (ptr_t)GC_greatest_plausible_heap_addr) { \
GC_mark_stack_top = GC_mark_and_push( \
(void *)(p), GC_mark_stack_top, \
GC_mark_stack_limit, (void * *)(source)); \
}
/* Mark starting at mark stack entry top (incl.) down to */
/* mark stack entry bottom (incl.). Stop after performing */
/* about one page worth of work. Return the new mark stack */
/* top entry. */
mse * GC_mark_from(mse * top, mse * bottom, mse *limit);
#define MARK_FROM_MARK_STACK() \
GC_mark_stack_top = GC_mark_from(GC_mark_stack_top, \
GC_mark_stack, \
GC_mark_stack + GC_mark_stack_size);
/*
* Mark from one finalizable object using the specified
* mark proc. May not mark the object pointed to by
* real_ptr. That is the job of the caller, if appropriate.
* Note that this is called with the mutator running, but
* with us holding the allocation lock. This is safe only if the
* mutator needs tha allocation lock to reveal hidden pointers.
* FIXME: Why do we need the GC_mark_state test below?
*/
# define GC_MARK_FO(real_ptr, mark_proc) \
{ \
(*(mark_proc))(real_ptr); \
while (!GC_mark_stack_empty()) MARK_FROM_MARK_STACK(); \
if (GC_mark_state != MS_NONE) { \
GC_set_mark_bit(real_ptr); \
while (!GC_mark_some((ptr_t)0)) {} \
} \
}
extern GC_bool GC_mark_stack_too_small;
/* We need a larger mark stack. May be */
/* set by client supplied mark routines.*/
typedef int mark_state_t; /* Current state of marking, as follows:*/
/* Used to remember where we are during */
/* concurrent marking. */
/* We say something is dirty if it was */
/* written since the last time we */
/* retrieved dirty bits. We say it's */
/* grungy if it was marked dirty in the */
/* last set of bits we retrieved. */
/* Invariant I: all roots and marked */
/* objects p are either dirty, or point */
/* to objects q that are either marked */
/* or a pointer to q appears in a range */
/* on the mark stack. */
# define MS_NONE 0 /* No marking in progress. I holds. */
/* Mark stack is empty. */
# define MS_PUSH_RESCUERS 1 /* Rescuing objects are currently */
/* being pushed. I holds, except */
/* that grungy roots may point to */
/* unmarked objects, as may marked */
/* grungy objects above scan_ptr. */
# define MS_PUSH_UNCOLLECTABLE 2
/* I holds, except that marked */
/* uncollectable objects above scan_ptr */
/* may point to unmarked objects. */
/* Roots may point to unmarked objects */
# define MS_ROOTS_PUSHED 3 /* I holds, mark stack may be nonempty */
# define MS_PARTIALLY_INVALID 4 /* I may not hold, e.g. because of M.S. */
/* overflow. However marked heap */
/* objects below scan_ptr point to */
/* marked or stacked objects. */
# define MS_INVALID 5 /* I may not hold. */
extern mark_state_t GC_mark_state;
#endif /* GC_PMARK_H */
| 37.353535 | 79 | 0.634992 | [
"object"
] |
d6ad60689a24ecd994ddc56093bf5eb747de4460 | 16,558 | h | C | gpu/command_buffer/service/shared_image_representation.h | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | gpu/command_buffer/service/shared_image_representation.h | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | gpu/command_buffer/service/shared_image_representation.h | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_H_
#define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_H_
#include <dawn/dawn_proc_table.h>
#include <dawn/webgpu.h>
#include <memory>
#include "base/callback_helpers.h"
#include "base/memory/scoped_refptr.h"
#include "base/util/type_safety/pass_key.h"
#include "build/build_config.h"
#include "components/viz/common/resources/resource_format.h"
#include "gpu/command_buffer/service/shared_image_backing.h"
#include "gpu/command_buffer/service/shared_image_manager.h"
#include "gpu/gpu_gles2_export.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gpu_fence.h"
typedef unsigned int GLenum;
class SkPromiseImageTexture;
namespace gl {
class GLImage;
}
namespace gfx {
class NativePixmap;
} // namespace gfx
namespace media {
class VASurface;
} // namespace media
namespace gpu {
class TextureBase;
namespace gles2 {
class Texture;
class TexturePassthrough;
} // namespace gles2
enum class RepresentationAccessMode {
kNone,
kRead,
kWrite,
};
// A representation of a SharedImageBacking for use with a specific use case /
// api.
class GPU_GLES2_EXPORT SharedImageRepresentation {
public:
// Used by derived classes.
enum class AllowUnclearedAccess { kYes, kNo };
SharedImageRepresentation(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker);
virtual ~SharedImageRepresentation();
viz::ResourceFormat format() const { return backing_->format(); }
const gfx::Size& size() const { return backing_->size(); }
const gfx::ColorSpace& color_space() const { return backing_->color_space(); }
uint32_t usage() const { return backing_->usage(); }
MemoryTypeTracker* tracker() { return tracker_; }
bool IsCleared() const { return backing_->IsCleared(); }
void SetCleared() { backing_->SetCleared(); }
gfx::Rect ClearedRect() const { return backing_->ClearedRect(); }
void SetClearedRect(const gfx::Rect& cleared_rect) {
backing_->SetClearedRect(cleared_rect);
}
// Indicates that the underlying graphics context has been lost, and the
// backing should be treated as destroyed.
void OnContextLost() {
has_context_ = false;
backing_->OnContextLost();
}
protected:
SharedImageManager* manager() const { return manager_; }
SharedImageBacking* backing() const { return backing_; }
bool has_context() const { return has_context_; }
// Helper class for derived classes' Scoped*Access objects. Has tracking to
// ensure a Scoped*Access does not outlive the representation it's associated
// with.
template <typename RepresentationClass>
class ScopedAccessBase {
public:
ScopedAccessBase(RepresentationClass* representation)
: representation_(representation) {
DCHECK(!representation_->has_scoped_access_);
representation_->has_scoped_access_ = true;
}
~ScopedAccessBase() {
DCHECK(representation_->has_scoped_access_);
representation_->has_scoped_access_ = false;
}
RepresentationClass* representation() { return representation_; }
private:
RepresentationClass* const representation_;
DISALLOW_COPY_AND_ASSIGN(ScopedAccessBase);
};
private:
SharedImageManager* const manager_;
SharedImageBacking* const backing_;
MemoryTypeTracker* const tracker_;
bool has_context_ = true;
bool has_scoped_access_ = false;
};
class SharedImageRepresentationFactoryRef : public SharedImageRepresentation {
public:
SharedImageRepresentationFactoryRef(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentation(manager, backing, tracker) {}
~SharedImageRepresentationFactoryRef() override;
const Mailbox& mailbox() const { return backing()->mailbox(); }
void Update(std::unique_ptr<gfx::GpuFence> in_fence) {
backing()->Update(std::move(in_fence));
backing()->OnWriteSucceeded();
}
bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) {
return backing()->ProduceLegacyMailbox(mailbox_manager);
}
bool PresentSwapChain() { return backing()->PresentSwapChain(); }
void RegisterImageFactory(SharedImageFactory* factory) {
backing()->RegisterImageFactory(factory);
}
};
class GPU_GLES2_EXPORT SharedImageRepresentationGLTextureBase
: public SharedImageRepresentation {
public:
class ScopedAccess
: public ScopedAccessBase<SharedImageRepresentationGLTextureBase> {
public:
ScopedAccess(util::PassKey<SharedImageRepresentationGLTextureBase> pass_key,
SharedImageRepresentationGLTextureBase* representation)
: ScopedAccessBase(representation) {}
~ScopedAccess() {
representation()->UpdateClearedStateOnEndAccess();
representation()->EndAccess();
}
};
SharedImageRepresentationGLTextureBase(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentation(manager, backing, tracker) {}
std::unique_ptr<ScopedAccess> BeginScopedAccess(
GLenum mode,
AllowUnclearedAccess allow_uncleared);
virtual gpu::TextureBase* GetTextureBase() = 0;
protected:
friend class SharedImageRepresentationSkiaGL;
friend class SharedImageRepresentationGLTextureImpl;
// Can be overridden to handle clear state tracking when GL access begins or
// ends.
virtual void UpdateClearedStateOnBeginAccess() {}
virtual void UpdateClearedStateOnEndAccess() {}
// TODO(ericrk): Make these pure virtual and ensure real implementations
// exist.
virtual bool BeginAccess(GLenum mode);
virtual void EndAccess() {}
virtual bool SupportsMultipleConcurrentReadAccess();
};
class GPU_GLES2_EXPORT SharedImageRepresentationGLTexture
: public SharedImageRepresentationGLTextureBase {
public:
SharedImageRepresentationGLTexture(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentationGLTextureBase(manager, backing, tracker) {}
// TODO(ericrk): Move this to the ScopedAccess object. crbug.com/1003686
virtual gles2::Texture* GetTexture() = 0;
gpu::TextureBase* GetTextureBase() override;
protected:
void UpdateClearedStateOnBeginAccess() override;
void UpdateClearedStateOnEndAccess() override;
};
class GPU_GLES2_EXPORT SharedImageRepresentationGLTexturePassthrough
: public SharedImageRepresentationGLTextureBase {
public:
SharedImageRepresentationGLTexturePassthrough(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentationGLTextureBase(manager, backing, tracker) {}
// TODO(ericrk): Move this to the ScopedAccess object. crbug.com/1003686
virtual const scoped_refptr<gles2::TexturePassthrough>&
GetTexturePassthrough() = 0;
gpu::TextureBase* GetTextureBase() override;
};
class GPU_GLES2_EXPORT SharedImageRepresentationSkia
: public SharedImageRepresentation {
public:
class GPU_GLES2_EXPORT ScopedWriteAccess
: public ScopedAccessBase<SharedImageRepresentationSkia> {
public:
ScopedWriteAccess(util::PassKey<SharedImageRepresentationSkia> pass_key,
SharedImageRepresentationSkia* representation,
sk_sp<SkSurface> surface);
~ScopedWriteAccess();
SkSurface* surface() const { return surface_.get(); }
private:
sk_sp<SkSurface> surface_;
};
class GPU_GLES2_EXPORT ScopedReadAccess
: public ScopedAccessBase<SharedImageRepresentationSkia> {
public:
ScopedReadAccess(util::PassKey<SharedImageRepresentationSkia> pass_key,
SharedImageRepresentationSkia* representation,
sk_sp<SkPromiseImageTexture> promise_image_texture);
~ScopedReadAccess();
SkPromiseImageTexture* promise_image_texture() const {
return promise_image_texture_.get();
}
private:
sk_sp<SkPromiseImageTexture> promise_image_texture_;
};
SharedImageRepresentationSkia(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentation(manager, backing, tracker) {}
// Note: See BeginWriteAccess below for a description of the semaphore
// parameters.
std::unique_ptr<ScopedWriteAccess> BeginScopedWriteAccess(
int final_msaa_count,
const SkSurfaceProps& surface_props,
std::vector<GrBackendSemaphore>* begin_semaphores,
std::vector<GrBackendSemaphore>* end_semaphores,
AllowUnclearedAccess allow_uncleared);
std::unique_ptr<ScopedWriteAccess> BeginScopedWriteAccess(
std::vector<GrBackendSemaphore>* begin_semaphores,
std::vector<GrBackendSemaphore>* end_semaphores,
AllowUnclearedAccess allow_uncleared);
// Note: See BeginReadAccess below for a description of the semaphore
// parameters.
std::unique_ptr<ScopedReadAccess> BeginScopedReadAccess(
std::vector<GrBackendSemaphore>* begin_semaphores,
std::vector<GrBackendSemaphore>* end_semaphores);
virtual bool SupportsMultipleConcurrentReadAccess();
protected:
// Begin the write access. The implementations should insert semaphores into
// begin_semaphores vector which client will wait on before writing the
// backing. The ownership of begin_semaphores will be passed to client.
// The implementations should also insert semaphores into end_semaphores,
// client must submit them with drawing operations which use the backing.
// The ownership of end_semaphores are not passed to client. And client must
// submit the end_semaphores before calling EndWriteAccess().
virtual sk_sp<SkSurface> BeginWriteAccess(
int final_msaa_count,
const SkSurfaceProps& surface_props,
std::vector<GrBackendSemaphore>* begin_semaphores,
std::vector<GrBackendSemaphore>* end_semaphores) = 0;
virtual void EndWriteAccess(sk_sp<SkSurface> surface) = 0;
// Begin the read access. The implementations should insert semaphores into
// begin_semaphores vector which client will wait on before reading the
// backing. The ownership of begin_semaphores will be passed to client.
// The implementations should also insert semaphores into end_semaphores,
// client must submit them with drawing operations which use the backing.
// The ownership of end_semaphores are not passed to client. And client must
// submit the end_semaphores before calling EndReadAccess().
virtual sk_sp<SkPromiseImageTexture> BeginReadAccess(
std::vector<GrBackendSemaphore>* begin_semaphores,
std::vector<GrBackendSemaphore>* end_semaphores) = 0;
virtual void EndReadAccess() = 0;
};
class GPU_GLES2_EXPORT SharedImageRepresentationDawn
: public SharedImageRepresentation {
public:
SharedImageRepresentationDawn(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentation(manager, backing, tracker) {}
class GPU_GLES2_EXPORT ScopedAccess
: public ScopedAccessBase<SharedImageRepresentationDawn> {
public:
ScopedAccess(util::PassKey<SharedImageRepresentationDawn> pass_key,
SharedImageRepresentationDawn* representation,
WGPUTexture texture);
~ScopedAccess();
WGPUTexture texture() const { return texture_; }
private:
WGPUTexture texture_ = 0;
};
// Calls BeginAccess and returns a ScopedAccess object which will EndAccess
// when it goes out of scope. The Representation must outlive the returned
// ScopedAccess.
std::unique_ptr<ScopedAccess> BeginScopedAccess(
WGPUTextureUsage usage,
AllowUnclearedAccess allow_uncleared);
private:
// This can return null in case of a Dawn validation error, for example if
// usage is invalid.
virtual WGPUTexture BeginAccess(WGPUTextureUsage usage) = 0;
virtual void EndAccess() = 0;
};
class GPU_GLES2_EXPORT SharedImageRepresentationOverlay
: public SharedImageRepresentation {
public:
SharedImageRepresentationOverlay(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker)
: SharedImageRepresentation(manager, backing, tracker) {}
class ScopedReadAccess
: public ScopedAccessBase<SharedImageRepresentationOverlay> {
public:
ScopedReadAccess(util::PassKey<SharedImageRepresentationOverlay> pass_key,
SharedImageRepresentationOverlay* representation,
gl::GLImage* gl_image);
~ScopedReadAccess() { representation()->EndReadAccess(); }
gl::GLImage* gl_image() const {
return gl_image_;
}
private:
gl::GLImage* gl_image_;
};
#if defined(OS_ANDROID)
virtual void NotifyOverlayPromotion(bool promotion,
const gfx::Rect& bounds) = 0;
#endif
std::unique_ptr<ScopedReadAccess> BeginScopedReadAccess(bool needs_gl_image);
protected:
// TODO(weiliangc): Currently this only handles Android pre-SurfaceControl
// case. Add appropriate fence later.
virtual bool BeginReadAccess() = 0;
virtual void EndReadAccess() = 0;
// TODO(weiliangc): Add API to backing AHardwareBuffer.
// TODO(penghuang): Refactor it to not depend on GL.
// Get the backing as GLImage for GLSurface::ScheduleOverlayPlane.
virtual gl::GLImage* GetGLImage() = 0;
};
// An interface that allows a SharedImageBacking to hold a reference to VA-API
// surface without depending on //media/gpu/vaapi targets.
class VaapiDependencies {
public:
virtual ~VaapiDependencies() = default;
virtual const media::VASurface* GetVaSurface() const = 0;
virtual bool SyncSurface() = 0;
};
// Interface that allows a SharedImageBacking to create VaapiDependencies from a
// NativePixmap without depending on //media/gpu/vaapi targets.
class VaapiDependenciesFactory {
public:
virtual ~VaapiDependenciesFactory() = default;
// Returns a VaapiDependencies or nullptr on failure.
virtual std::unique_ptr<VaapiDependencies> CreateVaapiDependencies(
scoped_refptr<gfx::NativePixmap> pixmap) = 0;
};
// Representation of a SharedImageBacking as a VA-API surface.
// This representation is currently only supported by SharedImageBackingOzone.
//
// Synchronized access is currently not required in this representation because:
//
// For reads:
// We will be using this for the destination of decoding work, so no read access
// synchronization is needed from the point of view of the VA-API.
//
// For writes:
// Because of the design of the current video pipeline, we don't start the
// decoding work until we're sure that the destination buffer is not being used
// by the rest of the pipeline. However, we still need to keep track of write
// accesses so that other representations can synchronize with the decoder.
class GPU_GLES2_EXPORT SharedImageRepresentationVaapi
: public SharedImageRepresentation {
public:
class GPU_GLES2_EXPORT ScopedWriteAccess
: public ScopedAccessBase<SharedImageRepresentationVaapi> {
public:
ScopedWriteAccess(util::PassKey<SharedImageRepresentationVaapi> pass_key,
SharedImageRepresentationVaapi* representation);
~ScopedWriteAccess();
const media::VASurface* va_surface();
};
SharedImageRepresentationVaapi(SharedImageManager* manager,
SharedImageBacking* backing,
MemoryTypeTracker* tracker,
VaapiDependencies* vaapi_dependency);
~SharedImageRepresentationVaapi() override;
std::unique_ptr<ScopedWriteAccess> BeginScopedWriteAccess();
private:
VaapiDependencies* vaapi_deps_;
virtual void EndAccess() = 0;
virtual void BeginAccess() = 0;
};
} // namespace gpu
#endif // GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_REPRESENTATION_H_
| 36.551876 | 80 | 0.729557 | [
"geometry",
"object",
"vector"
] |
d6b00f8195551ee94973e40dd7db15945198d713 | 1,124 | h | C | libdevcore/TrieHash2.h | imtypist/FISCO-BCOS | 30a281d31e83ca666ef203193963a6d32e39e36a | [
"Apache-2.0"
] | null | null | null | libdevcore/TrieHash2.h | imtypist/FISCO-BCOS | 30a281d31e83ca666ef203193963a6d32e39e36a | [
"Apache-2.0"
] | null | null | null | libdevcore/TrieHash2.h | imtypist/FISCO-BCOS | 30a281d31e83ca666ef203193963a6d32e39e36a | [
"Apache-2.0"
] | null | null | null | /**
* @CopyRight:
* FISCO-BCOS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FISCO-BCOS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with FISCO-BCOS. If not, see <http://www.gnu.org/licenses/>
* (c) 2016-2019 fisco-dev contributors.
*
* @brief: calc trie hash with merkle tree
*
* @file: TrieHash2.h
* @author: darrenyin
* @date 2019-09-24
*/
#pragma once
#include "FixedHash.h"
#include <vector>
namespace dev
{
h256 getHash256(const std::vector<dev::bytes>& bytesCaches);
void getMerkleProof(const std::vector<dev::bytes>& bytesCaches,
std::shared_ptr<std::map<std::string, std::vector<std::string>>> _parent2ChildList);
} // namespace dev
| 31.222222 | 88 | 0.725089 | [
"vector"
] |
d6b4471f2aa9e4bf288050dca59f2b3a8c68beb8 | 7,309 | h | C | car2dc-kiran/lib/chilkat/include/CkKeyContainerW.h | kirannCS/MasterThesis | a12771dc40efe77ae7d6e1631ed66c4b9992afd8 | [
"Unlicense"
] | 3 | 2021-03-05T07:51:44.000Z | 2021-06-26T19:43:34.000Z | car2dc-kiran/lib/chilkat/include/CkKeyContainerW.h | kirannCS/MasterThesis | a12771dc40efe77ae7d6e1631ed66c4b9992afd8 | [
"Unlicense"
] | 1 | 2018-12-15T11:43:48.000Z | 2018-12-16T06:17:59.000Z | car2dc-kiran/lib/chilkat/include/CkKeyContainerW.h | kirannCS/MasterThesis | a12771dc40efe77ae7d6e1631ed66c4b9992afd8 | [
"Unlicense"
] | 4 | 2021-09-03T15:36:21.000Z | 2022-02-27T23:53:30.000Z | // CkKeyContainerW.h: interface for the CkKeyContainerW class.
//
//////////////////////////////////////////////////////////////////////
// This header is generated for Chilkat 9.5.0.75
#ifndef _CkKeyContainerW_H
#define _CkKeyContainerW_H
#include "chilkatDefs.h"
#if defined(CK_WINDOWS)
#include "CkString.h"
#include "CkWideCharBase.h"
class CkPrivateKeyW;
class CkPublicKeyW;
#if !defined(__sun__) && !defined(__sun)
#pragma pack (push, 8)
#endif
// CLASS: CkKeyContainerW
class CK_VISIBLE_PUBLIC CkKeyContainerW : public CkWideCharBase
{
private:
// Don't allow assignment or copying these objects.
CkKeyContainerW(const CkKeyContainerW &);
CkKeyContainerW &operator=(const CkKeyContainerW &);
public:
CkKeyContainerW(void);
virtual ~CkKeyContainerW(void);
static CkKeyContainerW *createNew(void);
void CK_VISIBLE_PRIVATE inject(void *impl);
// May be called when finished with the object to free/dispose of any
// internal resources held by the object.
void dispose(void);
// BEGIN PUBLIC INTERFACE
// ----------------------
// Properties
// ----------------------
#if defined(CK_CRYPTOAPI_INCLUDED)
// The name of the currently open key container.
void get_ContainerName(CkString &str);
// The name of the currently open key container.
const wchar_t *containerName(void);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// true if the currently open key container is from the machine keyset, otherwise
// false.
bool get_IsMachineKeyset(void);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// true if the object currently has a key container open, otherwise false.
bool get_IsOpen(void);
#endif
// ----------------------
// Methods
// ----------------------
#if defined(CK_CRYPTOAPI_INCLUDED)
// Closes the currently opened key container (if this object has one opened).
void CloseContainer(void);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Creates a new key container with a given name in the machine or user keyset. If
// a key container having the same name already exists, it is opened.
bool CreateContainer(const wchar_t *name, bool machineKeyset);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Deletes a key container with a given name in the machine or user keyset.
bool DeleteContainer(void);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Fetches the container names for the machine or user keyset. After this method
// has been called successfully, the GetNumContainers method can be called to get
// the number of key containers in the given keyset, and the GetContainerName
// method can be called to retrieve each key container's name by index.
bool FetchContainerNames(bool bMachineKeyset);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Generates a new key pair in the currently open key container. Each key container
// can contain two public/private key pairs: one for key exchange, and one for
// signature creation. The 1st argument determines which key pair is generated. A
// value of true causes a new key-exchange key pair to be generated, a value of
// false causes a new signature key pair to be generated. The size of the key (in
// bits) can range from 384 to 16384, with a typical value being 1024 or 2048 bits.
bool GenerateKeyPair(bool bKeyExchangePair, int keyLengthInBits);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// This method is provided as a convenient way of generating unique key container
// names. There are no set rules for naming key containers. However, if your
// application is to generate a large number of keys, using a UUID for the key
// container name is wise to ensure uniqueness.
bool GenerateUuid(CkString &outGuid);
// This method is provided as a convenient way of generating unique key container
// names. There are no set rules for naming key containers. However, if your
// application is to generate a large number of keys, using a UUID for the key
// container name is wise to ensure uniqueness.
const wchar_t *generateUuid(void);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Returns the Nth key container name. The FetchContainerNames method must have
// been previously called with the same keyset (machine or user). The index ranges
// from 0 to GetNumContainers() - 1.
bool GetNthContainerName(bool bMachineKeyset, int index, CkString &outName);
// Returns the Nth key container name. The FetchContainerNames method must have
// been previously called with the same keyset (machine or user). The index ranges
// from 0 to GetNumContainers() - 1.
const wchar_t *getNthContainerName(bool bMachineKeyset, int index);
// Returns the Nth key container name. The FetchContainerNames method must have
// been previously called with the same keyset (machine or user). The index ranges
// from 0 to GetNumContainers() - 1.
const wchar_t *nthContainerName(bool bMachineKeyset, int index);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Returns the number of key containers in existence for the given keyset (machine
// or user). The FetchContainerNames method must have been previously called with
// the same keyset (machine or user).
int GetNumContainers(bool bMachineKeyset);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// A key container can hold two public/private key pairs -- a key-exchange pair and
// a signature pair. This method returns the private key for one of the key pairs.
// Passing a true returns the key-exchange pair, passing false returns the
// signature pair. A null reference is returned on failure.
// The caller is responsible for deleting the object returned by this method.
CkPrivateKeyW *GetPrivateKey(bool bKeyExchangePair);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// A key container can hold two public/private key pairs -- a key-exchange pair and
// a signature pair. This method returns the public key for one of the key pairs.
// Passing a true returns the key-exchange pair, passing false returns the
// signature pair. A null reference is returned on failure.
// The caller is responsible for deleting the object returned by this method.
CkPublicKeyW *GetPublicKey(bool bKeyExchangePair);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Imports a private key into the key container. The 1st argument is the private
// key to be imported, and the 2nd argument determines if the key-exchange private
// key (true) or signature private key (false) is replaced. Note: A private key
// actually contains the key material for both the public and private key. When you
// have a private key, you effectively have both the public and private key of a
// key pair.
bool ImportPrivateKey(CkPrivateKeyW &key, bool bKeyExchangePair);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Imports a public key into the key container. The 1st argument is the public key
// to be imported, and the 2nd argument determines if the key-exchange public key
// (true) or signature public key (false) is replaced.
bool ImportPublicKey(CkPublicKeyW &key, bool bKeyExchangePair);
#endif
#if defined(CK_CRYPTOAPI_INCLUDED)
// Opens an existing key container in either the machine or user keyset.
bool OpenContainer(const wchar_t *name, bool needPrivateKeyAccess, bool machineKeyset);
#endif
// END PUBLIC INTERFACE
};
#if !defined(__sun__) && !defined(__sun)
#pragma pack (pop)
#endif
#endif
#endif
| 36.004926 | 88 | 0.749897 | [
"object"
] |
d6b6a3c42903bd797691ee877573f0a6e1faacbc | 17,014 | h | C | src/mongo/db/storage/storage_engine.h | GoldJohn/dds | 68e5cf295d2b356f42d86b78f35182f488fba85b | [
"Apache-2.0"
] | 72 | 2020-06-12T06:33:41.000Z | 2021-03-22T03:15:56.000Z | src/mongo/db/storage/storage_engine.h | GoldJohn/dds | 68e5cf295d2b356f42d86b78f35182f488fba85b | [
"Apache-2.0"
] | 9 | 2020-07-02T09:36:49.000Z | 2021-03-25T23:54:00.000Z | src/mongo/db/storage/storage_engine.h | GoldJohn/dds | 68e5cf295d2b356f42d86b78f35182f488fba85b | [
"Apache-2.0"
] | 14 | 2020-06-12T03:08:03.000Z | 2021-02-03T11:43:09.000Z | // storage_engine.h
/**
* Copyright (C) 2014 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, the copyright holders give permission to link the
* code of portions of this program with the OpenSSL library under certain
* conditions as described in each individual source file and distribute
* linked combinations including the program with the OpenSSL library. You
* must comply with the GNU Affero General Public License in all respects for
* all of the code used other than as permitted herein. If you modify file(s)
* with this exception, you may extend this exception to your version of the
* file(s), but you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
#pragma once
#include <string>
#include <vector>
#include "mongo/base/status.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/timestamp.h"
#include "mongo/util/mongoutils/str.h"
namespace mongo {
class DatabaseCatalogEntry;
class JournalListener;
class OperationContext;
class RecoveryUnit;
class SnapshotManager;
struct StorageGlobalParams;
class StorageEngineLockFile;
class StorageEngineMetadata;
/**
* The StorageEngine class is the top level interface for creating a new storage
* engine. All StorageEngine(s) must be registered by calling registerFactory in order
* to possibly be activated.
*/
class StorageEngine {
public:
/**
* The interface for creating new instances of storage engines.
*
* A storage engine provides an instance of this class (along with an associated
* name) to the global environment, which then sets the global storage engine
* according to the provided configuration parameter.
*/
class Factory {
public:
virtual ~Factory() {}
/**
* Return a new instance of the StorageEngine. The lockFile parameter may be null if
* params.readOnly is set. Caller owns the returned pointer.
*/
virtual StorageEngine* create(const StorageGlobalParams& params,
const StorageEngineLockFile* lockFile) const = 0;
/**
* Returns the name of the storage engine.
*
* Implementations that change the value of the returned string can cause
* data file incompatibilities.
*/
virtual StringData getCanonicalName() const = 0;
/**
* Validates creation options for a collection in the StorageEngine.
* Returns an error if the creation options are not valid.
*
* Default implementation only accepts empty objects (no options).
*/
virtual Status validateCollectionStorageOptions(const BSONObj& options) const {
if (options.isEmpty())
return Status::OK();
return Status(ErrorCodes::InvalidOptions,
str::stream() << "storage engine " << getCanonicalName()
<< " does not support any collection storage options");
}
/**
* Validates creation options for an index in the StorageEngine.
* Returns an error if the creation options are not valid.
*
* Default implementation only accepts empty objects (no options).
*/
virtual Status validateIndexStorageOptions(const BSONObj& options) const {
if (options.isEmpty())
return Status::OK();
return Status(ErrorCodes::InvalidOptions,
str::stream() << "storage engine " << getCanonicalName()
<< " does not support any index storage options");
}
/**
* Validates existing metadata in the data directory against startup options.
* Returns an error if the storage engine initialization should not proceed
* due to any inconsistencies between the current startup options and the creation
* options stored in the metadata.
*/
virtual Status validateMetadata(const StorageEngineMetadata& metadata,
const StorageGlobalParams& params) const = 0;
/**
* Returns a new document suitable for storing in the data directory metadata.
* This document will be used by validateMetadata() to check startup options
* on restart.
*/
virtual BSONObj createMetadataOptions(const StorageGlobalParams& params) const = 0;
/**
* Returns whether the engine supports read-only mode. If read-only mode is enabled, the
* engine may be started on a read-only filesystem (either mounted read-only or with
* read-only permissions). If readOnly mode is enabled, it is undefined behavior to call
* methods that write data (e.g. insertRecord). This method is provided on the Factory
* because it must be called before the storageEngine is instantiated.
*/
virtual bool supportsReadOnly() const {
return false;
}
};
/**
* The destructor should only be called if we are tearing down but not exiting the process.
*/
virtual ~StorageEngine() {}
/**
* Called after the globalStorageEngine pointer has been set up, before any other methods
* are called. Any initialization work that requires the ability to create OperationContexts
* should be done here rather than in the constructor.
*/
virtual void finishInit() {}
/**
* Returns a new interface to the storage engine's recovery unit. The recovery
* unit is the durability interface. For details, see recovery_unit.h
*
* Caller owns the returned pointer.
*/
virtual RecoveryUnit* newRecoveryUnit() = 0;
/**
* List the databases stored in this storage engine.
*
* XXX: why doesn't this take OpCtx?
*/
virtual void listDatabases(std::vector<std::string>* out) const = 0;
/**
* Return the DatabaseCatalogEntry that describes the database indicated by 'db'.
*
* StorageEngine owns returned pointer.
* It should not be deleted by any caller.
*/
virtual DatabaseCatalogEntry* getDatabaseCatalogEntry(OperationContext* opCtx,
StringData db) = 0;
/**
* Returns whether the storage engine supports its own locking locking below the collection
* level. If the engine returns true, MongoDB will acquire intent locks down to the
* collection level and will assume that the engine will ensure consistency at the level of
* documents. If false, MongoDB will lock the entire collection in Shared/Exclusive mode
* for read/write operations respectively.
*/
virtual bool supportsDocLocking() const = 0;
/**
* Returns whether the storage engine supports locking at a database level.
*/
virtual bool supportsDBLocking() const {
return true;
}
/**
* Returns whether the storage engine supports capped collections.
*/
virtual bool supportsCappedCollections() const {
return true;
}
/**
* Returns whether the engine supports a journalling concept or not.
*/
virtual bool isDurable() const = 0;
/**
* Returns true if the engine does not persist data to disk; false otherwise.
*/
virtual bool isEphemeral() const = 0;
/**
* Only MMAPv1 should override this and return true to trigger MMAPv1-specific behavior.
*/
virtual bool isMmapV1() const {
return false;
}
/**
* Populates and tears down in-memory data structures, respectively. Only required for storage
* engines that support recoverToStableTimestamp().
*
* Must be called with the global lock acquired in exclusive mode.
*/
virtual void loadCatalog(OperationContext* opCtx) {}
virtual void closeCatalog(OperationContext* opCtx) {}
/**
* Closes all file handles associated with a database.
*/
virtual Status closeDatabase(OperationContext* opCtx, StringData db) = 0;
/**
* Deletes all data and metadata for a database.
*/
virtual Status dropDatabase(OperationContext* opCtx, StringData db) = 0;
/**
* @return number of files flushed
*/
virtual int flushAllFiles(OperationContext* opCtx, bool sync) = 0;
/**
* Transitions the storage engine into backup mode.
*
* During backup mode the storage engine must stabilize its on-disk files, and avoid
* any internal processing that may involve file I/O, such as online compaction, so
* a filesystem level backup may be performed.
*
* Storage engines that do not support this feature should use the default implementation.
* Storage engines that implement this must also implement endBackup().
*
* For Storage engines that implement beginBackup the _inBackupMode variable is provided
* to avoid multiple instance enterting/leaving backup concurrently.
*
* If this function returns an OK status, MongoDB can call endBackup to signal the storage
* engine that filesystem writes may continue. This function should return a non-OK status if
* filesystem changes cannot be stopped to allow for online backup. If the function should be
* retried, returns a non-OK status. This function may throw a WriteConflictException, which
* should trigger a retry by the caller. All other exceptions should be treated as errors.
*/
virtual Status beginBackup(OperationContext* opCtx) {
return Status(ErrorCodes::CommandNotSupported,
"The current storage engine doesn't support backup mode");
}
/**
* Transitions the storage engine out of backup mode.
*
* Storage engines that do not support this feature should use the default implementation.
*
* Storage engines implementing this feature should fassert when unable to leave backup mode.
*/
virtual void endBackup(OperationContext* opCtx) {
return;
}
/**
* Recover as much data as possible from a potentially corrupt RecordStore.
* This only recovers the record data, not indexes or anything else.
*
* Generally, this method should not be called directly except by the repairDatabase()
* free function.
*
* NOTE: MMAPv1 does not support this method and has its own repairDatabase() method.
*/
virtual Status repairRecordStore(OperationContext* opCtx, const std::string& ns) = 0;
/**
* This method will be called before there is a clean shutdown. Storage engines should
* override this method if they have clean-up to do that is different from unclean shutdown.
* MongoDB will not call into the storage subsystem after calling this function.
*
* On error, the storage engine should assert and crash.
* There is intentionally no uncleanShutdown().
*/
virtual void cleanShutdown() = 0;
/**
* Returns the SnapshotManager for this StorageEngine or NULL if not supported.
*
* Pointer remains owned by the StorageEngine, not the caller.
*/
virtual SnapshotManager* getSnapshotManager() const {
return nullptr;
}
/**
* Sets a new JournalListener, which is used by the storage engine to alert the rest of the
* system about journaled write progress.
*/
virtual void setJournalListener(JournalListener* jl) = 0;
/**
* Returns whether the storage engine supports "recover to stable timestamp". Returns true
* if the storage engine supports "recover to stable timestamp" but does not currently have
* a stable timestamp. In that case StorageEngine::recoverToStableTimestamp() will return
* a bad status.
*/
virtual bool supportsRecoverToStableTimestamp() const {
return false;
}
/**
* Returns whether the storage engine can provide a recovery timestamp.
*/
virtual bool supportsRecoveryTimestamp() const {
return false;
}
/**
* Returns true if the storage engine supports the readConcern level "snapshot".
*/
virtual bool supportsReadConcernSnapshot() const {
return false;
}
virtual bool supportsReadConcernMajority() const {
return false;
}
/**
* Recovers the storage engine state to the last stable timestamp. "Stable" in this case
* refers to a timestamp that is guaranteed to never be rolled back. The stable timestamp
* used should be one provided by StorageEngine::setStableTimestamp().
*
* The "local" database is exempt and should not roll back any state except for
* "local.replset.minvalid" which must roll back to the last stable timestamp.
*
* If successful, returns the timestamp that the storage engine recovered to.
*
* fasserts if StorageEngine::supportsRecoverToStableTimestamp() would return
* false. Returns a bad status if there is no stable timestamp to recover to.
*
* It is illegal to call this concurrently with `setStableTimestamp` or
* `setInitialDataTimestamp`.
*/
virtual StatusWith<Timestamp> recoverToStableTimestamp(OperationContext* opCtx) {
fassertFailed(40547);
}
/**
* Returns the stable timestamp that the storage engine recovered to on startup. If the
* recovery point was not stable, returns "none".
* fasserts if StorageEngine::supportsRecoverToStableTimestamp() would return false.
*/
virtual boost::optional<Timestamp> getRecoveryTimestamp() const {
MONGO_UNREACHABLE;
}
/**
* Returns a timestamp that is guaranteed to be persisted to disk in a checkpoint. Returns
* boost::none if there is no stable checkpoint. This method should return at least the value of
* `getRecoveryTimestamp` if the node started from a stable checkpoint. fasserts if
* StorageEngine::supportsRecoverToStableTimestamp() would return false.
*/
virtual boost::optional<Timestamp> getLastStableCheckpointTimestamp() const {
MONGO_UNREACHABLE;
}
/**
* Sets the highest timestamp at which the storage engine is allowed to take a checkpoint.
* This timestamp can never decrease, and thus should be a timestamp that can never roll back.
*/
virtual void setStableTimestamp(Timestamp timestamp) {}
/**
* Tells the storage engine the timestamp of the data at startup. This is necessary because
* timestamps are not persisted in the storage layer.
*/
virtual void setInitialDataTimestamp(Timestamp timestamp) {}
/**
* Sets the oldest timestamp for which the storage engine must maintain snapshot history
* through. Additionally, all future writes must be newer or equal to this value.
*/
virtual void setOldestTimestamp(Timestamp timestampa) {}
/**
* Notifies the storage engine that a replication batch has completed.
* This means that all the writes associated with the oplog entries in the batch are
* finished and no new writes with timestamps associated with those oplog entries will show
* up in the future.
* This function can be used to ensure oplog visibility rules are not broken, for example.
*/
virtual void replicationBatchIsComplete() const {};
// (CollectionName, IndexName)
typedef std::pair<std::string, std::string> CollectionIndexNamePair;
/**
* Drop abandoned idents. In the successful case, returns a list of collection, index name
* pairs to rebuild.
*/
virtual StatusWith<std::vector<CollectionIndexNamePair>> reconcileCatalogAndIdents(
OperationContext* opCtx) {
return std::vector<CollectionIndexNamePair>();
};
/**
* Returns the all committed timestamp. All transactions with timestamps earlier than the
* all committed timestamp are committed. Only storage engines that support document level
* locking must provide an implementation. Other storage engines may provide a no-op
* implementation.
*/
virtual Timestamp getAllCommittedTimestamp() const = 0;
};
} // namespace mongo
| 39.752336 | 100 | 0.677501 | [
"vector"
] |
c5e94765da7380f38e75712cf6e6e3e71a9e801f | 10,355 | h | C | content/public/test/download_test_observer.h | hujiajie/pa-chromium | 1816ff80336a6efd1616f9e936880af460b1e105 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-05-03T06:33:56.000Z | 2021-11-14T18:39:42.000Z | content/public/test/download_test_observer.h | hujiajie/pa-chromium | 1816ff80336a6efd1616f9e936880af460b1e105 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | content/public/test/download_test_observer.h | hujiajie/pa-chromium | 1816ff80336a6efd1616f9e936880af460b1e105 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
#define CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
#include <set>
#include <vector>
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/download_url_parameters.h"
#include "net/base/net_errors.h"
namespace content {
// Detects an arbitrary change on a download item.
// TODO: Rewrite other observers to use this (or be replaced by it).
class DownloadUpdatedObserver : public DownloadItem::Observer {
public:
typedef base::Callback<bool(DownloadItem*)> EventFilter;
// The filter passed may be called multiple times, even after it
// returns true.
DownloadUpdatedObserver(DownloadItem* item, EventFilter filter);
virtual ~DownloadUpdatedObserver();
// Returns when either the event has been seen (at least once since
// object construction) or the item is destroyed. Return value indicates
// if the wait ended because the item was seen (true) or the object
// destroyed (false).
bool WaitForEvent();
private:
// DownloadItem::Observer
virtual void OnDownloadUpdated(DownloadItem* item) OVERRIDE;
virtual void OnDownloadDestroyed(DownloadItem* item) OVERRIDE;
DownloadItem* item_;
EventFilter filter_;
bool waiting_;
bool event_seen_;
DISALLOW_COPY_AND_ASSIGN(DownloadUpdatedObserver);
};
// Detects changes to the downloads after construction.
//
// Finishes when one of the following happens:
// - A specified number of downloads change to a terminal state (defined
// in derived classes).
// - The download manager was shutdown.
//
// Callers may either probe for the finished state, or wait on it.
class DownloadTestObserver : public DownloadManager::Observer,
public DownloadItem::Observer {
public:
// Action an observer should take if a dangerous download is encountered.
enum DangerousDownloadAction {
ON_DANGEROUS_DOWNLOAD_ACCEPT, // Accept the download
ON_DANGEROUS_DOWNLOAD_DENY, // Deny the download
ON_DANGEROUS_DOWNLOAD_FAIL, // Fail if a dangerous download is seen
ON_DANGEROUS_DOWNLOAD_IGNORE // Make it the callers problem.
};
// Create an object that will be considered finished when |wait_count|
// download items have entered a terminal state.
DownloadTestObserver(DownloadManager* download_manager,
size_t wait_count,
DangerousDownloadAction dangerous_download_action);
virtual ~DownloadTestObserver();
// Wait for one of the finish conditions.
void WaitForFinished();
// Return true if we reached one of the finish conditions.
bool IsFinished() const;
// DownloadItem::Observer
virtual void OnDownloadUpdated(DownloadItem* download) OVERRIDE;
virtual void OnDownloadDestroyed(DownloadItem* download) OVERRIDE;
// DownloadManager::Observer
virtual void OnDownloadCreated(
DownloadManager* manager, DownloadItem* item) OVERRIDE;
virtual void ManagerGoingDown(DownloadManager* manager) OVERRIDE;
size_t NumDangerousDownloadsSeen() const;
size_t NumDownloadsSeenInState(DownloadItem::DownloadState state) const;
protected:
// Only to be called by derived classes' constructors.
virtual void Init();
// Called to see if a download item is in a final state.
virtual bool IsDownloadInFinalState(DownloadItem* download) = 0;
private:
typedef std::set<DownloadItem*> DownloadSet;
// Maps states to the number of times they have been encountered
typedef std::map<DownloadItem::DownloadState, size_t> StateMap;
// Called when we know that a download item is in a final state.
// Note that this is not the same as it first transitioning in to the
// final state; multiple notifications may occur once the item is in
// that state. So we keep our own track of transitions into final.
void DownloadInFinalState(DownloadItem* download);
void SignalIfFinished();
// Fake user click on "Accept".
void AcceptDangerousDownload(int32 download_id);
// Fake user click on "Deny".
void DenyDangerousDownload(int32 download_id);
// The observed download manager.
DownloadManager* download_manager_;
// The set of DownloadItem's that have transitioned to their finished state
// since construction of this object. When the size of this array
// reaches wait_count_, we're done.
DownloadSet finished_downloads_;
// The set of DownloadItem's we are currently observing. Generally there
// won't be any overlap with the above; once we see the final state
// on a DownloadItem, we'll stop observing it.
DownloadSet downloads_observed_;
// The map of states to the number of times they have been observed since
// we started looking.
// Recorded at the time downloads_observed_ is recorded, but cleared in the
// constructor to exclude pre-existing states.
StateMap states_observed_;
// The number of downloads to wait on completing.
size_t wait_count_;
// The number of downloads entered in final state in Init(). We use
// |finished_downloads_| to track the incoming transitions to final state we
// should ignore, and to track the number of final state transitions that
// occurred between construction and return from wait. But some downloads may
// be in our final state (and thus be entered into |finished_downloads_|) when
// we construct this class. We don't want to count those in our transition to
// finished.
int finished_downloads_at_construction_;
// Whether an internal message loop has been started and must be quit upon
// all downloads completing.
bool waiting_;
// Action to take if a dangerous download is encountered.
DangerousDownloadAction dangerous_download_action_;
// Holds the download ids which were dangerous.
std::set<int32> dangerous_downloads_seen_;
base::WeakPtrFactory<DownloadTestObserver> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DownloadTestObserver);
};
class DownloadTestObserverTerminal : public DownloadTestObserver {
public:
// Create an object that will be considered finished when |wait_count|
// download items have entered a terminal state (any but IN_PROGRESS).
DownloadTestObserverTerminal(
DownloadManager* download_manager,
size_t wait_count,
DangerousDownloadAction dangerous_download_action);
virtual ~DownloadTestObserverTerminal();
private:
virtual bool IsDownloadInFinalState(DownloadItem* download) OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(DownloadTestObserverTerminal);
};
// Detects changes to the downloads after construction.
// Finishes when a specified number of downloads change to the
// IN_PROGRESS state, or when the download manager is destroyed.
// Dangerous downloads are accepted.
// Callers may either probe for the finished state, or wait on it.
class DownloadTestObserverInProgress : public DownloadTestObserver {
public:
// Create an object that will be considered finished when |wait_count|
// download items have entered state |IN_PROGRESS|.
DownloadTestObserverInProgress(
DownloadManager* download_manager, size_t wait_count);
virtual ~DownloadTestObserverInProgress();
private:
virtual bool IsDownloadInFinalState(DownloadItem* download) OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(DownloadTestObserverInProgress);
};
// The WaitForFlush() method on this class returns after:
// * There are no IN_PROGRESS download items remaining on the
// DownloadManager.
// * There have been two round trip messages through the file and
// IO threads.
// This almost certainly means that a Download cancel has propagated through
// the system.
class DownloadTestFlushObserver
: public DownloadManager::Observer,
public DownloadItem::Observer,
public base::RefCountedThreadSafe<DownloadTestFlushObserver> {
public:
explicit DownloadTestFlushObserver(DownloadManager* download_manager);
void WaitForFlush();
// DownloadsManager observer methods.
virtual void OnDownloadCreated(
DownloadManager* manager,
DownloadItem* item) OVERRIDE;
// DownloadItem observer methods.
virtual void OnDownloadUpdated(DownloadItem* download) OVERRIDE;
virtual void OnDownloadDestroyed(DownloadItem* download) OVERRIDE;
protected:
friend class base::RefCountedThreadSafe<DownloadTestFlushObserver>;
virtual ~DownloadTestFlushObserver();
private:
typedef std::set<DownloadItem*> DownloadSet;
// If we're waiting for that flush point, check the number
// of downloads in the IN_PROGRESS state and take appropriate
// action. If requested, also observes all downloads while iterating.
void CheckDownloadsInProgress(bool observe_downloads);
void PingFileThread(int cycle);
void PingIOThread(int cycle);
DownloadManager* download_manager_;
DownloadSet downloads_observed_;
bool waiting_for_zero_inprogress_;
DISALLOW_COPY_AND_ASSIGN(DownloadTestFlushObserver);
};
// Waits for a callback indicating that the DownloadItem is about to be created,
// or that an error occurred and it won't be created.
class DownloadTestItemCreationObserver
: public base::RefCountedThreadSafe<DownloadTestItemCreationObserver> {
public:
DownloadTestItemCreationObserver();
void WaitForDownloadItemCreation();
int download_id() const { return download_id_; }
net::Error error() const { return error_; }
bool started() const { return called_back_count_ > 0; }
bool succeeded() const { return started() && (error_ == net::OK); }
const DownloadUrlParameters::OnStartedCallback callback();
private:
friend class base::RefCountedThreadSafe<DownloadTestItemCreationObserver>;
~DownloadTestItemCreationObserver();
void DownloadItemCreationCallback(DownloadItem* item, net::Error error);
// The download creation information we received.
int download_id_;
net::Error error_;
// Count of callbacks.
size_t called_back_count_;
// We are in the message loop.
bool waiting_;
DISALLOW_COPY_AND_ASSIGN(DownloadTestItemCreationObserver);
};
} // namespace content`
#endif // CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
| 35.101695 | 80 | 0.765041 | [
"object",
"vector"
] |
c5ecb24f36be0f184c26f83511bc4dc81369755a | 2,096 | h | C | ios/versioned-react-native/ABI41_0_0/ReactNative/ReactCommon/fabric/textlayoutmanager/platform/ios/ABI41_0_0RCTTextLayoutManager.h | veeramarni/expo | 3ddc0b47430649cbe85463c56464d5b6363b4b73 | [
"Apache-2.0",
"MIT"
] | 16,461 | 2017-03-24T19:59:01.000Z | 2022-03-31T21:52:45.000Z | ios/versioned-react-native/ABI41_0_0/ReactNative/ReactCommon/fabric/textlayoutmanager/platform/ios/ABI41_0_0RCTTextLayoutManager.h | veeramarni/expo | 3ddc0b47430649cbe85463c56464d5b6363b4b73 | [
"Apache-2.0",
"MIT"
] | 13,016 | 2017-03-25T22:49:31.000Z | 2022-03-31T23:23:58.000Z | ios/versioned-react-native/ABI41_0_0/ReactNative/ReactCommon/fabric/textlayoutmanager/platform/ios/ABI41_0_0RCTTextLayoutManager.h | veeramarni/expo | 3ddc0b47430649cbe85463c56464d5b6363b4b73 | [
"Apache-2.0",
"MIT"
] | 3,945 | 2017-03-25T07:12:57.000Z | 2022-03-31T20:55:18.000Z | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <ABI41_0_0React/attributedstring/AttributedString.h>
#import <ABI41_0_0React/attributedstring/ParagraphAttributes.h>
#import <ABI41_0_0React/core/LayoutConstraints.h>
#import <ABI41_0_0React/graphics/Geometry.h>
#import <ABI41_0_0React/textlayoutmanager/TextMeasureCache.h>
NS_ASSUME_NONNULL_BEGIN
/**
* iOS-specific TextLayoutManager
*/
@interface ABI41_0_0RCTTextLayoutManager : NSObject
- (ABI41_0_0facebook::ABI41_0_0React::TextMeasurement)measureAttributedString:(ABI41_0_0facebook::ABI41_0_0React::AttributedString)attributedString
paragraphAttributes:(ABI41_0_0facebook::ABI41_0_0React::ParagraphAttributes)paragraphAttributes
layoutConstraints:(ABI41_0_0facebook::ABI41_0_0React::LayoutConstraints)layoutConstraints;
- (ABI41_0_0facebook::ABI41_0_0React::TextMeasurement)measureNSAttributedString:(NSAttributedString *)attributedString
paragraphAttributes:(ABI41_0_0facebook::ABI41_0_0React::ParagraphAttributes)paragraphAttributes
layoutConstraints:(ABI41_0_0facebook::ABI41_0_0React::LayoutConstraints)layoutConstraints;
- (void)drawAttributedString:(ABI41_0_0facebook::ABI41_0_0React::AttributedString)attributedString
paragraphAttributes:(ABI41_0_0facebook::ABI41_0_0React::ParagraphAttributes)paragraphAttributes
frame:(CGRect)frame;
- (ABI41_0_0facebook::ABI41_0_0React::SharedEventEmitter)
getEventEmitterWithAttributeString:(ABI41_0_0facebook::ABI41_0_0React::AttributedString)attributedString
paragraphAttributes:(ABI41_0_0facebook::ABI41_0_0React::ParagraphAttributes)paragraphAttributes
frame:(CGRect)frame
atPoint:(CGPoint)point;
@end
NS_ASSUME_NONNULL_END
| 47.636364 | 147 | 0.739981 | [
"geometry"
] |
c5ee4ac57fe0bcd39ee8331390e97be541bc19e8 | 9,038 | h | C | cframework/libparc/parc/security/parc_IdentityFile.h | cherouvim/cicn-nrs | 440d6a7f56e7240f179205ed5ce1fe8000d03b83 | [
"Apache-2.0"
] | 10 | 2018-11-04T06:37:14.000Z | 2022-02-18T00:26:34.000Z | cframework/libparc/parc/security/parc_IdentityFile.h | cherouvim/cicn-nrs | 440d6a7f56e7240f179205ed5ce1fe8000d03b83 | [
"Apache-2.0"
] | null | null | null | cframework/libparc/parc/security/parc_IdentityFile.h | cherouvim/cicn-nrs | 440d6a7f56e7240f179205ed5ce1fe8000d03b83 | [
"Apache-2.0"
] | 3 | 2019-01-17T19:47:55.000Z | 2022-02-18T00:28:18.000Z | /*
* Copyright (c) 2017 Cisco and/or its affiliates.
* 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.
*/
/**
* @file parc_IdentityFile.h
* @ingroup security
* @brief This is a PARCIdentity represented as a PKCS12 keystore file.
*
* To create these files, use the `parc-publickey` command line tool. Or you could also
* use `openssl` to create the same file.
*
* A `PARCIdentityFile` is a concrete instance of a `PARCIdentity`. To create a
* `PARCIdentity` from a `PARCIdentityFile`, one would do the following:
*
* @code
* {
* const char *keystoreName = "my_identity.p12";
* const char *keystorePassword = "my_password";
*
* // Create the concrete identity instance from the PKCS12 file
* PARCIdentityFile *identityFile = parcIdentityFile_Create(keystoreName, keystorePassword);
*
* // Create a generic `PARCIdentity` from the concrete identity instance
* PARCIdentity *identity = parcIdentity_Create(identityFile, PARCIdentityFileAsPARCIdentity);
*
* // Now use the `PARCIdentity` for signing purposes (amongst other things)
* PARCSigner *signer = parcIdentity_GetSigner(identity);
* }
* @endcode
*
*/
#ifndef libparc_parc_IdentityFile_h
#define libparc_parc_IdentityFile_h
#include <parc/security/parc_Identity.h>
struct parc_identity_file;
typedef struct parc_identity_file PARCIdentityFile;
/**
* The mapping of a PARCIdentityFile to the generic PARCIdentity.
*/
extern PARCIdentityInterface *PARCIdentityFileAsPARCIdentity;
/**
* Create an instance of `PARCIdentityFile` from a given filename, and a password to unlock the stored information.
*
* The information is stored in PKCS 12 format.
*
* @param [in] fileName The name (relative path) to a file to be opened
* @param [in] password The password to be used to open the identity file
*
* @return NULL A `PARCIdentityFile` could not be allocated.
* @return PARCIdentityFile A newly allocated `PARCIdentityFile` that must be freed with `parcIdentityFile_Release()`
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
* ...
* parcIdentityFile_Release(&file);
* }
* @endcode
*/
PARCIdentityFile *parcIdentityFile_Create(const char *fileName, const char *password);
/**
* Increase the number of references to the given `PARCIdentityFile` instance.
*
* A new instance is not created,
* only that the given instance's reference count is incremented.
* Discard the acquired reference by invoking `parcIdentityFile_Release()`.
*
* @param [in] identity A pointer to a `PARCIdentityFile` instance.
*
* @return NULL An error occurred.
* @return non-NULL A pointer to a PARCIdentityFile instance.
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
* PARCIdentityFile *secondHandle = parcIdentityFile_Acquire(file);
* // use both handles as needed
* parcIdentityFile_Release(&file);
* parcIdentityFile_Release(&secondHandle);
* }
* @endcode
*/
PARCIdentityFile *parcIdentityFile_Acquire(const PARCIdentityFile *identity);
/**
* Decrease the number of references to the given `PARCIdentityFile` instance.
*
* This only decrements the reference count so long as count >= 1. If the count
* reaches zero, the object's memory is freed. The content pointer is always
* NULLified after invocation.
*
* @param [in,out] identityPtr A pointer to a `PARCIdentityFile` instance.
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
* // use handle as needed
* parcIdentityFile_Release(&file);
* }
* @endcode
*/
void parcIdentityFile_Release(PARCIdentityFile **identityPtr);
/**
* Determine if the PARCIdentityFile exists.
*
* It must exist and be a regular file.
*
* @param [in] identity A pointer to a valid PARCIdentity instance.
*
* @return true The file exists and is a regular file.
* @return false The file does not exist (see errno values for stat(2)) or is not a regular file.
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
*
* if (parcIdentityFile_Exists(file) == true) {
* printf("The file exists\n");
* } else {
* printf("The file does not exist fos\n");
* }
* }
* @endcode
*/
bool parcIdentityFile_Exists(const PARCIdentityFile *identity);
/**
* Retrieve the name of the file associated with this `PARCIdentityFile` instance.
*
* @param [in] identity A pointer to a `PARCIdentityFile` instance.
*
* @return NULL An error occurred.
* @return non-NULL A pointer to a PARCIdentityFile instance.
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
* const char *fileName = parcIdentityFile_GetFileName(file);
* // use handle and/or file name as needed
* parcIdentityFile_Release(&file);
* }
* @endcode
*/
const char *parcIdentityFile_GetFileName(const PARCIdentityFile *identity);
/**
* Retrieve the file password associated with this `PARCIdentityFile` instance.
*
* @param [in] identity A pointer to a `PARCIdentityFile` instance.
*
* @return NULL An error occurred.
* @return non-NULL A pointer to a PARCIdentityFile instance.
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
* const char *password = parcIdentityFile_GetPassWord(file);
* // use handle and/or file name as needed
* parcIdentityFile_Release(&file);
* }
* @endcode
*/
const char *parcIdentityFile_GetPassWord(const PARCIdentityFile *identity);
/**
* Create an instance of `PARCSigner` from the given `PARCIdentity`
*
* @param [in] identity A pointer to a PARCIdentity instance.
*
* @return NULL An error occurred
* @return PARCSigner A new `PARCSigner` instance created using the identity file for the public/private signing keys
*
* Example:
* @code
* {
* PARCIdentityFile *file = parcIdentityFile_Create("./secret.p12", "1234");
* PARCSigner *signer = parcIdentityFile_GetSigner(file);
* parcIdentityFile_Release(&file);
* // use the signer
* parcSigner_Release(&signer);
* }
* @endcode
*/
PARCSigner *parcIdentityFile_CreateSigner(const PARCIdentityFile *identity);
/**
* Determine if two PARCIdentityFiles are equal.
*
* The following equivalence relations on non-null `PARCIdentityFile` instances are maintained:
*
* * It is reflexive: for any non-null reference value x, parcIdentityFile_Equals(x, x) must return true.
*
* * It is symmetric: for any non-null reference values x and y, parcIdentityFile_Equals(x, y) must return true if and only if
* parcIdentityFile_Equals(y x) returns true.
*
* * It is transitive: for any non-null reference values x, y, and z, if
* parcIdentityFile_Equals(x, y) returns true and
* parcIdentityFile_Equals(y, z) returns true,
* then parcIdentityFile_Equals(x, z) must return true.
*
* * It is consistent: for any non-null reference values x and y, multiple invocations of parcIdentityFile_Equals(x, y)
* consistently return true or consistently return false.
*
* * For any non-null reference value x, parcIdentityFile_Equals(x, NULL)) must return false.
*
* @param a A pointer to a PARCIdentityFile instance.
* @param b A pointer to a PARCIdentityFile instance.
* @return True if the referenced PARCIdentityFiles are equal.
*
* Example:
* @code
* {
* PARCIdentityFile *a = parcIdentityFile_Create(...);
* PARCIdentityFile *b = parcIdentityFile_Create(...);
* if (parcIdentityFile_Equals(a, b)) {
* // this is expected
* } else {
* // this is not expected
* }
* parcIdentityFile_Release(&a);
* parcIdentityFile_Release(&b);
* }
*
* }
* @endcode
*/
bool parcIdentityFile_Equals(const PARCIdentityFile *a, const PARCIdentityFile *b);
/**
* Print a human readable representation of the given `PARCIdentityFile`.
*
* @param [in] indentation The level of indentation to use to pretty-print the output.
* @param [in] instance A pointer to the instance to display.
*
* Example:
* @code
* {
* PARCIdentityFile *instance = parcIdentityFile_Create("./secret.p12", "1234");
*
* parcIdentityFile_Display(instance, 0);
*
* parcIdentityFile_Release(&instance);
* }
* @endcode
*/
void parcIdentityFile_Display(const PARCIdentityFile *instance, int indentation);
#endif // libparc_parc_IdentityFile_h
| 33.227941 | 128 | 0.708453 | [
"object"
] |
c5f286103a0d6fe8dde40de2d43100d9a7b34910 | 7,953 | h | C | shell/common/isolate_configuration.h | SuperY/engine | 44f0757793221df89d363fd7e35f094a421639aa | [
"BSD-3-Clause"
] | 7 | 2020-04-10T14:07:06.000Z | 2020-10-21T13:53:11.000Z | shell/common/isolate_configuration.h | shoryukenn/engine | 0dc86cda19d55aba8b719231c11306eeaca4b798 | [
"BSD-3-Clause"
] | 6 | 2019-02-01T04:52:46.000Z | 2019-12-09T03:38:27.000Z | shell/common/isolate_configuration.h | shoryukenn/engine | 0dc86cda19d55aba8b719231c11306eeaca4b798 | [
"BSD-3-Clause"
] | 4 | 2019-09-27T08:49:50.000Z | 2019-12-10T11:27:32.000Z | // Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_COMMON_ISOLATE_CONFIGURATION_H_
#define FLUTTER_SHELL_COMMON_ISOLATE_CONFIGURATION_H_
#include <future>
#include <memory>
#include <string>
#include "flutter/assets/asset_manager.h"
#include "flutter/assets/asset_resolver.h"
#include "flutter/common/settings.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
#include "flutter/fml/memory/weak_ptr.h"
#include "flutter/runtime/dart_isolate.h"
namespace flutter {
//------------------------------------------------------------------------------
/// @brief An isolate configuration is a collection of snapshots and asset
/// managers that the engine will use to configure the isolate
/// before invoking its root entrypoint. The set of snapshots must
/// be sufficient for the engine to move the isolate from the
/// |DartIsolate::Phase::LibrariesSetup| phase to the
/// |DartIsolate::Phase::Ready| phase. Note that the isolate
/// configuration will not be collected till the isolate tied to the
/// configuration as well as any and all child isolates of that
/// isolate are collected. The engine may ask the configuration to
/// prepare multiple isolates. All subclasses of this class must be
/// thread safe as the configuration may be created, collected and
/// used on multiple threads. Usually these threads are engine or VM
/// managed so care must be taken to ensure that subclasses do not
/// reference any thread local state.
///
class IsolateConfiguration {
public:
//----------------------------------------------------------------------------
/// @brief Attempts to infer the isolate configuration from the
/// `Settings` object. If the VM is configured for AOT mode,
/// snapshot resolution is attempted with predefined symbols
/// present in the currently loaded process. In JIT mode, Dart
/// kernel file resolution is attempted in the assets directory.
/// If an IO worker is specified, snapshot resolution may be
/// attempted on the serial worker task runner. The worker task
/// runner thread must remain valid and running till after the
/// shell associated with the engine used to launch the isolate
/// for which this run configuration is used is collected.
///
/// @param[in] settings The settings
/// @param[in] asset_manager The asset manager
/// @param[in] io_worker An optional IO worker. Specify `nullptr` is a
/// worker should not be used or one is not
/// available.
///
/// @return An isolate configuration if one can be inferred from the
/// settings. If not, returns `nullptr`.
///
static std::unique_ptr<IsolateConfiguration> InferFromSettings(
const Settings& settings,
std::shared_ptr<AssetManager> asset_manager,
fml::RefPtr<fml::TaskRunner> io_worker);
//----------------------------------------------------------------------------
/// @brief Creates an AOT isolate configuration using snapshot symbols
/// present in the currently loaded process. These symbols need to
/// be given to the Dart VM on bootstrap and hence have already
/// been resolved.
///
/// @return An AOT isolate configuration.
///
static std::unique_ptr<IsolateConfiguration> CreateForAppSnapshot();
//----------------------------------------------------------------------------
/// @brief Creates a JIT isolate configuration using a list of futures to
/// snapshots defining the ready isolate state. In environments
/// where snapshot resolution is extremely expensive, embedders
/// attempt to resolve snapshots on worker thread(s) and return
/// the future of the promise of snapshot resolution to this
/// method. That way, snapshot resolution begins well before
/// isolate launch is attempted by the engine.
///
/// @param[in] kernel_pieces The list of futures to Dart kernel snapshots.
///
/// @return A JIT isolate configuration.
///
static std::unique_ptr<IsolateConfiguration> CreateForKernelList(
std::vector<std::future<std::unique_ptr<const fml::Mapping>>>
kernel_pieces);
//----------------------------------------------------------------------------
/// @brief Creates a JIT isolate configuration using the specified
/// snapshot. This is a convenience method for the
/// `CreateForKernelList` method that takes a list of futures to
/// Dart kernel snapshots.
///
/// @see CreateForKernelList()
///
/// @param[in] kernel The kernel snapshot.
///
/// @return A JIT isolate configuration.
///
static std::unique_ptr<IsolateConfiguration> CreateForKernel(
std::unique_ptr<const fml::Mapping> kernel);
//----------------------------------------------------------------------------
/// @brief Creates a JIT isolate configuration using the specified
/// snapshots. This is a convenience method for the
/// `CreateForKernelList` method that takes a list of futures to
/// Dart kernel snapshots.
///
/// @see CreateForKernelList()
///
/// @param[in] kernel_pieces The kernel pieces
///
/// @return { description_of_the_return_value }
///
static std::unique_ptr<IsolateConfiguration> CreateForKernelList(
std::vector<std::unique_ptr<const fml::Mapping>> kernel_pieces);
//----------------------------------------------------------------------------
/// @brief Create an isolate configuration. This has no threading
/// restrictions.
///
IsolateConfiguration();
//----------------------------------------------------------------------------
/// @brief Destroys an isolate configuration. This has no threading
/// restrictions and may be collection of configurations may occur
/// on any thread (and usually happens on an internal VM managed
/// thread pool thread).
///
virtual ~IsolateConfiguration();
//----------------------------------------------------------------------------
/// @brief When an isolate is created and sufficiently initialized to
/// move it into the `DartIsolate::Phase::LibrariesSetup` phase,
/// this method is invoked on the isolate to then move the isolate
/// into the `DartIsolate::Phase::Ready` phase. Then isolate's
/// main entrypoint is then invoked to move it into the
/// `DartIsolate::Phase::Running` phase. This method will be
/// called each time the root isolate is launched (which may be
/// multiple times in cold-restart scenarios) as well as one each
/// for any child isolates referenced by that isolate.
///
/// @param isolate The isolate which is already in the
/// `DartIsolate::Phase::LibrariesSetup` phase.
///
/// @return Returns true if the isolate could be configured. Unless this
/// returns true, the engine will not move the isolate to the
/// `DartIsolate::Phase::Ready` phase for subsequent run.
///
bool PrepareIsolate(DartIsolate& isolate);
protected:
virtual bool DoPrepareIsolate(DartIsolate& isolate) = 0;
private:
FML_DISALLOW_COPY_AND_ASSIGN(IsolateConfiguration);
};
} // namespace flutter
#endif // FLUTTER_SHELL_COMMON_ISOLATE_CONFIGURATION_H_
| 47.622754 | 80 | 0.590846 | [
"object",
"vector"
] |
c5f6574a713401ca6747b795e69e7754fd9495fa | 5,903 | h | C | middleware/legato/library/src/gfx/legato/widget/groupbox/legato_widget_groupbox.h | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | 4 | 2021-07-23T18:37:34.000Z | 2022-01-09T17:31:40.000Z | middleware/legato/library/src/gfx/legato/widget/groupbox/legato_widget_groupbox.h | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | 1 | 2020-12-31T22:40:10.000Z | 2020-12-31T22:40:10.000Z | middleware/legato/library/src/gfx/legato/widget/groupbox/legato_widget_groupbox.h | automaate/gfx3.8 | 55bf94302f00c8d513c84d910185cef2ca6b5be2 | [
"0BSD"
] | 3 | 2021-01-20T19:16:00.000Z | 2021-07-27T08:06:14.000Z | /*******************************************************************************
* Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
*
* Subject to your compliance with these terms, you may use Microchip software
* and any derivatives exclusively with Microchip products. It is your
* responsibility to comply with third party license terms applicable to your
* use of third party software (including open source software) that may
* accompany Microchip software.
*
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
* ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
*******************************************************************************/
/*******************************************************************************
Module for Microchip Graphics Library - Legato User Interface Library
Company:
Microchip Technology Inc.
File Name:
legato_widget_groupbox.h
Summary:
Description:
This module implements group box widget functions.
*******************************************************************************/
/** \file legato_widget_groupbox.h
* @brief Group box widget menu functions and definitions.
*
* @details This module implements group box widget functions.
*/
#ifndef LEGATO_GROUPBOX_H
#define LEGATO_GROUPBOX_H
#include "gfx/legato/common/legato_common.h"
#if LE_GROUPBOX_WIDGET_ENABLED
#include "gfx/legato/widget/legato_widget.h"
#include "gfx/legato/string/legato_string.h"
// *****************************************************************************
// *****************************************************************************
// Section: Data Types and Constants
// *****************************************************************************
// *****************************************************************************
/* internal use only */
/**
* @cond INTERNAL
*
*/typedef struct leGroupBoxWidget leGroupBoxWidget;
#define LE_GROUPBOXWIDGET_VTABLE(THIS_TYPE) \
LE_WIDGET_VTABLE(THIS_TYPE) \
\
leString* (*getString)(const THIS_TYPE* _this); \
leResult (*setString)(THIS_TYPE* _this, const leString* str); \
typedef struct leGroupBoxWidgetVTable
{
LE_GROUPBOXWIDGET_VTABLE(leGroupBoxWidget)
} leGroupBoxWidgetVTable;
/**
* @endcond
*
*/
// *****************************************************************************
/* Enumeration:
leGroupBoxWidget
Summary:
Group box struct definition.
Description:
A group box is a widget that is similar to a basic panel but provides
a line border and title text. Used for grouping and describing widgets
of similar function.
Remarks:
None.
*/
/**
* @brief This struct represents a group box widget.
* @details A group box is a widget that is similar to a basic panel
* but provides a line border and title text. Used for grouping and
* describing widgets of similar function.
*/
typedef struct leGroupBoxWidget
{
leWidget widget; // widget base class
const leGroupBoxWidgetVTable* fn;
const leString* string; // group box title text
} leGroupBoxWidget;
// *****************************************************************************
// *****************************************************************************
// Section: Routines
// *****************************************************************************
// *****************************************************************************
/**
* @brief Create widget.
* @details Creates a new leGroupBoxWidget and allocates memory for the widget through the
* current active context. Application is responsible for managing the widget
* pointer until the widget is added to a widget tree.
* @remark use leWidget_Delete() to free this pointer.
* @code
* leGroupBoxWidget* wgt = leGroupBoxWidget_New();
* @endcode
* @return a widget object pointer.
*/
leGroupBoxWidget* leGroupBoxWidget_New(void);
/**
* @brief Initialize widget.
* @details Initializes the leGroupBoxWidget <span class="param">wgt</span>.
* @code
* leGroupBoxWidget* wgt;
* leGroupBoxWidget_Constructor(wgt);
* @endcode
* @param wgt is the widget to initialize
* @return void.
*/
void leGroupBoxWidget_Constructor(leGroupBoxWidget* box);
#ifdef _DOXYGEN_
#define THIS_TYPE struct leWidget
/**
* @brief Get string assigned.
* @details Gets the string assigned for <span class="param">_this</span>.
* @code
* const leGroupBoxWidget* _this;
* leString* str = _this->fn->getString(_this);
* @endcode
* @param _this is the widget pointer to query.
* @returns the string pointer.
*/
virtual leString* getString(const leGroupBoxWidget* _this);
/**
* @brief Set string.
* @details Sets the string for <span class="param">_this</span> to
* <span class="param">str</span>.
* @code
* leGroupBoxWidget* _this;
* const leString* str;
* leResult res = _this->fn->setString(_this, str);
* @endcode
* @param _this is the widget pointer to modify.
* @param str is the string pointer.
* @returns LE_SUCCESS if set, otherwise LE_FAILURE.
*/
virtual leResult setString(leGroupBoxWidget* _this,
const leString* str);
#undef THIS_TYPE
#endif
#endif // LE_GROUPBOX_WIDGET_ENABLED
#endif /* LEGATO_GROUPBOX_H */
| 31.908108 | 90 | 0.606302 | [
"object"
] |
c5f793df465e760328a83b076076873761a683a0 | 4,505 | h | C | Parser/include/ast.h | 422404/PipouScript | 0984b0bac81e5bedb03e03fdc26ad476e8c8ae63 | [
"MIT"
] | null | null | null | Parser/include/ast.h | 422404/PipouScript | 0984b0bac81e5bedb03e03fdc26ad476e8c8ae63 | [
"MIT"
] | 14 | 2019-12-16T23:15:03.000Z | 2020-01-14T10:39:03.000Z | Parser/include/ast.h | 422404/PipouScript | 0984b0bac81e5bedb03e03fdc26ad476e8c8ae63 | [
"MIT"
] | null | null | null | /**
* @file ast.h
* Abstract Syntax Tree implementation
*/
#pragma once
#include <stdbool.h>
#include "vector.h"
#include "tokens.h"
#include "str.h"
typedef enum {
NODE__ROOT_,
NODE_IDENTIFIER,
NODE_STRING,
NODE_INT,
NODE_DOUBLE,
NODE_DECL,
NODE_AFFECT,
NODE_OBJ_FIELD_NAME,
NODE_OBJ_FIELD_INIT,
NODE_OBJ_MSG_DEF,
NODE_OBJ_LITTERAL,
NODE_ARRAY_LITTERAL,
NODE_BLOCK,
NODE_ARRAY_ACCESS,
NODE_DOTTED_EXPR,
NODE_MSG_PASS_EXPR,
NODE_OR_EXPR,
NODE_AND_EXPR,
NODE_EQ_EXPR,
NODE_COMP_EXPR,
NODE_ARITH_EXPR,
NODE_TERM_EXPR,
NODE_FACTOR_EXPR,
NODE_UNARY_EXPR,
NODE_STATEMENT
} ast_node_type_t;
struct ast_node_s;
typedef struct ast_node_s ast_node_t;
typedef struct ast_root_s {
/** vector_t<ast_statement *> */
vector_t * statements;
} ast_root_t;
typedef struct ast_identifier_s {
char * value;
} ast_identifier_t;
typedef struct ast_string_s {
char * value;
} ast_string_t;
typedef struct ast_int_s {
int value;
} ast_int_t;
typedef struct ast_double_s {
double value;
} ast_double_t;
typedef struct ast_decl_s {
ast_node_t * lval;
ast_node_t * rval;
} ast_decl_t;
typedef struct ast_affect_s {
ast_node_t * lval;
ast_node_t * rval;
} ast_affect_t;
typedef struct ast_obj_field_init_s {
ast_node_t * ident;
ast_node_t * value;
} ast_obj_field_init_t;
typedef struct ast_obj_msg_def_s {
/** vector_t<ast_identifier_t *> */
vector_t * selector;
/** vector_t<ast_statement *> */
vector_t * statements;
} ast_obj_msg_def_t;
typedef struct ast_obj_litteral_s {
/** vector_t<ast_obj_field_init * | ast_obj_msg_def *> */
vector_t * obj_fields;
} ast_obj_litteral_t;
typedef struct ast_obj_field_name_s {
bool is_msg_name;
/** vector_t<ast_identifier_t *> */
vector_t * components;
} ast_obj_field_name_t;
typedef struct ast_array_litteral_s {
/** vector_t<ast_expr_t *> */
vector_t * items;
} ast_array_litteral_t;
typedef struct ast_block_s {
/** vector_t<ast_identifier_t *> */
vector_t * params;
/** vector_t<ast_statement *> */
vector_t * statements;
} ast_block_t;
typedef struct ast_array_access_s {
ast_node_t * index_expr;
} ast_array_access_t;
typedef struct ast_dotted_expr_s {
/** vector_t<ast_array_access_t * | ast_obj_field_name_t * | ast_identifier_t *> */
vector_t * components;
} ast_dotted_expr_t;
typedef struct ast_msg_pass_expr_s {
/** vector_t<ast_atom_expr_t * | ast_identifier_t *> */
vector_t * components;
} ast_msg_pass_expr_t;
/**
* Represents or_expr, and_expr, comp_expr, arith_expr, term_expr,
* factor_expr, unary_expr and atom_expr
*/
typedef struct ast_expr_s {
/** vector_t<ast_expr_t *> */
vector_t * values;
/**
* arith_expr, eq_expr, comp_expr and unary_expr need more info
* on the operator used
*/
token_type_t op;
} ast_expr_t;
/**
* Represents statement and mod_statement
*/
typedef struct ast_statement_s {
bool is_mod_statement;
bool is_return_expr;
bool is_local_return;
ast_node_t * value;
} ast_statement_t;
struct ast_node_s {
ast_node_type_t type;
// loc_t loc;
union {
ast_root_t as_root;
ast_identifier_t as_ident;
ast_string_t as_string;
ast_int_t as_int;
ast_double_t as_double;
ast_decl_t as_decl;
ast_affect_t as_affect;
ast_obj_field_init_t as_obj_field_init;
ast_obj_msg_def_t as_obj_msg_def;
ast_obj_litteral_t as_obj_litteral;
ast_obj_field_name_t as_obj_field_name;
ast_array_litteral_t as_array_litteral;
ast_block_t as_block;
ast_array_access_t as_array_access;
ast_dotted_expr_t as_dotted_expr;
ast_msg_pass_expr_t as_msg_pass_expr;
ast_expr_t as_expr;
ast_statement_t as_statement;
};
};
/**
* Allocates a new AST node
* @param type AST node type
* @returns A pointer to the newly allocated node
*/
ast_node_t * ASTNode_New(ast_node_type_t type);
/**
* Frees a node and its children if any
* @param[int] node The node to free
*/
void ASTNode_Free(ast_node_t * node);
/**
* Builds the string representation of an AST node
* @param[in] node The node to build the string from
* @returns The string representation of the node
*/
string * ASTNode_ToString(ast_node_t * node);
| 23.710526 | 87 | 0.688568 | [
"vector"
] |
c5fa1386f6065ed903160c681cedb4cb6e6d52d1 | 2,397 | h | C | parser/include/bearparser/pe/OptHdrWrapper.h | yjd/bearparser | 7ec04943a7b7f478d8b924aebe1fc0e831cb27da | [
"BSD-2-Clause"
] | 516 | 2015-01-04T14:04:21.000Z | 2022-03-13T05:07:27.000Z | parser/include/bearparser/pe/OptHdrWrapper.h | yjd/bearparser | 7ec04943a7b7f478d8b924aebe1fc0e831cb27da | [
"BSD-2-Clause"
] | 12 | 2018-08-04T22:37:46.000Z | 2021-02-17T00:37:56.000Z | parser/include/bearparser/pe/OptHdrWrapper.h | yjd/bearparser | 7ec04943a7b7f478d8b924aebe1fc0e831cb27da | [
"BSD-2-Clause"
] | 99 | 2015-04-23T01:59:24.000Z | 2022-03-03T04:38:28.000Z | #pragma once
#include "PENodeWrapper.h"
class OptHdrWrapper : public PEElementWrapper
{
public:
/* fields :*/
enum OptHdrFID {
NONE = FIELD_NONE,
MAGIC = 0,
LINKER_MAJOR,
LINKER_MINOR,
CODE_SIZE,
INITDATA_SIZE,
UNINITDATA_SIZE,
EP,
CODE_BASE,
DATA_BASE,
IMAGE_BASE,
SEC_ALIGN,
FILE_ALIGN,
OSVER_MAJOR,
OSVER_MINOR,
IMGVER_MAJOR,
IMGVER_MINOR,
SUBSYSVER_MAJOR,
SUBSYSVER_MINOR,
WIN32_VER,
IMAGE_SIZE,
HDRS_SIZE,
CHECKSUM,
SUBSYS,
DLL_CHARACT,
STACK_RSRV_SIZE,
STACK_COMMIT_SIZE,
HEAP_RSRV_SIZE,
HEAP_COMMIT_SIZE,
LDR_FLAGS,
RVAS_SIZES_NUM,
DATA_DIR,
FIELD_COUNTER
};
static std::map<DWORD, QString> s_optMagic;
static std::map<std::pair<WORD,WORD>, QString> s_osVersion;
static std::map<DWORD, QString> s_dllCharact;
static std::map<DWORD, QString> s_subsystem;
static void initDllCharact();
static std::vector<DWORD> splitDllCharact(DWORD characteristics);
static QString translateDllCharacteristics(DWORD charact);
static QString translateOptMagic(DWORD magic);
static QString translateOSVersion(WORD major, WORD minor);
static QString translateSubsystem(DWORD subsystem);
//----
OptHdrWrapper(PEFile *pe) : PEElementWrapper(pe), opt32(NULL), opt64(NULL) { wrap(); }
bool wrap();
/* full structure boundaries */
virtual void* getPtr();
virtual bufsize_t getSize();
virtual QString getName() { return "Optional Hdr"; }
virtual size_t getFieldsCount() { return FIELD_COUNTER; }
/* specific field boundaries */
virtual void* getFieldPtr(size_t fieldId, size_t subField = FIELD_NONE);
virtual bufsize_t getFieldSize(size_t fieldId, size_t subField = FIELD_NONE);
virtual QString translateFieldContent(size_t fieldId);
virtual QString getFieldName(size_t fieldId);
virtual Executable::addr_type containsAddrType(size_t fieldId, size_t subField = FIELD_NONE);
Executable::exe_bits getHdrBitMode();
IMAGE_NT_HEADERS32* nt32();
IMAGE_NT_HEADERS64* nt64();
//DataDirWrapper dataDir;
protected:
IMAGE_OPTIONAL_HEADER32* opt32;
IMAGE_OPTIONAL_HEADER64* opt64;
std::vector<DWORD> dllCharact;
};
| 27.238636 | 97 | 0.663329 | [
"vector"
] |
680163db5a5f673c2ea3d6b811636138aa5809a3 | 6,085 | h | C | EQSignal/EQSignal.h | Panchatantra/EQSignal | ac04d71a5b011bc3feb66562d6dda0b4e7e4e67b | [
"MIT"
] | 5 | 2018-04-19T12:41:26.000Z | 2021-09-21T12:39:02.000Z | EQSignal/EQSignal.h | jiayingqi/EQSignal | ac04d71a5b011bc3feb66562d6dda0b4e7e4e67b | [
"MIT"
] | null | null | null | EQSignal/EQSignal.h | jiayingqi/EQSignal | ac04d71a5b011bc3feb66562d6dda0b4e7e4e67b | [
"MIT"
] | 2 | 2018-08-04T09:57:06.000Z | 2020-06-01T03:24:26.000Z | #ifndef EQSIGNAL_H
#define EQSIGNAL_H
#include <QVector>
#include <QString>
#include "Spectra.h"
#include <complex>
struct Response
{
double zeta, P;
double *ra, *rv, *rd, *ku;
double fy, uy;
};
class EQSignal
{
public:
EQSignal();
EQSignal(int N, double DT, double V0=0.0, double D0=0.0);
EQSignal(double *a, int N, double DT, double V0=0.0, double D0=0.0);
~EQSignal();
void readtxt(const char *filename, double DT = 0.02, bool NORM = false, bool singleCol=true, int skip_rows=0);
void readtxt(QString filename, double DT = 0.02, bool NORM = false, bool singleCol = true);
void readnga(const char *filename, bool NORM = false, bool IsOld = false);
void readnga(QString filename, bool NORM = false, bool IsOld = false);
void setInit(double V0 = 0.0, double D0 = 0.0);
void resample(int r);
void interpolate(int r, int method=0);
void recover();
void trim(int ind1, int ind2);
void confirm();
void norm();
void scaling(double factor);
void calcAriasIntensity();
void copyAccFrom(EQSignal *eqs);
int *autoTrimEdges(int method=0, double thd1=0.02, double thd2=0.98, bool EZ=true);
void savetxt(const char *filename);
void savetxt(QString filename);
void savecsv(const char *filename);
void savecsv(QString filename);
void savetxtsp(const char *filename);
void savetxtsp(QString filename);
void savecsvsp(const char *filename);
void savecsvsp(QString filename);
void savetxtsp(const char *filename,int indsp);
void savetxtsp(QString filename,int indsp);
void savecsvsp(const char *filename,int indsp);
void savecsvsp(QString filename,int indsp);
void setAcc(double *a);
void modifyAcc(double *a, int ind1, int ind2);
void a2vd(bool raw=false, bool rat=false);
void detrend(int method, int oh=2, int ol=0, bool raw=true);
void align(int method, int ntp=4, int oh=1, int ol=0, bool raw=true, bool EWZ=false);
void filt(int ftype, int order, double f1, double f2, bool raw=true);
void setupSP(int NSP, int np, double P1, double P2, int dm, int sm, bool pseudo, double *Zetas);
void setupSP(int NSP, int np, double *p, int sm, bool pseudo, double *Zetas);
void calcSP(bool allSP=false);
void calcSP(int i, bool allSP=false);
void calcNLSP(double mu, int model, double rk, double alpha);
void calcNLSP(int i, double mu, int model, double rk, double alpha);
void calcFFT();
void calcPSD(double olr=0.5, bool win=true);
// Set target spectrum (GB)
void setSPT(double Tg, double PAF, double scale, int code, double *ep = nullptr);
void setSPT(double *p, double *spt, int np, int drr);
// Execute spectrum fitting
void fitSP(int i, double tol, int mit, int fm, double peak0, int kpb=1);
double getDR();
double getAR();
int getN() {return n;}
int getNsp() {return nsp;}
double getDt() {return dt;}
double getV0() {return v0;}
double getD0() {return d0;}
double getPeakAcc() {return peak(acc,n);}
double getPeakVel() {return peak(vel,n);}
double getPeakDisp() {return peak(disp,n);}
double getRMSAcc() {return rms(acc,n);}
double getRMSVel() {return rms(vel,n);}
double getRMSDisp() {return rms(disp,n);}
double *getT() {return t;}
double *getAcc0() {return acc0;}
double *getAcc() {return acc;}
double *getVel() {return vel;}
double *getDisp() {return disp;}
double *getTd() {return td;}
double *getTv() {return tv;}
double *getTa() {return ta;}
double *getRd() {return rd;}
double *getRv() {return rv;}
double *getRa() {return ra;}
double *getZeta() {return zeta;}
double *getIa() {return Ia;}
double *getIv() {return Iv;}
double *getId() {return Id;}
double *getFreqs() {return freqs;}
double *getAmpf() {return ampf;}
double *getAngf() {return angf;}
double *getDAngf() {return dangf;}
double *getPsd() {return psd;}
double *getFpsd() {return fpsd;}
double *getRF();
double **getTHData();
double **getSPData(int i);
double ***getSPData();
double *getSPTData();
double **getEnergy();
Spectra *getSP() {return sp;}
Spectra *getSP(int i) {return sp+i;}
// Response of SDOF
void response(double zeta, double P, int method=2);
void responseNL(double zeta, double P, int method, double *cp);
QVector<double> qGetT() {return A2QV(t,n);}
QVector<double> qGetAcc0() {return A2QV(acc0,n);}
QVector<double> qGetAcc() {return A2QV(acc,n);}
QVector<double> qGetVel() {return A2QV(vel,n);}
QVector<double> qGetDisp() {return A2QV(disp,n);}
QVector<double> qGetTa() {return A2QV(ta,n);}
QVector<double> qGetTv() {return A2QV(tv,n);}
QVector<double> qGetTd() {return A2QV(td,n);}
QVector<double> qGetRa() {return A2QV(ra,n);}
QVector<double> qGetRv() {return A2QV(rv,n);}
QVector<double> qGetRd() {return A2QV(rd,n);}
QVector<double> qGetIa() {return A2QV(Ia,n);}
QVector<double> qGetIv() {return A2QV(Iv,n);}
QVector<double> qGetId() {return A2QV(Id,n);}
QVector<double> qGetFreqs() { return A2QV(freqs, nfft / 2 + 1); }
QVector<double> qGetAmpf() { return A2QV(ampf, nfft / 2 + 1); }
QVector<double> qGetAngf() { return A2QV(angf, nfft / 2 + 1); }
QVector<double> qGetDAngf() { return A2QV(dangf, nfft / 2 + 1); }
QVector<double> qGetPsd() { return A2QV(psd, npsd/2 + 1); }
QVector<double> qGetFpsd() { return A2QV(fpsd, npsd/2 + 1); }
QVector<double> qGetRF() {return A2QV(getRF(),n);}
Response getRes() {return res;}
void endAlign(int ntp=8, bool raw=true, int IZC=1, bool AccOnly=false);
private:
int n, nsp, nfft, npsd;
double dt, v0, d0;
double *t, *acc, *vel, *disp;
double *acc0, *Ia, *Iv, *Id;
double *td, *tv, *ta;
double *rd, *rv, *ra;
Spectra *sp;
double *zeta;
std::complex<double> *af;
double *freqs, *ampf, *angf, *dangf, *psd, *fpsd;
Response res;
void reallocateTH();
};
#endif // EQSIGNAL_H
| 32.195767 | 111 | 0.637141 | [
"model"
] |
680714167c581f2f42049ed499434444828366c4 | 7,252 | c | C | src/libseptvm/common/garray.c | krajzeg/september | 109f4deea8175119e7d7aae77e2de741308d7f36 | [
"MIT"
] | null | null | null | src/libseptvm/common/garray.c | krajzeg/september | 109f4deea8175119e7d7aae77e2de741308d7f36 | [
"MIT"
] | null | null | null | src/libseptvm/common/garray.c | krajzeg/september | 109f4deea8175119e7d7aae77e2de741308d7f36 | [
"MIT"
] | null | null | null | /*****************************************************************
**
** garray.c
**
** Implementation for a generic dynamic array.
**
***************
** September **
*****************************************************************/
// ===============================================================
// Includes
// ===============================================================
#include <string.h>
#include <stdint.h>
#include <stddef.h>
#include "garray.h"
#include "../vm/mem.h"
// ===============================================================
// Generic array implementation - privates
// ===============================================================
// how much the array grows each time it runs out of storage
#define ARRAY_GROWTH_FACTOR 1.5f
// Resizes the array's backing store to a new number of elements.
void _ga_resize(GenericArray *this, uint32_t new_size) {
// create new content array, copying the old contents over
void *new_contents = this->allocator->reallocate(this->start, this->end - this->start, new_size * this->element_size);
// attach new storage
ptrdiff_t length = this->end - this->start;
this->start = new_contents;
this->end = new_contents + length;
this->memory_end = new_contents + (new_size * this->element_size);
}
// ===============================================================
// Array implementation - public
// ===============================================================
// Creates a new, empty array.
GenericArray *ga_create(uint32_t initial_capacity, size_t element_size, Allocator *allocator) {
// allocate, initialize, return
GenericArray *array = allocator->allocate(sizeof(GenericArray));
ga_init(array, initial_capacity, element_size, allocator);
return array;
}
// Initializes a new generic array in place.
void ga_init(GenericArray *this, uint32_t initial_capacity, size_t element_size, Allocator *allocator) {
this->allocator = allocator;
this->element_size = element_size;
// allocate some storage for contents
this->start = allocator->allocate(initial_capacity * element_size);
this->end = this->start;
this->memory_end = this->start + (initial_capacity * element_size);
}
// Pushes a new value at the end of this array.
void *ga_push(GenericArray *this, void *value) {
// out of space?
if (this->end == this->memory_end) {
uint32_t current_size = (this->end - this->start) / this->element_size;
uint32_t new_size = (uint32_t)(current_size * ARRAY_GROWTH_FACTOR) + 1;
_ga_resize(this, new_size);
}
// push
memcpy(this->end, value, this->element_size);
this->end += this->element_size;
return this->end - this->element_size;
}
// Pops a value from the end of this array.
void *ga_pop(GenericArray *this) {
// detect underflow
if (this->end == this->start) {
return NULL;
}
// pop
this->end -= this->element_size;
return this->end;
}
// Gets a value at a given index.
void *ga_get(GenericArray *this, uint32_t index) {
void *pointer = this->start + this->element_size * index;
// detect out of bounds
if (pointer >= this->end)
return NULL;
// return value
return pointer;
}
// Sets a value at a given index.
void *ga_set(GenericArray *this, uint32_t index, void *value) {
void *pointer = this->start + this->element_size * index;
if (pointer >= this->end)
return NULL;
// set the value and return it
memcpy(pointer, value, this->element_size);
return pointer;
}
// Grows the array by a given number of cells.
void ga_grow(GenericArray *this, uint32_t cells) {
// resize storage if needed
if (this->end + (cells * this->element_size) >= this->memory_end) {
uint32_t current_size = (this->end - this->start) / this->element_size;
uint32_t new_size = (uint32_t)(current_size * ARRAY_GROWTH_FACTOR) + cells;
_ga_resize(this, new_size);
}
// move pointer to make the cells appear
this->end += cells * this->element_size;
}
// Clears the array, truncating it to 0 entries, but keeping its storage intact.
void ga_clear(GenericArray *this) {
this->end = this->start;
}
// Gets the length of this array.
uint32_t ga_length(GenericArray *this) {
return (this->end - this->start) / this->element_size;
}
// Finds an object in the array (memcmp is used for comparison) and returns its index, or -1 if the object is not found.
int32_t ga_index_of(GenericArray *this, void *needed_ptr) {
GenericArrayIterator it = ga_iterate_over(this);
while (!gait_end(&it)) {
void *element_ptr = gait_current(&it);
if (memcmp(needed_ptr, element_ptr, this->element_size) == 0)
return gait_index(&it);
else
gait_advance(&it);
}
// nothing found
return -1;
}
// Removes the first occurence of an object from the array (memcmp is used for comparisons) if it is present.
// Returns true if the object was present, false otherwise.
bool ga_remove(GenericArray *this, void *value_ptr) {
int32_t index = ga_index_of(this, value_ptr);
if (index == -1)
return false;
// copy all elements following the one to be removed one index to the left
void *location = this->start + index * this->element_size;
memmove(location, location + this->element_size, this->end - location - this->element_size);
// shorten the array by one element
this->end -= this->element_size;
// we have removed something
return true;
}
// Removes a single element from the given index.
void ga_remove_at(GenericArray *this, uint32_t index) {
// copy following elements one step back
void *position = this->start + index * this->element_size;
memmove(position, position + this->element_size, this->end - position - this->element_size);
// shorten the array by one element
this->end -= this->element_size;
}
// ===============================================================
// Iteration
// ===============================================================
// Starts a new iteration over an array.
GenericArrayIterator ga_iterate_over(GenericArray *this) {
GenericArrayIterator it = {this, this->start, this->start};
return it;
}
// Returns the current element under the iterator.
void *gait_current(GenericArrayIterator *this) {
return this->position;
}
// Returns the index of the current element under the iterator.
uint32_t gait_index(GenericArrayIterator *this) {
return (this->position - this->start) / this->array->element_size;
}
// Advances the iterator to the next element.
void gait_advance(GenericArrayIterator *this) {
this->position += this->array->element_size;
}
// Removes the current element and advances to the next.
void gait_remove_and_advance(GenericArrayIterator *this) {
ga_remove_at(this->array, gait_index(this));
}
// Returns true if we have reached past the last element in the array.
bool gait_end(GenericArrayIterator *this) {
return this->position >= this->array->end;
}
// ===============================================================
// Freeing memory
// ===============================================================
// Frees just the internal entries table (for use with arrays created via ga_init). The memory for the array
// itself has to be freed separately.
void ga_free_entries(GenericArray *this) {
this->allocator->free(this->start);
}
// Frees the array.
void ga_free(GenericArray *this) {
this->allocator->free(this->start);
this->allocator->free(this);
}
| 32.231111 | 120 | 0.642719 | [
"object"
] |
680c0cd9ad1d738516247dfe2eb9bd30146ee29d | 5,996 | h | C | libs/obs/include/mrpt/obs/CObservationRGBD360.h | skair39/mrpt | 88238f8ac1abdcf15401e14dc3a9faa5c59ba559 | [
"BSD-3-Clause"
] | 2 | 2019-02-20T02:36:05.000Z | 2019-02-20T02:46:51.000Z | libs/obs/include/mrpt/obs/CObservationRGBD360.h | skair39/mrpt | 88238f8ac1abdcf15401e14dc3a9faa5c59ba559 | [
"BSD-3-Clause"
] | null | null | null | libs/obs/include/mrpt/obs/CObservationRGBD360.h | skair39/mrpt | 88238f8ac1abdcf15401e14dc3a9faa5c59ba559 | [
"BSD-3-Clause"
] | null | null | null | /* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| |
| Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
| See: http://www.mrpt.org/Authors - All rights reserved. |
| Released under BSD License. See details in http://www.mrpt.org/License |
+------------------------------------------------------------------------+ */
#pragma once
#include <mrpt/serialization/CSerializable.h>
#include <mrpt/img/CImage.h>
#include <mrpt/obs/CObservation.h>
#include <mrpt/obs/CObservation2DRangeScan.h>
#include <mrpt/poses/CPose3D.h>
#include <mrpt/poses/CPose2D.h>
#include <mrpt/math/CPolygon.h>
#include <mrpt/math/CMatrix.h>
#include <mrpt/opengl/pointcloud_adapters.h>
namespace mrpt
{
namespace obs
{
// namespace detail {
// // Implemented in CObservationRGBD360_project3D_impl.h
// template <class POINTMAP>
// void project3DPointsFromDepthImageInto(CObservationRGBD360 &src_obs,
// POINTMAP &dest_pointcloud, const bool takeIntoAccountSensorPoseOnRobot, const
// mrpt::poses::CPose3D * robotPoseInTheWorld, const bool PROJ3D_USE_LUT);
// }
/** Declares a class derived from "CObservation" that
* encapsules an omnidirectional RGBD measurement from a set of RGBD
*sensors.
* This kind of observations can carry one or more of these data fields:
* - 3D point cloud (as float's).
* - 2D range image (as a matrix): Each entry in the matrix
*"rangeImage(ROW,COLUMN)" contains a distance or a depth (in meters), depending
*on \a range_is_depth.
* - 2D intensity (grayscale or RGB) image (as a mrpt::img::CImage): For
*SwissRanger cameras, a logarithmic A-law compression is used to convert the
*original 16bit intensity to a more standard 8bit graylevel.
*
* The coordinates of the 3D point cloud are in millimeters with respect to the
*RGB camera origin of coordinates
*
* The 2D images and matrices are stored as common images, with an up->down
*rows order and left->right, as usual.
* Optionally, the intensity and confidence channels can be set to
*delayed-load images for off-rawlog storage so it saves
* memory by having loaded in memory just the needed images. See the methods
*load() and unload().
* Due to the intensive storage requirements of this kind of observations, this
*observation is the only one in MRPT
* for which it's recommended to always call "load()" and "unload()" before
*and after using the observation, *ONLY* when
* the observation was read from a rawlog dataset, in order to make sure that
*all the externally stored data fields are
* loaded and ready in memory.
*
* Classes that grab observations of this type are:
* - mrpt::hwdrivers::CSwissRanger3DCamera
* - mrpt::hwdrivers::CKinect
*
*
* 3D point clouds can be generated at any moment after grabbing with
*CObservationRGBD360::project3DPointsFromDepthImage() and
*CObservationRGBD360::project3DPointsFromDepthImageInto(), provided the correct
* calibration parameters.
*
* \note Starting at serialization version 3 (MRPT 0.9.1+), the 3D point cloud
*and the rangeImage can both be stored externally to save rawlog space.
* \note Starting at serialization version 5 (MRPT 0.9.5+), the new field \a
*range_is_depth
* \note Starting at serialization version 6 (MRPT 0.9.5+), the new field \a
*intensityImageChannel
*
* \sa mrpt::hwdrivers::CSwissRanger3DCamera, mrpt::hwdrivers::COpenNI2_RGBD360,
*CObservation
* \ingroup mrpt_obs_grp
*/
class CObservationRGBD360 : public CObservation
{
DEFINE_SERIALIZABLE(CObservationRGBD360)
protected:
/** If set to true, m_points3D_external_file is valid. */
bool m_points3D_external_stored{false};
/** 3D points are in CImage::getImagesPathBase()+<this_file_name> */
std::string m_points3D_external_file;
/** If set to true, m_rangeImage_external_file is valid. */
bool m_rangeImage_external_stored{false};
/** rangeImage is in CImage::getImagesPathBase()+<this_file_name> */
std::string m_rangeImage_external_file;
public:
/** Default constructor */
CObservationRGBD360();
/** Destructor */
~CObservationRGBD360() override;
static const unsigned int NUM_SENSORS = 2;
mrpt::system::TTimeStamp timestamps[NUM_SENSORS];
/** true means the field rangeImage contains valid data */
bool hasRangeImage{false};
/** If hasRangeImage=true, a matrix of floats with the range data as
* captured by the camera (in meters) \sa range_is_depth */
mrpt::math::CMatrix rangeImages[NUM_SENSORS];
/** Similar to calling "rangeImage.setSize(H,W)" but this method provides
* memory pooling to speed-up the memory allocation. */
void rangeImage_setSize(
const int HEIGHT, const int WIDTH, const unsigned sensor_id);
/** true means the field intensityImage contains valid data */
bool hasIntensityImage{false};
/** If hasIntensityImage=true, a color or gray-level intensity image of the
* same size than "rangeImage" */
mrpt::img::CImage intensityImages[NUM_SENSORS];
/** Projection parameters of the 8 RGBD sensor. */
mrpt::img::TCamera sensorParamss[NUM_SENSORS];
/** The maximum range allowed by the device, in meters (e.g. 8.0m, 5.0m,...)
*/
float maxRange{10.0f};
/** The 6D pose of the sensor on the robot. */
mrpt::poses::CPose3D sensorPose;
/** The "sigma" error of the device in meters, used while inserting the scan
* in an occupancy grid. */
float stdError{0.01f};
// See base class docs
void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
{
out_sensorPose = sensorPose;
}
void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
{
sensorPose = newSensorPose;
}
void getDescriptionAsText(std::ostream& o) const override;
}; // End of class def.
} // namespace obs
} // namespace mrpt
| 39.447368 | 80 | 0.700133 | [
"3d"
] |
68100e165993b54b0fc3fe6adadbbe9ecb46e109 | 4,670 | h | C | Kernel_23/include/CGAL/Circle_3.h | ffteja/cgal | c1c7f4ad9a4cd669e33ca07a299062a461581812 | [
"CC0-1.0"
] | 3,227 | 2015-03-05T00:19:18.000Z | 2022-03-31T08:20:35.000Z | Kernel_23/include/CGAL/Circle_3.h | ffteja/cgal | c1c7f4ad9a4cd669e33ca07a299062a461581812 | [
"CC0-1.0"
] | 5,574 | 2015-03-05T00:01:56.000Z | 2022-03-31T15:08:11.000Z | Kernel_23/include/CGAL/Circle_3.h | ffteja/cgal | c1c7f4ad9a4cd669e33ca07a299062a461581812 | [
"CC0-1.0"
] | 1,274 | 2015-03-05T00:01:12.000Z | 2022-03-31T14:47:56.000Z | // Copyright (c) 2005-2006 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// Partially supported by the IST Programme of the EU as a Shared-cost
// RTD (FET Open) Project under Contract No IST-2000-26473
// (ECG - Effective Computational Geometry for Curves and Surfaces)
// and a STREP (FET Open) Project under Contract No IST-006413
// (ACS -- Algorithms for Complex Shapes)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Monique Teillaud <Monique.Teillaud@sophia.inria.fr>
// Sylvain Pion
// Pedro Machado <tashimir@gmail.com>
// Julien Hazebrouck
// Damien Leroy
#ifndef CGAL_CIRCLE_3_H
#define CGAL_CIRCLE_3_H
#include <CGAL/assertions.h>
#include <boost/type_traits/is_same.hpp>
#include <CGAL/Kernel/Return_base_tag.h>
#include <CGAL/Bbox_3.h>
#include <CGAL/representation_tags.h>
#include <CGAL/Dimension.h>
namespace CGAL {
template <class R_>
class Circle_3
: public R_::Kernel_base::Circle_3
{
typedef typename R_::RT RT;
typedef typename R_::FT FT;
typedef typename R_::Point_3 Point_3;
typedef typename R_::Plane_3 Plane_3;
typedef typename R_::Vector_3 Vector_3;
typedef typename R_::Sphere_3 Sphere_3;
typedef typename R_::Direction_3 Direction_3;
typedef Circle_3 Self;
CGAL_static_assertion((boost::is_same<Self, typename R_::Circle_3>::value));
public:
typedef Dimension_tag<3> Ambient_dimension;
typedef Dimension_tag<1> Feature_dimension;
typedef typename R_::Kernel_base::Circle_3 Rep;
typedef R_ R;
const Rep& rep() const
{
return *this;
}
Rep& rep()
{
return *this;
}
Circle_3() {}
Circle_3(const Sphere_3& s, const Plane_3& p, int a)
: Rep(typename R::Construct_circle_3()(s,p,a)) {}
Circle_3(const Point_3& c, const FT& sr, const Plane_3& p)
: Rep(typename R::Construct_circle_3()(c,sr,p)) {}
Circle_3(const Point_3& c, const FT& sr, const Direction_3& d)
: Rep(typename R::Construct_circle_3()(c,sr,d)) {}
Circle_3(const Point_3& c, const FT& sr, const Vector_3& v)
: Rep(typename R::Construct_circle_3()(c,sr,v)) {}
Circle_3(const Sphere_3& s1, const Sphere_3& s2)
: Rep(typename R::Construct_circle_3()(s1,s2)) {}
Circle_3(const Sphere_3& s, const Plane_3& p)
: Rep(typename R::Construct_circle_3()(s,p)) {}
Circle_3(const Plane_3& p, const Sphere_3& s)
: Rep(typename R::Construct_circle_3()(p,s)) {}
Circle_3(const Point_3& p1, const Point_3& p2, const Point_3& p3)
: Rep(typename R::Construct_circle_3()(p1,p2,p3)) {}
Circle_3(const Rep& r)
: Rep(r) {}
Circle_3(Rep&& r)
: Rep(std::move(r)) {}
decltype(auto)
diametral_sphere() const
{
return typename R::Construct_sphere_3()(*this);
}
Point_3 center() const
{
return typename R::Construct_sphere_3()(*this).center();
}
FT squared_radius() const
{
return typename R::Construct_sphere_3()(*this).squared_radius();
}
decltype(auto)
supporting_plane() const
{
return typename R::Construct_plane_3()(*this);
}
Bbox_3 bbox() const
{
return typename R::Construct_bbox_3()(*this);
}
FT area_divided_by_pi() const
{
return typename R::Compute_area_divided_by_pi_3()(*this);
}
double approximate_area() const
{
return typename R::Compute_approximate_area_3()(*this);
}
FT squared_length_divided_by_pi_square() const
{
return typename R::Compute_squared_length_divided_by_pi_square_3()(*this);
}
double approximate_squared_length() const
{
return typename R::Compute_approximate_squared_length_3()(*this);
}
typename R::Boolean
has_on(const Point_3 &p) const
{
return typename R::Has_on_3()(*this, p);
}
};
template < typename R >
inline
bool
operator==(const Circle_3<R> &p,
const Circle_3<R> &q)
{
return R().equal_3_object()(p, q);
}
template < typename R >
inline
bool
operator!=(const Circle_3<R> &p,
const Circle_3<R> &q)
{
return ! (p == q);
}
template < typename R >
std::ostream &
operator<<(std::ostream & os, const Circle_3<R> &c)
{
return os << c.supporting_plane() << " "
<< c.diametral_sphere() << " ";
}
template < typename R >
std::istream &
operator>>(std::istream & is, Circle_3<R> &c)
{
typename R::Plane_3 p;
typename R::Sphere_3 s;
is >> p >> s ;
if (is)
c = Circle_3<R>(p, s);
return is;
}
} //namespace CGAL
#endif // CGAL_CIRCLE_3_H
| 23.826531 | 78 | 0.64818 | [
"geometry"
] |
68113419e58395effdf0fffbcd8faec5afe6be67 | 1,897 | h | C | marlin-firmware/Marlin/src/module/thermistor/thermistor_6.h | voicevon/gogame_bot | a1d91f4a1b2537d00b5cd5ed78d429a9c1aad3d1 | [
"MIT"
] | 6 | 2020-12-04T21:55:04.000Z | 2022-02-02T20:49:45.000Z | marlin-firmware/Marlin/src/module/thermistor/thermistor_6.h | voicevon/gogame_bot | a1d91f4a1b2537d00b5cd5ed78d429a9c1aad3d1 | [
"MIT"
] | 24 | 2020-12-25T05:00:51.000Z | 2021-04-20T00:56:50.000Z | marlin-firmware/Marlin/src/module/thermistor/thermistor_6.h | voicevon/gogame_bot | a1d91f4a1b2537d00b5cd5ed78d429a9c1aad3d1 | [
"MIT"
] | 3 | 2021-05-01T15:13:41.000Z | 2022-02-11T01:15:30.000Z | /**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 4092 K, 8.2 kOhm pull-up, 100k Epcos (?) thermistor
const temp_entry_t temptable_6[] PROGMEM = {
{ OV( 1), 350 },
{ OV( 28), 250 }, // top rating 250C
{ OV( 31), 245 },
{ OV( 35), 240 },
{ OV( 39), 235 },
{ OV( 42), 230 },
{ OV( 44), 225 },
{ OV( 49), 220 },
{ OV( 53), 215 },
{ OV( 62), 210 },
{ OV( 71), 205 }, // fitted graphically
{ OV( 78), 200 }, // fitted graphically
{ OV( 94), 190 },
{ OV( 102), 185 },
{ OV( 116), 170 },
{ OV( 143), 160 },
{ OV( 183), 150 },
{ OV( 223), 140 },
{ OV( 270), 130 },
{ OV( 318), 120 },
{ OV( 383), 110 },
{ OV( 413), 105 },
{ OV( 439), 100 },
{ OV( 484), 95 },
{ OV( 513), 90 },
{ OV( 607), 80 },
{ OV( 664), 70 },
{ OV( 781), 60 },
{ OV( 810), 55 },
{ OV( 849), 50 },
{ OV( 914), 45 },
{ OV( 914), 40 },
{ OV( 935), 35 },
{ OV( 954), 30 },
{ OV( 970), 25 },
{ OV( 978), 22 },
{ OV(1008), 3 },
{ OV(1023), 0 } // to allow internal 0 degrees C
};
| 29.184615 | 79 | 0.568266 | [
"3d"
] |
6811984e5e847384624a17806c8bd132055e835c | 2,951 | h | C | aws-cpp-sdk-elasticloadbalancing/include/aws/elasticloadbalancing/model/ConnectionDraining.h | capeanalytics/aws-sdk-cpp | e88f75add5a9433601b6d46fe738e493da56ac3b | [
"Apache-2.0"
] | null | null | null | aws-cpp-sdk-elasticloadbalancing/include/aws/elasticloadbalancing/model/ConnectionDraining.h | capeanalytics/aws-sdk-cpp | e88f75add5a9433601b6d46fe738e493da56ac3b | [
"Apache-2.0"
] | null | null | null | aws-cpp-sdk-elasticloadbalancing/include/aws/elasticloadbalancing/model/ConnectionDraining.h | capeanalytics/aws-sdk-cpp | e88f75add5a9433601b6d46fe738e493da56ac3b | [
"Apache-2.0"
] | null | null | null | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
#pragma once
#include <aws/elasticloadbalancing/ElasticLoadBalancing_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
namespace Aws
{
namespace Utils
{
namespace Xml
{
class XmlNode;
} // namespace Xml
} // namespace Utils
namespace ElasticLoadBalancing
{
namespace Model
{
/**
* <p>Information about the <code>ConnectionDraining</code>
* attribute.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConnectionDraining">AWS
* API Reference</a></p>
*/
class AWS_ELASTICLOADBALANCING_API ConnectionDraining
{
public:
ConnectionDraining();
ConnectionDraining(const Aws::Utils::Xml::XmlNode& xmlNode);
ConnectionDraining& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
void OutputToStream(Aws::OStream& oStream, const char* location) const;
/**
* <p>Specifies whether connection draining is enabled for the load balancer.</p>
*/
inline bool GetEnabled() const{ return m_enabled; }
/**
* <p>Specifies whether connection draining is enabled for the load balancer.</p>
*/
inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
/**
* <p>Specifies whether connection draining is enabled for the load balancer.</p>
*/
inline ConnectionDraining& WithEnabled(bool value) { SetEnabled(value); return *this;}
/**
* <p>The maximum time, in seconds, to keep the existing connections open before
* deregistering the instances.</p>
*/
inline int GetTimeout() const{ return m_timeout; }
/**
* <p>The maximum time, in seconds, to keep the existing connections open before
* deregistering the instances.</p>
*/
inline void SetTimeout(int value) { m_timeoutHasBeenSet = true; m_timeout = value; }
/**
* <p>The maximum time, in seconds, to keep the existing connections open before
* deregistering the instances.</p>
*/
inline ConnectionDraining& WithTimeout(int value) { SetTimeout(value); return *this;}
private:
bool m_enabled;
bool m_enabledHasBeenSet;
int m_timeout;
bool m_timeoutHasBeenSet;
};
} // namespace Model
} // namespace ElasticLoadBalancing
} // namespace Aws
| 31.731183 | 118 | 0.70654 | [
"model"
] |
6813870389ee9ca351993a5b4db2178b2512f488 | 30,117 | c | C | freebsd5/sys/kern/kern_exec.c | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 91 | 2015-01-05T15:18:31.000Z | 2022-03-11T16:43:28.000Z | freebsd5/sys/kern/kern_exec.c | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 1 | 2016-02-25T15:57:55.000Z | 2016-02-25T16:01:02.000Z | freebsd5/sys/kern/kern_exec.c | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 21 | 2015-02-07T08:23:07.000Z | 2021-12-14T06:01:49.000Z | /*
* Copyright (c) 1993, David Greenman
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/kern/kern_exec.c,v 1.202.2.1 2002/12/19 09:40:10 alfred Exp $
*/
#include "opt_ktrace.h"
#include "opt_mac.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/kernel.h>
#include <sys/mac.h>
#include <sys/mount.h>
#include <sys/filedesc.h>
#include <sys/fcntl.h>
#include <sys/acct.h>
#include <sys/exec.h>
#include <sys/imgact.h>
#include <sys/imgact_elf.h>
#include <sys/wait.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/pioctl.h>
#include <sys/namei.h>
#include <sys/sysent.h>
#include <sys/shm.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#include <sys/vnode.h>
#ifdef KTRACE
#include <sys/ktrace.h>
#endif
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#include <vm/vm_object.h>
#include <vm/vm_pager.h>
#include <machine/reg.h>
MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments");
static MALLOC_DEFINE(M_ATEXEC, "atexec", "atexec callback");
static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS);
static int sysctl_kern_usrstack(SYSCTL_HANDLER_ARGS);
static int kern_execve(struct thread *td, char *fname, char **argv,
char **envv, struct mac *mac_p);
/*
* callout list for things to do at exec time
*/
struct execlist {
execlist_fn function;
TAILQ_ENTRY(execlist) next;
};
TAILQ_HEAD(exec_list_head, execlist);
static struct exec_list_head exec_list = TAILQ_HEAD_INITIALIZER(exec_list);
/* XXX This should be vm_size_t. */
SYSCTL_PROC(_kern, KERN_PS_STRINGS, ps_strings, CTLTYPE_ULONG|CTLFLAG_RD,
NULL, 0, sysctl_kern_ps_strings, "LU", "");
/* XXX This should be vm_size_t. */
SYSCTL_PROC(_kern, KERN_USRSTACK, usrstack, CTLTYPE_ULONG|CTLFLAG_RD,
NULL, 0, sysctl_kern_usrstack, "LU", "");
u_long ps_arg_cache_limit = PAGE_SIZE / 16;
SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW,
&ps_arg_cache_limit, 0, "");
int ps_argsopen = 1;
SYSCTL_INT(_kern, OID_AUTO, ps_argsopen, CTLFLAG_RW, &ps_argsopen, 0, "");
#ifdef __ia64__
/* XXX HACK */
static int regstkpages = 256;
SYSCTL_INT(_machdep, OID_AUTO, regstkpages, CTLFLAG_RW, ®stkpages, 0, "");
#endif
static int
sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
{
struct proc *p;
p = curproc;
return (SYSCTL_OUT(req, &p->p_sysent->sv_psstrings,
sizeof(p->p_sysent->sv_psstrings)));
}
static int
sysctl_kern_usrstack(SYSCTL_HANDLER_ARGS)
{
struct proc *p;
p = curproc;
return (SYSCTL_OUT(req, &p->p_sysent->sv_usrstack,
sizeof(p->p_sysent->sv_usrstack)));
}
/*
* Each of the items is a pointer to a `const struct execsw', hence the
* double pointer here.
*/
static const struct execsw **execsw;
/*
* In-kernel implementation of execve(). All arguments are assumed to be
* userspace pointers from the passed thread.
*
* MPSAFE
*/
static int
kern_execve(td, fname, argv, envv, mac_p)
struct thread *td;
char *fname;
char **argv;
char **envv;
struct mac *mac_p;
{
struct proc *p = td->td_proc;
struct nameidata nd, *ndp;
struct ucred *newcred = NULL, *oldcred;
struct uidinfo *euip;
register_t *stack_base;
int error, len, i;
struct image_params image_params, *imgp;
struct vattr attr;
int (*img_first)(struct image_params *);
struct pargs *oldargs = NULL, *newargs = NULL;
struct procsig *oldprocsig, *newprocsig;
#ifdef KTRACE
struct vnode *tracevp = NULL;
#endif
struct vnode *textvp = NULL;
int credential_changing;
int textset;
#ifdef MAC
struct label interplabel; /* label of the interpreted vnode */
struct label execlabel; /* optional label argument */
int will_transition, interplabelvalid = 0;
#endif
imgp = &image_params;
/*
* Lock the process and set the P_INEXEC flag to indicate that
* it should be left alone until we're done here. This is
* necessary to avoid race conditions - e.g. in ptrace() -
* that might allow a local user to illicitly obtain elevated
* privileges.
*/
PROC_LOCK(p);
KASSERT((p->p_flag & P_INEXEC) == 0,
("%s(): process already has P_INEXEC flag", __func__));
if (p->p_flag & P_KSES) {
if (thread_single(SINGLE_EXIT)) {
PROC_UNLOCK(p);
return (ERESTART); /* Try again later. */
}
/*
* If we get here all other threads are dead,
* so unset the associated flags and lose KSE mode.
*/
p->p_flag &= ~P_KSES;
td->td_flags &= ~TDF_UNBOUND;
thread_single_end();
}
p->p_flag |= P_INEXEC;
PROC_UNLOCK(p);
/*
* Initialize part of the common data
*/
imgp->proc = p;
imgp->userspace_argv = argv;
imgp->userspace_envv = envv;
imgp->execlabel = NULL;
imgp->attr = &attr;
imgp->argc = imgp->envc = 0;
imgp->argv0 = NULL;
imgp->entry_addr = 0;
imgp->vmspace_destroyed = 0;
imgp->interpreted = 0;
imgp->interpreter_name[0] = '\0';
imgp->auxargs = NULL;
imgp->vp = NULL;
imgp->object = NULL;
imgp->firstpage = NULL;
imgp->ps_strings = 0;
imgp->auxarg_size = 0;
#ifdef MAC
error = mac_execve_enter(imgp, mac_p, &execlabel);
if (error) {
mtx_lock(&Giant);
goto exec_fail;
}
#endif
/*
* Allocate temporary demand zeroed space for argument and
* environment strings
*/
imgp->stringbase = (char *)kmem_alloc_wait(exec_map, ARG_MAX +
PAGE_SIZE);
if (imgp->stringbase == NULL) {
error = ENOMEM;
mtx_lock(&Giant);
goto exec_fail;
}
imgp->stringp = imgp->stringbase;
imgp->stringspace = ARG_MAX;
imgp->image_header = imgp->stringbase + ARG_MAX;
/*
* Translate the file name. namei() returns a vnode pointer
* in ni_vp amoung other things.
*/
ndp = &nd;
NDINIT(ndp, LOOKUP, LOCKLEAF | FOLLOW | SAVENAME,
UIO_USERSPACE, fname, td);
mtx_lock(&Giant);
interpret:
error = namei(ndp);
if (error) {
kmem_free_wakeup(exec_map, (vm_offset_t)imgp->stringbase,
ARG_MAX + PAGE_SIZE);
goto exec_fail;
}
imgp->vp = ndp->ni_vp;
imgp->fname = fname;
/*
* Check file permissions (also 'opens' file)
*/
error = exec_check_permissions(imgp);
if (error)
goto exec_fail_dealloc;
if (VOP_GETVOBJECT(imgp->vp, &imgp->object) == 0)
vm_object_reference(imgp->object);
/*
* Set VV_TEXT now so no one can write to the executable while we're
* activating it.
*
* Remember if this was set before and unset it in case this is not
* actually an executable image.
*/
textset = imgp->vp->v_vflag & VV_TEXT;
imgp->vp->v_vflag |= VV_TEXT;
error = exec_map_first_page(imgp);
if (error)
goto exec_fail_dealloc;
/*
* If the current process has a special image activator it
* wants to try first, call it. For example, emulating shell
* scripts differently.
*/
error = -1;
if ((img_first = imgp->proc->p_sysent->sv_imgact_try) != NULL)
error = img_first(imgp);
/*
* Loop through the list of image activators, calling each one.
* An activator returns -1 if there is no match, 0 on success,
* and an error otherwise.
*/
for (i = 0; error == -1 && execsw[i]; ++i) {
if (execsw[i]->ex_imgact == NULL ||
execsw[i]->ex_imgact == img_first) {
continue;
}
error = (*execsw[i]->ex_imgact)(imgp);
}
if (error) {
if (error == -1) {
if (textset == 0)
imgp->vp->v_vflag &= ~VV_TEXT;
error = ENOEXEC;
}
goto exec_fail_dealloc;
}
/*
* Special interpreter operation, cleanup and loop up to try to
* activate the interpreter.
*/
if (imgp->interpreted) {
exec_unmap_first_page(imgp);
/*
* VV_TEXT needs to be unset for scripts. There is a short
* period before we determine that something is a script where
* VV_TEXT will be set. The vnode lock is held over this
* entire period so nothing should illegitimately be blocked.
*/
imgp->vp->v_vflag &= ~VV_TEXT;
/* free name buffer and old vnode */
NDFREE(ndp, NDF_ONLY_PNBUF);
#ifdef MAC
mac_init_vnode_label(&interplabel);
mac_copy_vnode_label(&ndp->ni_vp->v_label, &interplabel);
interplabelvalid = 1;
#endif
vput(ndp->ni_vp);
vm_object_deallocate(imgp->object);
imgp->object = NULL;
/* set new name to that of the interpreter */
NDINIT(ndp, LOOKUP, LOCKLEAF | FOLLOW | SAVENAME,
UIO_SYSSPACE, imgp->interpreter_name, td);
goto interpret;
}
/*
* Copy out strings (args and env) and initialize stack base
*/
if (p->p_sysent->sv_copyout_strings)
stack_base = (*p->p_sysent->sv_copyout_strings)(imgp);
else
stack_base = exec_copyout_strings(imgp);
/*
* If custom stack fixup routine present for this process
* let it do the stack setup.
* Else stuff argument count as first item on stack
*/
if (p->p_sysent->sv_fixup)
(*p->p_sysent->sv_fixup)(&stack_base, imgp);
else
suword(--stack_base, imgp->argc);
/*
* For security and other reasons, the file descriptor table cannot
* be shared after an exec.
*/
FILEDESC_LOCK(p->p_fd);
if (p->p_fd->fd_refcnt > 1) {
struct filedesc *tmp;
tmp = fdcopy(td);
FILEDESC_UNLOCK(p->p_fd);
fdfree(td);
p->p_fd = tmp;
} else
FILEDESC_UNLOCK(p->p_fd);
/*
* Malloc things before we need locks.
*/
newcred = crget();
euip = uifind(attr.va_uid);
i = imgp->endargs - imgp->stringbase;
if (ps_arg_cache_limit >= i + sizeof(struct pargs))
newargs = pargs_alloc(i);
/* close files on exec */
fdcloseexec(td);
/* Get a reference to the vnode prior to locking the proc */
VREF(ndp->ni_vp);
/*
* For security and other reasons, signal handlers cannot
* be shared after an exec. The new process gets a copy of the old
* handlers. In execsigs(), the new process will have its signals
* reset.
*/
PROC_LOCK(p);
mp_fixme("procsig needs a lock");
if (p->p_procsig->ps_refcnt > 1) {
oldprocsig = p->p_procsig;
PROC_UNLOCK(p);
MALLOC(newprocsig, struct procsig *, sizeof(struct procsig),
M_SUBPROC, M_WAITOK);
bcopy(oldprocsig, newprocsig, sizeof(*newprocsig));
newprocsig->ps_refcnt = 1;
oldprocsig->ps_refcnt--;
PROC_LOCK(p);
p->p_procsig = newprocsig;
if (p->p_sigacts == &p->p_uarea->u_sigacts)
panic("shared procsig but private sigacts?");
p->p_uarea->u_sigacts = *p->p_sigacts;
p->p_sigacts = &p->p_uarea->u_sigacts;
}
/* Stop profiling */
stopprofclock(p);
/* reset caught signals */
execsigs(p);
/* name this process - nameiexec(p, ndp) */
len = min(ndp->ni_cnd.cn_namelen,MAXCOMLEN);
bcopy(ndp->ni_cnd.cn_nameptr, p->p_comm, len);
p->p_comm[len] = 0;
/*
* mark as execed, wakeup the process that vforked (if any) and tell
* it that it now has its own resources back
*/
p->p_flag |= P_EXEC;
if (p->p_pptr && (p->p_flag & P_PPWAIT)) {
p->p_flag &= ~P_PPWAIT;
wakeup(p->p_pptr);
}
/*
* Implement image setuid/setgid.
*
* Don't honor setuid/setgid if the filesystem prohibits it or if
* the process is being traced.
*
* XXXMAC: For the time being, use NOSUID to also prohibit
* transitions on the file system.
*/
oldcred = p->p_ucred;
credential_changing = 0;
credential_changing |= (attr.va_mode & VSUID) && oldcred->cr_uid !=
attr.va_uid;
credential_changing |= (attr.va_mode & VSGID) && oldcred->cr_gid !=
attr.va_gid;
#ifdef MAC
will_transition = mac_execve_will_transition(oldcred, imgp->vp,
interplabelvalid ? &interplabel : NULL, imgp);
credential_changing |= will_transition;
#endif
if (credential_changing &&
(imgp->vp->v_mount->mnt_flag & MNT_NOSUID) == 0 &&
(p->p_flag & P_TRACED) == 0) {
/*
* Turn off syscall tracing for set-id programs, except for
* root. Record any set-id flags first to make sure that
* we do not regain any tracing during a possible block.
*/
setsugid(p);
#ifdef KTRACE
if (p->p_tracep && suser_cred(oldcred, PRISON_ROOT)) {
mtx_lock(&ktrace_mtx);
p->p_traceflag = 0;
tracevp = p->p_tracep;
p->p_tracep = NULL;
mtx_unlock(&ktrace_mtx);
}
#endif
/*
* Close any file descriptors 0..2 that reference procfs,
* then make sure file descriptors 0..2 are in use.
*
* setugidsafety() may call closef() and then pfind()
* which may grab the process lock.
* fdcheckstd() may call falloc() which may block to
* allocate memory, so temporarily drop the process lock.
*/
PROC_UNLOCK(p);
setugidsafety(td);
error = fdcheckstd(td);
if (error != 0)
goto done1;
PROC_LOCK(p);
/*
* Set the new credentials.
*/
crcopy(newcred, oldcred);
if (attr.va_mode & VSUID)
change_euid(newcred, euip);
if (attr.va_mode & VSGID)
change_egid(newcred, attr.va_gid);
#ifdef MAC
if (will_transition) {
mac_execve_transition(oldcred, newcred, imgp->vp,
interplabelvalid ? &interplabel : NULL, imgp);
}
#endif
/*
* Implement correct POSIX saved-id behavior.
*
* XXXMAC: Note that the current logic will save the
* uid and gid if a MAC domain transition occurs, even
* though maybe it shouldn't.
*/
change_svuid(newcred, newcred->cr_uid);
change_svgid(newcred, newcred->cr_gid);
p->p_ucred = newcred;
newcred = NULL;
} else {
if (oldcred->cr_uid == oldcred->cr_ruid &&
oldcred->cr_gid == oldcred->cr_rgid)
p->p_flag &= ~P_SUGID;
/*
* Implement correct POSIX saved-id behavior.
*
* XXX: It's not clear that the existing behavior is
* POSIX-compliant. A number of sources indicate that the
* saved uid/gid should only be updated if the new ruid is
* not equal to the old ruid, or the new euid is not equal
* to the old euid and the new euid is not equal to the old
* ruid. The FreeBSD code always updates the saved uid/gid.
* Also, this code uses the new (replaced) euid and egid as
* the source, which may or may not be the right ones to use.
*/
if (oldcred->cr_svuid != oldcred->cr_uid ||
oldcred->cr_svgid != oldcred->cr_gid) {
crcopy(newcred, oldcred);
change_svuid(newcred, newcred->cr_uid);
change_svgid(newcred, newcred->cr_gid);
p->p_ucred = newcred;
newcred = NULL;
}
}
/*
* Store the vp for use in procfs. This vnode was referenced prior
* to locking the proc lock.
*/
textvp = p->p_textvp;
p->p_textvp = ndp->ni_vp;
/*
* Notify others that we exec'd, and clear the P_INEXEC flag
* as we're now a bona fide freshly-execed process.
*/
KNOTE(&p->p_klist, NOTE_EXEC);
p->p_flag &= ~P_INEXEC;
/*
* If tracing the process, trap to debugger so breakpoints
* can be set before the program executes.
*/
if (p->p_flag & P_TRACED)
psignal(p, SIGTRAP);
/* clear "fork but no exec" flag, as we _are_ execing */
p->p_acflag &= ~AFORK;
/* Free any previous argument cache */
oldargs = p->p_args;
p->p_args = NULL;
/* Cache arguments if they fit inside our allowance */
if (ps_arg_cache_limit >= i + sizeof(struct pargs)) {
bcopy(imgp->stringbase, newargs->ar_args, i);
p->p_args = newargs;
newargs = NULL;
}
PROC_UNLOCK(p);
/* Set values passed into the program in registers. */
if (p->p_sysent->sv_setregs)
(*p->p_sysent->sv_setregs)(td, imgp->entry_addr,
(u_long)(uintptr_t)stack_base, imgp->ps_strings);
else
exec_setregs(td, imgp->entry_addr,
(u_long)(uintptr_t)stack_base, imgp->ps_strings);
done1:
/*
* Free any resources malloc'd earlier that we didn't use.
*/
uifree(euip);
if (newcred == NULL)
crfree(oldcred);
else
crfree(newcred);
/*
* Handle deferred decrement of ref counts.
*/
if (textvp != NULL)
vrele(textvp);
if (ndp->ni_vp && error != 0)
vrele(ndp->ni_vp);
#ifdef KTRACE
if (tracevp != NULL)
vrele(tracevp);
#endif
if (oldargs != NULL)
pargs_drop(oldargs);
if (newargs != NULL)
pargs_drop(newargs);
exec_fail_dealloc:
/*
* free various allocated resources
*/
if (imgp->firstpage)
exec_unmap_first_page(imgp);
if (imgp->vp) {
NDFREE(ndp, NDF_ONLY_PNBUF);
vput(imgp->vp);
}
if (imgp->stringbase != NULL)
kmem_free_wakeup(exec_map, (vm_offset_t)imgp->stringbase,
ARG_MAX + PAGE_SIZE);
if (imgp->object)
vm_object_deallocate(imgp->object);
if (error == 0) {
/*
* Stop the process here if its stop event mask has
* the S_EXEC bit set.
*/
STOPEVENT(p, S_EXEC, 0);
goto done2;
}
exec_fail:
/* we're done here, clear P_INEXEC */
PROC_LOCK(p);
p->p_flag &= ~P_INEXEC;
PROC_UNLOCK(p);
if (imgp->vmspace_destroyed) {
/* sorry, no more process anymore. exit gracefully */
#ifdef MAC
mac_execve_exit(imgp);
if (interplabelvalid)
mac_destroy_vnode_label(&interplabel);
#endif
exit1(td, W_EXITCODE(0, SIGABRT));
/* NOT REACHED */
error = 0;
}
done2:
#ifdef MAC
mac_execve_exit(imgp);
if (interplabelvalid)
mac_destroy_vnode_label(&interplabel);
#endif
mtx_unlock(&Giant);
return (error);
}
#ifndef _SYS_SYSPROTO_H_
struct execve_args {
char *fname;
char **argv;
char **envv;
};
#endif
/*
* MPSAFE
*/
int
execve(td, uap)
struct thread *td;
struct execve_args /* {
char *fname;
char **argv;
char **envv;
} */ *uap;
{
return (kern_execve(td, uap->fname, uap->argv, uap->envv, NULL));
}
#ifndef _SYS_SYSPROTO_H_
struct __mac_execve_args {
char *fname;
char **argv;
char **envv;
struct mac *mac_p;
};
#endif
/*
* MPSAFE
*/
int
__mac_execve(td, uap)
struct thread *td;
struct __mac_execve_args /* {
char *fname;
char **argv;
char **envv;
struct mac *mac_p;
} */ *uap;
{
#ifdef MAC
return (kern_execve(td, uap->fname, uap->argv, uap->envv,
uap->mac_p));
#else
return (ENOSYS);
#endif
}
int
exec_map_first_page(imgp)
struct image_params *imgp;
{
int rv, i;
int initial_pagein;
vm_page_t ma[VM_INITIAL_PAGEIN];
vm_object_t object;
GIANT_REQUIRED;
if (imgp->firstpage) {
exec_unmap_first_page(imgp);
}
VOP_GETVOBJECT(imgp->vp, &object);
ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
if ((ma[0]->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) {
initial_pagein = VM_INITIAL_PAGEIN;
if (initial_pagein > object->size)
initial_pagein = object->size;
for (i = 1; i < initial_pagein; i++) {
if ((ma[i] = vm_page_lookup(object, i)) != NULL) {
if ((ma[i]->flags & PG_BUSY) || ma[i]->busy)
break;
if (ma[i]->valid)
break;
vm_page_busy(ma[i]);
} else {
ma[i] = vm_page_alloc(object, i,
VM_ALLOC_NORMAL);
if (ma[i] == NULL)
break;
}
}
initial_pagein = i;
rv = vm_pager_get_pages(object, ma, initial_pagein, 0);
ma[0] = vm_page_lookup(object, 0);
if ((rv != VM_PAGER_OK) || (ma[0] == NULL) ||
(ma[0]->valid == 0)) {
if (ma[0]) {
vm_page_lock_queues();
pmap_remove_all(ma[0]);
vm_page_free(ma[0]);
vm_page_unlock_queues();
}
return (EIO);
}
}
vm_page_lock_queues();
vm_page_wire(ma[0]);
vm_page_wakeup(ma[0]);
vm_page_unlock_queues();
pmap_qenter((vm_offset_t)imgp->image_header, ma, 1);
imgp->firstpage = ma[0];
return (0);
}
void
exec_unmap_first_page(imgp)
struct image_params *imgp;
{
GIANT_REQUIRED;
if (imgp->firstpage) {
pmap_qremove((vm_offset_t)imgp->image_header, 1);
vm_page_lock_queues();
vm_page_unwire(imgp->firstpage, 1);
vm_page_unlock_queues();
imgp->firstpage = NULL;
}
}
/*
* Destroy old address space, and allocate a new stack
* The new stack is only SGROWSIZ large because it is grown
* automatically in trap.c.
*/
int
exec_new_vmspace(imgp, sv)
struct image_params *imgp;
struct sysentvec *sv;
{
int error;
struct execlist *ep;
struct proc *p = imgp->proc;
struct vmspace *vmspace = p->p_vmspace;
vm_offset_t stack_addr;
vm_map_t map;
GIANT_REQUIRED;
stack_addr = sv->sv_usrstack - maxssiz;
imgp->vmspace_destroyed = 1;
/*
* Perform functions registered with at_exec().
*/
TAILQ_FOREACH(ep, &exec_list, next)
(*ep->function)(p);
/*
* Blow away entire process VM, if address space not shared,
* otherwise, create a new VM space so that other threads are
* not disrupted
*/
map = &vmspace->vm_map;
if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser &&
vm_map_max(map) == sv->sv_maxuser) {
if (vmspace->vm_shm)
shmexit(p);
vm_page_lock_queues();
pmap_remove_pages(vmspace_pmap(vmspace), vm_map_min(map),
vm_map_max(map));
vm_page_unlock_queues();
vm_map_remove(map, vm_map_min(map), vm_map_max(map));
} else {
vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser);
vmspace = p->p_vmspace;
map = &vmspace->vm_map;
}
/* Allocate a new stack */
error = vm_map_stack(map, stack_addr, (vm_size_t)maxssiz,
sv->sv_stackprot, VM_PROT_ALL, 0);
if (error)
return (error);
#ifdef __ia64__
{
/*
* Allocate backing store. We really need something
* similar to vm_map_stack which can allow the backing
* store to grow upwards. This will do for now.
*/
vm_offset_t bsaddr;
bsaddr = p->p_sysent->sv_usrstack - 2 * maxssiz;
error = vm_map_find(map, 0, 0, &bsaddr,
regstkpages * PAGE_SIZE, 0, VM_PROT_ALL, VM_PROT_ALL, 0);
FIRST_THREAD_IN_PROC(p)->td_md.md_bspstore = bsaddr;
}
#endif
/* vm_ssize and vm_maxsaddr are somewhat antiquated concepts in the
* VM_STACK case, but they are still used to monitor the size of the
* process stack so we can check the stack rlimit.
*/
vmspace->vm_ssize = sgrowsiz >> PAGE_SHIFT;
vmspace->vm_maxsaddr = (char *)sv->sv_usrstack - maxssiz;
return (0);
}
/*
* Copy out argument and environment strings from the old process
* address space into the temporary string buffer.
*/
int
exec_extract_strings(imgp)
struct image_params *imgp;
{
char **argv, **envv;
char *argp, *envp;
int error;
size_t length;
/*
* extract arguments first
*/
argv = imgp->userspace_argv;
if (argv) {
argp = (caddr_t)(intptr_t)fuword(argv);
if (argp == (caddr_t)-1)
return (EFAULT);
if (argp)
argv++;
if (imgp->argv0)
argp = imgp->argv0;
if (argp) {
do {
if (argp == (caddr_t)-1)
return (EFAULT);
if ((error = copyinstr(argp, imgp->stringp,
imgp->stringspace, &length))) {
if (error == ENAMETOOLONG)
return (E2BIG);
return (error);
}
imgp->stringspace -= length;
imgp->stringp += length;
imgp->argc++;
} while ((argp = (caddr_t)(intptr_t)fuword(argv++)));
}
}
imgp->endargs = imgp->stringp;
/*
* extract environment strings
*/
envv = imgp->userspace_envv;
if (envv) {
while ((envp = (caddr_t)(intptr_t)fuword(envv++))) {
if (envp == (caddr_t)-1)
return (EFAULT);
if ((error = copyinstr(envp, imgp->stringp,
imgp->stringspace, &length))) {
if (error == ENAMETOOLONG)
return (E2BIG);
return (error);
}
imgp->stringspace -= length;
imgp->stringp += length;
imgp->envc++;
}
}
return (0);
}
/*
* Copy strings out to the new process address space, constructing
* new arg and env vector tables. Return a pointer to the base
* so that it can be used as the initial stack pointer.
*/
register_t *
exec_copyout_strings(imgp)
struct image_params *imgp;
{
int argc, envc;
char **vectp;
char *stringp, *destp;
register_t *stack_base;
struct ps_strings *arginfo;
struct proc *p;
int szsigcode;
/*
* Calculate string base and vector table pointers.
* Also deal with signal trampoline code for this exec type.
*/
p = imgp->proc;
szsigcode = 0;
arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings;
if (p->p_sysent->sv_szsigcode != NULL)
szsigcode = *(p->p_sysent->sv_szsigcode);
destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE -
roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
/*
* install sigcode
*/
if (szsigcode)
copyout(p->p_sysent->sv_sigcode, ((caddr_t)arginfo -
szsigcode), szsigcode);
/*
* If we have a valid auxargs ptr, prepare some room
* on the stack.
*/
if (imgp->auxargs) {
/*
* 'AT_COUNT*2' is size for the ELF Auxargs data. This is for
* lower compatibility.
*/
imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size :
(AT_COUNT * 2);
/*
* The '+ 2' is for the null pointers at the end of each of
* the arg and env vector sets,and imgp->auxarg_size is room
* for argument of Runtime loader.
*/
vectp = (char **)(destp - (imgp->argc + imgp->envc + 2 +
imgp->auxarg_size) * sizeof(char *));
} else
/*
* The '+ 2' is for the null pointers at the end of each of
* the arg and env vector sets
*/
vectp = (char **)(destp - (imgp->argc + imgp->envc + 2) *
sizeof(char *));
/*
* vectp also becomes our initial stack base
*/
stack_base = (register_t *)vectp;
stringp = imgp->stringbase;
argc = imgp->argc;
envc = imgp->envc;
/*
* Copy out strings - arguments and environment.
*/
copyout(stringp, destp, ARG_MAX - imgp->stringspace);
/*
* Fill in "ps_strings" struct for ps, w, etc.
*/
suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp);
suword(&arginfo->ps_nargvstr, argc);
/*
* Fill in argument portion of vector table.
*/
for (; argc > 0; --argc) {
suword(vectp++, (long)(intptr_t)destp);
while (*stringp++ != 0)
destp++;
destp++;
}
/* a null vector table pointer separates the argp's from the envp's */
suword(vectp++, 0);
suword(&arginfo->ps_envstr, (long)(intptr_t)vectp);
suword(&arginfo->ps_nenvstr, envc);
/*
* Fill in environment portion of vector table.
*/
for (; envc > 0; --envc) {
suword(vectp++, (long)(intptr_t)destp);
while (*stringp++ != 0)
destp++;
destp++;
}
/* end of vector table is a null pointer */
suword(vectp, 0);
return (stack_base);
}
/*
* Check permissions of file to execute.
* Called with imgp->vp locked.
* Return 0 for success or error code on failure.
*/
int
exec_check_permissions(imgp)
struct image_params *imgp;
{
struct vnode *vp = imgp->vp;
struct vattr *attr = imgp->attr;
struct thread *td;
int error;
td = curthread; /* XXXKSE */
#ifdef MAC
error = mac_check_vnode_exec(td->td_ucred, imgp->vp, imgp);
if (error)
return (error);
#endif
/* Get file attributes */
error = VOP_GETATTR(vp, attr, td->td_ucred, td);
if (error)
return (error);
/*
* 1) Check if file execution is disabled for the filesystem that this
* file resides on.
* 2) Insure that at least one execute bit is on - otherwise root
* will always succeed, and we don't want to happen unless the
* file really is executable.
* 3) Insure that the file is a regular file.
*/
if ((vp->v_mount->mnt_flag & MNT_NOEXEC) ||
((attr->va_mode & 0111) == 0) ||
(attr->va_type != VREG))
return (EACCES);
/*
* Zero length files can't be exec'd
*/
if (attr->va_size == 0)
return (ENOEXEC);
/*
* Check for execute permission to file based on current credentials.
*/
error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td);
if (error)
return (error);
/*
* Check number of open-for-writes on the file and deny execution
* if there are any.
*/
if (vp->v_writecount)
return (ETXTBSY);
/*
* Call filesystem specific open routine (which does nothing in the
* general case).
*/
error = VOP_OPEN(vp, FREAD, td->td_ucred, td);
return (error);
}
/*
* Exec handler registration
*/
int
exec_register(execsw_arg)
const struct execsw *execsw_arg;
{
const struct execsw **es, **xs, **newexecsw;
int count = 2; /* New slot and trailing NULL */
if (execsw)
for (es = execsw; *es; es++)
count++;
newexecsw = malloc(count * sizeof(*es), M_TEMP, M_WAITOK);
if (newexecsw == NULL)
return (ENOMEM);
xs = newexecsw;
if (execsw)
for (es = execsw; *es; es++)
*xs++ = *es;
*xs++ = execsw_arg;
*xs = NULL;
if (execsw)
free(execsw, M_TEMP);
execsw = newexecsw;
return (0);
}
int
exec_unregister(execsw_arg)
const struct execsw *execsw_arg;
{
const struct execsw **es, **xs, **newexecsw;
int count = 1;
if (execsw == NULL)
panic("unregister with no handlers left?\n");
for (es = execsw; *es; es++) {
if (*es == execsw_arg)
break;
}
if (*es == NULL)
return (ENOENT);
for (es = execsw; *es; es++)
if (*es != execsw_arg)
count++;
newexecsw = malloc(count * sizeof(*es), M_TEMP, M_WAITOK);
if (newexecsw == NULL)
return (ENOMEM);
xs = newexecsw;
for (es = execsw; *es; es++)
if (*es != execsw_arg)
*xs++ = *es;
*xs = NULL;
if (execsw)
free(execsw, M_TEMP);
execsw = newexecsw;
return (0);
}
int
at_exec(function)
execlist_fn function;
{
struct execlist *ep;
#ifdef INVARIANTS
/* Be noisy if the programmer has lost track of things */
if (rm_at_exec(function))
printf("WARNING: exec callout entry (%p) already present\n",
function);
#endif
ep = malloc(sizeof(*ep), M_ATEXEC, M_NOWAIT);
if (ep == NULL)
return (ENOMEM);
ep->function = function;
TAILQ_INSERT_TAIL(&exec_list, ep, next);
return (0);
}
/*
* Scan the exec callout list for the given item and remove it.
* Returns the number of items removed (0 or 1)
*/
int
rm_at_exec(function)
execlist_fn function;
{
struct execlist *ep;
TAILQ_FOREACH(ep, &exec_list, next) {
if (ep->function == function) {
TAILQ_REMOVE(&exec_list, ep, next);
free(ep, M_ATEXEC);
return (1);
}
}
return (0);
}
| 24.170947 | 82 | 0.670784 | [
"object",
"vector"
] |
681785e57ce8ddae5b79c260c1a563d2f6694ad8 | 1,734 | h | C | include/librealuvc/ru_hid.h | Niram7777/librealuvc | 519bcee33a53ea3125e203d7c2a08dc4508ff17f | [
"Apache-2.0"
] | null | null | null | include/librealuvc/ru_hid.h | Niram7777/librealuvc | 519bcee33a53ea3125e203d7c2a08dc4508ff17f | [
"Apache-2.0"
] | null | null | null | include/librealuvc/ru_hid.h | Niram7777/librealuvc | 519bcee33a53ea3125e203d7c2a08dc4508ff17f | [
"Apache-2.0"
] | null | null | null | // License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2017 Intel Corporation. All Rights Reserved.
#ifndef LIBREALUVC_RU_HID_H
#define LIBREALUVC_RU_HID_H 1
#include "ru_common.h"
namespace librealuvc {
using std::shared_ptr;
using std::string;
using std::vector;
class LIBREALUVC_EXPORT hid_device_info {
public:
string id;
string vid;
string pid;
string unique_id;
string device_path;
string serial_number;
public:
bool operator==(const hid_device_info& b) const;
string to_string() const;
operator string() const { return this->to_string(); }
};
struct hid_profile {
string sensor_name;
uint32_t frequency;
};
struct hid_sensor {
string name;
};
#pragma pack(push, 1)
struct hid_sensor_data {
int16_t x;
char reserved1[2];
int16_t y;
char reserved2[2];
int16_t z;
char reserved3[2];
uint32_t ts_low;
uint32_t ts_high;
};
#pragma pack(pop)
struct hid_sensor_input {
uint32_t index;
string name;
};
struct sensor_data {
hid_sensor sensor;
frame_object fo;
};
enum custom_sensor_report_field {
minimum,
maximum,
name,
size,
unit_expo,
units,
value
};
typedef std::function<void(const sensor_data&)> hid_callback;
class LIBREALUVC_EXPORT hid_device {
public:
virtual ~hid_device() = default;
virtual void open(const vector<hid_profile>& hid_profiles) = 0;
virtual void close() = 0;
virtual void start_capture(hid_callback callback) = 0;
virtual void stop_capture() = 0;
virtual vector<hid_sensor> get_sensors() = 0;
virtual vector<uint8_t> get_custom_report_data(
const string& custom_sensor_name,
const string& report_name,
custom_sensor_report_field report_field
) = 0;
};
} // end librealuvc
#endif
| 18.847826 | 65 | 0.728374 | [
"vector"
] |
681d64955d96b40867a768dcb4eda45d5761d4f7 | 5,474 | h | C | include/SGFCBoardSizeProperty.h | herzbube/SgfcKit | ec67ebbd4f484e7d162f0552749f64c3f0ca3101 | [
"Apache-2.0"
] | 1 | 2021-01-12T01:53:17.000Z | 2021-01-12T01:53:17.000Z | include/SGFCBoardSizeProperty.h | herzbube/SgfcKit | ec67ebbd4f484e7d162f0552749f64c3f0ca3101 | [
"Apache-2.0"
] | 2 | 2020-12-30T11:38:49.000Z | 2021-02-08T22:56:50.000Z | include/SGFCBoardSizeProperty.h | herzbube/SgfcKit | ec67ebbd4f484e7d162f0552749f64c3f0ca3101 | [
"Apache-2.0"
] | null | null | null | // -----------------------------------------------------------------------------
// Copyright 2020 Patrick Näf (herzbube@herzbube.ch)
//
// 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.
// -----------------------------------------------------------------------------
#pragma once
// Project includes
#import "SGFCBoardSize.h"
#import "SGFCProperty.h"
// Forward declarations
@class SGFCComposedPropertyValue;
@class SGFCNumberPropertyValue;
/// @brief The SGFCBoardSizeProperty class is a specialization of
/// SGFCProperty for #SGFCPropertyTypeSZ. It simplifies access to the
/// property value and provides the value in the form of an SGFCBoardSize
/// object.
///
/// @ingroup public-api
/// @ingroup property
@interface SGFCBoardSizeProperty : SGFCProperty
{
}
/// @brief Returns a newly constructed SGFCBoardSizeProperty object that
/// has no value. The property is not associated with any node.
+ (instancetype) boardSizeProperty;
/// @brief Returns a newly constructed SGFCBoardSizeProperty object that
/// has the specified property value @a numberPropertyValue. The property is not
/// associated with any node. The SGFCBoardSizeProperty object takes
/// ownership of the SGFCNumberPropertyValue object @a numberPropertyValue.
///
/// This convenience constructor returns an SGFCBoardSizeProperty object that
/// describes a square board.
///
/// @exception NSInvalidArgumentException Is raised if @a numberPropertyValue is
/// @e nil.
+ (instancetype) boardSizePropertyWithNumberPropertyValue:(SGFCNumberPropertyValue*)numberPropertyValue;
/// @brief Returns a newly constructed SGFCBoardSizeProperty object that
/// has the specified property value @a composedPropertyValue. The property is
/// not associated with any node. The SGFCBoardSizeProperty object takes
/// ownership of the SGFCComposedPropertyValue object @a composedPropertyValue.
///
/// This convenience constructor returns an SGFCBoardSizeProperty object that
/// describes a rectangular board.
///
/// @exception NSInvalidArgumentException Is raised if @a composedPropertyValue
/// is @e nil or if the @a composedPropertyValue object is not composed of two
/// SGFCNumberPropertyValue objects.
+ (instancetype) boardSizePropertyWithComposedPropertyValue:(SGFCComposedPropertyValue*)composedPropertyValue;
/// @brief Initializes an SGFCBoardSizeProperty object. The property
/// has no value. The property is not associated with any node.
///
/// This is the designated initializer of SGFCBoardSizeProperty.
- (instancetype) init NS_DESIGNATED_INITIALIZER;
/// @brief Initializes an SGFCBoardSizeProperty object. The property
/// has the specified property value @a numberPropertyValue. The property is not
/// associated with any node. The SGFCBoardSizeProperty object takes
/// ownership of the SGFCNumberPropertyValue object @a numberPropertyValue.
///
/// The initialized SGFCBoardSizeProperty object
/// describes a square board.
///
/// @exception NSInvalidArgumentException Is raised if @a numberPropertyValue is
/// @e nil.
- (instancetype) initWithNumberPropertyValue:(SGFCNumberPropertyValue*)numberPropertyValue;
/// @brief Initializes an SGFCBoardSizeProperty object that
/// has the specified property value @a composedPropertyValue. The property is
/// not associated with any node. The SGFCBoardSizeProperty object takes
/// ownership of the SGFCComposedPropertyValue object @a composedPropertyValue.
///
/// The initialized SGFCBoardSizeProperty object
/// describes a rectangular board.
///
/// @exception NSInvalidArgumentException Is raised if @a composedPropertyValue
/// is @e nil or if the @a composedPropertyValue object is not composed of two
/// SGFCNumberPropertyValue objects.
- (instancetype) initWithComposedPropertyValue:(SGFCComposedPropertyValue*)composedPropertyValue;
/// @brief Returns the property value interpreted as an SgfcBoardSize value.
///
/// @retval SGFCBoardSize If the property has a valid value. The value is
/// guaranteed not to be #SGFCBoardSizeNone nor
/// #SGFCBoardSizeInvalid.
/// @retval #SGFCBoardSizeDefaultGo If the property has no value,
/// and @a gameType is #SGFCGameTypeGo.
/// @retval #SGFCBoardSizeDefaultChess If the property has no
/// value, and @a gameType is #SGFCGameTypeChess.
/// @retval #SGFCBoardSizeNone If the property has no value, but
/// @a gameType is neither #SGFCGameTypeGo nor #SGFCGameTypeChess.
/// @retval #SGFCBoardSizeInvalid If the property value(s) cannot
/// be converted to an SGFCBoardSize value (the property has more
/// than one value, or it has a single value that is neither a
/// Number nor a composed value consisting of two Number values),
/// or if conversion is possible but the SGFCBoardSize value
/// violates the constraints defined by the SGF standard. See the
/// documentation of #SGFCBoardSizeInvalid for details.
- (SGFCBoardSize) boardSizeForGameType:(SGFCGameType)gameType;
@end
| 46 | 110 | 0.750091 | [
"object"
] |
681e79d1e2e34000e7157d07912a59426e9d0a87 | 1,012 | h | C | src/gamemodel/Terrain.h | GiGurra/drunken_walker | 45f49a4bffc900a592c1ea0c0ddcdba3a22ac832 | [
"MIT"
] | null | null | null | src/gamemodel/Terrain.h | GiGurra/drunken_walker | 45f49a4bffc900a592c1ea0c0ddcdba3a22ac832 | [
"MIT"
] | null | null | null | src/gamemodel/Terrain.h | GiGurra/drunken_walker | 45f49a4bffc900a592c1ea0c0ddcdba3a22ac832 | [
"MIT"
] | null | null | null | #ifndef TERRAIN_H
#define TERRAIN_H
#include <util/Math.h>
#include <util/Random.h>
#include <vector>
#include "Constants.h"
class Terrain {
public:
Terrain(
const float stepLength = constants::TERRAIN_STEP_LENGTH,
const float amplitude = constants::TERRAIN_HEIGHT_VARIATION_AMPLITUDE,
const float worldInitLength = constants::WORLD_INIT_LENGTH);
virtual ~Terrain();
void ensureHasTerrainTo(const float end);
glm::vec2 vertexAtX(const float x) const;
// Inlining these as performance examples
float stepLength() const { return _stepLength; }
float length() const { return float(_vertices.size()) * stepLength() - stepLength(); }
const std::vector<glm::vec2>& vertices() const { return _vertices; }
bool isAboveGround(const glm::vec2& pos) const;
bool isBelowGround(const glm::vec2& pos) const { return !isAboveGround(pos); }
private:
Random _randomizer;
const float _stepLength;
const float _amplitude;
std::vector<glm::vec2> _vertices;
};
#endif
| 27.351351 | 88 | 0.72332 | [
"vector"
] |
682059713f2ac4e6da1c2bef1a26ef1fed371af5 | 56,247 | h | C | aws-cpp-sdk-awstransfer/include/aws/awstransfer/TransferClient.h | MajorMurphy/aws-sdk-cpp | e116ae4f91ffe9c22ad5b1854b4cd8970eaf9b4b | [
"Apache-2.0"
] | 1 | 2019-10-10T20:58:44.000Z | 2019-10-10T20:58:44.000Z | aws-cpp-sdk-awstransfer/include/aws/awstransfer/TransferClient.h | MajorMurphy/aws-sdk-cpp | e116ae4f91ffe9c22ad5b1854b4cd8970eaf9b4b | [
"Apache-2.0"
] | null | null | null | aws-cpp-sdk-awstransfer/include/aws/awstransfer/TransferClient.h | MajorMurphy/aws-sdk-cpp | e116ae4f91ffe9c22ad5b1854b4cd8970eaf9b4b | [
"Apache-2.0"
] | null | null | null | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
#pragma once
#include <aws/awstransfer/Transfer_EXPORTS.h>
#include <aws/awstransfer/TransferErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/awstransfer/model/CreateServerResult.h>
#include <aws/awstransfer/model/CreateUserResult.h>
#include <aws/awstransfer/model/DescribeServerResult.h>
#include <aws/awstransfer/model/DescribeUserResult.h>
#include <aws/awstransfer/model/ImportSshPublicKeyResult.h>
#include <aws/awstransfer/model/ListServersResult.h>
#include <aws/awstransfer/model/ListTagsForResourceResult.h>
#include <aws/awstransfer/model/ListUsersResult.h>
#include <aws/awstransfer/model/TestIdentityProviderResult.h>
#include <aws/awstransfer/model/UpdateServerResult.h>
#include <aws/awstransfer/model/UpdateUserResult.h>
#include <aws/core/NoResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace Transfer
{
namespace Model
{
class CreateServerRequest;
class CreateUserRequest;
class DeleteServerRequest;
class DeleteSshPublicKeyRequest;
class DeleteUserRequest;
class DescribeServerRequest;
class DescribeUserRequest;
class ImportSshPublicKeyRequest;
class ListServersRequest;
class ListTagsForResourceRequest;
class ListUsersRequest;
class StartServerRequest;
class StopServerRequest;
class TagResourceRequest;
class TestIdentityProviderRequest;
class UntagResourceRequest;
class UpdateServerRequest;
class UpdateUserRequest;
typedef Aws::Utils::Outcome<CreateServerResult, Aws::Client::AWSError<TransferErrors>> CreateServerOutcome;
typedef Aws::Utils::Outcome<CreateUserResult, Aws::Client::AWSError<TransferErrors>> CreateUserOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> DeleteServerOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> DeleteSshPublicKeyOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> DeleteUserOutcome;
typedef Aws::Utils::Outcome<DescribeServerResult, Aws::Client::AWSError<TransferErrors>> DescribeServerOutcome;
typedef Aws::Utils::Outcome<DescribeUserResult, Aws::Client::AWSError<TransferErrors>> DescribeUserOutcome;
typedef Aws::Utils::Outcome<ImportSshPublicKeyResult, Aws::Client::AWSError<TransferErrors>> ImportSshPublicKeyOutcome;
typedef Aws::Utils::Outcome<ListServersResult, Aws::Client::AWSError<TransferErrors>> ListServersOutcome;
typedef Aws::Utils::Outcome<ListTagsForResourceResult, Aws::Client::AWSError<TransferErrors>> ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome<ListUsersResult, Aws::Client::AWSError<TransferErrors>> ListUsersOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> StartServerOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> StopServerOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> TagResourceOutcome;
typedef Aws::Utils::Outcome<TestIdentityProviderResult, Aws::Client::AWSError<TransferErrors>> TestIdentityProviderOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, Aws::Client::AWSError<TransferErrors>> UntagResourceOutcome;
typedef Aws::Utils::Outcome<UpdateServerResult, Aws::Client::AWSError<TransferErrors>> UpdateServerOutcome;
typedef Aws::Utils::Outcome<UpdateUserResult, Aws::Client::AWSError<TransferErrors>> UpdateUserOutcome;
typedef std::future<CreateServerOutcome> CreateServerOutcomeCallable;
typedef std::future<CreateUserOutcome> CreateUserOutcomeCallable;
typedef std::future<DeleteServerOutcome> DeleteServerOutcomeCallable;
typedef std::future<DeleteSshPublicKeyOutcome> DeleteSshPublicKeyOutcomeCallable;
typedef std::future<DeleteUserOutcome> DeleteUserOutcomeCallable;
typedef std::future<DescribeServerOutcome> DescribeServerOutcomeCallable;
typedef std::future<DescribeUserOutcome> DescribeUserOutcomeCallable;
typedef std::future<ImportSshPublicKeyOutcome> ImportSshPublicKeyOutcomeCallable;
typedef std::future<ListServersOutcome> ListServersOutcomeCallable;
typedef std::future<ListTagsForResourceOutcome> ListTagsForResourceOutcomeCallable;
typedef std::future<ListUsersOutcome> ListUsersOutcomeCallable;
typedef std::future<StartServerOutcome> StartServerOutcomeCallable;
typedef std::future<StopServerOutcome> StopServerOutcomeCallable;
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
typedef std::future<TestIdentityProviderOutcome> TestIdentityProviderOutcomeCallable;
typedef std::future<UntagResourceOutcome> UntagResourceOutcomeCallable;
typedef std::future<UpdateServerOutcome> UpdateServerOutcomeCallable;
typedef std::future<UpdateUserOutcome> UpdateUserOutcomeCallable;
} // namespace Model
class TransferClient;
typedef std::function<void(const TransferClient*, const Model::CreateServerRequest&, const Model::CreateServerOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateServerResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::CreateUserRequest&, const Model::CreateUserOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateUserResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::DeleteServerRequest&, const Model::DeleteServerOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteServerResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::DeleteSshPublicKeyRequest&, const Model::DeleteSshPublicKeyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteSshPublicKeyResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::DeleteUserRequest&, const Model::DeleteUserOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteUserResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::DescribeServerRequest&, const Model::DescribeServerOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeServerResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::DescribeUserRequest&, const Model::DescribeUserOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeUserResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::ImportSshPublicKeyRequest&, const Model::ImportSshPublicKeyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ImportSshPublicKeyResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::ListServersRequest&, const Model::ListServersOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListServersResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::ListTagsForResourceRequest&, const Model::ListTagsForResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::ListUsersRequest&, const Model::ListUsersOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListUsersResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::StartServerRequest&, const Model::StartServerOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StartServerResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::StopServerRequest&, const Model::StopServerOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StopServerResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::TagResourceRequest&, const Model::TagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TagResourceResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::TestIdentityProviderRequest&, const Model::TestIdentityProviderOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TestIdentityProviderResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::UntagResourceRequest&, const Model::UntagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UntagResourceResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::UpdateServerRequest&, const Model::UpdateServerOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateServerResponseReceivedHandler;
typedef std::function<void(const TransferClient*, const Model::UpdateUserRequest&, const Model::UpdateUserOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateUserResponseReceivedHandler;
/**
* <p>AWS Transfer for SFTP is a fully managed service that enables the transfer of
* files directly into and out of Amazon S3 using the Secure File Transfer Protocol
* (SFTP)—also known as Secure Shell (SSH) File Transfer Protocol. AWS helps you
* seamlessly migrate your file transfer workflows to AWS Transfer for SFTP—by
* integrating with existing authentication systems, and providing DNS routing with
* Amazon Route 53—so nothing changes for your customers and partners, or their
* applications. With your data in S3, you can use it with AWS services for
* processing, analytics, machine learning, and archiving. Getting started with AWS
* Transfer for SFTP (AWS SFTP) is easy; there is no infrastructure to buy and set
* up. </p>
*/
class AWS_TRANSFER_API TransferClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
TransferClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
TransferClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
TransferClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~TransferClient();
inline virtual const char* GetServiceClientName() const override { return "Transfer"; }
/**
* <p>Instantiates an autoscaling virtual server based on Secure File Transfer
* Protocol (SFTP) in AWS. When you make updates to your server or when you work
* with users, use the service-generated <code>ServerId</code> property that is
* assigned to the newly created server.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer">AWS
* API Reference</a></p>
*/
virtual Model::CreateServerOutcome CreateServer(const Model::CreateServerRequest& request) const;
/**
* <p>Instantiates an autoscaling virtual server based on Secure File Transfer
* Protocol (SFTP) in AWS. When you make updates to your server or when you work
* with users, use the service-generated <code>ServerId</code> property that is
* assigned to the newly created server.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateServerOutcomeCallable CreateServerCallable(const Model::CreateServerRequest& request) const;
/**
* <p>Instantiates an autoscaling virtual server based on Secure File Transfer
* Protocol (SFTP) in AWS. When you make updates to your server or when you work
* with users, use the service-generated <code>ServerId</code> property that is
* assigned to the newly created server.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateServer">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateServerAsync(const Model::CreateServerRequest& request, const CreateServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Creates a user and associates them with an existing Secure File Transfer
* Protocol (SFTP) server. You can only create and associate users with SFTP
* servers that have the <code>IdentityProviderType</code> set to
* <code>SERVICE_MANAGED</code>. Using parameters for <code>CreateUser</code>, you
* can specify the user name, set the home directory, store the user's public key,
* and assign the user's AWS Identity and Access Management (IAM) role. You can
* also optionally add a scope-down policy, and assign metadata with tags that can
* be used to group and search for users.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser">AWS
* API Reference</a></p>
*/
virtual Model::CreateUserOutcome CreateUser(const Model::CreateUserRequest& request) const;
/**
* <p>Creates a user and associates them with an existing Secure File Transfer
* Protocol (SFTP) server. You can only create and associate users with SFTP
* servers that have the <code>IdentityProviderType</code> set to
* <code>SERVICE_MANAGED</code>. Using parameters for <code>CreateUser</code>, you
* can specify the user name, set the home directory, store the user's public key,
* and assign the user's AWS Identity and Access Management (IAM) role. You can
* also optionally add a scope-down policy, and assign metadata with tags that can
* be used to group and search for users.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateUserOutcomeCallable CreateUserCallable(const Model::CreateUserRequest& request) const;
/**
* <p>Creates a user and associates them with an existing Secure File Transfer
* Protocol (SFTP) server. You can only create and associate users with SFTP
* servers that have the <code>IdentityProviderType</code> set to
* <code>SERVICE_MANAGED</code>. Using parameters for <code>CreateUser</code>, you
* can specify the user name, set the home directory, store the user's public key,
* and assign the user's AWS Identity and Access Management (IAM) role. You can
* also optionally add a scope-down policy, and assign metadata with tags that can
* be used to group and search for users.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/CreateUser">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateUserAsync(const Model::CreateUserRequest& request, const CreateUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deletes the Secure File Transfer Protocol (SFTP) server that you specify.</p>
* <p>No response returns from this operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer">AWS
* API Reference</a></p>
*/
virtual Model::DeleteServerOutcome DeleteServer(const Model::DeleteServerRequest& request) const;
/**
* <p>Deletes the Secure File Transfer Protocol (SFTP) server that you specify.</p>
* <p>No response returns from this operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteServerOutcomeCallable DeleteServerCallable(const Model::DeleteServerRequest& request) const;
/**
* <p>Deletes the Secure File Transfer Protocol (SFTP) server that you specify.</p>
* <p>No response returns from this operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteServer">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteServerAsync(const Model::DeleteServerRequest& request, const DeleteServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deletes a user's Secure Shell (SSH) public key.</p> <p>No response is
* returned from this operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey">AWS
* API Reference</a></p>
*/
virtual Model::DeleteSshPublicKeyOutcome DeleteSshPublicKey(const Model::DeleteSshPublicKeyRequest& request) const;
/**
* <p>Deletes a user's Secure Shell (SSH) public key.</p> <p>No response is
* returned from this operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteSshPublicKeyOutcomeCallable DeleteSshPublicKeyCallable(const Model::DeleteSshPublicKeyRequest& request) const;
/**
* <p>Deletes a user's Secure Shell (SSH) public key.</p> <p>No response is
* returned from this operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteSshPublicKeyAsync(const Model::DeleteSshPublicKeyRequest& request, const DeleteSshPublicKeyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deletes the user belonging to the server you specify.</p> <p>No response
* returns from this operation.</p> <note> <p>When you delete a user from a server,
* the user's information is lost.</p> </note><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser">AWS
* API Reference</a></p>
*/
virtual Model::DeleteUserOutcome DeleteUser(const Model::DeleteUserRequest& request) const;
/**
* <p>Deletes the user belonging to the server you specify.</p> <p>No response
* returns from this operation.</p> <note> <p>When you delete a user from a server,
* the user's information is lost.</p> </note><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteUserOutcomeCallable DeleteUserCallable(const Model::DeleteUserRequest& request) const;
/**
* <p>Deletes the user belonging to the server you specify.</p> <p>No response
* returns from this operation.</p> <note> <p>When you delete a user from a server,
* the user's information is lost.</p> </note><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteUser">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteUserAsync(const Model::DeleteUserRequest& request, const DeleteUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the server that you specify by passing the <code>ServerId</code>
* parameter.</p> <p>The response contains a description of the server's
* properties.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer">AWS
* API Reference</a></p>
*/
virtual Model::DescribeServerOutcome DescribeServer(const Model::DescribeServerRequest& request) const;
/**
* <p>Describes the server that you specify by passing the <code>ServerId</code>
* parameter.</p> <p>The response contains a description of the server's
* properties.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeServerOutcomeCallable DescribeServerCallable(const Model::DescribeServerRequest& request) const;
/**
* <p>Describes the server that you specify by passing the <code>ServerId</code>
* parameter.</p> <p>The response contains a description of the server's
* properties.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeServer">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeServerAsync(const Model::DescribeServerRequest& request, const DescribeServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the user assigned to a specific server, as identified by its
* <code>ServerId</code> property.</p> <p>The response from this call returns the
* properties of the user associated with the <code>ServerId</code> value that was
* specified.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser">AWS
* API Reference</a></p>
*/
virtual Model::DescribeUserOutcome DescribeUser(const Model::DescribeUserRequest& request) const;
/**
* <p>Describes the user assigned to a specific server, as identified by its
* <code>ServerId</code> property.</p> <p>The response from this call returns the
* properties of the user associated with the <code>ServerId</code> value that was
* specified.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeUserOutcomeCallable DescribeUserCallable(const Model::DescribeUserRequest& request) const;
/**
* <p>Describes the user assigned to a specific server, as identified by its
* <code>ServerId</code> property.</p> <p>The response from this call returns the
* properties of the user associated with the <code>ServerId</code> value that was
* specified.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DescribeUser">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeUserAsync(const Model::DescribeUserRequest& request, const DescribeUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Adds a Secure Shell (SSH) public key to a user account identified by a
* <code>UserName</code> value assigned to a specific server, identified by
* <code>ServerId</code>.</p> <p>The response returns the <code>UserName</code>
* value, the <code>ServerId</code> value, and the name of the
* <code>SshPublicKeyId</code>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey">AWS
* API Reference</a></p>
*/
virtual Model::ImportSshPublicKeyOutcome ImportSshPublicKey(const Model::ImportSshPublicKeyRequest& request) const;
/**
* <p>Adds a Secure Shell (SSH) public key to a user account identified by a
* <code>UserName</code> value assigned to a specific server, identified by
* <code>ServerId</code>.</p> <p>The response returns the <code>UserName</code>
* value, the <code>ServerId</code> value, and the name of the
* <code>SshPublicKeyId</code>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ImportSshPublicKeyOutcomeCallable ImportSshPublicKeyCallable(const Model::ImportSshPublicKeyRequest& request) const;
/**
* <p>Adds a Secure Shell (SSH) public key to a user account identified by a
* <code>UserName</code> value assigned to a specific server, identified by
* <code>ServerId</code>.</p> <p>The response returns the <code>UserName</code>
* value, the <code>ServerId</code> value, and the name of the
* <code>SshPublicKeyId</code>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ImportSshPublicKeyAsync(const Model::ImportSshPublicKeyRequest& request, const ImportSshPublicKeyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the Secure File Transfer Protocol (SFTP) servers that are associated
* with your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers">AWS
* API Reference</a></p>
*/
virtual Model::ListServersOutcome ListServers(const Model::ListServersRequest& request) const;
/**
* <p>Lists the Secure File Transfer Protocol (SFTP) servers that are associated
* with your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListServersOutcomeCallable ListServersCallable(const Model::ListServersRequest& request) const;
/**
* <p>Lists the Secure File Transfer Protocol (SFTP) servers that are associated
* with your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListServersAsync(const Model::ListServersRequest& request, const ListServersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists all of the tags associated with the Amazon Resource Number (ARN) you
* specify. The resource can be a user, server, or role.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource">AWS
* API Reference</a></p>
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* <p>Lists all of the tags associated with the Amazon Resource Number (ARN) you
* specify. The resource can be a user, server, or role.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const Model::ListTagsForResourceRequest& request) const;
/**
* <p>Lists all of the tags associated with the Amazon Resource Number (ARN) you
* specify. The resource can be a user, server, or role.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListTagsForResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTagsForResourceAsync(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the users for the server that you specify by passing the
* <code>ServerId</code> parameter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers">AWS
* API Reference</a></p>
*/
virtual Model::ListUsersOutcome ListUsers(const Model::ListUsersRequest& request) const;
/**
* <p>Lists the users for the server that you specify by passing the
* <code>ServerId</code> parameter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListUsersOutcomeCallable ListUsersCallable(const Model::ListUsersRequest& request) const;
/**
* <p>Lists the users for the server that you specify by passing the
* <code>ServerId</code> parameter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListUsers">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListUsersAsync(const Model::ListUsersRequest& request, const ListUsersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Changes the state of a Secure File Transfer Protocol (SFTP) server from
* <code>OFFLINE</code> to <code>ONLINE</code>. It has no impact on an SFTP server
* that is already <code>ONLINE</code>. An <code>ONLINE</code> server can accept
* and process file transfer jobs.</p> <p>The state of <code>STARTING</code>
* indicates that the server is in an intermediate state, either not fully able to
* respond, or not fully online. The values of <code>START_FAILED</code> can
* indicate an error condition. </p> <p>No response is returned from this
* call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer">AWS
* API Reference</a></p>
*/
virtual Model::StartServerOutcome StartServer(const Model::StartServerRequest& request) const;
/**
* <p>Changes the state of a Secure File Transfer Protocol (SFTP) server from
* <code>OFFLINE</code> to <code>ONLINE</code>. It has no impact on an SFTP server
* that is already <code>ONLINE</code>. An <code>ONLINE</code> server can accept
* and process file transfer jobs.</p> <p>The state of <code>STARTING</code>
* indicates that the server is in an intermediate state, either not fully able to
* respond, or not fully online. The values of <code>START_FAILED</code> can
* indicate an error condition. </p> <p>No response is returned from this
* call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::StartServerOutcomeCallable StartServerCallable(const Model::StartServerRequest& request) const;
/**
* <p>Changes the state of a Secure File Transfer Protocol (SFTP) server from
* <code>OFFLINE</code> to <code>ONLINE</code>. It has no impact on an SFTP server
* that is already <code>ONLINE</code>. An <code>ONLINE</code> server can accept
* and process file transfer jobs.</p> <p>The state of <code>STARTING</code>
* indicates that the server is in an intermediate state, either not fully able to
* respond, or not fully online. The values of <code>START_FAILED</code> can
* indicate an error condition. </p> <p>No response is returned from this
* call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void StartServerAsync(const Model::StartServerRequest& request, const StartServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Changes the state of an SFTP server from <code>ONLINE</code> to
* <code>OFFLINE</code>. An <code>OFFLINE</code> server cannot accept and process
* file transfer jobs. Information tied to your server such as server and user
* properties are not affected by stopping your server. Stopping a server will not
* reduce or impact your Secure File Transfer Protocol (SFTP) endpoint billing.</p>
* <p>The state of <code>STOPPING</code> indicates that the server is in an
* intermediate state, either not fully able to respond, or not fully offline. The
* values of <code>STOP_FAILED</code> can indicate an error condition.</p> <p>No
* response is returned from this call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer">AWS
* API Reference</a></p>
*/
virtual Model::StopServerOutcome StopServer(const Model::StopServerRequest& request) const;
/**
* <p>Changes the state of an SFTP server from <code>ONLINE</code> to
* <code>OFFLINE</code>. An <code>OFFLINE</code> server cannot accept and process
* file transfer jobs. Information tied to your server such as server and user
* properties are not affected by stopping your server. Stopping a server will not
* reduce or impact your Secure File Transfer Protocol (SFTP) endpoint billing.</p>
* <p>The state of <code>STOPPING</code> indicates that the server is in an
* intermediate state, either not fully able to respond, or not fully offline. The
* values of <code>STOP_FAILED</code> can indicate an error condition.</p> <p>No
* response is returned from this call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::StopServerOutcomeCallable StopServerCallable(const Model::StopServerRequest& request) const;
/**
* <p>Changes the state of an SFTP server from <code>ONLINE</code> to
* <code>OFFLINE</code>. An <code>OFFLINE</code> server cannot accept and process
* file transfer jobs. Information tied to your server such as server and user
* properties are not affected by stopping your server. Stopping a server will not
* reduce or impact your Secure File Transfer Protocol (SFTP) endpoint billing.</p>
* <p>The state of <code>STOPPING</code> indicates that the server is in an
* intermediate state, either not fully able to respond, or not fully offline. The
* values of <code>STOP_FAILED</code> can indicate an error condition.</p> <p>No
* response is returned from this call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void StopServerAsync(const Model::StopServerRequest& request, const StopServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Attaches a key-value pair to a resource, as identified by its Amazon Resource
* Name (ARN). Resources are users, servers, roles, and other entities.</p>
* <p>There is no response returned from this call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource">AWS
* API Reference</a></p>
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* <p>Attaches a key-value pair to a resource, as identified by its Amazon Resource
* Name (ARN). Resources are users, servers, roles, and other entities.</p>
* <p>There is no response returned from this call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const;
/**
* <p>Attaches a key-value pair to a resource, as identified by its Amazon Resource
* Name (ARN). Resources are users, servers, roles, and other entities.</p>
* <p>There is no response returned from this call.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TagResourceAsync(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>If the <code>IdentityProviderType</code> of the server is
* <code>API_Gateway</code>, tests whether your API Gateway is set up successfully.
* We highly recommend that you call this operation to test your authentication
* method as soon as you create your server. By doing so, you can troubleshoot
* issues with the API Gateway integration to ensure that your users can
* successfully use the service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider">AWS
* API Reference</a></p>
*/
virtual Model::TestIdentityProviderOutcome TestIdentityProvider(const Model::TestIdentityProviderRequest& request) const;
/**
* <p>If the <code>IdentityProviderType</code> of the server is
* <code>API_Gateway</code>, tests whether your API Gateway is set up successfully.
* We highly recommend that you call this operation to test your authentication
* method as soon as you create your server. By doing so, you can troubleshoot
* issues with the API Gateway integration to ensure that your users can
* successfully use the service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TestIdentityProviderOutcomeCallable TestIdentityProviderCallable(const Model::TestIdentityProviderRequest& request) const;
/**
* <p>If the <code>IdentityProviderType</code> of the server is
* <code>API_Gateway</code>, tests whether your API Gateway is set up successfully.
* We highly recommend that you call this operation to test your authentication
* method as soon as you create your server. By doing so, you can troubleshoot
* issues with the API Gateway integration to ensure that your users can
* successfully use the service.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TestIdentityProvider">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TestIdentityProviderAsync(const Model::TestIdentityProviderRequest& request, const TestIdentityProviderResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Detaches a key-value pair from a resource, as identified by its Amazon
* Resource Name (ARN). Resources are users, servers, roles, and other
* entities.</p> <p>No response is returned from this call.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource">AWS
* API Reference</a></p>
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* <p>Detaches a key-value pair from a resource, as identified by its Amazon
* Resource Name (ARN). Resources are users, servers, roles, and other
* entities.</p> <p>No response is returned from this call.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UntagResourceOutcomeCallable UntagResourceCallable(const Model::UntagResourceRequest& request) const;
/**
* <p>Detaches a key-value pair from a resource, as identified by its Amazon
* Resource Name (ARN). Resources are users, servers, roles, and other
* entities.</p> <p>No response is returned from this call.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UntagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Updates the server properties after that server has been created.</p> <p>The
* <code>UpdateServer</code> call returns the <code>ServerId</code> of the Secure
* File Transfer Protocol (SFTP) server you updated.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer">AWS
* API Reference</a></p>
*/
virtual Model::UpdateServerOutcome UpdateServer(const Model::UpdateServerRequest& request) const;
/**
* <p>Updates the server properties after that server has been created.</p> <p>The
* <code>UpdateServer</code> call returns the <code>ServerId</code> of the Secure
* File Transfer Protocol (SFTP) server you updated.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateServerOutcomeCallable UpdateServerCallable(const Model::UpdateServerRequest& request) const;
/**
* <p>Updates the server properties after that server has been created.</p> <p>The
* <code>UpdateServer</code> call returns the <code>ServerId</code> of the Secure
* File Transfer Protocol (SFTP) server you updated.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateServerAsync(const Model::UpdateServerRequest& request, const UpdateServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Assigns new properties to a user. Parameters you pass modify any or all of
* the following: the home directory, role, and policy for the
* <code>UserName</code> and <code>ServerId</code> you specify.</p> <p>The response
* returns the <code>ServerId</code> and the <code>UserName</code> for the updated
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser">AWS
* API Reference</a></p>
*/
virtual Model::UpdateUserOutcome UpdateUser(const Model::UpdateUserRequest& request) const;
/**
* <p>Assigns new properties to a user. Parameters you pass modify any or all of
* the following: the home directory, role, and policy for the
* <code>UserName</code> and <code>ServerId</code> you specify.</p> <p>The response
* returns the <code>ServerId</code> and the <code>UserName</code> for the updated
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateUserOutcomeCallable UpdateUserCallable(const Model::UpdateUserRequest& request) const;
/**
* <p>Assigns new properties to a user. Parameters you pass modify any or all of
* the following: the home directory, role, and policy for the
* <code>UserName</code> and <code>ServerId</code> you specify.</p> <p>The response
* returns the <code>ServerId</code> and the <code>UserName</code> for the updated
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateUserAsync(const Model::UpdateUserRequest& request, const UpdateUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateServerAsyncHelper(const Model::CreateServerRequest& request, const CreateServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void CreateUserAsyncHelper(const Model::CreateUserRequest& request, const CreateUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeleteServerAsyncHelper(const Model::DeleteServerRequest& request, const DeleteServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeleteSshPublicKeyAsyncHelper(const Model::DeleteSshPublicKeyRequest& request, const DeleteSshPublicKeyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeleteUserAsyncHelper(const Model::DeleteUserRequest& request, const DeleteUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeServerAsyncHelper(const Model::DescribeServerRequest& request, const DescribeServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeUserAsyncHelper(const Model::DescribeUserRequest& request, const DescribeUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ImportSshPublicKeyAsyncHelper(const Model::ImportSshPublicKeyRequest& request, const ImportSshPublicKeyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListServersAsyncHelper(const Model::ListServersRequest& request, const ListServersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListUsersAsyncHelper(const Model::ListUsersRequest& request, const ListUsersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void StartServerAsyncHelper(const Model::StartServerRequest& request, const StartServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void StopServerAsyncHelper(const Model::StopServerRequest& request, const StopServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void TagResourceAsyncHelper(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void TestIdentityProviderAsyncHelper(const Model::TestIdentityProviderRequest& request, const TestIdentityProviderResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UntagResourceAsyncHelper(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UpdateServerAsyncHelper(const Model::UpdateServerRequest& request, const UpdateServerResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UpdateUserAsyncHelper(const Model::UpdateUserRequest& request, const UpdateUserResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace Transfer
} // namespace Aws
| 66.250883 | 249 | 0.695628 | [
"model"
] |
68222769a524301bf3165f82e8a05b69e5c3ea36 | 6,737 | h | C | passes/fsm/fsmdata.h | kallisti5/yosys | 0b9bb852c66ec2a6e9b4b510b3e2e32b8c6a6b16 | [
"ISC"
] | 10 | 2016-04-13T06:21:50.000Z | 2021-06-13T01:26:02.000Z | passes/fsm/fsmdata.h | kallisti5/yosys | 0b9bb852c66ec2a6e9b4b510b3e2e32b8c6a6b16 | [
"ISC"
] | 1 | 2020-12-15T05:59:37.000Z | 2020-12-15T05:59:37.000Z | passes/fsm/fsmdata.h | kallisti5/yosys | 0b9bb852c66ec2a6e9b4b510b3e2e32b8c6a6b16 | [
"ISC"
] | 4 | 2021-09-01T17:04:22.000Z | 2022-02-11T15:20:45.000Z | /*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#ifndef FSMDATA_H
#define FSMDATA_H
#include "kernel/yosys.h"
YOSYS_NAMESPACE_BEGIN
struct FsmData
{
int num_inputs, num_outputs, state_bits, reset_state;
struct transition_t { int state_in, state_out; RTLIL::Const ctrl_in, ctrl_out; };
std::vector<transition_t> transition_table;
std::vector<RTLIL::Const> state_table;
void copy_to_cell(RTLIL::Cell *cell)
{
cell->parameters["\\CTRL_IN_WIDTH"] = RTLIL::Const(num_inputs);
cell->parameters["\\CTRL_OUT_WIDTH"] = RTLIL::Const(num_outputs);
int state_num_log2 = 0;
for (int i = state_table.size(); i > 0; i = i >> 1)
state_num_log2++;
state_num_log2 = max(state_num_log2, 1);
cell->parameters["\\STATE_BITS"] = RTLIL::Const(state_bits);
cell->parameters["\\STATE_NUM"] = RTLIL::Const(state_table.size());
cell->parameters["\\STATE_NUM_LOG2"] = RTLIL::Const(state_num_log2);
cell->parameters["\\STATE_RST"] = RTLIL::Const(reset_state);
cell->parameters["\\STATE_TABLE"] = RTLIL::Const();
for (int i = 0; i < int(state_table.size()); i++) {
std::vector<RTLIL::State> &bits_table = cell->parameters["\\STATE_TABLE"].bits;
std::vector<RTLIL::State> &bits_state = state_table[i].bits;
bits_table.insert(bits_table.end(), bits_state.begin(), bits_state.end());
}
cell->parameters["\\TRANS_NUM"] = RTLIL::Const(transition_table.size());
cell->parameters["\\TRANS_TABLE"] = RTLIL::Const();
for (int i = 0; i < int(transition_table.size()); i++)
{
std::vector<RTLIL::State> &bits_table = cell->parameters["\\TRANS_TABLE"].bits;
transition_t &tr = transition_table[i];
RTLIL::Const const_state_in = RTLIL::Const(tr.state_in, state_num_log2);
RTLIL::Const const_state_out = RTLIL::Const(tr.state_out, state_num_log2);
std::vector<RTLIL::State> &bits_state_in = const_state_in.bits;
std::vector<RTLIL::State> &bits_state_out = const_state_out.bits;
std::vector<RTLIL::State> &bits_ctrl_in = tr.ctrl_in.bits;
std::vector<RTLIL::State> &bits_ctrl_out = tr.ctrl_out.bits;
// append lsb first
bits_table.insert(bits_table.end(), bits_ctrl_out.begin(), bits_ctrl_out.end());
bits_table.insert(bits_table.end(), bits_state_out.begin(), bits_state_out.end());
bits_table.insert(bits_table.end(), bits_ctrl_in.begin(), bits_ctrl_in.end());
bits_table.insert(bits_table.end(), bits_state_in.begin(), bits_state_in.end());
}
}
void copy_from_cell(RTLIL::Cell *cell)
{
num_inputs = cell->parameters["\\CTRL_IN_WIDTH"].as_int();
num_outputs = cell->parameters["\\CTRL_OUT_WIDTH"].as_int();
state_bits = cell->parameters["\\STATE_BITS"].as_int();
reset_state = cell->parameters["\\STATE_RST"].as_int();
int state_num = cell->parameters["\\STATE_NUM"].as_int();
int state_num_log2 = cell->parameters["\\STATE_NUM_LOG2"].as_int();
int trans_num = cell->parameters["\\TRANS_NUM"].as_int();
if (reset_state < 0 || reset_state >= state_num)
reset_state = -1;
RTLIL::Const state_table = cell->parameters["\\STATE_TABLE"];
RTLIL::Const trans_table = cell->parameters["\\TRANS_TABLE"];
for (int i = 0; i < state_num; i++) {
RTLIL::Const state_code;
int off_begin = i*state_bits, off_end = off_begin + state_bits;
state_code.bits.insert(state_code.bits.begin(), state_table.bits.begin()+off_begin, state_table.bits.begin()+off_end);
this->state_table.push_back(state_code);
}
for (int i = 0; i < trans_num; i++)
{
auto off_ctrl_out = trans_table.bits.begin() + i*(num_inputs+num_outputs+2*state_num_log2);
auto off_state_out = off_ctrl_out + num_outputs;
auto off_ctrl_in = off_state_out + state_num_log2;
auto off_state_in = off_ctrl_in + num_inputs;
auto off_end = off_state_in + state_num_log2;
RTLIL::Const state_in, state_out, ctrl_in, ctrl_out;
ctrl_out.bits.insert(state_in.bits.begin(), off_ctrl_out, off_state_out);
state_out.bits.insert(state_out.bits.begin(), off_state_out, off_ctrl_in);
ctrl_in.bits.insert(ctrl_in.bits.begin(), off_ctrl_in, off_state_in);
state_in.bits.insert(state_in.bits.begin(), off_state_in, off_end);
transition_t tr;
tr.state_in = state_in.as_int();
tr.state_out = state_out.as_int();
tr.ctrl_in = ctrl_in;
tr.ctrl_out = ctrl_out;
if (tr.state_in < 0 || tr.state_in >= state_num)
tr.state_in = -1;
if (tr.state_out < 0 || tr.state_out >= state_num)
tr.state_out = -1;
transition_table.push_back(tr);
}
}
void log_info(RTLIL::Cell *cell)
{
log("-------------------------------------\n");
log("\n");
log(" Information on FSM %s (%s):\n", cell->name.c_str(), cell->parameters["\\NAME"].decode_string().c_str());
log("\n");
log(" Number of input signals: %3d\n", num_inputs);
log(" Number of output signals: %3d\n", num_outputs);
log(" Number of state bits: %3d\n", state_bits);
log("\n");
log(" Input signals:\n");
RTLIL::SigSpec sig_in = cell->getPort("\\CTRL_IN");
for (int i = 0; i < GetSize(sig_in); i++)
log(" %3d: %s\n", i, log_signal(sig_in[i]));
log("\n");
log(" Output signals:\n");
RTLIL::SigSpec sig_out = cell->getPort("\\CTRL_OUT");
for (int i = 0; i < GetSize(sig_out); i++)
log(" %3d: %s\n", i, log_signal(sig_out[i]));
log("\n");
log(" State encoding:\n");
for (int i = 0; i < GetSize(state_table); i++)
log(" %3d: %10s%s\n", i, log_signal(state_table[i], false),
int(i) == reset_state ? " <RESET STATE>" : "");
log("\n");
log(" Transition Table (state_in, ctrl_in, state_out, ctrl_out):\n");
for (int i = 0; i < GetSize(transition_table); i++) {
transition_t &tr = transition_table[i];
log(" %5d: %5d %s -> %5d %s\n", i, tr.state_in, log_signal(tr.ctrl_in), tr.state_out, log_signal(tr.ctrl_out));
}
log("\n");
log("-------------------------------------\n");
}
// implemented in fsm_opt.cc
static void optimize_fsm(RTLIL::Cell *cell, RTLIL::Module *module);
};
YOSYS_NAMESPACE_END
#endif
| 37.636872 | 121 | 0.678492 | [
"vector",
"3d"
] |
6823800f3779add10a75d4d7646a15173dec38f6 | 20,162 | h | C | src/seq_mv/protos.h | Heatherms27/hypre | 0fb7956eac3d1d400d577ac4be6ce3ebddce76df | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | src/seq_mv/protos.h | Heatherms27/hypre | 0fb7956eac3d1d400d577ac4be6ce3ebddce76df | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | src/seq_mv/protos.h | Heatherms27/hypre | 0fb7956eac3d1d400d577ac4be6ce3ebddce76df | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
******************************************************************************/
/* csr_matop.c */
HYPRE_Int hypre_CSRMatrixAddFirstPass ( HYPRE_Int firstrow , HYPRE_Int lastrow , HYPRE_Int *marker , HYPRE_Int *twspace , HYPRE_Int *map_A2C , HYPRE_Int *map_B2C , hypre_CSRMatrix *A , hypre_CSRMatrix *B , HYPRE_Int nnzrows_C , HYPRE_Int nrows_C , HYPRE_Int ncols_C , HYPRE_Int *rownnz_C , HYPRE_MemoryLocation memory_location_C , HYPRE_Int *C_i , hypre_CSRMatrix **C_ptr );
HYPRE_Int hypre_CSRMatrixAddSecondPass ( HYPRE_Int firstrow , HYPRE_Int lastrow , HYPRE_Int *marker, HYPRE_Int *twspace , HYPRE_Int *map_A2C , HYPRE_Int *map_B2C , HYPRE_Int *rownnz_C , HYPRE_Complex alpha , HYPRE_Complex beta , hypre_CSRMatrix *A , hypre_CSRMatrix *B , hypre_CSRMatrix *C);
hypre_CSRMatrix *hypre_CSRMatrixAddHost ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixAdd ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixBigAdd ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixMultiplyHost ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixMultiply ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixDeleteZeros ( hypre_CSRMatrix *A , HYPRE_Real tol );
HYPRE_Int hypre_CSRMatrixTransposeHost ( hypre_CSRMatrix *A , hypre_CSRMatrix **AT , HYPRE_Int data );
HYPRE_Int hypre_CSRMatrixTranspose ( hypre_CSRMatrix *A , hypre_CSRMatrix **AT , HYPRE_Int data );
HYPRE_Int hypre_CSRMatrixReorder ( hypre_CSRMatrix *A );
HYPRE_Complex hypre_CSRMatrixSumElts ( hypre_CSRMatrix *A );
HYPRE_Real hypre_CSRMatrixFnorm( hypre_CSRMatrix *A );
HYPRE_Int hypre_CSRMatrixSplit(hypre_CSRMatrix *Bs_ext, HYPRE_BigInt first_col_diag_B, HYPRE_BigInt last_col_diag_B, HYPRE_Int num_cols_offd_B, HYPRE_BigInt *col_map_offd_B, HYPRE_Int *num_cols_offd_C_ptr, HYPRE_BigInt **col_map_offd_C_ptr, hypre_CSRMatrix **Bext_diag_ptr, hypre_CSRMatrix **Bext_offd_ptr);
hypre_CSRMatrix * hypre_CSRMatrixAddPartial( hypre_CSRMatrix *A, hypre_CSRMatrix *B, HYPRE_Int *row_nums);
void hypre_CSRMatrixComputeRowSum( hypre_CSRMatrix *A, HYPRE_Int *CF_i, HYPRE_Int *CF_j, HYPRE_Complex *row_sum, HYPRE_Int type, HYPRE_Complex scal, const char *set_or_add);
void hypre_CSRMatrixExtractDiagonal( hypre_CSRMatrix *A, HYPRE_Complex *d, HYPRE_Int type);
void hypre_CSRMatrixExtractDiagonalHost( hypre_CSRMatrix *A, HYPRE_Complex *d, HYPRE_Int type);
/* csr_matop_device.c */
hypre_CSRMatrix *hypre_CSRMatrixAddDevice ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixMultiplyDevice ( hypre_CSRMatrix *A , hypre_CSRMatrix *B );
hypre_CSRMatrix *hypre_CSRMatrixTripleMultiplyDevice ( hypre_CSRMatrix *A, hypre_CSRMatrix *B, hypre_CSRMatrix *C );
HYPRE_Int hypre_CSRMatrixSplitDevice_core( HYPRE_Int job, HYPRE_Int num_rows, HYPRE_Int B_ext_nnz, HYPRE_Int *B_ext_ii, HYPRE_BigInt *B_ext_bigj, HYPRE_Complex *B_ext_data, char *B_ext_xata, HYPRE_BigInt first_col_diag_B, HYPRE_BigInt last_col_diag_B, HYPRE_Int num_cols_offd_B, HYPRE_BigInt *col_map_offd_B, HYPRE_Int **map_B_to_C_ptr, HYPRE_Int *num_cols_offd_C_ptr, HYPRE_BigInt **col_map_offd_C_ptr, HYPRE_Int *B_ext_diag_nnz_ptr, HYPRE_Int *B_ext_diag_ii, HYPRE_Int *B_ext_diag_j, HYPRE_Complex *B_ext_diag_data, char *B_ext_diag_xata, HYPRE_Int *B_ext_offd_nnz_ptr, HYPRE_Int *B_ext_offd_ii, HYPRE_Int *B_ext_offd_j, HYPRE_Complex *B_ext_offd_data, char *B_ext_offd_xata );
HYPRE_Int hypre_CSRMatrixSplitDevice(hypre_CSRMatrix *B_ext, HYPRE_BigInt first_col_diag_B, HYPRE_BigInt last_col_diag_B, HYPRE_Int num_cols_offd_B, HYPRE_BigInt *col_map_offd_B, HYPRE_Int **map_B_to_C_ptr, HYPRE_Int *num_cols_offd_C_ptr, HYPRE_BigInt **col_map_offd_C_ptr, hypre_CSRMatrix **B_ext_diag_ptr, hypre_CSRMatrix **B_ext_offd_ptr);
HYPRE_Int hypre_CSRMatrixTransposeDevice ( hypre_CSRMatrix *A , hypre_CSRMatrix **AT , HYPRE_Int data );
hypre_CSRMatrix* hypre_CSRMatrixAddPartialDevice( hypre_CSRMatrix *A, hypre_CSRMatrix *B, HYPRE_Int *row_nums);
HYPRE_Int hypre_CSRMatrixColNNzRealDevice( hypre_CSRMatrix *A, HYPRE_Real *colnnz);
HYPRE_Int hypre_CSRMatrixMoveDiagFirstDevice( hypre_CSRMatrix *A );
HYPRE_Int hypre_CSRMatrixCheckDiagFirstDevice( hypre_CSRMatrix *A );
HYPRE_Int hypre_CSRMatrixCheckDiagFirstSetValueZeroDevice( hypre_CSRMatrix *A, HYPRE_Complex v );
void hypre_CSRMatrixComputeRowSumDevice( hypre_CSRMatrix *A, HYPRE_Int *CF_i, HYPRE_Int *CF_j, HYPRE_Complex *row_sum, HYPRE_Int type, HYPRE_Complex scal, const char *set_or_add);
void hypre_CSRMatrixExtractDiagonalDevice( hypre_CSRMatrix *A, HYPRE_Complex *d, HYPRE_Int type);
hypre_CSRMatrix* hypre_CSRMatrixStack2Device(hypre_CSRMatrix *A, hypre_CSRMatrix *B);
hypre_CSRMatrix* hypre_CSRMatrixIdentityDevice(HYPRE_Int n, HYPRE_Complex alp);
HYPRE_Int hypre_CSRMatrixRemoveDiagonalDevice(hypre_CSRMatrix *A);
HYPRE_Int hypre_CSRMatrixDropSmallEntriesDevice( hypre_CSRMatrix *A, HYPRE_Complex tol, HYPRE_Int abs, HYPRE_Int option);
HYPRE_Int hypre_CSRMatrixSortRow(hypre_CSRMatrix *A);
HYPRE_Int hypre_CSRMatrixTriLowerUpperSolveCusparse(char uplo, hypre_CSRMatrix *A, hypre_Vector *f, hypre_Vector *u );
HYPRE_Int hypre_CSRMatrixIntersectPattern(hypre_CSRMatrix *A, hypre_CSRMatrix *B, HYPRE_Int *markA, HYPRE_Int diag_option);
/* csr_matrix.c */
hypre_CSRMatrix *hypre_CSRMatrixCreate ( HYPRE_Int num_rows , HYPRE_Int num_cols , HYPRE_Int num_nonzeros );
HYPRE_Int hypre_CSRMatrixDestroy ( hypre_CSRMatrix *matrix );
HYPRE_Int hypre_CSRMatrixInitialize_v2( hypre_CSRMatrix *matrix, HYPRE_Int bigInit, HYPRE_MemoryLocation memory_location );
HYPRE_Int hypre_CSRMatrixInitialize ( hypre_CSRMatrix *matrix );
HYPRE_Int hypre_CSRMatrixBigInitialize ( hypre_CSRMatrix *matrix );
HYPRE_Int hypre_CSRMatrixBigJtoJ ( hypre_CSRMatrix *matrix );
HYPRE_Int hypre_CSRMatrixJtoBigJ ( hypre_CSRMatrix *matrix );
HYPRE_Int hypre_CSRMatrixSetDataOwner ( hypre_CSRMatrix *matrix , HYPRE_Int owns_data );
HYPRE_Int hypre_CSRMatrixSetRownnz ( hypre_CSRMatrix *matrix );
hypre_CSRMatrix *hypre_CSRMatrixRead ( char *file_name );
HYPRE_Int hypre_CSRMatrixPrint ( hypre_CSRMatrix *matrix, const char *file_name );
HYPRE_Int hypre_CSRMatrixPrint2( hypre_CSRMatrix *matrix, const char *file_name );
HYPRE_Int hypre_CSRMatrixPrintHB ( hypre_CSRMatrix *matrix_input , char *file_name );
HYPRE_Int hypre_CSRMatrixPrintMM( hypre_CSRMatrix *matrix, HYPRE_Int basei, HYPRE_Int basej, HYPRE_Int trans, const char *file_name );
HYPRE_Int hypre_CSRMatrixCopy ( hypre_CSRMatrix *A , hypre_CSRMatrix *B , HYPRE_Int copy_data );
hypre_CSRMatrix *hypre_CSRMatrixClone ( hypre_CSRMatrix *A, HYPRE_Int copy_data );
hypre_CSRMatrix *hypre_CSRMatrixClone_v2( hypre_CSRMatrix *A, HYPRE_Int copy_data, HYPRE_MemoryLocation memory_location );
hypre_CSRMatrix *hypre_CSRMatrixUnion ( hypre_CSRMatrix *A , hypre_CSRMatrix *B , HYPRE_BigInt *col_map_offd_A , HYPRE_BigInt *col_map_offd_B , HYPRE_BigInt **col_map_offd_C );
HYPRE_Int hypre_CSRMatrixPrefetch( hypre_CSRMatrix *A, HYPRE_MemoryLocation memory_location);
HYPRE_Int hypre_CSRMatrixCheckSetNumNonzeros( hypre_CSRMatrix *matrix );
HYPRE_Int hypre_CSRMatrixResize( hypre_CSRMatrix *matrix, HYPRE_Int new_num_rows, HYPRE_Int new_num_cols, HYPRE_Int new_num_nonzeros );
/* csr_matvec.c */
// y[offset:end] = alpha*A[offset:end,:]*x + beta*b[offset:end]
HYPRE_Int hypre_CSRMatrixMatvecOutOfPlace ( HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *b, hypre_Vector *y, HYPRE_Int offset );
// y = alpha*A + beta*y
HYPRE_Int hypre_CSRMatrixMatvec ( HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *y );
HYPRE_Int hypre_CSRMatrixMatvecT ( HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *y );
HYPRE_Int hypre_CSRMatrixMatvec_FF ( HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *y , HYPRE_Int *CF_marker_x , HYPRE_Int *CF_marker_y , HYPRE_Int fpt );
/* csr_matvec_device.c */
HYPRE_Int hypre_CSRMatrixMatvecDevice(HYPRE_Int trans, HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *b, hypre_Vector *y, HYPRE_Int offset );
HYPRE_Int hypre_CSRMatrixMatvecMaskedDevice(HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *b, hypre_Vector *y, HYPRE_Int *mask, HYPRE_Int size_of_mask);
HYPRE_Int hypre_CSRMatrixMatvecCusparseNewAPI( HYPRE_Int trans, HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
HYPRE_Int hypre_CSRMatrixMatvecCusparseOldAPI( HYPRE_Int trans, HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
HYPRE_Int hypre_CSRMatrixMatvecOMPOffload (HYPRE_Int trans, HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *y, HYPRE_Int offset );
HYPRE_Int hypre_CSRMatrixMatvecRocsparse (HYPRE_Int trans, HYPRE_Complex alpha , hypre_CSRMatrix *A , hypre_Vector *x , HYPRE_Complex beta , hypre_Vector *y, HYPRE_Int offset );
/* genpart.c */
HYPRE_Int hypre_GeneratePartitioning ( HYPRE_BigInt length , HYPRE_Int num_procs , HYPRE_BigInt **part_ptr );
HYPRE_Int hypre_GenerateLocalPartitioning ( HYPRE_BigInt length , HYPRE_Int num_procs , HYPRE_Int myid , HYPRE_BigInt **part_ptr );
/* HYPRE_csr_matrix.c */
HYPRE_CSRMatrix HYPRE_CSRMatrixCreate ( HYPRE_Int num_rows , HYPRE_Int num_cols , HYPRE_Int *row_sizes );
HYPRE_Int HYPRE_CSRMatrixDestroy ( HYPRE_CSRMatrix matrix );
HYPRE_Int HYPRE_CSRMatrixInitialize ( HYPRE_CSRMatrix matrix );
HYPRE_CSRMatrix HYPRE_CSRMatrixRead ( char *file_name );
void HYPRE_CSRMatrixPrint ( HYPRE_CSRMatrix matrix , char *file_name );
HYPRE_Int HYPRE_CSRMatrixGetNumRows ( HYPRE_CSRMatrix matrix , HYPRE_Int *num_rows );
/* HYPRE_mapped_matrix.c */
HYPRE_MappedMatrix HYPRE_MappedMatrixCreate ( void );
HYPRE_Int HYPRE_MappedMatrixDestroy ( HYPRE_MappedMatrix matrix );
HYPRE_Int HYPRE_MappedMatrixLimitedDestroy ( HYPRE_MappedMatrix matrix );
HYPRE_Int HYPRE_MappedMatrixInitialize ( HYPRE_MappedMatrix matrix );
HYPRE_Int HYPRE_MappedMatrixAssemble ( HYPRE_MappedMatrix matrix );
void HYPRE_MappedMatrixPrint ( HYPRE_MappedMatrix matrix );
HYPRE_Int HYPRE_MappedMatrixGetColIndex ( HYPRE_MappedMatrix matrix , HYPRE_Int j );
void *HYPRE_MappedMatrixGetMatrix ( HYPRE_MappedMatrix matrix );
HYPRE_Int HYPRE_MappedMatrixSetMatrix ( HYPRE_MappedMatrix matrix , void *matrix_data );
HYPRE_Int HYPRE_MappedMatrixSetColMap ( HYPRE_MappedMatrix matrix , HYPRE_Int (*ColMap )(HYPRE_Int ,void *));
HYPRE_Int HYPRE_MappedMatrixSetMapData ( HYPRE_MappedMatrix matrix , void *MapData );
/* HYPRE_multiblock_matrix.c */
HYPRE_MultiblockMatrix HYPRE_MultiblockMatrixCreate ( void );
HYPRE_Int HYPRE_MultiblockMatrixDestroy ( HYPRE_MultiblockMatrix matrix );
HYPRE_Int HYPRE_MultiblockMatrixLimitedDestroy ( HYPRE_MultiblockMatrix matrix );
HYPRE_Int HYPRE_MultiblockMatrixInitialize ( HYPRE_MultiblockMatrix matrix );
HYPRE_Int HYPRE_MultiblockMatrixAssemble ( HYPRE_MultiblockMatrix matrix );
void HYPRE_MultiblockMatrixPrint ( HYPRE_MultiblockMatrix matrix );
HYPRE_Int HYPRE_MultiblockMatrixSetNumSubmatrices ( HYPRE_MultiblockMatrix matrix , HYPRE_Int n );
HYPRE_Int HYPRE_MultiblockMatrixSetSubmatrixType ( HYPRE_MultiblockMatrix matrix , HYPRE_Int j , HYPRE_Int type );
/* HYPRE_vector.c */
HYPRE_Vector HYPRE_VectorCreate ( HYPRE_Int size );
HYPRE_Int HYPRE_VectorDestroy ( HYPRE_Vector vector );
HYPRE_Int HYPRE_VectorInitialize ( HYPRE_Vector vector );
HYPRE_Int HYPRE_VectorPrint ( HYPRE_Vector vector , char *file_name );
HYPRE_Vector HYPRE_VectorRead ( char *file_name );
/* mapped_matrix.c */
hypre_MappedMatrix *hypre_MappedMatrixCreate ( void );
HYPRE_Int hypre_MappedMatrixDestroy ( hypre_MappedMatrix *matrix );
HYPRE_Int hypre_MappedMatrixLimitedDestroy ( hypre_MappedMatrix *matrix );
HYPRE_Int hypre_MappedMatrixInitialize ( hypre_MappedMatrix *matrix );
HYPRE_Int hypre_MappedMatrixAssemble ( hypre_MappedMatrix *matrix );
void hypre_MappedMatrixPrint ( hypre_MappedMatrix *matrix );
HYPRE_Int hypre_MappedMatrixGetColIndex ( hypre_MappedMatrix *matrix , HYPRE_Int j );
void *hypre_MappedMatrixGetMatrix ( hypre_MappedMatrix *matrix );
HYPRE_Int hypre_MappedMatrixSetMatrix ( hypre_MappedMatrix *matrix , void *matrix_data );
HYPRE_Int hypre_MappedMatrixSetColMap ( hypre_MappedMatrix *matrix , HYPRE_Int (*ColMap )(HYPRE_Int ,void *));
HYPRE_Int hypre_MappedMatrixSetMapData ( hypre_MappedMatrix *matrix , void *map_data );
/* multiblock_matrix.c */
hypre_MultiblockMatrix *hypre_MultiblockMatrixCreate ( void );
HYPRE_Int hypre_MultiblockMatrixDestroy ( hypre_MultiblockMatrix *matrix );
HYPRE_Int hypre_MultiblockMatrixLimitedDestroy ( hypre_MultiblockMatrix *matrix );
HYPRE_Int hypre_MultiblockMatrixInitialize ( hypre_MultiblockMatrix *matrix );
HYPRE_Int hypre_MultiblockMatrixAssemble ( hypre_MultiblockMatrix *matrix );
void hypre_MultiblockMatrixPrint ( hypre_MultiblockMatrix *matrix );
HYPRE_Int hypre_MultiblockMatrixSetNumSubmatrices ( hypre_MultiblockMatrix *matrix , HYPRE_Int n );
HYPRE_Int hypre_MultiblockMatrixSetSubmatrixType ( hypre_MultiblockMatrix *matrix , HYPRE_Int j , HYPRE_Int type );
HYPRE_Int hypre_MultiblockMatrixSetSubmatrix ( hypre_MultiblockMatrix *matrix , HYPRE_Int j , void *submatrix );
/* vector.c */
hypre_Vector *hypre_SeqVectorCreate ( HYPRE_Int size );
hypre_Vector *hypre_SeqMultiVectorCreate ( HYPRE_Int size , HYPRE_Int num_vectors );
HYPRE_Int hypre_SeqVectorDestroy ( hypre_Vector *vector );
HYPRE_Int hypre_SeqVectorInitialize_v2( hypre_Vector *vector, HYPRE_MemoryLocation memory_location );
HYPRE_Int hypre_SeqVectorInitialize ( hypre_Vector *vector );
HYPRE_Int hypre_SeqVectorSetDataOwner ( hypre_Vector *vector , HYPRE_Int owns_data );
hypre_Vector *hypre_SeqVectorRead ( char *file_name );
HYPRE_Int hypre_SeqVectorPrint ( hypre_Vector *vector , char *file_name );
HYPRE_Int hypre_SeqVectorSetConstantValues ( hypre_Vector *v , HYPRE_Complex value );
HYPRE_Int hypre_SeqVectorSetRandomValues ( hypre_Vector *v , HYPRE_Int seed );
HYPRE_Int hypre_SeqVectorCopy ( hypre_Vector *x , hypre_Vector *y );
hypre_Vector *hypre_SeqVectorCloneDeep ( hypre_Vector *x );
hypre_Vector *hypre_SeqVectorCloneDeep_v2( hypre_Vector *x, HYPRE_MemoryLocation memory_location );
hypre_Vector *hypre_SeqVectorCloneShallow ( hypre_Vector *x );
HYPRE_Int hypre_SeqVectorScale( HYPRE_Complex alpha, hypre_Vector *y );
HYPRE_Int hypre_SeqVectorAxpy ( HYPRE_Complex alpha , hypre_Vector *x , hypre_Vector *y );
HYPRE_Real hypre_SeqVectorInnerProd ( hypre_Vector *x , hypre_Vector *y );
HYPRE_Int hypre_SeqVectorMassInnerProd(hypre_Vector *x, hypre_Vector **y, HYPRE_Int k, HYPRE_Int unroll, HYPRE_Real *result);
HYPRE_Int hypre_SeqVectorMassInnerProd4(hypre_Vector *x, hypre_Vector **y, HYPRE_Int k, HYPRE_Real *result);
HYPRE_Int hypre_SeqVectorMassInnerProd8(hypre_Vector *x, hypre_Vector **y, HYPRE_Int k, HYPRE_Real *result);
HYPRE_Int hypre_SeqVectorMassDotpTwo(hypre_Vector *x, hypre_Vector *y , hypre_Vector **z, HYPRE_Int k, HYPRE_Int unroll, HYPRE_Real *result_x , HYPRE_Real *result_y);
HYPRE_Int hypre_SeqVectorMassDotpTwo4(hypre_Vector *x, hypre_Vector *y , hypre_Vector **z, HYPRE_Int k, HYPRE_Real *result_x , HYPRE_Real *result_y);
HYPRE_Int hypre_SeqVectorMassDotpTwo8(hypre_Vector *x, hypre_Vector *y , hypre_Vector **z, HYPRE_Int k, HYPRE_Real *result_x , HYPRE_Real *result_y);
HYPRE_Int hypre_SeqVectorMassAxpy(HYPRE_Complex *alpha, hypre_Vector **x, hypre_Vector *y, HYPRE_Int k, HYPRE_Int unroll);
HYPRE_Int hypre_SeqVectorMassAxpy4(HYPRE_Complex *alpha, hypre_Vector **x, hypre_Vector *y, HYPRE_Int k);
HYPRE_Int hypre_SeqVectorMassAxpy8(HYPRE_Complex *alpha, hypre_Vector **x, hypre_Vector *y, HYPRE_Int k);
HYPRE_Complex hypre_SeqVectorSumElts ( hypre_Vector *vector );
HYPRE_Int hypre_SeqVectorPrefetch(hypre_Vector *x, HYPRE_MemoryLocation memory_location);
//HYPRE_Int hypre_SeqVectorMax( HYPRE_Complex alpha, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y );
HYPRE_Int hypreDevice_CSRSpAdd(HYPRE_Int ma, HYPRE_Int mb, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int nnzB, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Complex *d_ab, HYPRE_Int *d_num_b, HYPRE_Int *nnzC_out, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_ac_out);
HYPRE_Int hypreDevice_CSRSpTrans(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
HYPRE_Int hypreDevice_CSRSpTransCusparse(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
HYPRE_Int hypreDevice_CSRSpTransRocsparse(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
HYPRE_Int hypreDevice_CSRSpGemm(hypre_CSRMatrix *A, hypre_CSRMatrix *B, hypre_CSRMatrix **C_ptr);
HYPRE_Int hypre_CSRMatrixDeviceSpGemmSetRownnzEstimateMethod( HYPRE_Int value );
HYPRE_Int hypre_CSRMatrixDeviceSpGemmSetRownnzEstimateNSamples( HYPRE_Int value );
HYPRE_Int hypre_CSRMatrixDeviceSpGemmSetRownnzEstimateNSamples( HYPRE_Int value );
HYPRE_Int hypre_CSRMatrixDeviceSpGemmSetRownnzEstimateMultFactor( HYPRE_Real value );
HYPRE_Int hypre_CSRMatrixDeviceSpGemmSetHashType( char value );
HYPRE_Int hypreDevice_CSRSpGemmRownnzEstimate(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Int *d_rc);
HYPRE_Int hypreDevice_CSRSpGemmRownnzUpperbound(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Int *d_rc, HYPRE_Int *d_rf);
HYPRE_Int hypreDevice_CSRSpGemmRownnz(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Int *d_rc);
HYPRE_Int hypreDevice_CSRSpGemmWithRownnzUpperbound(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_a, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Complex *d_b, HYPRE_Int *d_rc, HYPRE_Int exact_rownnz, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_c_out, HYPRE_Int *nnzC);
HYPRE_Int hypreDevice_CSRSpGemmWithRownnzEstimate(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_a, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Complex *d_b, HYPRE_Int *d_rc, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_c_out, HYPRE_Int *nnzC);
HYPRE_Int hypreDevice_CSRSpGemmCusparseGenericAPI(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_a, HYPRE_Int nnzB, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Complex *d_b, HYPRE_Int *nnzC_out, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out, HYPRE_Complex **d_c_out);
HYPRE_Int hypre_SeqVectorElmdivpy( hypre_Vector *x, hypre_Vector *b, hypre_Vector *y );
HYPRE_Int hypre_CSRMatrixSpMVDevice( HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int fill );
#if defined(HYPRE_USING_CUSPARSE)
hypre_CsrsvData* hypre_CsrsvDataCreate();
void hypre_CsrsvDataDestroy(hypre_CsrsvData *data);
#endif
#if defined(HYPRE_USING_CUSPARSE) || defined(HYPRE_USING_ROCSPARSE)
hypre_GpuMatData* hypre_GpuMatDataCreate();
void hypre_GpuMatDataDestroy(hypre_GpuMatData *data);
hypre_GpuMatData* hypre_CSRMatrixGetGPUMatData(hypre_CSRMatrix *matrix);
#define hypre_CSRMatrixGPUMatDescr(matrix) ( hypre_GpuMatDataMatDecsr(hypre_CSRMatrixGetGPUMatData(matrix)) )
#define hypre_CSRMatrixGPUMatInfo(matrix) ( hypre_GpuMatDataMatInfo (hypre_CSRMatrixGetGPUMatData(matrix)) )
#endif
| 85.432203 | 679 | 0.821893 | [
"vector"
] |
682410317f44e5df81f8820660bba8d84404d0f8 | 10,397 | h | C | core/include/mmcore/utility/sys/Thread.h | masrice/megamol | d48fc4889f500528609053a5445202a9c0f6e5fb | [
"BSD-3-Clause"
] | 49 | 2017-08-23T13:24:24.000Z | 2022-03-16T09:10:58.000Z | core/include/mmcore/utility/sys/Thread.h | masrice/megamol | d48fc4889f500528609053a5445202a9c0f6e5fb | [
"BSD-3-Clause"
] | 200 | 2018-07-20T15:18:26.000Z | 2022-03-31T11:01:44.000Z | core/include/mmcore/utility/sys/Thread.h | masrice/megamol | d48fc4889f500528609053a5445202a9c0f6e5fb | [
"BSD-3-Clause"
] | 31 | 2017-07-31T16:19:29.000Z | 2022-02-14T23:41:03.000Z | /*
* Thread.h 15.08.2006 (mueller)
*
* Copyright (C) 2006 by Universitaet Stuttgart (VIS). Alle Rechte vorbehalten.
*/
#ifndef VISLIB_THREAD_H_INCLUDED
#define VISLIB_THREAD_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */
#if defined(_WIN32) && defined(_MANAGED)
#pragma managed(push, off)
#endif /* defined(_WIN32) && defined(_MANAGED) */
#include "mmcore/api/MegaMolCore.std.h"
#ifndef _WIN32
#include <pthread.h>
#endif /* !_WIN32 */
#include "vislib/sys/Runnable.h"
#include "vislib/types.h"
namespace vislib {
namespace sys {
/**
* Implements a platform independent interface for system threads.
*
* On Linux, Threads are created joinable. Join() may only be called once.
* See remarks on this method.
*
* On Linux, the thread is detached in the destructor. Any native API calls,
* in particular joining the thread, using the thread ID are illegal after
* the thread object has been destroyed.
*
* @author Christoph Mueller
*/
class MEGAMOLCORE_API Thread {
// TODO: Exit code handling/IsRunning impl is at least hugly.
public:
/**
* Answer the ID of the calling thread.
*
* @eturn The ID of the calling thread.
*/
static inline DWORD CurrentID(void) {
#ifdef _WIN32
return ::GetCurrentThreadId();
#else /* _WIN32 */
return static_cast<DWORD>(::pthread_self());
#endif /* _WIN32 */
}
// TODO: How to get exit code under Linux when using pthread_exit??
// /**
// * Exits the calling thread with the specified exit code.
// *
// * @param exitCode Exit code for the calling thread.
// */
// static inline void Exit(const DWORD exitCode) {
//#ifdef _WIN32
// ::ExitThread(exitCode);
//#else /* _WIN32 */
// ::pthread_exit(reinterpret_cast<void *>(exitCode));
//#endif /* _WIN32 */
// }
/**
* Makes the calling thread sleep for 'millis' milliseconds.
*
* @param millis The milliseconds to block the calling thread.
*/
static void Sleep(const DWORD millis);
/**
* Causes the calling thread to yield execution to another thread that
* is ready to run on the current processor.
*
* @throws SystemException If the operation could not be completed
* successfully (Linux only).
*/
static void Reschedule(void);
// Implementation note: Cannot be named Yield() because of macro with
// the same name in Windows API.
/**
* Create a thread that executes the given Runnable.
*
* @param runnable The Runnable to run in a thread. The caller must
* guarantee that the object designated by 'runnable'
* exists at least as long as the thread is running.
*/
explicit Thread(Runnable* runnable);
/**
* Create a thread that executes the function designated by
* 'runnableFunc'.
*
* @param runnableFunc The function to run in a thread.
*/
explicit Thread(Runnable::Function runnableFunc);
/** Dtor. */
virtual ~Thread(void);
/**
* Answer the exit code of the thread.
*
* @return The thread exit code.
*
* @throws SystemException If the exit code could not be determined.
*/
DWORD GetExitCode(void) const;
/**
* Answer a pointer to the Runnable executed by this thread. If the
* thread executes a ThreadFunc instead of a runnable, this method
* will return NULL.
*
* @return A pointer to the Runnable or NULL, if a function is used.
*/
inline const Runnable* GetRunnable(void) const {
return this->runnable;
}
/**
* Answer whether the thread is currently running.
*
* @return true, if the thread is currently running, false otherwise.
*/
bool IsRunning(void) const;
/**
* Waits for the thread to finish. If the thread was not started, the
* method returns immediately.
*
* On Linux, Join() can only be called by one other thread.
*
* On Linux, Join() detaches the thread. Any further call to join is
* illegal.
*
* @throws SystemException If waiting for the thread failed.
*/
void Join(void);
/**
* Start the thread.
*
* A thread can only be started, if it is in the state NEW or
* FINISHED.
*
* @param userData The user data that are passed to the new thread's
* thread function or Run() method.
*
* @return true, if the thread was started, false, if it could not be
* started, because it is already running.
*
* @throws SystemException If the creation of the new thread failed.
*/
bool Start(void* userData = NULL);
/**
* Terminate the thread.
*
* If the thread has been constructed using a RunnableFunc, the
* behaviour is as follows: If 'forceTerminate' is true, the thread is
* forcefully terminated and the method returns true. 'forceTerminate'
* cannot be false when using a RunnableFunc. The method will throw
* an IllegalParamException.
*
* If the thread has been constructed using a Runnable object, the
* behaviour is as follows: If 'forceTerminate' is true, the thread
* is forcefully terminated and the method returns true. Otherwise,
* the method behaves as TryTerminate(true). Note, that this can cause
* a deadlock, if your Runnable acknowledges a termination request but
* does not finish.
*
* @param forceTerminate If true, the thread is terminated immediately,
* if false, the thread has the possibility to do
* some cleanup and finish in a controllend
* manner. 'forceTerminate' must be true, if the
* thread has been constructed using a
* RunnableFunc.
* @param exitCode If 'forceTerminate' is true, this value will be
* used as exit code of the thread. If
* 'forceTerminate' is false, this value will be
* ignored.
*
* @returns true, if the thread has been terminated, false, otherwise.
*
* @throws IllegalStateException If 'forceTerminate' is false and the
* thread has been constructed using a
* RunnableFunc.
* @throws SystemException If terminating the thread forcefully
* failed.
*/
bool Terminate(const bool forceTerminate, const int exitCode = 0);
/**
* This method tries to terminate a thread in a controlled manner. It
* can only be called, if the thread has been constructed using a
* Runnable object.
*
* The behaviour is as follows: The method will ask the Runnable to
* finish as soon as possible. If the Runnable acknowledges the request,
* the method can wait for the thread to finish. It returns true in
* both cases. If the Runnable does not acknowledge the request, the
* method returns false immediately.
*
* Note, that TryTerminate(true) can possibly cause a deadlock, if the
* Runnable acknowledges the request and does not return.
*
* @param doWait If set true, the method will wait for the thread to
* finish, if the Runnable acknowlegdes the termination
* request. Otherwise, the method will return immediately
* after requesting the termination.
*
* @return true, if the Runnable acknowledged the termination request,
* false otherwise.
*
* @throws IllegalStateException If the thread has been constructed
* using a RunnableFunc.
*/
bool TryTerminate(const bool doWait = false);
protected:
/**
* Forbidden copy ctor.
*
* @param rhs The object to be cloned.
*
* @throws UnsupportedOperationException Unconditionally.
*/
Thread(const Thread& rhs);
/**
* Forbidden assignment.
*
* @param rhs The right hand side operand.
*
* @return *this.
*
* @throws IllegalParamException If (this != &rhs).
*/
Thread& operator=(const Thread& rhs);
private:
/**
* A pointer to this structure is passed to ThreadFunc. This consists of
* a pointer to the Thread object and of the user data for the thread.
*/
typedef struct ThreadFuncParam_t {
Thread* thread; // The thread to execute.
void* userData; // The user parameters.
} ThreadFuncParam;
#ifndef _WIN32
/**
* A cleanup handler for posix threads. We use this to determine whether a
* thread is still running and for storing the exit code.
*
* @param param A pointer to this Thread.
*/
static void CleanupFunc(void* param);
#endif /* !_WIN32 */
/**
* The thread function that is passed to the system API when starting a
* new thread.
*
* @param param The parameters for the thread which must be a pointer
* to a ThreadFuncParam structure.
*
* @return The thread's exit code.
*/
#ifdef _WIN32
static DWORD WINAPI ThreadFunc(void* param);
#else /* _WIN32 */
static void* ThreadFunc(void* param);
#endif /* _WIN32 */
#ifdef _WIN32
/** Handle of the thread. */
HANDLE handle;
/** The thread ID. */
DWORD id;
#else /* _WIN32 */
/** The thread attributes. */
pthread_attr_t attribs;
/** The exit code of the thread. */
DWORD exitCode;
/** The thread ID. */
pthread_t id;
#endif /* _WIN32 */
/** The Runnable to execute, or NULL, if 'threadFunc' should be used. */
Runnable* runnable;
/** The function to execute, or NULL, if 'runnable' should be used. */
Runnable::Function runnableFunc;
/** This is the parameter for the actual system thread function. */
ThreadFuncParam threadFuncParam;
};
} /* end namespace sys */
} /* end namespace vislib */
#if defined(_WIN32) && defined(_MANAGED)
#pragma managed(pop)
#endif /* defined(_WIN32) && defined(_MANAGED) */
#endif /* VISLIB_THREAD_H_INCLUDED */
| 32.188854 | 79 | 0.617774 | [
"object"
] |
6825f84f31e294ec69905a34d1865e9d5329105c | 5,211 | h | C | src/gui/DescriptionWidget.h | Ascent-Group/visual-db | 4cd074fb64fac2def74bb5005fc0d46caa0e96f7 | [
"BSD-3-Clause"
] | 1 | 2015-06-25T18:12:50.000Z | 2015-06-25T18:12:50.000Z | src/gui/DescriptionWidget.h | Ascent-Group/visual-db | 4cd074fb64fac2def74bb5005fc0d46caa0e96f7 | [
"BSD-3-Clause"
] | null | null | null | src/gui/DescriptionWidget.h | Ascent-Group/visual-db | 4cd074fb64fac2def74bb5005fc0d46caa0e96f7 | [
"BSD-3-Clause"
] | null | null | null | /*-
* Copyright (c) 2009, Ascent Group.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the Ascent Group nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DESCRIPTIONWIDGET_H
#define DESCRIPTIONWIDGET_H
#include <common/DbObjectPtr.h>
#include <gui/ui/ui_DescriptionWidget.h>
#include <QWidget>
namespace DbObjects
{
namespace Common
{
class DbIndex;
class DbProcedure;
class DbRole;
class DbSchema;
class DbTable;
class DbTrigger;
class DbView;
typedef DbObjectPtr<DbIndex> DbIndexPtr;
typedef DbObjectPtr<DbProcedure> DbProcedurePtr;
typedef DbObjectPtr<DbRole> DbRolePtr;
typedef DbObjectPtr<DbSchema> DbSchemaPtr;
typedef DbObjectPtr<DbTable> DbTablePtr;
typedef DbObjectPtr<DbTrigger> DbTriggerPtr;
typedef DbObjectPtr<DbView> DbViewPtr;
} // namespace Common
} //namespace DbObjects
/*!
* \class DescriptionWidget
* \headerfile gui/DescriptionWidget.h
* \brief Description widget. Here the object's description is displayed.
*/
class DescriptionWidget : public QWidget
{
Q_OBJECT
public:
enum DbTableCols {
TableColumnNameCol = 0,
TableTypeCol,
TableNullCol,
TableUniqueCol,
TablePKCol,
TableFKCol,
TableForeignTableCol,
DbTableColumnsCount
};
enum DbRoleCols {
RoleNameCol = 0,
RoleIdCol,
RoleSuperUserCol,
RoleInheritCol,
RoleCreateRoleCol,
RoleCreateDbCol,
RoleUpdateSysCatCol,
RoleLoginCol,
RoleConnectionLimitCol,
RoleExpiryDateCol,
DbRoleColumnsCount
};
enum DbViewCols {
ViewNameCol = 0,
ViewSchemaCol,
ViewOwnerCol,
DbViewColumnsCount
};
enum DbIndexCols {
IndexNameCol = 0,
IndexTableCol,
IndexColCountCol,
IndexColNumsCol,
IndexUniqueCol,
IndexPrimaryCol,
IndexClusteredCol,
IndexValidCol,
IndexChecksXMinCol,
IndexReadyCol,
DbIndexColumnsCount
};
enum DbTriggerCols {
TriggerNameCol = 0,
TriggerTableNameCol,
TriggerProcedureNameCol,
TriggerEnabledCol,
TriggerIsConstraintCol,
TriggerConstraintNameCol,
TriggerReferencedTableNameCol,
TriggerIsDeferrableCol,
TriggerIsInitiallyDeferredCol,
TriggerNumArgsCol,
DbTriggerColumnsCount
};
enum DbSchemaCols {
SchemaNameCol = 0,
SchemaOwnerNameCol,
SchemaDescriptionCol,
DbSchemaColumnsCount
};
enum DbProcedureCols {
ProcedureNameCol = 0,
ProcedureSchemaCol,
ProcedureOwnerCol,
ProcedureLanguageCol,
DbProcedureColumnsCount
};
public:
DescriptionWidget(QWidget *ipParent = 0);
~DescriptionWidget();
void describe(const DbObjects::Common::DbIndexPtr &ipIndex);
void describe(const DbObjects::Common::DbProcedurePtr &ipProcedure);
void describe(const DbObjects::Common::DbRolePtr &ipRole);
void describe(const DbObjects::Common::DbSchemaPtr &ipSchema);
void describe(const DbObjects::Common::DbTablePtr &ipTable);
void describe(const DbObjects::Common::DbTriggerPtr &ipTrigger);
void describe(const DbObjects::Common::DbViewPtr &ipView);
private:
Ui::DescriptionWidget ui;
static const QString sCreateSchemaScript;
static const QString sAddSchemaDecriptionScript;
};
#endif // DESCRIPTIONWIDGET_H
| 30.652941 | 85 | 0.664172 | [
"object"
] |
682ba1c8dff06b812cf5dc7a9a16bec7bdb995b3 | 7,076 | h | C | cc/paint/paint_op_writer.h | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 575 | 2015-06-18T23:58:20.000Z | 2022-03-23T09:32:39.000Z | cc/paint/paint_op_writer.h | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | cc/paint/paint_op_writer.h | iridium-browser/iridium-browser | 907e31cf5ce5ad14d832796e3a7c11e496828959 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 52 | 2015-07-14T10:40:50.000Z | 2022-03-15T01:11:49.000Z | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CC_PAINT_PAINT_OP_WRITER_H_
#define CC_PAINT_PAINT_OP_WRITER_H_
#include <unordered_set>
#include "build/build_config.h"
#include "cc/paint/paint_canvas.h"
#include "cc/paint/paint_export.h"
#include "cc/paint/paint_filter.h"
#include "cc/paint/paint_op_buffer_serializer.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkYUVAInfo.h"
struct SkRect;
struct SkIRect;
class SkRRect;
namespace gpu {
struct Mailbox;
}
namespace cc {
class DrawImage;
class PaintShader;
class CC_PAINT_EXPORT PaintOpWriter {
public:
// The SerializeOptions passed to the writer must set the required fields
// if it can be used for serializing images, paint records or text blobs.
PaintOpWriter(void* memory,
size_t size,
const PaintOp::SerializeOptions& options,
bool enable_security_constraints = false);
~PaintOpWriter();
static size_t constexpr HeaderBytes() { return 4u; }
static size_t constexpr Alignment() { return 4u; }
static size_t GetFlattenableSize(const SkFlattenable* flattenable);
static size_t GetImageSize(const PaintImage& image);
static size_t GetRecordSize(const PaintRecord* record);
// Write a sequence of arbitrary bytes.
void WriteData(size_t bytes, const void* input);
size_t size() const { return valid_ ? size_ - remaining_bytes_ : 0u; }
uint64_t* WriteSize(size_t size);
void Write(SkScalar data);
void Write(SkMatrix data);
void Write(const SkM44& data);
void Write(uint8_t data);
void Write(uint32_t data);
void Write(uint64_t data);
void Write(int32_t data);
void Write(const SkRect& rect);
void Write(const SkIRect& rect);
void Write(const SkRRect& rect);
void Write(const SkPath& path);
void Write(const PaintFlags& flags);
void Write(const sk_sp<SkData>& data);
void Write(const SkColorSpace* data);
void Write(const SkSamplingOptions&);
void Write(const PaintShader* shader, SkFilterQuality quality);
void Write(const PaintFilter* filter);
void Write(const sk_sp<SkTextBlob>& blob);
void Write(SkYUVColorSpace yuv_color_space);
void Write(SkYUVAInfo::PlaneConfig plane_config);
void Write(SkYUVAInfo::Subsampling subsampling);
void Write(const gpu::Mailbox& mailbox);
void Write(SkClipOp op) { WriteEnum(op); }
void Write(PaintCanvas::AnnotationType type) { WriteEnum(type); }
void Write(SkCanvas::SrcRectConstraint constraint) { WriteEnum(constraint); }
void Write(SkColorType color_type) { WriteEnum(color_type); }
void Write(SkFilterQuality filter_quality) { WriteEnum(filter_quality); }
void Write(SkBlendMode blend_mode) { WriteEnum(blend_mode); }
void Write(SkTileMode tile_mode) { WriteEnum(tile_mode); }
void Write(SkFilterMode filter_mode) { WriteEnum(filter_mode); }
void Write(SkMipmapMode mipmap_mode) { WriteEnum(mipmap_mode); }
void Write(bool data) { Write(static_cast<uint8_t>(data)); }
// Aligns the memory to the given alignment.
void AlignMemory(size_t alignment);
// sk_sp is implicitly convertible to uint8_t (likely via implicit bool
// conversion). In order to avoid accidentally calling that overload instead
// of a specific function (such as would be the case if one forgets to call
// .get() on it), the following template asserts if it's instantiated.
template <typename T>
void Write(const sk_sp<T>&) {
// Note that this is essentially static_assert(false, ...) but it needs to
// be dependent on T in order to only trigger if instantiated.
static_assert(sizeof(T) == 0,
"Attempted to call a non-existent sk_sp override.");
}
template <typename T>
void Write(const T*) {
static_assert(sizeof(T) == 0,
"Attempted to call a non-existent T* override.");
}
// Serializes the given |draw_image|.
// |scale_adjustment| is set to the scale applied to the serialized image.
// |quality| is set to the quality that should be used when rasterizing this
// image.
void Write(const DrawImage& draw_image, SkSize* scale_adjustment);
#if !defined(OS_ANDROID)
// Serializes the given |skottie| vector graphic.
void Write(scoped_refptr<SkottieWrapper> skottie);
#endif
private:
template <typename T>
void WriteSimple(const T& val);
void WriteFlattenable(const SkFlattenable* val);
template <typename Enum>
void WriteEnum(Enum value) {
Write(base::checked_cast<uint8_t>(value));
}
// The main entry point is Write(const PaintFilter* filter) which casts the
// filter and calls one of the following functions.
void Write(const ColorFilterPaintFilter& filter);
void Write(const BlurPaintFilter& filter);
void Write(const DropShadowPaintFilter& filter);
void Write(const MagnifierPaintFilter& filter);
void Write(const ComposePaintFilter& filter);
void Write(const AlphaThresholdPaintFilter& filter);
void Write(const XfermodePaintFilter& filter);
void Write(const ArithmeticPaintFilter& filter);
void Write(const MatrixConvolutionPaintFilter& filter);
void Write(const DisplacementMapEffectPaintFilter& filter);
void Write(const ImagePaintFilter& filter);
void Write(const RecordPaintFilter& filter);
void Write(const MergePaintFilter& filter);
void Write(const MorphologyPaintFilter& filter);
void Write(const OffsetPaintFilter& filter);
void Write(const TilePaintFilter& filter);
void Write(const TurbulencePaintFilter& filter);
void Write(const PaintFlagsPaintFilter& filter);
void Write(const MatrixPaintFilter& filter);
void Write(const LightingDistantPaintFilter& filter);
void Write(const LightingPointPaintFilter& filter);
void Write(const LightingSpotPaintFilter& filter);
void Write(const PaintRecord* record,
const gfx::Rect& playback_rect,
const gfx::SizeF& post_scale,
const SkMatrix& post_matrix_for_analysis);
void Write(const SkRegion& region);
void WriteImage(const DecodedDrawImage& decoded_draw_image);
void WriteImage(uint32_t transfer_cache_entry_id, bool needs_mips);
void WriteImage(const gpu::Mailbox& mailbox);
void EnsureBytes(size_t required_bytes);
sk_sp<PaintShader> TransformShaderIfNecessary(
const PaintShader* original,
SkFilterQuality quality,
uint32_t* paint_image_transfer_cache_entry_id,
gfx::SizeF* paint_record_post_scale,
bool* paint_image_needs_mips,
gpu::Mailbox* mailbox_out);
char* memory_ = nullptr;
size_t size_ = 0u;
size_t remaining_bytes_ = 0u;
const PaintOp::SerializeOptions& options_;
bool valid_ = true;
// Indicates that the following security constraints must be applied during
// serialization:
// 1) PaintRecords and SkDrawLoopers must be ignored.
// 2) Codec backed images must be decoded and only the bitmap should be
// serialized.
const bool enable_security_constraints_;
};
} // namespace cc
#endif // CC_PAINT_PAINT_OP_WRITER_H_
| 36.854167 | 79 | 0.746184 | [
"vector"
] |
6833e1a09ff8ed232163989795a3e8f8fe118a6f | 348 | h | C | DirectX3D11/Scenes/ModelAnimatorRenderScene.h | GyumLee/DirectX3D11 | 6158874aa12e790747e6fd8a53de608071c49574 | [
"Apache-2.0"
] | null | null | null | DirectX3D11/Scenes/ModelAnimatorRenderScene.h | GyumLee/DirectX3D11 | 6158874aa12e790747e6fd8a53de608071c49574 | [
"Apache-2.0"
] | null | null | null | DirectX3D11/Scenes/ModelAnimatorRenderScene.h | GyumLee/DirectX3D11 | 6158874aa12e790747e6fd8a53de608071c49574 | [
"Apache-2.0"
] | null | null | null | #pragma once
class ModelAnimatorRenderScene : public Scene
{
private:
ModelAnimator* modelAnimator;
public:
ModelAnimatorRenderScene();
~ModelAnimatorRenderScene();
virtual void Update() override;
virtual void PreRender() override;
virtual void Render() override;
virtual void PostRender() override;
virtual void GUIRender() override;
}; | 20.470588 | 45 | 0.781609 | [
"render"
] |
6836944b069ecfeca2950176774ec325e3be42ed | 522 | h | C | source/utopian/core/ActorFactory.h | simplerr/Papageno | 7ec1da40dc0459e26f5b9a8a3f72d8962237040d | [
"MIT"
] | 62 | 2020-11-06T17:29:24.000Z | 2022-03-21T19:21:16.000Z | source/utopian/core/ActorFactory.h | simplerr/Papageno | 7ec1da40dc0459e26f5b9a8a3f72d8962237040d | [
"MIT"
] | 134 | 2017-02-25T20:47:43.000Z | 2022-03-14T06:54:58.000Z | source/utopian/core/ActorFactory.h | simplerr/Papageno | 7ec1da40dc0459e26f5b9a8a3f72d8962237040d | [
"MIT"
] | 6 | 2021-02-19T07:20:19.000Z | 2021-12-27T09:07:27.000Z | #pragma once
#include <string>
#include <vector>
#include "utility/Common.h"
#include <LuaPlus.h>
namespace Utopian
{
class Actor;
class Window;
class ActorFactory
{
public:
//ActorFactory();
//~ActorFactory();
static void LoadFromFile(Window* window, std::string filename); // Note: Window should not be here
static void SaveToFile(std::string filename, const std::vector<SharedPtr<Actor>>& actors);
private:
void LoadActor(const LuaPlus::LuaObject& luaObject);
};
}
| 21.75 | 104 | 0.676245 | [
"vector"
] |
683b9d7902f7ed299e8ffdaefc0e58297fd99311 | 5,276 | h | C | Python/clinic/context.c.h | livioso/cpython | 077061a7b24917aaf31057885c69919c5a553c88 | [
"PSF-2.0"
] | 3 | 2019-04-23T11:06:38.000Z | 2021-03-03T12:17:16.000Z | Python/clinic/context.c.h | livioso/cpython | 077061a7b24917aaf31057885c69919c5a553c88 | [
"PSF-2.0"
] | 4 | 2020-04-02T14:59:42.000Z | 2021-02-10T14:30:18.000Z | Python/clinic/context.c.h | livioso/cpython | 077061a7b24917aaf31057885c69919c5a553c88 | [
"PSF-2.0"
] | 1 | 2019-10-08T12:57:48.000Z | 2019-10-08T12:57:48.000Z | /*[clinic input]
preserve
[clinic start generated code]*/
PyDoc_STRVAR(_contextvars_Context_get__doc__,
"get($self, key, default=None, /)\n"
"--\n"
"\n"
"Return the value for `key` if `key` has the value in the context object.\n"
"\n"
"If `key` does not exist, return `default`. If `default` is not given,\n"
"return None.");
#define _CONTEXTVARS_CONTEXT_GET_METHODDEF \
{"get", (PyCFunction)_contextvars_Context_get, METH_FASTCALL, _contextvars_Context_get__doc__},
static PyObject *
_contextvars_Context_get_impl(PyContext *self, PyObject *key,
PyObject *default_value);
static PyObject *
_contextvars_Context_get(PyContext *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *default_value = Py_None;
if (!_PyArg_UnpackStack(args, nargs, "get",
1, 2,
&key, &default_value)) {
goto exit;
}
return_value = _contextvars_Context_get_impl(self, key, default_value);
exit:
return return_value;
}
PyDoc_STRVAR(_contextvars_Context_items__doc__,
"items($self, /)\n"
"--\n"
"\n"
"Return all variables and their values in the context object.\n"
"\n"
"The result is returned as a list of 2-tuples (variable, value).");
#define _CONTEXTVARS_CONTEXT_ITEMS_METHODDEF \
{"items", (PyCFunction)_contextvars_Context_items, METH_NOARGS, _contextvars_Context_items__doc__},
static PyObject *
_contextvars_Context_items_impl(PyContext *self);
static PyObject *
_contextvars_Context_items(PyContext *self, PyObject *Py_UNUSED(ignored))
{
return _contextvars_Context_items_impl(self);
}
PyDoc_STRVAR(_contextvars_Context_keys__doc__,
"keys($self, /)\n"
"--\n"
"\n"
"Return a list of all variables in the context object.");
#define _CONTEXTVARS_CONTEXT_KEYS_METHODDEF \
{"keys", (PyCFunction)_contextvars_Context_keys, METH_NOARGS, _contextvars_Context_keys__doc__},
static PyObject *
_contextvars_Context_keys_impl(PyContext *self);
static PyObject *
_contextvars_Context_keys(PyContext *self, PyObject *Py_UNUSED(ignored))
{
return _contextvars_Context_keys_impl(self);
}
PyDoc_STRVAR(_contextvars_Context_values__doc__,
"values($self, /)\n"
"--\n"
"\n"
"Return a list of all variables’ values in the context object.");
#define _CONTEXTVARS_CONTEXT_VALUES_METHODDEF \
{"values", (PyCFunction)_contextvars_Context_values, METH_NOARGS, _contextvars_Context_values__doc__},
static PyObject *
_contextvars_Context_values_impl(PyContext *self);
static PyObject *
_contextvars_Context_values(PyContext *self, PyObject *Py_UNUSED(ignored))
{
return _contextvars_Context_values_impl(self);
}
PyDoc_STRVAR(_contextvars_Context_copy__doc__,
"copy($self, /)\n"
"--\n"
"\n"
"Return a shallow copy of the context object.");
#define _CONTEXTVARS_CONTEXT_COPY_METHODDEF \
{"copy", (PyCFunction)_contextvars_Context_copy, METH_NOARGS, _contextvars_Context_copy__doc__},
static PyObject *
_contextvars_Context_copy_impl(PyContext *self);
static PyObject *
_contextvars_Context_copy(PyContext *self, PyObject *Py_UNUSED(ignored))
{
return _contextvars_Context_copy_impl(self);
}
PyDoc_STRVAR(_contextvars_ContextVar_get__doc__,
"get($self, default=None, /)\n"
"--\n"
"\n"
"Return a value for the context variable for the current context.\n"
"\n"
"If there is no value for the variable in the current context, the method will:\n"
" * return the value of the default argument of the method, if provided; or\n"
" * return the default value for the context variable, if it was created\n"
" with one; or\n"
" * raise a LookupError.");
#define _CONTEXTVARS_CONTEXTVAR_GET_METHODDEF \
{"get", (PyCFunction)_contextvars_ContextVar_get, METH_FASTCALL, _contextvars_ContextVar_get__doc__},
static PyObject *
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value);
static PyObject *
_contextvars_ContextVar_get(PyContextVar *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *default_value = NULL;
if (!_PyArg_UnpackStack(args, nargs, "get",
0, 1,
&default_value)) {
goto exit;
}
return_value = _contextvars_ContextVar_get_impl(self, default_value);
exit:
return return_value;
}
PyDoc_STRVAR(_contextvars_ContextVar_set__doc__,
"set($self, value, /)\n"
"--\n"
"\n"
"Call to set a new value for the context variable in the current context.\n"
"\n"
"The required value argument is the new value for the context variable.\n"
"\n"
"Returns a Token object that can be used to restore the variable to its previous\n"
"value via the `ContextVar.reset()` method.");
#define _CONTEXTVARS_CONTEXTVAR_SET_METHODDEF \
{"set", (PyCFunction)_contextvars_ContextVar_set, METH_O, _contextvars_ContextVar_set__doc__},
PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
"reset($self, token, /)\n"
"--\n"
"\n"
"Reset the context variable.\n"
"\n"
"The variable is reset to the value it had before the `ContextVar.set()` that\n"
"created the token was used.");
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
/*[clinic end generated code: output=33414d13716d0648 input=a9049054013a1b77]*/
| 30.321839 | 106 | 0.753412 | [
"object"
] |
683c41c64780a1dda349063b2db4ab09d799d70f | 2,913 | h | C | include/TreeClasses/TensorTreeFunctions_Implementation.h | roman-ellerbrock/QuTree | 28c5b4eddf20e41cd015a03d33f31693eff17839 | [
"MIT"
] | 6 | 2020-04-24T09:58:23.000Z | 2022-02-06T03:40:55.000Z | include/TreeClasses/TensorTreeFunctions_Implementation.h | roman-ellerbrock/QuTree | 28c5b4eddf20e41cd015a03d33f31693eff17839 | [
"MIT"
] | 1 | 2020-06-18T11:33:14.000Z | 2020-06-18T11:35:23.000Z | include/TreeClasses/TensorTreeFunctions_Implementation.h | roman-ellerbrock/QuTree | 28c5b4eddf20e41cd015a03d33f31693eff17839 | [
"MIT"
] | 1 | 2020-12-26T15:23:21.000Z | 2020-12-26T15:23:21.000Z | //
// Created by Roman Ellerbrock on 5/24/20.
//
#ifndef TENSORTREEFUNCTIONS_IMPLEMENTATION_H
#define TENSORTREEFUNCTIONS_IMPLEMENTATION_H
#include "TensorTreeFunctions.h"
namespace TreeFunctions {
size_t nOccupied(const Vectord& p, double eps) {
size_t n = 0;
for (size_t i = 0; i < p.dim(); ++i) {
if (p(i) > eps) { n++; }
}
if (n == 0) { n = 1; }
return n;
}
template<typename T>
void AdjustNode(Tensor<T>& Phi, Tensor<T>& A, Node& node, Node& parent,
const SpectralDecomposition<T>& x, double eps) {
const Vectord& p = x.second;
size_t n_occ = nOccupied(p, eps);
/// Adjust node content
TensorShape& shape = node.shape();
/// do not switch to node.childIdx here:
/// This does not work with TensorOperators
shape.setDimension(n_occ, shape.lastIdx());
Phi = Phi.adjustDimensions(shape);
/// Adjust parent content
TensorShape& pshape = parent.shape();
size_t k = node.childIdx();
Phi = Phi.adjustDimensions(shape);
pshape.setDimension(n_occ, k);
A = A.adjustDimensions(pshape);
}
template<typename T>
void adjust(TensorTree<T>& Psi, Tree& tree,
const SpectralDecompositionTree<T>& X, double eps) {
for (Node& node : tree) {
if (!node.isToplayer()) {
Node& parent = node.parent();
AdjustNode(Psi[node], Psi[parent], node, parent, X[node], eps);
}
}
}
template<typename T>
void adjust(TensorTree<T>& Psi, const Tree& newtree) {
for (const Node& node : newtree) {
Tensor<T>& Phi = Psi[node];
Phi = Phi.adjustDimensions(node.shape());
}
}
template<typename T>
void sum(TensorTree<T>& Psi, Tree& tree, const TensorTree<T>& Chi,
bool sharedLeafs, bool sumToplayer) {
/**
* \brief Perform sum on TensorTrees.
*
* This is the generalized sum for Tensor Trees. It performs a direct sum of the basis
* and can perform either a regular sum (Psi + Chi) at the toplayer or a direct sum
* at toplayer (Psi [+] Chi) depending on the boolean sumToplayer. The Boolean
* sharedLeafs tells whether the LeafInterface is the same or not.
*
* @param Psi left element of sum
* @param Chi left element of sum
* @param tree Treestructure of Psi & Chi, will get changed during sum.
* @param sharedLeafs Tells whether leaf basis is same for Psi & Chi.
* @param sumToplayer If true, the toplayer will be a regular sum, otherwise a direct sum.
*/
for (Node& node : tree) {
bool before = !(node.isBottomlayer() && sharedLeafs);
bool last = !(node.isToplayer() && sumToplayer);
Psi[node] = Tensor_Extension::directSum(Psi[node], Chi[node],
before, last);
node.shape() = Psi[node].shape();
}
}
template <typename T>
void product(TensorTree<T>& Psi, Tree& tree, const TensorTree<T>& Chi) {
for (Node& node : tree) {
Psi[node] = Tensor_Extension::directProduct(Psi[node], Chi[node]);
node.shape() = Psi[node].shape();
}
}
}
#endif //TENSORTREEFUNCTIONS_IMPLEMENTATION_H
| 30.030928 | 92 | 0.672159 | [
"shape"
] |
68406cbfcb443528b82b679dac4f3e07fbef86b7 | 1,184 | h | C | include/CwAPI3D/ICwAPI3DRoofController.h | CadworkMontreal/AxisImporter | b6e483239f02e3fa4afaed5cc52d2cca1ee256ae | [
"MIT"
] | null | null | null | include/CwAPI3D/ICwAPI3DRoofController.h | CadworkMontreal/AxisImporter | b6e483239f02e3fa4afaed5cc52d2cca1ee256ae | [
"MIT"
] | null | null | null | include/CwAPI3D/ICwAPI3DRoofController.h | CadworkMontreal/AxisImporter | b6e483239f02e3fa4afaed5cc52d2cca1ee256ae | [
"MIT"
] | null | null | null | /** @file
* Copyright (C) 2019 cadwork informatik AG
*
* This file is part of the CwAPI3D module for cadwork 3d.
*
* @ingroup CwAPI3D
* @since 26.0
* @author Paquet
* @date 2019-02-06
*/
#pragma once
#include "CwAPI3DTypes.h"
#include "ICwAPI3DElementIDList.h"
#include "ICwAPI3DString.h"
namespace CwAPI3D
{
namespace Interfaces
{
/**
* @interface ICwAPI3DRoofController
* \brief
*/
class ICwAPI3DRoofController
{
public:
/**
* \brief Gets the profile length
* \param aID element ID
* \return profile length
*/
virtual double getProfileLength(elementID aID) = 0;
/**
* \brief Gets the edge length
* \param aID element ID
* \param aEdgeType edge type
* \return edge length
*/
virtual double getEdgeLength(elementID aID, const character* aEdgeType) = 0;
/**
* \brief Gets all caddy elements
* \return element ID list
*/
virtual ICwAPI3DElementIDList* getAllCaddyElementIDs() = 0;
virtual ICwAPI3DString* getLastError(int32_t* aErrorCode) = 0;
virtual void clearErrors() = 0;
};
}
}
| 22.769231 | 82 | 0.609797 | [
"3d"
] |
684089dec5d4fe398200f17de5044ea33b39f075 | 34,840 | h | C | bank.h | meibrahim/Banking-System | 8b634c683cd28c1668455eeb5bb0c244ea7b7152 | [
"MIT"
] | null | null | null | bank.h | meibrahim/Banking-System | 8b634c683cd28c1668455eeb5bb0c244ea7b7152 | [
"MIT"
] | null | null | null | bank.h | meibrahim/Banking-System | 8b634c683cd28c1668455eeb5bb0c244ea7b7152 | [
"MIT"
] | null | null | null | //
// Created by prati on 12/12/2018.
//
#include "people.h"
#include "groups.h"
#include "juniorEmployeeGroup.h"
#include "juniorPartnerEmployees.h"
#include "seniorEmployees.h"
#include "seniorPartnerGroup.h"
#include "enumerations.h"
#include "client.h"
#include <iostream>
#include <string.h>
#include <cstdlib>
#include <ctime>
#ifndef BANKINGPROJECT_BANK_H
#define BANKINGPROJECT_BANK_H
using namespace std;
class Bank {
public:
struct BankAccounts {
string bankName;
string accountHolderName;
int accountNumber;
int accountBalance;
int loanAmount;
bool hasLoan;
int amountRepayed;
int previousNumberOfLoans;
BankAccounts() {
this->bankName = "";
this->accountHolderName = "";
this->accountNumber = 0;
this->accountBalance = 0;
this->loanAmount = 0;
this->amountRepayed = 0;
this->previousNumberOfLoans = 0;
this->hasLoan = false;
}
BankAccounts(string name) {
this->bankName = name;
this->accountHolderName = "";
this->accountNumber = 0;
this->accountBalance = 0;
this->loanAmount = 0;
this->amountRepayed = 0;
this->previousNumberOfLoans = 0;
this->hasLoan = false;
}
void setAccountNumber(int accountNumber) {
this->accountNumber = accountNumber;
}
void setAccountHolderName(string name) {
this->accountHolderName = name;
}
void setAccountBalance(int balance) {
this->accountBalance = this->getAccountBalance()+balance;
}
bool loanTaken() {
return this->hasLoan;
}
int getAccountBalance() {
return this->accountBalance;
}
void deductFromBalance(int amount) {
this->accountBalance -= amount;
}
};
Bank();
Bank(string name);
~Bank() { }
bool addCeoToBank(Ceo& ceo);
bool addPresidentToBank(President& president);
bool addManagerToBank(Manager& manager);
bool addClientToBank(Client& client);
bool addCashierToBank(Cashier& cashier);
bool addAccountantToBank(Accountant& accountant);
bool removeCeo(Ceo& ceo);
bool removePresident(President& president);
bool removeManager(Manager& manager);
bool removeClient(Client& client);
bool fireCashier(Cashier& cashier);
bool fireAccountant(Accountant& accountant);
bool requestBankForLoan(Bank& bank);
bool respondToLoanRequest(Bank& bank);
void printEmployeeInformation();
void printClientInformation();
string getBankName() const;
int getGetBankNetWorth() const;
int getBankCredibility() const;
string getCeoName() const;
string getPresidentName() const;
bool openAccount(Client& client, int accountNumber, int balance);
bool addAccount(Client& client, int accountNumber, int balance);
int getAccountBalance(Client const & client, int accountNumber);
bool closeAccount(Client& client, int accountNumbe);
bool depositCash(Client& client, int accountNumber, int amount);
bool withdrawCash(Client& client, int accountNumber, int amount);
bool requestForLoan(Client& client, int accountNumber,
int amount);
bool transferMoney(Client& client1, int actn1, int amount, Client& client2, int acnt2);
bool crossBankTransfer(Client& sender,int actn1, int amount, Client& recipient,int actn2, Bank& recipientBank);
bool repayLoan(Client& client, int acctn, int amount);
private:
string bankName;
int bankNetWorth;
int bankCredibility;
seniorPartnerGroup gp1;
juniorEmployeeGroup gp2;
std::vector<BankAccounts> bankAccounts;
Manager siteManager;
};
Bank :: Bank() {
this->bankName = "";
this->bankNetWorth = 0;
this->bankCredibility = 0;
srand(time(NULL));
seniorPartnerGroup tmpGrp1("random");
juniorEmployeeGroup tmpGrp2("random");
this->gp1 = tmpGrp1;
this->gp2 = tmpGrp2;
Manager m1("dfd","sds",21);
this->siteManager = m1;
}
Bank::Bank(string name) {
srand(time(NULL));
this->bankName = name;
this->bankNetWorth = ( rand() % 100000 ) + 60000 ;
this->bankCredibility = ( rand() % 1000000 ) + 1000000;
seniorPartnerGroup tmpGrp1(name);
juniorEmployeeGroup tmpGrp2(name);
this->gp1 = tmpGrp1;
this->gp2 = tmpGrp2;
Manager m1("dfd","sds",21);
this->siteManager = m1;
}
string Bank::getBankName() const {
return this->bankName;
}
int Bank::getGetBankNetWorth() const {
return this->bankNetWorth;
}
int Bank::getBankCredibility() const {
return this->bankCredibility;
}
bool Bank::addCeoToBank(Ceo &ceo) {
ceo.setBankerId((rand()% 600) + 50);
ceo.setSeniorPartnerId((rand()%10000)+5000);
if(!this->gp1.addCeo(ceo)){
return true;
}
else {
try {
throw std::invalid_argument("CEO " + ceo.get_name() + " has already been hired to " + ceo.getHiredGroup());
}
catch (std::exception& e) {
cout << e.what() << endl;
return false;
}
}
}
bool Bank::addPresidentToBank(President &president) {
president.setBankerId((rand()% 600) + 50);
president.setSeniorPartnerId((rand()%10000)+5000);
if(!this->gp1.addPresident(president)) return true;
else {
try {
throw std::invalid_argument("President " + president.get_name() +" has already been hired to "+ president.getHiredGroup());
}
catch (std::exception& e) {
cout << e.what() << endl;
return false;
}
}
}
bool Bank::addManagerToBank(Manager &manager) {
manager.setBankerId((rand()% 600) + 50);
manager.setJuniorEmployeeId((rand()% 600)+50);
if(!this->gp2.addManager(manager)) {
return true;
}
else {
try {
throw std::invalid_argument("Manager " + manager.get_name() + " has already been hired to " + manager.getHiredGroup());
}
catch(std::exception& e) {
cout << e.what() << endl;
return false;
}
}
}
bool Bank::addAccountantToBank(Accountant &accountant) {
accountant.setBankerId((rand()%600)+100);
accountant.setJuniorEmployeeId((rand()%600)+50);
try {
if(!this->gp2.addAccountant(accountant)) return true;
}
catch (std::exception& e) {
cout << e.what() << endl;
}
return false;
}
bool Bank::addCashierToBank(Cashier &cashier) {
try {
cashier.setBankerId( (rand() % 500) + 100);
cashier.setJuniorEmployeeId((rand()%500)+100);
if(!this->gp2.addCashier(cashier)) {
return true;
}
}
catch (std::exception& e) {
cout << e.what() << endl;
}
return false;
}
bool Bank::removeCeo(Ceo &ceo) {
try {
if(!this->gp1.removeCeo()){
ceo.setHire(false);
ceo.setHiredGroup("not hired.");
return true;
}
else {
throw std::invalid_argument("Cant find CEO in this bank " + this->getBankName());
return false;
}
}
catch (exception& e) {
cout << e.what() << endl;
return false;
}
}
bool Bank::removePresident(President &president) {
if(!this->gp1.removePresident()) {
president.setStateOfHire(false);
president.setHiredGroup("not hired");
return true;
}
else {
try {
throw std::invalid_argument("Cant find President in this bank " + this->getBankName());
}
catch (std::exception& e) {
cout << e.what() << endl;
return false;
}
}
}
bool Bank::removeManager(Manager &manager) {
try {
if(!this->gp2.removeManager()) {
manager.setHasBeenHired(false);
manager.setJuniorEmployeeId(0);
manager.setBankerId(0);
cout << "Manager " << manager.get_name() << " has been removed from the group " << this->getBankName() << endl;
return true;
}
}
catch (std::exception& e) {
cout << e.what() << endl;
return false;
}
return false;
}
bool Bank::fireCashier(Cashier &cashier) {
if(!this->gp2.removeCashier(cashier.getBankerId())) {
cashier.setHasBeenHired(false);
cashier.setJuniorEmployeeId(0);
cashier.setBankerId(0);
return true;
}
else {
try {
throw std::invalid_argument("Cant find cashier in this bank " + this->getBankName());
}
catch (std::exception& e){
cout << e.what() << endl;
return false;
}
}
}
bool Bank::fireAccountant(Accountant &accountant) {
if(!this->gp2.removeAccountant(accountant.getBankerId())) {
accountant.setHasBeenHired(false);
accountant.setJuniorEmployeeId(0);
accountant.setBankerId(0);
return true;
}
else {
try {
throw std::invalid_argument("Cant find accountant in this bank " + this->getBankName());
}
catch (std::exception& e) {
cout << e.what() << endl;
return false;
}
}
}
bool Bank::openAccount(Client &client, int accountNumber, int balances) {
try {
if(!this->addAccount(client, accountNumber, balances )){
return true;
}
}
catch (std::exception& e) {
cout << e.what() << endl;
}
return false;
}
bool Bank::addAccount(Client& client, int accountNumber, int balance){
std::vector<BankAccounts>::iterator iter;
for(iter = this->bankAccounts.begin(); iter != bankAccounts.end(); iter++) {
if((*iter).accountNumber == accountNumber) {
//cout << "Account with account number: " << (*iter).accountNumber << " already exists!, Please choose another account number." << endl;
throw std::runtime_error("Account with account number: " + std::to_string((*iter).accountNumber) + " already existss!, Please choose another account number");
return 1;
}
}
if(balance >= 10000) {
struct BankAccounts newAccount(this->getBankName());
newAccount.setAccountHolderName(client.getClientName());
newAccount.setAccountNumber(accountNumber);
newAccount.setAccountBalance(balance);
this->bankAccounts.push_back(newAccount);
client.setNetWorth(balance);
cout << client.getClientName() << "'s account has been opened: " << newAccount.accountNumber << endl;
return 0;
}
else {
//cout << "Client " << client.getClientName() << " is not recommended by " << recommendedClient.getClientName() << endl;
throw std::domain_error("Client " + client.getClientName() + " has to deposit amount greater than 10000 to open account.");
return 1;
}
}
int Bank::getAccountBalance(Client const &client, int accountNumber) {
std::vector<BankAccounts>::iterator it;
if(!this->gp2.fastAccessAccountant().get_role() == ACCNTS) {
try {
throw std::domain_error("Accountant retrieval error!");
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
else {
for(it = this->bankAccounts.begin(); it != this->bankAccounts.end(); it++) {
if((*it).accountHolderName == client.getClientName() && (*it).accountNumber == accountNumber) {
cout << "!-----------Balance sheet------------!" << endl;
cout << "Name: " << (*it).accountHolderName << endl;
cout << "Account number: " << (*it).accountNumber << endl;
cout << "Balance: " << (*it).getAccountBalance() << endl;
cout << "Loans: " << (*it).loanAmount << endl;
cout << "Repayed: " << (*it).amountRepayed << endl;
cout << "!------------------------------------!" << endl;
return 0;
}
}
try{
throw std::runtime_error("Client not found in system: " + client.getClientName());
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
bool Bank::closeAccount(Client &client, int accountNumber) {
std::vector<BankAccounts>::iterator it;
int positionCounter = 0;
for(it = this->bankAccounts.begin(); it != this->bankAccounts.end(); it++) {
if((*it).accountHolderName == client.getClientName() && (*it).accountNumber == accountNumber) {
try {
if((*it).accountNumber != accountNumber) {
throw std::invalid_argument("The account number is incorrect! " + std::to_string(accountNumber));
}
else {
if (siteManager.agreeToClose((*it).loanTaken())) {
this->bankAccounts.erase(this->bankAccounts.begin() + positionCounter);
if((*it).accountBalance >= 2000) {
///Money given back if balance greater than 2000.
(*it).deductFromBalance(2000);
client.deductNetWorth(2000);
}
cout << client.getClientName() << "'s account has been closed." << endl;
return 0;
}
else {
//cout << client.getClientName() <<" has outstanding loans amounting to " << (*it).loanAmount << endl;
throw std::runtime_error(client.getClientName() + " has outstanding loans amounting to " + std::to_string((*it).loanAmount) + " account closure request has been turned down!");
return 1;
}
}
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
else positionCounter++;
}
try {
throw std::runtime_error("The requested account has not been found: " + client.getClientName() + ", account number " + std::to_string(accountNumber));
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
bool Bank::depositCash(Client &client, int accountNumber, int amount) {
if( this->gp2.fastAccessCashier().getThisRole() == CASHRS) {
std::vector<BankAccounts>::iterator iter;
for (iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++) {
if ((*iter).accountHolderName == client.getClientName() && (*iter).accountNumber == accountNumber) {
if(amount >= 10000) {
if(this->gp2.fastAccessAccountant().getThisRole() == ACCNTS) {
(*iter).setAccountBalance(amount);
client.addNetWorth(amount);
cout << "Amount " << amount << " has been deposited to the account." << endl;
return 0;
}
else {
try {
throw std::domain_error("Accountant retrieval error");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
else {
(*iter).setAccountBalance(amount);
client.addNetWorth(amount);
cout << "Amount " << amount << " has been deposited to the account." << endl;
return 0;
}
}
}
}
else {
try {
throw std::domain_error("Cashier retrieval error");
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
try {
throw std::invalid_argument("Operation failure!");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
bool Bank::withdrawCash(Client &client, int accountNumber, int amount) {
if(this->gp2.fastAccessCashier().getThisRole() == CASHRS) {
std::vector<BankAccounts>::iterator iter;
int positionCounter = 0;
int foundPerson = 0;
for (iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++) {
if ((*iter).accountHolderName == client.getClientName() && (*iter).accountNumber == accountNumber) {
foundPerson = 1;
if((*iter).getAccountBalance() >= amount) {
if(amount > 10000) {
if(this->gp2.fastAccessAccountant().get_role() == ACCNTS) {
//client.setNetWorth((*iter).getAccountBalance() + amount);
(*iter).deductFromBalance(amount);
cout << amount << " has been deducted from the account of " << client.getClientName() << ", " << (*iter).accountNumber << endl;
return 0;
}
}
//client.setNetWorth((*iter).getAccountBalance() + amount);
(*iter).deductFromBalance(amount);
cout << amount << " has been deducted from the account of " << client.getClientName() << ", " << (*iter).accountNumber << endl;
return 0;
}
else {
//cout << "Not enough funds in account to withdraw, Choose a smaller amount." << endl;
try {
throw std::domain_error("Not enough funds in account to withdraw, Choose a smaller amount.");
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
}
if(!foundPerson) {
try{
throw std::invalid_argument("Client " + client.getClientName() + " not part of this bank!");
}
catch(std::exception& e){
cout << e.what() << endl;
return 1;
}
}
}
else {
cout << "Cashier retrieval error!" << endl;
return 1;
}
return 1;
}
bool Bank::transferMoney(Client &client1, int actn1, int amount, Client &client2, int actn2) {
std::vector<BankAccounts>::iterator iter;
if(this->gp2.fastAccessCashier().getThisRole() == CASHRS) {
int foundClient1 = 0;
for(iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++) {
if((*iter).accountHolderName == client1.getClientName() && (*iter).accountNumber == actn1) {
//cout << "Found " << client1.getClientName() << endl;
foundClient1 = 1;
std::vector<BankAccounts>::iterator iter2;
int foundClient2 = 0;
int accountNumber = (*iter).accountNumber;
for(iter2 = this->bankAccounts.begin(); iter2 != this->bankAccounts.end(); iter2++) {
if((*iter2).accountHolderName == client2.getClientName() && (*iter2).accountNumber == actn2) {
if((*iter2).accountNumber == accountNumber ) {
//cout << "Transferring amount between same accounts is not permitted." << endl;
try {
throw std::domain_error("Transferring amount between the same account is not permitted. You can try depositing.");
}
catch(std::exception& e) {
cout <<e.what() << endl;
return 1;
}
}
//cout << "Found " << client2.getClientName() << endl;
foundClient2 = 1;
if (amount >= 10000) {
if (this->gp2.fastAccessAccountant().get_role() == ACCNTS) {
if (amount <= (*iter).getAccountBalance()) {
client1.deductNetWorth(amount);
(*iter).deductFromBalance(amount);
client2.addNetWorth(amount);
(*iter2).setAccountBalance(amount);
cout << "Inter bank transaction has been completed between " << client1.getClientName()
<< " and " << client2.getClientName() << " with the help of "
<< this->gp2.fastAccessAccountant().get_name() << endl;
return 0;
}
else {
//cout << "Not enough Funds!" << endl;
try {
throw std::domain_error("Not enough funds!");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
else {
//cout << "Accountant retrieval error!" << endl;
try {
throw std::domain_error("Accountant retrieval error.");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
else {
client1.deductNetWorth(amount);
(*iter).deductFromBalance(amount);
(*iter2).setAccountBalance(amount);
client2.addNetWorth(amount);
cout << "Transaction has been completed between " << client1.getClientName() << " and " << client2.getClientName() << endl;
return 0;
}
}
}
if(!foundClient2) {
//cout << "Client2 " << client2.getClientName() << " is not part of the bank " << this->getBankName() << endl;
try {
throw std::domain_error("Client 2 " + client2.getClientName() + " is not part of the bank " + this->getBankName());
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
}
if(!foundClient1) {
//cout << "Client1 " << client1.getClientName() << " is not part of the bank " << this->getBankName() << endl;
try {
throw std::domain_error("Client 1 " + client1.getClientName() + " is not part of the bank " + this->getBankName());
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
return false;
}
bool Bank::crossBankTransfer(Client& sender, int actn1, int amount, Client& recipient,int actn2, Bank& recipientBank) {
if(this->gp2.fastAccessCashier().getThisRole() == CASHRS) {
std::vector<BankAccounts> :: iterator iter;
int foundSender = 0;
for(iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++) {
std::vector<BankAccounts>::iterator iter2;
int foundRecipient=0;
if((*iter).accountHolderName == sender.getClientName() && (*iter).accountNumber == actn1) {
foundSender = 1;
for(iter2 = recipientBank.bankAccounts.begin(); iter2!= recipientBank.bankAccounts.end(); iter2++) {
if(amount <= (*iter).getAccountBalance()) {
if(this->gp2.fastAccessAccountant().getThisRole() == ACCNTS && recipientBank.gp2.fastAccessAccountant().getThisRole() == ACCNTS) {
if((*iter2).accountHolderName == recipient.getClientName() && (*iter2).accountNumber == actn2) {
foundRecipient = 1;
cout << "Both clients have been found!" << endl;
sender.deductNetWorth(amount);
(*iter).deductFromBalance(amount);
(*iter2).setAccountBalance(amount);
recipient.addNetWorth(amount);
cout << "Transaction has been complete between " << (*iter2).accountHolderName << " & " << sender.getClientName() << " of bank " << recipientBank.getBankName() << " & " << this->getBankName() << endl;
return 0;
}
}
else {
//cout << "Accountant retrieval error!" << endl;
try {
throw std::domain_error("Amount retrieval error.");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
else {
//cout << "No sufficient funds to complete transaction." << endl;
try {
throw std::domain_error("No sufficient funds to complete transaction.");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
}
if(!foundRecipient) {
//cout << "Recipient account does not exist!" << endl;
try {
throw std::invalid_argument("Recipient account does not exist.");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
if(!foundSender) {
//cout << "Senders account does not exist!" << endl;
try {
throw std::invalid_argument("Senders account does not exist");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
else {
//cout << "Cashier retrieval error." << endl;
try {
throw std::invalid_argument("Cashier retrieval error.");
}
catch(std::exception& e){
cout << e.what() << endl;
return 1;
}
}
cout << "Operation failure!" << endl;
return 1;
}
bool Bank::requestForLoan(Client &client, int accountNumber, int amount) {
std::vector<BankAccounts>::iterator iter;
int foundClient = 0;
for(iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++) {
if((*iter).accountHolderName == client.getClientName() && (*iter).accountNumber == accountNumber) {
if((*iter).hasLoan) {
cout << "This client has a loan of " << (*iter).loanAmount << endl;
if((*iter).amountRepayed >= (0.6)*(*iter).loanAmount) {
cout << "Amount repaid(" << (*iter).amountRepayed << "), greater than 0.6 times the loan amount of " << (*iter).loanAmount << " equalling " << (*iter).loanAmount * 0.6 << endl;
if(this->gp2.getManager().agreeForLoan(client, amount)) {
(*iter).hasLoan = true;
(*iter).loanAmount = (*iter).loanAmount + amount;
(*iter).setAccountBalance(amount);
client.addNetWorth(amount);
return 0;
}
else {
try {
throw invalid_argument("Manager has not agreed to grant the loan, since the loan amount is not less than 0.25 * net worth of the client.");
}
catch (std::exception& e){
cout << e.what() << endl;
return 1;
}
}
}else {
//cout << "Previous loan amount of " << (*iter).loanAmount << " has not been paid, or atleast 0.6 times the loan amount has not been re-paid, loan shall not be granted." << endl;
try {
throw std::domain_error("Previous loan amount of " + std::to_string((*iter).loanAmount) + " has not been paid, or atleast 0.6 * the loans amount has not been re-paid.");
}
catch (std::exception& e){
cout << e.what() << endl;
return 1;
}
}
}
else {
if(this->gp2.getManager().agreeForLoan(client, amount)) {
(*iter).hasLoan = true;
(*iter).loanAmount = (*iter).loanAmount + amount;
(*iter).setAccountBalance(amount);
client.addNetWorth(amount);
return 0;
}
else {
try {
throw std::invalid_argument("Manager has not agreed to grant the loan, since the loan amount is not less than 0.25 * net worth of the client.");
}
catch (std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
}
foundClient = 1;
}
}
if(!foundClient) {
//cout << "Client not part of this bank." << endl;
try {
throw std::domain_error("Client not part of this bank.");
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
else
return 0;
}
bool Bank::repayLoan(Client &client, int acctn, int amount ) {
std::vector<BankAccounts>::iterator iter;
int foundClient = 0;
for(iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++ ){
if((*iter).accountHolderName == client.getClientName() && (*iter).accountNumber == acctn) {
foundClient = 1;
cout << "Client found." << endl;
(*iter).amountRepayed += amount;
cout << "Client re-paid " << amount << " off the loan of " << (*iter).loanAmount << endl;
if((*iter).amountRepayed >= 0.6 * (*iter).loanAmount) {
cout << "Client " << client.getClientName() << " is elligible for another loan." << endl;
(*iter).hasLoan = false;
return 0;
}
else {
//cout << "Client " << client.getClientName() << " is not elligible for another loan." << endl;
try {
throw std::invalid_argument ("Client " + client.getClientName() + " is not YET elligible for another loan.");
}
catch(std::exception& e) {
cout << e.what() << endl;
}
return 1;
}
}
}
if(!foundClient) {
//cout << "Client not part of this bank." << endl;
try {
throw std::invalid_argument("Client not part of this bank.");
}
catch(std::exception& e) {
cout << e.what() << endl;
return 1;
}
}
return 1;
}
void Bank::printEmployeeInformation() {
cout << "!------------ " << this->getBankName() << " ---------------!" << endl;
try {
if(!this->gp1.hasCeoNot() && !this->gp1.hasPresidentNot()) {
throw std::invalid_argument("CEO and President are not added to this bank: " + this->getBankName() );
}
else {
if(this->gp1.printListSeniorPartner()) {
///cout << "No memebers have been added to bank: " << this->getBankName() << endl;
throw std::invalid_argument("No members have been added to this bank: " + this->getBankName());
}
}
if(this->gp2.printGroupInformation()){
throw std::invalid_argument("No junior employees have been added to this bank: " + this->getBankName());
}
}
catch(std::exception& e) {
cout << e.what() << endl;
}
}
void Bank::printClientInformation() {
try {
if(this->bankAccounts.empty()) {
throw std::invalid_argument("There are no clients in this bank " + this->getBankName());
}
}
catch (std::exception& e) {
cout << e.what() << endl;
}
std::vector<BankAccounts>::iterator iter;
for(iter = this->bankAccounts.begin(); iter != this->bankAccounts.end(); iter++) {
cout <<"!----------------Client Information: " << this->getBankName() <<" ----------------!" << endl;
cout << "Name: " << (*iter).accountHolderName << endl;
cout << "Account No: " << (*iter).accountNumber << endl;
cout << "BankBalance: " << (*iter).getAccountBalance() << endl;
if ((*iter).loanTaken()) {
cout << "Loan: Has Loan to Clear!" << endl;
cout << "Loan Amount: " << (*iter).loanAmount << endl;
cout << "Amount repaid: " << (*iter).amountRepayed << endl;
}else {
cout << "Loan: Doesn't have a loan to clear!" << endl;
}
cout <<"!--------------------------------------------------!" << endl;
}
}
#endif //BANKINGPROJECT_BANK_H
| 36.596639 | 233 | 0.487457 | [
"vector"
] |
6842e67237f1edece5b72c18a9c6876518fd94a0 | 4,546 | h | C | include/infinispan/hotrod/QueryUtils.h | fabriziosta/cpp-client | 5056c9fc35b5ae30f79b26c7362637c9dfc2100b | [
"Apache-2.0"
] | 6 | 2015-09-08T21:00:40.000Z | 2021-08-06T15:20:11.000Z | include/infinispan/hotrod/QueryUtils.h | fabriziosta/cpp-client | 5056c9fc35b5ae30f79b26c7362637c9dfc2100b | [
"Apache-2.0"
] | 198 | 2015-02-10T11:35:21.000Z | 2022-03-08T16:42:51.000Z | include/infinispan/hotrod/QueryUtils.h | fabriziosta/cpp-client | 5056c9fc35b5ae30f79b26c7362637c9dfc2100b | [
"Apache-2.0"
] | 10 | 2015-09-10T07:46:56.000Z | 2021-11-28T17:26:43.000Z | /*
* QueryUtils.h
*
* Created on: Apr 7, 2016
* Author: rigazilla
*/
#ifndef INCLUDE_INFINISPAN_HOTROD_QUERYUTILS_H_
#define INCLUDE_INFINISPAN_HOTROD_QUERYUTILS_H_
#include "infinispan/hotrod/Query.h"
#include <tuple>
using namespace org::infinispan::protostream;
using namespace google::protobuf;
using namespace org::infinispan::query::remote::client;
// extract a resultset of entities from a QueryResponse obj
template <class T> bool unwrapResults(QueryResponse resp, std::vector<T> &res)
{
if (resp.projectionsize()>0)
{ // Query has select
return false;
}
for (int i=0; i<resp.results_size(); i++)
{
const WrappedMessage &wm =resp.results(i);
if ( wm.has_wrappedbytes() )
{
WrappedMessage wmn;
wmn.ParseFromString(wm.wrappedbytes());
if (wmn.has_wrappedmessagebytes()) {
T u1;
u1.ParseFromString(wmn.wrappedmessagebytes());
res.push_back(u1);
}
}
}
return true;
}
// typesafe method to extract the value obj from a WrappedMessage obj
template <typename T> T unwrapSingleValue(const WrappedMessage& wm);
template <> inline std::string unwrapSingleValue<std::string>(const WrappedMessage& wm)
{
if (wm.has_wrappedstring())
{
return wm.wrappedstring();
}
else
{
throw "std::string type not found in response";
}
}
template <> inline int unwrapSingleValue<int>(const WrappedMessage& wm)
{
if (wm.has_wrappedint32())
{
return wm.wrappedint32();
}
else if (wm.has_wrappedint64())
{
return wm.wrappedint64();
}
else
{
throw "int type not found in response";
}
}
template <> inline double unwrapSingleValue<double>(const WrappedMessage& wm)
{
if (wm.has_wrappeddouble())
{
return wm.wrappeddouble();
}
else
{
throw "double type not found in response";
}
}
template <typename T> T unwrapSingleResult(const QueryResponse &qr)
{
return unwrapSingleValue<T>(qr.results(0));
}
#if !defined (_MSC_VER) || (_MSC_VER>=1800)
// typesafe method to turn one projection row of a array of WrappedMessage objs into a tuple
template <typename H, typename... Params> std::tuple<H, Params...> popTuple(const RepeatedPtrField<WrappedMessage >& wMsgs, int &k)
{
H s = unwrapSingleValue<H>(wMsgs.Get(k++));
std::tuple<Params...> p = popTuple<Params... >(wMsgs,k);
return std::tuple_cat(std::tie(s),p);
}
template<>
inline std::tuple<int> popTuple<int>(const RepeatedPtrField<WrappedMessage >& wMsgs, int &k)
{
int s(unwrapSingleValue<int>(wMsgs.Get(k++)));
return std::make_tuple<int>(std::move(s));
}
template<>
inline std::tuple<std::string> popTuple<std::string>(const RepeatedPtrField<WrappedMessage >& wMsgs, int &k)
{
std::string s(unwrapSingleValue<std::string>(wMsgs.Get(k++)));
return std::make_tuple<std::string>(std::move(s));
}
// typesafe method to turn one projection row of a QueryResponse obj into a tuple
template <typename H, typename... Params> std::tuple<H, Params...> popTuple(QueryResponse &resp, int &k)
{
H s = unwrapSingleValue<H>(resp.results(k++));
std::tuple<Params...> p=popTuple<Params... >(resp,k);
return std::tuple_cat(std::tie(s),p);
}
template<>
inline std::tuple<std::string> popTuple<std::string>(QueryResponse& resp, int &k)
{
std::string s(unwrapSingleValue<std::string>(resp.results(k++)));
return std::make_tuple<std::string>(std::move(s));
}
template<>
inline std::tuple<int> popTuple<int>(QueryResponse & resp, int &k)
{
int s(unwrapSingleValue<int>(resp.results(k++)));
return std::make_tuple<int>(std::move(s));
}
template<>
inline std::tuple<double> popTuple<double>(QueryResponse & resp, int &k)
{
int s(unwrapSingleValue<double>(resp.results(k++)));
return std::make_tuple<double>(std::move(s));
}
// typesafe method to convert QueryResponse containing a resultset of projections to a std::tuple
template<typename... Params> bool unwrapProjection(QueryResponse &resp, std::vector<std::tuple<Params...> > &prjRes)
{
if (resp.projectionsize() == 0) {
return false;
}
int numTuple = resp.results_size() / resp.projectionsize();
int k = 0;
for (int i = 0; i < numTuple; i++) {
std::tuple<Params...> tp= popTuple<Params...>(resp, k) ;
prjRes.push_back(tp);
}
return true;
}
#endif
#endif /* INCLUDE_INFINISPAN_HOTROD_QUERYUTILS_H_ */
| 28.236025 | 132 | 0.651782 | [
"vector"
] |
d034c2e12a21e6f728e4041ca837c7359a02d280 | 5,785 | h | C | include/ged/view.h | earl-ducaine/brlcad-mirror | 402bd3542a10618d1f749b264cadf9b0bd723546 | [
"BSD-4-Clause",
"BSD-3-Clause"
] | 1 | 2019-10-23T16:17:49.000Z | 2019-10-23T16:17:49.000Z | include/ged/view.h | pombredanne/sf.net-brlcad | fb56f37c201b51241e8f3aa7b979436856f43b8c | [
"BSD-4-Clause",
"BSD-3-Clause"
] | null | null | null | include/ged/view.h | pombredanne/sf.net-brlcad | fb56f37c201b51241e8f3aa7b979436856f43b8c | [
"BSD-4-Clause",
"BSD-3-Clause"
] | null | null | null | /* V I E W . H
* BRL-CAD
*
* Copyright (c) 2008-2019 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** @addtogroup ged_view
*
* Geometry EDiting Library Database View Related Functions.
*
*/
/** @{ */
/** @file ged/view.h */
#ifndef GED_VIEW_H
#define GED_VIEW_H
#include "common.h"
#include "ged/defines.h"
#include "ged/view/adc.h"
#include "ged/view/matrix.h"
#include "ged/view/select.h"
#include "ged/view/state.h"
__BEGIN_DECLS
/** Check if a drawable exists */
#define GED_CHECK_DRAWABLE(_gedp, _flags) \
if (_gedp->ged_gdp == GED_DRAWABLE_NULL) { \
int ged_check_drawable_quiet = (_flags) & GED_QUIET; \
if (!ged_check_drawable_quiet) { \
bu_vls_trunc((_gedp)->ged_result_str, 0); \
bu_vls_printf((_gedp)->ged_result_str, "A drawable does not exist."); \
} \
return (_flags); \
}
/** Check if a view exists */
#define GED_CHECK_VIEW(_gedp, _flags) \
if (_gedp->ged_gvp == GED_VIEW_NULL) { \
int ged_check_view_quiet = (_flags) & GED_QUIET; \
if (!ged_check_view_quiet) { \
bu_vls_trunc((_gedp)->ged_result_str, 0); \
bu_vls_printf((_gedp)->ged_result_str, "A view does not exist."); \
} \
return (_flags); \
}
/* defined in display_list.c */
GED_EXPORT void dl_set_iflag(struct bu_list *hdlp, int iflag);
GED_EXPORT extern void dl_color_soltab(struct bu_list *hdlp);
GED_EXPORT extern void dl_erasePathFromDisplay(struct bu_list *hdlp,
struct db_i *dbip,
void (*callback)(unsigned int, int),
const char *path,
int allow_split,
struct solid *freesolid);
GED_EXPORT extern struct display_list *dl_addToDisplay(struct bu_list *hdlp, struct db_i *dbip, const char *name);
GED_EXPORT extern int invent_solid(struct bu_list *hdlp, struct db_i *dbip, void (*callback_create)(struct solid *), void (*callback_free)(unsigned int, int), char *name, struct bu_list *vhead, long int rgb, int copy, fastf_t transparency, int dmode, struct solid *freesolid, int csoltab);
/* defined in ged.c */
GED_EXPORT extern void ged_view_init(struct bview *gvp);
/* defined in grid.c */
GED_EXPORT extern void ged_snap_to_grid(struct ged *gedp, fastf_t *vx, fastf_t *vy);
/**
* Grid utility command.
*/
GED_EXPORT extern int ged_grid(struct ged *gedp, int argc, const char *argv[]);
/**
* Convert grid coordinates to model coordinates.
*/
GED_EXPORT extern int ged_grid2model_lu(struct ged *gedp, int argc, const char *argv[]);
/**
* Convert grid coordinates to view coordinates.
*/
GED_EXPORT extern int ged_grid2view_lu(struct ged *gedp, int argc, const char *argv[]);
/**
* Overlay the specified 2D/3D UNIX plot file
*/
GED_EXPORT extern int ged_overlay(struct ged *gedp, int argc, const char *argv[]);
/**
* Create a unix plot file of the currently displayed objects.
*/
GED_EXPORT extern int ged_plot(struct ged *gedp, int argc, const char *argv[]);
/**
* Create a png file of the view.
*/
GED_EXPORT extern int ged_png(struct ged *gedp, int argc, const char *argv[]);
GED_EXPORT extern int ged_screen_grab(struct ged *gedp, int argc, const char *argv[]);
/**
* Create a postscript file of the view.
*/
GED_EXPORT extern int ged_ps(struct ged *gedp, int argc, const char *argv[]);
/**
* Returns the solid table & vector list as a string
*/
GED_EXPORT extern int ged_solid_report(struct ged *gedp, int argc, const char *argv[]);
/**
* Save the view
*/
GED_EXPORT extern int ged_saveview(struct ged *gedp, int argc, const char *argv[]);
/**
* Return the object hierarchy for all object(s) specified or for all currently displayed
*/
GED_EXPORT extern int ged_tree(struct ged *gedp, int argc, const char *argv[]);
/**
* Vector drawing utility.
*/
GED_EXPORT extern int ged_vdraw(struct ged *gedp, int argc, const char *argv[]);
/**
* Get/set view attributes
*/
GED_EXPORT extern int ged_view_func(struct ged *gedp, int argc, const char *argv[]);
/**
* Get/set the unix plot output mode
*/
GED_EXPORT extern int ged_set_uplotOutputMode(struct ged *gedp, int argc, const char *argv[]);
GED_EXPORT extern bview_polygon *ged_clip_polygon(ClipType op, bview_polygon *subj, bview_polygon *clip, fastf_t sf, matp_t model2view, matp_t view2model);
GED_EXPORT extern bview_polygon *ged_clip_polygons(ClipType op, bview_polygons *subj, bview_polygons *clip, fastf_t sf, matp_t model2view, matp_t view2model);
GED_EXPORT extern int ged_export_polygon(struct ged *gedp, bview_data_polygon_state *gdpsp, size_t polygon_i, const char *sname);
GED_EXPORT extern bview_polygon *ged_import_polygon(struct ged *gedp, const char *sname);
GED_EXPORT extern fastf_t ged_find_polygon_area(bview_polygon *gpoly, fastf_t sf, matp_t model2view, fastf_t size);
GED_EXPORT extern int ged_polygons_overlap(struct ged *gedp, bview_polygon *polyA, bview_polygon *polyB);
GED_EXPORT extern void ged_polygon_fill_segments(struct ged *gedp, bview_polygon *poly, vect2d_t vfilldir, fastf_t vfilldelta);
__END_DECLS
#endif /* GED_VIEW_H */
/** @} */
/*
* Local Variables:
* tab-width: 8
* mode: C
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
| 33.439306 | 289 | 0.722385 | [
"cad",
"geometry",
"object",
"vector",
"model",
"3d",
"solid"
] |
d0356bef0951d3de91ecbc5e980b4bc29ecdfdcc | 1,742 | h | C | src/OT/HaAND.h | karannewatia/SCALE-MAMBA | 467b33a6c80050789204ea3ee3b5cf0113354f85 | [
"BSD-2-Clause"
] | 196 | 2018-05-25T11:41:56.000Z | 2022-03-12T05:49:50.000Z | src/OT/HaAND.h | karannewatia/SCALE-MAMBA | 467b33a6c80050789204ea3ee3b5cf0113354f85 | [
"BSD-2-Clause"
] | 49 | 2018-07-17T15:49:41.000Z | 2021-01-19T11:35:31.000Z | src/OT/HaAND.h | karannewatia/SCALE-MAMBA | 467b33a6c80050789204ea3ee3b5cf0113354f85 | [
"BSD-2-Clause"
] | 90 | 2018-05-25T11:41:42.000Z | 2022-03-23T19:15:10.000Z | /*
Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
Copyright (c) 2021, COSIC-KU Leuven, Kasteelpark Arenberg 10, bus 2452, B-3001 Leuven-Heverlee, Belgium.
All rights reserved
*/
#ifndef _HaAND
#define _HaAND
/* This produces the output from Figure 16 of
* ePrint 2017/189
*
* We do OT_Amort values at a time
* This is basically the number of executions of the MMO
* function we do in parallel. So if you change this you
* need to change the MMO template instantiation.
*
* Assumption that 32768 is divisible by OT_Amort
*/
#define OT_Amort 128
#include "Tools/buffer.h"
#include "aBit.h"
class HaAND
{
static const unsigned int number= 32768;
// Base key for the MMO key
uint8_t base_key[AES_BLK_SIZE];
// Counter to increase the MMO key on each major iteration
unsigned int counter;
vector<aBit> x, y;
vector<vector<gf2n>> HKi, HKiD, HMi;
vector<int> v;
buffer buff;
public:
HaAND()
{
memset(base_key, 0, AES_BLK_SIZE);
}
HaAND(Player &P, int connection)
{
Init(P, connection);
}
void Init(Player &P, int connection);
/* This is protocol 16 of ePrint 2017/189 executed 131072 times */
void make_more(Player &P, int num_online);
static unsigned int get_number()
{
return number;
}
// Access functions
aBit get_x(unsigned int i) const { return x[i]; }
aBit get_y(unsigned int i) const { return y[i]; }
int get_v(unsigned int i) const { return v[i]; }
gf2n get_HKi(unsigned int i, unsigned int p) const { return HKi[i][p]; }
gf2n get_HKiD(unsigned int i, unsigned int p) const { return HKiD[i][p]; }
gf2n get_HMi(unsigned int i, unsigned int p) const { return HMi[i][p]; }
};
#endif
| 25.246377 | 110 | 0.69403 | [
"vector"
] |
d038918c0a87a8e6b5c73d2b3142cb080eccb6c0 | 2,023 | h | C | src/conv/step/step-g/TrimmedCurve.h | lf-/brlcad | f91ea585c1a930a2e97c3f5a8274db8805ebbb46 | [
"BSD-4-Clause",
"BSD-3-Clause"
] | 83 | 2021-03-10T05:54:52.000Z | 2022-03-31T16:33:46.000Z | src/conv/step/step-g/TrimmedCurve.h | lf-/brlcad | f91ea585c1a930a2e97c3f5a8274db8805ebbb46 | [
"BSD-4-Clause",
"BSD-3-Clause"
] | 13 | 2021-06-24T17:07:48.000Z | 2022-03-31T15:31:33.000Z | src/conv/step/step-g/TrimmedCurve.h | lf-/brlcad | f91ea585c1a930a2e97c3f5a8274db8805ebbb46 | [
"BSD-4-Clause",
"BSD-3-Clause"
] | 54 | 2021-03-10T07:57:06.000Z | 2022-03-28T23:20:37.000Z | /* TrimmedCurve.h
* BRL-CAD
*
* Copyright (c) 1994-2021 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
/** @file step/TrimmedCurve.h
*
* Class definition used to convert STEP "TrimmedCurve" to BRL-CAD BREP
* structures.
*
*/
#ifndef CONV_STEP_STEP_G_TRIMMEDCURVE_H
#define CONV_STEP_STEP_G_TRIMMEDCURVE_H
#include "BoundedCurve.h"
class TrimmingSelect;
typedef list<TrimmingSelect *> LIST_OF_TRIMMING_SELECT;
class TrimmedCurve : public BoundedCurve
{
private:
static string entityname;
static EntityInstanceFunc GetInstance;
protected:
Curve *basis_curve;
LIST_OF_TRIMMING_SELECT trim_1;
LIST_OF_TRIMMING_SELECT trim_2;
Boolean sense_agreement;
Trimming_preference master_representation;
public:
TrimmedCurve();
virtual ~TrimmedCurve();
TrimmedCurve(STEPWrapper *sw, int step_id);
bool Load(STEPWrapper *sw, SDAI_Application_instance *sse);
virtual bool LoadONBrep(ON_Brep *brep);
virtual const double *PointAtEnd();
virtual const double *PointAtStart();
virtual void Print(int level);
//static methods
static STEPEntity *Create(STEPWrapper *sw, SDAI_Application_instance *sse);
};
#endif /* CONV_STEP_STEP_G_TRIMMEDCURVE_H */
/*
* Local Variables:
* tab-width: 8
* mode: C
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
| 27.712329 | 79 | 0.738013 | [
"cad"
] |
d03a942b9b755d78d2d2f83e2cd898f1cd621e37 | 2,804 | h | C | vbox/src/VBox/Main/include/ClientToken.h | Nurzamal/rest_api_docker | a9cc01dfc235467d490d9663755b33ef6990bdd8 | [
"MIT"
] | null | null | null | vbox/src/VBox/Main/include/ClientToken.h | Nurzamal/rest_api_docker | a9cc01dfc235467d490d9663755b33ef6990bdd8 | [
"MIT"
] | null | null | null | vbox/src/VBox/Main/include/ClientToken.h | Nurzamal/rest_api_docker | a9cc01dfc235467d490d9663755b33ef6990bdd8 | [
"MIT"
] | null | null | null | /* $Id: ClientToken.h 69500 2017-10-28 15:14:05Z vboxsync $ */
/** @file
*
* VirtualBox API client session token abstraction
*/
/*
* Copyright (C) 2013-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ____H_CLIENTTOKEN
#define ____H_CLIENTTOKEN
#include <VBox/com/ptr.h>
#include <VBox/com/AutoLock.h>
#include "MachineImpl.h"
#ifdef VBOX_WITH_GENERIC_SESSION_WATCHER
# include "TokenImpl.h"
#endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */
#if defined(RT_OS_WINDOWS)
# define CTTOKENARG NULL
# define CTTOKENTYPE HANDLE
#elif defined(RT_OS_OS2)
# define CTTOKENARG NULLHANDLE
# define CTTOKENTYPE HMTX
#elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
# define CTTOKENARG -1
# define CTTOKENTYPE int
#elif defined(VBOX_WITH_GENERIC_SESSION_WATCHER)
# define CTTOKENARG NULL
# define CTTOKENTYPE MachineToken *
#else
# error "Port me!"
#endif
/**
* Class which represents a token which can be used to check for client
* crashes and similar purposes.
*/
class Machine::ClientToken
{
public:
/**
* Constructor which creates a usable instance
*
* @param pMachine Reference to Machine object
* @param pSessionMachine Reference to corresponding SessionMachine object
*/
ClientToken(const ComObjPtr<Machine> &pMachine, SessionMachine *pSessionMachine);
/**
* Default destructor. Cleans everything up.
*/
~ClientToken();
/**
* Check if object contains a usable token.
*/
bool isReady();
/**
* Query token ID, which is a unique string value for this token. Do not
* assume any specific content/format, it is opaque information.
*/
void getId(Utf8Str &strId);
/**
* Query token, which is platform dependent.
*/
CTTOKENTYPE getToken();
#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
/**
* Release token now. Returns information if the client has terminated.
*/
bool release();
#endif /* !VBOX_WITH_GENERIC_SESSION_WATCHER */
private:
/**
* Default constructor. Don't use, will not create a sensible instance.
*/
ClientToken();
Machine *mMachine;
CTTOKENTYPE mClientToken;
Utf8Str mClientTokenId;
#ifdef VBOX_WITH_GENERIC_SESSION_WATCHER
bool mClientTokenPassed;
#endif
};
#endif /* !____H_CLIENTTOKEN */
/* vi: set tabstop=4 shiftwidth=4 expandtab: */
| 26.45283 | 85 | 0.713267 | [
"object"
] |
d03ab23f2450f9df9044942e96e915110b6bea8c | 2,812 | h | C | export/release/windows/obj/include/lime/graphics/opengl/ext/OES_vertex_type_10_10_10_2.h | SamuraiOfSecrets/Goatmeal-Time-v0.2 | 7b89cbaf6895495b90ee1a5679e9cc696a7fbb53 | [
"Apache-2.0"
] | null | null | null | export/release/windows/obj/include/lime/graphics/opengl/ext/OES_vertex_type_10_10_10_2.h | SamuraiOfSecrets/Goatmeal-Time-v0.2 | 7b89cbaf6895495b90ee1a5679e9cc696a7fbb53 | [
"Apache-2.0"
] | null | null | null | export/release/windows/obj/include/lime/graphics/opengl/ext/OES_vertex_type_10_10_10_2.h | SamuraiOfSecrets/Goatmeal-Time-v0.2 | 7b89cbaf6895495b90ee1a5679e9cc696a7fbb53 | [
"Apache-2.0"
] | null | null | null | // Generated by Haxe 4.2.2
#ifndef INCLUDED_lime_graphics_opengl_ext_OES_vertex_type_10_10_10_2
#define INCLUDED_lime_graphics_opengl_ext_OES_vertex_type_10_10_10_2
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
HX_DECLARE_STACK_FRAME(_hx_pos_d5e1f87d93817c09_4_new)
HX_DECLARE_CLASS4(lime,graphics,opengl,ext,OES_vertex_type_10_10_10_2)
namespace lime{
namespace graphics{
namespace opengl{
namespace ext{
class HXCPP_CLASS_ATTRIBUTES OES_vertex_type_10_10_10_2_obj : public ::hx::Object
{
public:
typedef ::hx::Object super;
typedef OES_vertex_type_10_10_10_2_obj OBJ_;
OES_vertex_type_10_10_10_2_obj();
public:
enum { _hx_ClassId = 0x6af59350 };
void __construct();
inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="lime.graphics.opengl.ext.OES_vertex_type_10_10_10_2")
{ return ::hx::Object::operator new(inSize,inContainer,inName); }
inline void *operator new(size_t inSize, int extra)
{ return ::hx::Object::operator new(inSize+extra,false,"lime.graphics.opengl.ext.OES_vertex_type_10_10_10_2"); }
inline static ::hx::ObjectPtr< OES_vertex_type_10_10_10_2_obj > __new() {
::hx::ObjectPtr< OES_vertex_type_10_10_10_2_obj > __this = new OES_vertex_type_10_10_10_2_obj();
__this->__construct();
return __this;
}
inline static ::hx::ObjectPtr< OES_vertex_type_10_10_10_2_obj > __alloc(::hx::Ctx *_hx_ctx) {
OES_vertex_type_10_10_10_2_obj *__this = (OES_vertex_type_10_10_10_2_obj*)(::hx::Ctx::alloc(_hx_ctx, sizeof(OES_vertex_type_10_10_10_2_obj), false, "lime.graphics.opengl.ext.OES_vertex_type_10_10_10_2"));
*(void **)__this = OES_vertex_type_10_10_10_2_obj::_hx_vtable;
{
HX_STACKFRAME(&_hx_pos_d5e1f87d93817c09_4_new)
HXLINE( 7) ( ( ::lime::graphics::opengl::ext::OES_vertex_type_10_10_10_2)(__this) )->INT_10_10_10_2_OES = 36343;
HXLINE( 6) ( ( ::lime::graphics::opengl::ext::OES_vertex_type_10_10_10_2)(__this) )->UNSIGNED_INT_10_10_10_2_OES = 36342;
}
return __this;
}
static void * _hx_vtable;
static Dynamic __CreateEmpty();
static Dynamic __Create(::hx::DynamicArray inArgs);
//~OES_vertex_type_10_10_10_2_obj();
HX_DO_RTTI_ALL;
::hx::Val __Field(const ::String &inString, ::hx::PropertyAccess inCallProp);
::hx::Val __SetField(const ::String &inString,const ::hx::Val &inValue, ::hx::PropertyAccess inCallProp);
void __GetFields(Array< ::String> &outFields);
static void __register();
bool _hx_isInstanceOf(int inClassId);
::String __ToString() const { return HX_("OES_vertex_type_10_10_10_2",de,be,f1,06); }
int UNSIGNED_INT_10_10_10_2_OES;
int INT_10_10_10_2_OES;
};
} // end namespace lime
} // end namespace graphics
} // end namespace opengl
} // end namespace ext
#endif /* INCLUDED_lime_graphics_opengl_ext_OES_vertex_type_10_10_10_2 */
| 37.493333 | 207 | 0.764936 | [
"object"
] |
d045013d8d2a07ae868a70720906f7ab31ddb668 | 26,118 | h | C | src/Imath/ImathEuler.h | nporcino-pixar/Imath | 4c53e0fd996573548faf4d20a22adcfdbfa85fed | [
"BSD-3-Clause"
] | null | null | null | src/Imath/ImathEuler.h | nporcino-pixar/Imath | 4c53e0fd996573548faf4d20a22adcfdbfa85fed | [
"BSD-3-Clause"
] | null | null | null | src/Imath/ImathEuler.h | nporcino-pixar/Imath | 4c53e0fd996573548faf4d20a22adcfdbfa85fed | [
"BSD-3-Clause"
] | null | null | null | //
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenEXR Project.
//
//
// Euler angle representation of rotation/orientation
//
#ifndef INCLUDED_IMATHEULER_H
#define INCLUDED_IMATHEULER_H
#include "ImathMath.h"
#include "ImathMatrix.h"
#include "ImathNamespace.h"
#include "ImathQuat.h"
#include "ImathVec.h"
#include <iostream>
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
// Disable MS VC++ warnings about conversion from double to float
# pragma warning(disable : 4244)
#endif
///
/// Template class `Euler<T>`
///
/// The Euler class represents euler angle orientations. The class
/// inherits from Vec3 to it can be freely cast. The additional
/// information is the euler priorities rep. This class is
/// essentially a rip off of Ken Shoemake's GemsIV code. It has
/// been modified minimally to make it more understandable, but
/// hardly enough to make it easy to grok completely.
///
/// There are 24 possible combonations of Euler angle
/// representations of which 12 are common in CG and you will
/// probably only use 6 of these which in this scheme are the
/// non-relative-non-repeating types.
///
/// The representations can be partitioned according to two
/// criteria:
///
/// 1) Are the angles measured relative to a set of fixed axis
/// or relative to each other (the latter being what happens
/// when rotation matrices are multiplied together and is
/// almost ubiquitous in the cg community)
///
/// 2) Is one of the rotations repeated (ala XYX rotation)
///
/// When you construct a given representation from scratch you
/// must order the angles according to their priorities. So, the
/// easiest is a softimage or aerospace (yaw/pitch/roll) ordering
/// of ZYX.
///
/// float x_rot = 1;
/// float y_rot = 2;
/// float z_rot = 3;
///
/// Eulerf angles(z_rot, y_rot, x_rot, Eulerf::ZYX);
///
/// or:
///
/// Eulerf angles( V3f(z_rot,y_rot,z_rot), Eulerf::ZYX );
///
///
/// If instead, the order was YXZ for instance you would have to
/// do this:
///
/// float x_rot = 1;
/// float y_rot = 2;
/// float z_rot = 3;
///
/// Eulerf angles(y_rot, x_rot, z_rot, Eulerf::YXZ);
///
/// or:
///
///
/// Eulerf angles( V3f(y_rot,x_rot,z_rot), Eulerf::YXZ );
///
/// Notice how the order you put the angles into the three slots
/// should correspond to the enum (YXZ) ordering. The input angle
/// vector is called the "ijk" vector -- not an "xyz" vector. The
/// ijk vector order is the same as the enum. If you treat the
/// Euler as a Vec3 (which it inherts from) you will find the
/// angles are ordered in the same way, i.e.:
///
/// V3f v = angles;
/// v.x == y_rot, v.y == x_rot, v.z == z_rot
///
/// If you just want the x, y, and z angles stored in a vector in
/// that order, you can do this:
///
/// V3f v = angles.toXYZVector()
/// v.x == x_rot, v.y == y_rot, v.z == z_rot
///
/// If you want to set the Euler with an XYZVector use the
/// optional layout argument:
///
/// Eulerf angles(x_rot, y_rot, z_rot, Eulerf::YXZ, Eulerf::XYZLayout);
///
/// This is the same as:
///
/// Eulerf angles(y_rot, x_rot, z_rot, Eulerf::YXZ);
///
/// Note that this won't do anything intelligent if you have a
/// repeated axis in the euler angles (e.g. XYX)
///
/// If you need to use the "relative" versions of these, you will
/// need to use the "r" enums.
///
/// The units of the rotation angles are assumed to be radians.
///
template <class T> class Euler : public Vec3<T>
{
public:
using Vec3<T>::x;
using Vec3<T>::y;
using Vec3<T>::z;
///
/// All 24 possible orderings
///
enum Order
{
XYZ = 0x0101, // "usual" orderings
XZY = 0x0001,
YZX = 0x1101,
YXZ = 0x1001,
ZXY = 0x2101,
ZYX = 0x2001,
XZX = 0x0011, // first axis repeated
XYX = 0x0111,
YXY = 0x1011,
YZY = 0x1111,
ZYZ = 0x2011,
ZXZ = 0x2111,
XYZr = 0x2000, // relative orderings -- not common
XZYr = 0x2100,
YZXr = 0x1000,
YXZr = 0x1100,
ZXYr = 0x0000,
ZYXr = 0x0100,
XZXr = 0x2110, // relative first axis repeated
XYXr = 0x2010,
YXYr = 0x1110,
YZYr = 0x1010,
ZYZr = 0x0110,
ZXZr = 0x0010,
// ||||
// VVVV
// ABCD
// Legend:
// A -> Initial Axis (0==x, 1==y, 2==z)
// B -> Parity Even (1==true)
// C -> Initial Repeated (1==true)
// D -> Frame Static (1==true)
//
Legal = XYZ | XZY | YZX | YXZ | ZXY | ZYX | XZX | XYX | YXY | YZY | ZYZ | ZXZ | XYZr |
XZYr | YZXr | YXZr | ZXYr | ZYXr | XZXr | XYXr | YXYr | YZYr | ZYZr | ZXZr,
Min = 0x0000,
Max = 0x2111,
Default = XYZ
};
///
/// Axes
///
enum Axis
{
X = 0,
Y = 1,
Z = 2
};
///
/// Layout
///
enum InputLayout
{
XYZLayout,
IJKLayout
};
/// @{
/// @name Constructors
///
/// All default to `ZYX` non-relative (ala Softimage 3D/Maya),
/// where there is no argument to specify it.
///
/// The Euler-from-matrix constructors assume that the matrix does
/// not include shear or non-uniform scaling, but the constructors
/// do not examine the matrix to verify this assumption. If necessary,
/// you can adjust the matrix by calling the removeScalingAndShear()
/// function, defined in ImathMatrixAlgo.h.
/// No initialization by default
IMATH_HOSTDEVICE constexpr Euler() noexcept;
/// Copy constructor
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Euler (const Euler&) noexcept;
/// Construct from given Order
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Euler (Order p) noexcept;
/// Construct from vector, order, layout
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Euler (const Vec3<T>& v,
Order o = Default,
InputLayout l = IJKLayout) noexcept;
/// Construct from explicit axes, order, layout
IMATH_HOSTDEVICE IMATH_CONSTEXPR14
Euler (T i, T j, T k, Order o = Default, InputLayout l = IJKLayout) noexcept;
/// Copy constructor with new Order
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Euler (const Euler<T>& euler, Order newp) noexcept;
/// Construct from Matrix33
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Euler (const Matrix33<T>&, Order o = Default) noexcept;
/// Construct from Matrix44
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Euler (const Matrix44<T>&, Order o = Default) noexcept;
/// Destructor
~Euler() = default;
/// @}
/// @{
/// @name Query
/// Return whether the given value is a legal Order
IMATH_HOSTDEVICE constexpr static bool legal (Order) noexcept;
/// Return the order
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Order order() const noexcept;
/// Return frameStatic
IMATH_HOSTDEVICE constexpr bool frameStatic() const { return _frameStatic; }
/// Return intialRepeated
IMATH_HOSTDEVICE constexpr bool initialRepeated() const { return _initialRepeated; }
/// Return partityEven
IMATH_HOSTDEVICE constexpr bool parityEven() const { return _parityEven; }
/// Return initialAxis
IMATH_HOSTDEVICE constexpr Axis initialAxis() const { return _initialAxis; }
/// Unpack angles from ijk form
IMATH_HOSTDEVICE void angleOrder (int& i, int& j, int& k) const noexcept;
/// Determine mapping from xyz to ijk (reshuffle the xyz to match the order)
IMATH_HOSTDEVICE void angleMapping (int& i, int& j, int& k) const noexcept;
/// @}
/// @{
/// @name Set Value
/// Set the order. This does NOT convert the angles, but it
/// does reorder the input vector.
IMATH_HOSTDEVICE void setOrder (Order) noexcept;
/// Set the euler value: set the first angle to `v[0]`, the second to
/// `v[1]`, the third to `v[2]`.
IMATH_HOSTDEVICE void setXYZVector (const Vec3<T>&) noexcept;
/// Set the value.
IMATH_HOSTDEVICE void set (Axis initial, bool relative, bool parityEven, bool firstRepeats) noexcept;
/// @}
/// @{
/// @name Assignments and Conversions
///
/// Assignment
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Euler<T>& operator= (const Euler<T>&) noexcept;
/// Assignment
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 const Euler<T>& operator= (const Vec3<T>&) noexcept;
/// Assign from Matrix33, assumed to be affine
IMATH_HOSTDEVICE void extract (const Matrix33<T>&) noexcept;
/// Assign from Matrix44, assumed to be affine
IMATH_HOSTDEVICE void extract (const Matrix44<T>&) noexcept;
/// Assign from Quaternion
IMATH_HOSTDEVICE void extract (const Quat<T>&) noexcept;
/// Convert to Matrix33
IMATH_HOSTDEVICE Matrix33<T> toMatrix33() const noexcept;
/// Convert to Matrix44
IMATH_HOSTDEVICE Matrix44<T> toMatrix44() const noexcept;
/// Convert to Quat
IMATH_HOSTDEVICE Quat<T> toQuat() const noexcept;
/// Reorder the angles so that the X rotation comes first,
/// followed by the Y and Z in cases like XYX ordering, the
/// repeated angle will be in the "z" component
IMATH_HOSTDEVICE Vec3<T> toXYZVector() const noexcept;
/// @}
/// @{
/// @name Utility Methods
///
/// Utility methods for getting continuous rotations. None of these
/// methods change the orientation given by its inputs (or at least
/// that is the intent).
/// Convert an angle to its equivalent in [-PI, PI]
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 static float angleMod (T angle) noexcept;
/// Adjust xyzRot so that its components differ from targetXyzRot by no more than +/-PI
IMATH_HOSTDEVICE static void simpleXYZRotation (Vec3<T>& xyzRot, const Vec3<T>& targetXyzRot) noexcept;
/// Adjust xyzRot so that its components differ from targetXyzRot by as little as possible.
/// Note that xyz here really means ijk, because the order must be provided.
IMATH_HOSTDEVICE static void
nearestRotation (Vec3<T>& xyzRot, const Vec3<T>& targetXyzRot, Order order = XYZ) noexcept;
/// Adjusts "this" Euler so that its components differ from target
/// by as little as possible. This method might not make sense for
/// Eulers with different order and it probably doesn't work for
/// repeated axis and relative orderings (TODO).
IMATH_HOSTDEVICE void makeNear (const Euler<T>& target) noexcept;
/// @}
protected:
/// relative or static rotations
bool _frameStatic : 1;
/// init axis repeated as last
bool _initialRepeated : 1;
/// "parity of axis permutation"
bool _parityEven : 1;
#if defined _WIN32 || defined _WIN64
/// First axis of rotation
Axis _initialAxis;
#else
/// First axis of rotation
Axis _initialAxis : 2;
#endif
};
//
// Convenient typedefs
//
/// Euler of type float
typedef Euler<float> Eulerf;
/// Euler of type double
typedef Euler<double> Eulerd;
//
// Implementation
//
/// @cond Doxygen_Suppress
template <class T>
inline void
Euler<T>::angleOrder (int& i, int& j, int& k) const noexcept
{
i = _initialAxis;
j = _parityEven ? (i + 1) % 3 : (i > 0 ? i - 1 : 2);
k = _parityEven ? (i > 0 ? i - 1 : 2) : (i + 1) % 3;
}
template <class T>
inline void
Euler<T>::angleMapping (int& i, int& j, int& k) const noexcept
{
int m[3];
m[_initialAxis] = 0;
m[(_initialAxis + 1) % 3] = _parityEven ? 1 : 2;
m[(_initialAxis + 2) % 3] = _parityEven ? 2 : 1;
i = m[0];
j = m[1];
k = m[2];
}
template <class T>
inline void
Euler<T>::setXYZVector (const Vec3<T>& v) noexcept
{
int i, j, k;
angleMapping (i, j, k);
(*this)[i] = v.x;
(*this)[j] = v.y;
(*this)[k] = v.z;
}
template <class T>
inline Vec3<T>
Euler<T>::toXYZVector() const noexcept
{
int i, j, k;
angleMapping (i, j, k);
return Vec3<T> ((*this)[i], (*this)[j], (*this)[k]);
}
template <class T>
constexpr inline Euler<T>::Euler() noexcept
: Vec3<T> (0, 0, 0),
_frameStatic (true),
_initialRepeated (false),
_parityEven (true),
_initialAxis (X)
{}
template <class T>
IMATH_CONSTEXPR14 inline Euler<T>::Euler (typename Euler<T>::Order p) noexcept
: Vec3<T> (0, 0, 0),
_frameStatic (true),
_initialRepeated (false),
_parityEven (true),
_initialAxis (X)
{
setOrder (p);
}
template <class T>
IMATH_CONSTEXPR14 inline Euler<T>::Euler (const Vec3<T>& v,
typename Euler<T>::Order p,
typename Euler<T>::InputLayout l) noexcept
{
setOrder (p);
if (l == XYZLayout)
setXYZVector (v);
else
{
x = v.x;
y = v.y;
z = v.z;
}
}
template <class T> IMATH_CONSTEXPR14 inline Euler<T>::Euler (const Euler<T>& euler) noexcept
{
operator= (euler);
}
template <class T> IMATH_CONSTEXPR14 inline Euler<T>::Euler (const Euler<T>& euler, Order p) noexcept
{
setOrder (p);
Matrix33<T> M = euler.toMatrix33();
extract (M);
}
template <class T>
IMATH_CONSTEXPR14 inline Euler<T>::Euler (T xi,
T yi,
T zi,
typename Euler<T>::Order p,
typename Euler<T>::InputLayout l) noexcept
{
setOrder (p);
if (l == XYZLayout)
setXYZVector (Vec3<T> (xi, yi, zi));
else
{
x = xi;
y = yi;
z = zi;
}
}
template <class T>
IMATH_CONSTEXPR14 inline Euler<T>::Euler (const Matrix33<T>& M, typename Euler::Order p) noexcept
{
setOrder (p);
extract (M);
}
template <class T>
IMATH_CONSTEXPR14 inline Euler<T>::Euler (const Matrix44<T>& M, typename Euler::Order p) noexcept
{
setOrder (p);
extract (M);
}
template <class T>
inline void
Euler<T>::extract (const Quat<T>& q) noexcept
{
extract (q.toMatrix33());
}
template <class T>
void
Euler<T>::extract (const Matrix33<T>& M) noexcept
{
int i, j, k;
angleOrder (i, j, k);
if (_initialRepeated)
{
//
// Extract the first angle, x.
//
x = std::atan2 (M[j][i], M[k][i]);
//
// Remove the x rotation from M, so that the remaining
// rotation, N, is only around two axes, and gimbal lock
// cannot occur.
//
Vec3<T> r (0, 0, 0);
r[i] = (_parityEven ? -x : x);
Matrix44<T> N;
N.rotate (r);
N = N * Matrix44<T> (M[0][0],
M[0][1],
M[0][2],
0,
M[1][0],
M[1][1],
M[1][2],
0,
M[2][0],
M[2][1],
M[2][2],
0,
0,
0,
0,
1);
//
// Extract the other two angles, y and z, from N.
//
T sy = std::sqrt (N[j][i] * N[j][i] + N[k][i] * N[k][i]);
y = std::atan2 (sy, N[i][i]);
z = std::atan2 (N[j][k], N[j][j]);
}
else
{
//
// Extract the first angle, x.
//
x = std::atan2 (M[j][k], M[k][k]);
//
// Remove the x rotation from M, so that the remaining
// rotation, N, is only around two axes, and gimbal lock
// cannot occur.
//
Vec3<T> r (0, 0, 0);
r[i] = (_parityEven ? -x : x);
Matrix44<T> N;
N.rotate (r);
N = N * Matrix44<T> (M[0][0],
M[0][1],
M[0][2],
0,
M[1][0],
M[1][1],
M[1][2],
0,
M[2][0],
M[2][1],
M[2][2],
0,
0,
0,
0,
1);
//
// Extract the other two angles, y and z, from N.
//
T cy = std::sqrt (N[i][i] * N[i][i] + N[i][j] * N[i][j]);
y = std::atan2 (-N[i][k], cy);
z = std::atan2 (-N[j][i], N[j][j]);
}
if (!_parityEven)
*this *= -1;
if (!_frameStatic)
{
T t = x;
x = z;
z = t;
}
}
template <class T>
void
Euler<T>::extract (const Matrix44<T>& M) noexcept
{
int i, j, k;
angleOrder (i, j, k);
if (_initialRepeated)
{
//
// Extract the first angle, x.
//
x = std::atan2 (M[j][i], M[k][i]);
//
// Remove the x rotation from M, so that the remaining
// rotation, N, is only around two axes, and gimbal lock
// cannot occur.
//
Vec3<T> r (0, 0, 0);
r[i] = (_parityEven ? -x : x);
Matrix44<T> N;
N.rotate (r);
N = N * M;
//
// Extract the other two angles, y and z, from N.
//
T sy = std::sqrt (N[j][i] * N[j][i] + N[k][i] * N[k][i]);
y = std::atan2 (sy, N[i][i]);
z = std::atan2 (N[j][k], N[j][j]);
}
else
{
//
// Extract the first angle, x.
//
x = std::atan2 (M[j][k], M[k][k]);
//
// Remove the x rotation from M, so that the remaining
// rotation, N, is only around two axes, and gimbal lock
// cannot occur.
//
Vec3<T> r (0, 0, 0);
r[i] = (_parityEven ? -x : x);
Matrix44<T> N;
N.rotate (r);
N = N * M;
//
// Extract the other two angles, y and z, from N.
//
T cy = std::sqrt (N[i][i] * N[i][i] + N[i][j] * N[i][j]);
y = std::atan2 (-N[i][k], cy);
z = std::atan2 (-N[j][i], N[j][j]);
}
if (!_parityEven)
*this *= -1;
if (!_frameStatic)
{
T t = x;
x = z;
z = t;
}
}
template <class T>
Matrix33<T>
Euler<T>::toMatrix33() const noexcept
{
int i, j, k;
angleOrder (i, j, k);
Vec3<T> angles;
if (_frameStatic)
angles = (*this);
else
angles = Vec3<T> (z, y, x);
if (!_parityEven)
angles *= -1.0;
T ci = std::cos (angles.x);
T cj = std::cos (angles.y);
T ch = std::cos (angles.z);
T si = std::sin (angles.x);
T sj = std::sin (angles.y);
T sh = std::sin (angles.z);
T cc = ci * ch;
T cs = ci * sh;
T sc = si * ch;
T ss = si * sh;
Matrix33<T> M;
if (_initialRepeated)
{
M[i][i] = cj;
M[j][i] = sj * si;
M[k][i] = sj * ci;
M[i][j] = sj * sh;
M[j][j] = -cj * ss + cc;
M[k][j] = -cj * cs - sc;
M[i][k] = -sj * ch;
M[j][k] = cj * sc + cs;
M[k][k] = cj * cc - ss;
}
else
{
M[i][i] = cj * ch;
M[j][i] = sj * sc - cs;
M[k][i] = sj * cc + ss;
M[i][j] = cj * sh;
M[j][j] = sj * ss + cc;
M[k][j] = sj * cs - sc;
M[i][k] = -sj;
M[j][k] = cj * si;
M[k][k] = cj * ci;
}
return M;
}
template <class T>
Matrix44<T>
Euler<T>::toMatrix44() const noexcept
{
int i, j, k;
angleOrder (i, j, k);
Vec3<T> angles;
if (_frameStatic)
angles = (*this);
else
angles = Vec3<T> (z, y, x);
if (!_parityEven)
angles *= -1.0;
T ci = std::cos (angles.x);
T cj = std::cos (angles.y);
T ch = std::cos (angles.z);
T si = std::sin (angles.x);
T sj = std::sin (angles.y);
T sh = std::sin (angles.z);
T cc = ci * ch;
T cs = ci * sh;
T sc = si * ch;
T ss = si * sh;
Matrix44<T> M;
if (_initialRepeated)
{
M[i][i] = cj;
M[j][i] = sj * si;
M[k][i] = sj * ci;
M[i][j] = sj * sh;
M[j][j] = -cj * ss + cc;
M[k][j] = -cj * cs - sc;
M[i][k] = -sj * ch;
M[j][k] = cj * sc + cs;
M[k][k] = cj * cc - ss;
}
else
{
M[i][i] = cj * ch;
M[j][i] = sj * sc - cs;
M[k][i] = sj * cc + ss;
M[i][j] = cj * sh;
M[j][j] = sj * ss + cc;
M[k][j] = sj * cs - sc;
M[i][k] = -sj;
M[j][k] = cj * si;
M[k][k] = cj * ci;
}
return M;
}
template <class T>
Quat<T>
Euler<T>::toQuat() const noexcept
{
Vec3<T> angles;
int i, j, k;
angleOrder (i, j, k);
if (_frameStatic)
angles = (*this);
else
angles = Vec3<T> (z, y, x);
if (!_parityEven)
angles.y = -angles.y;
T ti = angles.x * 0.5;
T tj = angles.y * 0.5;
T th = angles.z * 0.5;
T ci = std::cos (ti);
T cj = std::cos (tj);
T ch = std::cos (th);
T si = std::sin (ti);
T sj = std::sin (tj);
T sh = std::sin (th);
T cc = ci * ch;
T cs = ci * sh;
T sc = si * ch;
T ss = si * sh;
T parity = _parityEven ? 1.0 : -1.0;
Quat<T> q;
Vec3<T> a;
if (_initialRepeated)
{
a[i] = cj * (cs + sc);
a[j] = sj * (cc + ss) * parity, // NOSONAR - suppress SonarCloud bug report.
a[k] = sj * (cs - sc);
q.r = cj * (cc - ss);
}
else
{
a[i] = cj * sc - sj * cs,
a[j] = (cj * ss + sj * cc) * parity, // NOSONAR - suppress SonarCloud bug report.
a[k] = cj * cs - sj * sc;
q.r = cj * cc + sj * ss;
}
q.v = a;
return q;
}
template <class T>
constexpr inline bool
Euler<T>::legal (typename Euler<T>::Order order) noexcept
{
return (order & ~Legal) ? false : true;
}
template <class T>
IMATH_CONSTEXPR14 typename Euler<T>::Order
Euler<T>::order() const noexcept
{
int foo = (_initialAxis == Z ? 0x2000 : (_initialAxis == Y ? 0x1000 : 0));
if (_parityEven)
foo |= 0x0100;
if (_initialRepeated)
foo |= 0x0010;
if (_frameStatic)
foo++;
return (Order) foo;
}
template <class T>
inline void
Euler<T>::setOrder (typename Euler<T>::Order p) noexcept
{
set (p & 0x2000 ? Z : (p & 0x1000 ? Y : X), // initial axis
!(p & 0x1), // static?
!!(p & 0x100), // permutation even?
!!(p & 0x10)); // initial repeats?
}
template <class T>
inline void
Euler<T>::set (typename Euler<T>::Axis axis, bool relative, bool parityEven, bool firstRepeats) noexcept
{
_initialAxis = axis;
_frameStatic = !relative;
_parityEven = parityEven;
_initialRepeated = firstRepeats;
}
template <class T>
IMATH_CONSTEXPR14 inline const Euler<T>&
Euler<T>::operator= (const Euler<T>& euler) noexcept
{
x = euler.x;
y = euler.y;
z = euler.z;
_initialAxis = euler._initialAxis;
_frameStatic = euler._frameStatic;
_parityEven = euler._parityEven;
_initialRepeated = euler._initialRepeated;
return *this;
}
template <class T>
IMATH_CONSTEXPR14 inline const Euler<T>&
Euler<T>::operator= (const Vec3<T>& v) noexcept
{
x = v.x;
y = v.y;
z = v.z;
return *this;
}
/// Stream ouput
template <class T>
std::ostream&
operator<< (std::ostream& o, const Euler<T>& euler) noexcept
{
char a[3] = { 'X', 'Y', 'Z' };
const char* r = euler.frameStatic() ? "" : "r";
int i, j, k;
euler.angleOrder (i, j, k);
if (euler.initialRepeated())
k = i;
return o << "(" << euler.x << " " << euler.y << " " << euler.z << " " << a[i] << a[j] << a[k]
<< r << ")";
}
template <class T>
IMATH_CONSTEXPR14 inline float
Euler<T>::angleMod (T angle) noexcept
{
const T pi = static_cast<T> (M_PI);
angle = fmod (T (angle), T (2 * pi));
if (angle < -pi)
angle += 2 * pi;
if (angle > +pi)
angle -= 2 * pi;
return angle;
}
template <class T>
inline void
Euler<T>::simpleXYZRotation (Vec3<T>& xyzRot, const Vec3<T>& targetXyzRot) noexcept
{
Vec3<T> d = xyzRot - targetXyzRot;
xyzRot[0] = targetXyzRot[0] + angleMod (d[0]);
xyzRot[1] = targetXyzRot[1] + angleMod (d[1]);
xyzRot[2] = targetXyzRot[2] + angleMod (d[2]);
}
template <class T>
void
Euler<T>::nearestRotation (Vec3<T>& xyzRot, const Vec3<T>& targetXyzRot, Order order) noexcept
{
int i, j, k;
Euler<T> e (0, 0, 0, order);
e.angleOrder (i, j, k);
simpleXYZRotation (xyzRot, targetXyzRot);
Vec3<T> otherXyzRot;
otherXyzRot[i] = M_PI + xyzRot[i];
otherXyzRot[j] = M_PI - xyzRot[j];
otherXyzRot[k] = M_PI + xyzRot[k];
simpleXYZRotation (otherXyzRot, targetXyzRot);
Vec3<T> d = xyzRot - targetXyzRot;
Vec3<T> od = otherXyzRot - targetXyzRot;
T dMag = d.dot (d);
T odMag = od.dot (od);
if (odMag < dMag)
{
xyzRot = otherXyzRot;
}
}
template <class T>
void
Euler<T>::makeNear (const Euler<T>& target) noexcept
{
Vec3<T> xyzRot = toXYZVector();
Vec3<T> targetXyz;
if (order() != target.order())
{
Euler<T> targetSameOrder = Euler<T> (target, order());
targetXyz = targetSameOrder.toXYZVector();
}
else
{
targetXyz = target.toXYZVector();
}
nearestRotation (xyzRot, targetXyz, order());
setXYZVector (xyzRot);
}
#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
# pragma warning(default : 4244)
#endif
/// @endcond
IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
#endif // INCLUDED_IMATHEULER_H
| 25.259188 | 107 | 0.529328 | [
"vector",
"3d"
] |
d0470952a6f7e9e37aa0b5e5a9da9d2063c15118 | 1,318 | h | C | PhysicsSceneManager/MeshStrider.h | evan-lloyd/LabMan | 7512b14d4acaa912d4a63e4784ba6d6b9a6f830c | [
"Xnet",
"X11"
] | null | null | null | PhysicsSceneManager/MeshStrider.h | evan-lloyd/LabMan | 7512b14d4acaa912d4a63e4784ba6d6b9a6f830c | [
"Xnet",
"X11"
] | null | null | null | PhysicsSceneManager/MeshStrider.h | evan-lloyd/LabMan | 7512b14d4acaa912d4a63e4784ba6d6b9a6f830c | [
"Xnet",
"X11"
] | null | null | null | #ifndef MeshStrider_h__
#define MeshStrider_h__
#include "btBulletDynamicsCommon.h"
#include "OgreMesh.h"
#include "OgreSubMesh.h"
#include "OgreEntity.h"
#define ASSERT(m)
/// Shares vertices/indexes between Ogre and Bullet
class MeshStrider : public btStridingMeshInterface{
public:
MeshStrider( Ogre::Entity *e, int s ):mMesh(&*e->getMesh()), mEntity(e), sub(s) {}
MeshStrider( Ogre::Mesh *m, int s):mMesh(m), mEntity(0), sub(s) {}
void set( Ogre::Mesh * m ) { ASSERT(m); mMesh = m; }
// inherited interface
virtual int getNumSubParts() const;
virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0);
virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const;
virtual void unLockVertexBase(int subpart);
virtual void unLockReadOnlyVertexBase(int subpart) const;
virtual void preallocateVertices(int numverts);
virtual void preallocateIndices(int numindices);
private:
Ogre::Mesh * mMesh;
Ogre::Entity *mEntity;
int sub;
};
#endif // MeshStrider_h__ | 35.621622 | 242 | 0.765554 | [
"mesh"
] |
d04aeddd8371c108c47049842adeed1f8220d51c | 19,016 | h | C | ToolKit/DockingPane/XTPDockingPaneTabbedContainer.h | 11Zero/DemoBCG | 8f41d5243899cf1c82990ca9863fb1cb9f76491c | [
"MIT"
] | 2 | 2018-03-30T06:40:08.000Z | 2022-02-23T12:40:13.000Z | ToolKit/DockingPane/XTPDockingPaneTabbedContainer.h | 11Zero/DemoBCG | 8f41d5243899cf1c82990ca9863fb1cb9f76491c | [
"MIT"
] | null | null | null | ToolKit/DockingPane/XTPDockingPaneTabbedContainer.h | 11Zero/DemoBCG | 8f41d5243899cf1c82990ca9863fb1cb9f76491c | [
"MIT"
] | 1 | 2020-08-11T05:48:02.000Z | 2020-08-11T05:48:02.000Z | // XTPDockingPaneTabbedContainer.h : interface for the CXTPDockingPaneTabbedContainer class.
//
// This file is a part of the XTREME DOCKINGPANE MFC class library.
// (c)1998-2011 Codejock Software, All Rights Reserved.
//
// THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
// RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
// CONSENT OF CODEJOCK SOFTWARE.
//
// THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
// IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
// YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
// SINGLE COMPUTER.
//
// CONTACT INFORMATION:
// support@codejock.com
// http://www.codejock.com
//
/////////////////////////////////////////////////////////////////////////////
//{{AFX_CODEJOCK_PRIVATE
#if !defined(__XTPDOCKINGPANETABBEDCONTAINER_H__)
#define __XTPDOCKINGPANETABBEDCONTAINER_H__
//}}AFX_CODEJOCK_PRIVATE
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "XTPDockingPaneBaseContainer.h"
#include "XTPDockingPanePaintManager.h"
#include "Common/XTPSystemHelpers.h"
class CXTPDockingPaneAutoHidePanel;
class CXTPDockingPaneCaptionButton;
//===========================================================================
// Summary:
// CXTPDockingPaneTabbedContainer is a multiple inheritance class derived from
// CWnd and CXTPDockingPaneBase. It represents a tabbed container for Docking
// Panes.
//===========================================================================
class _XTP_EXT_CLASS CXTPDockingPaneTabbedContainer : public CWnd, public CXTPDockingPaneBaseContainer, public CXTPTabManager, public CXTPAccessible
{
DECLARE_DYNAMIC(CXTPDockingPaneTabbedContainer)
protected:
//-----------------------------------------------------------------------
// Summary:
// Constructs a CXTPDockingPaneTabbedContainer object
// Protected constructor. Internally constructed only.
// Parameters:
// pLayout - Points to a CXTPDockingPaneLayout object.
//-----------------------------------------------------------------------
CXTPDockingPaneTabbedContainer(CXTPDockingPaneLayout* pLayout);
//-----------------------------------------------------------------------
// Summary:
// Destroys a CXTPDockingPaneTabbedContainer object, handles cleanup and
// deallocation
//-----------------------------------------------------------------------
virtual ~CXTPDockingPaneTabbedContainer();
public:
//-----------------------------------------------------------------------
// Summary:
// Call this member to activate a child docking pane.
// Parameters:
// pPane - Pane to be activated.
// bSetFocus - TRUE to set focus to child docking pane.
// bDelayRedraw - TRUE to redraw caption delayed.
//-----------------------------------------------------------------------
virtual void SelectPane(CXTPDockingPane* pPane, BOOL bSetFocus = TRUE, BOOL bDelayRedraw = TRUE);
//-----------------------------------------------------------------------
// Summary:
// Call this member function to get child pane state.
// Returns:
// TRUE if a child pane is active.
//-----------------------------------------------------------------------
BOOL IsActive() const;
//-----------------------------------------------------------------------
// Summary:
// Call this member function to get selected pane.
// Returns:
// The selected child pane.
//-----------------------------------------------------------------------
CXTPDockingPane* GetSelected() const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to access title's close button.
// Returns:
// A reference to the title's close button.
//-----------------------------------------------------------------------
CXTPDockingPaneCaptionButton* GetCloseButton() const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to access title's pin button.
// Returns:
// A reference to the title's pin button.
//-----------------------------------------------------------------------
CXTPDockingPaneCaptionButton* GetPinButton() const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to determine if the title is visible.
// Returns:
// TRUE if the title is visible.
//-----------------------------------------------------------------------
BOOL IsTitleVisible() const;
//-----------------------------------------------------------------------
// Summary:
// Returns TRUE if caption drawn vertically
// Returns:
// TRUE if the caption drawn vertically
//-----------------------------------------------------------------------
virtual BOOL IsCaptionVertical() const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to determine if the tab bar is visible.
// Returns:
// TRUE if the tab bar is visible.
//-----------------------------------------------------------------------
virtual BOOL IsTabsVisible() const;
//-----------------------------------------------------------------------
// Summary:
// Retrieves safe window handle.
// Returns: Safe window handle.
//-----------------------------------------------------------------------
virtual HWND GetPaneHwnd() const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to determine if the tabbed container is
// auto-hidden. If one pane in a group of panes is auto-hidden,
// then the entire group will be auto-hidden.
// Returns:
// TRUE if the tabbed container is auto-hidden, FALSE if the
// tab group is visible.
//-----------------------------------------------------------------------
BOOL IsHidden() const;
//-----------------------------------------------------------------------
// Summary:
// This member is called by the framework when the left mouse
// button is clicked while the mouse pointer is positioned over
// a pane caption. This will give the pane focus and begin the
// pane dragging process (If the left button is held down).
// Parameters:
// point - Cursor location on the pane's caption that was clicked.
//-----------------------------------------------------------------------
virtual void OnCaptionLButtonDown(CPoint point);
//-----------------------------------------------------------------------
// Summary:
// This method called to check if docking pane can be attached to tabbed container.
// Parameters:
// rcClient - Client rectangle of container.
// pt - Point to attach.
// Returns:
// TRUE if pane can be attached as new tab to tabbed container.
//-----------------------------------------------------------------------
virtual BOOL CanAttach(CRect& rcClient, CPoint pt) const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to fill the pMinMaxInfo structure with the
// minimum and maximum width and height of the container.
// This will look at the MinMaxInfo for each pane in the
// container and set the appropriate minimum and maximum width
// and height for the container.
// Parameters:
// pMinMaxInfo - Pointer to MINMAXINFO structure
//-----------------------------------------------------------------------
void GetMinMaxInfo(LPMINMAXINFO pMinMaxInfo) const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to get pane by its index.
// Parameters:
// nIndex - Index of pane need to retrieve
// Returns:
// CXTPDockingPane pointer corresponded with nIndex
//-----------------------------------------------------------------------
CXTPDockingPane* GetItemPane(int nIndex) const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to get tab for corresponded pane.
// Parameters:
// pPane - Pane to get tab for
// Returns:
// CXTPTabManagerItem pointer corresponded with pPane
//-----------------------------------------------------------------------
CXTPTabManagerItem* GetPaneTab(CXTPDockingPane* pPane) const;
//-----------------------------------------------------------------------
// Summary:
// Call this member to get the text in the caption for the tabbed container (group of panes).
// Returns:
// The text in the caption for the tabbed container (group of panes).
//-----------------------------------------------------------------------
CString GetTitle() const;
protected:
//-----------------------------------------------------------------------
// Summary:
// This member is called to determine if a specific caption button
// is visible.
// Parameters:
// pButton - Button to check to see if it is visible.
// Returns:
// TRUE if the caption button specified is visible, FALSE otherwise.
//-----------------------------------------------------------------------
virtual BOOL IsCaptionButtonVisible(CXTPDockingPaneCaptionButton* pButton);
//-----------------------------------------------------------------------
// Summary:
// This member is called by the framework when a caption button
// is clicked.
// Parameters:
// pButton - Caption button that was clicked.
//-----------------------------------------------------------------------
virtual void OnCaptionButtonClick(CXTPDockingPaneCaptionButton* pButton);
virtual void OnNavigateButtonClick(CXTPTabManagerNavigateButton* pButton);
protected:
//-----------------------------------------------------------------------
// Summary:
// Constructs a CXTPDockingPaneTabbedContainer object
// Protected constructor. Internally constructed only.
// Parameters:
// pPane - Child pane.
// pFrame - Parent Frame.
// pLayout - Points to a CXTPDockingPaneLayout object.
//-----------------------------------------------------------------------
void Init(CXTPDockingPane* pPane, CWnd* pFrame);
//-----------------------------------------------------------------------
// Summary:
// Copies a CXTPDockingPaneTabbedContainer object
// Parameters:
// pClone - Points to a CXTPDockingPaneTabbedContainer object
// pMap - Points to a CXTPPaneToPaneMap object
// dwIgnoredOptions - Options that must be skipped.
// See Also:
// CXTPPaneToPaneMap
//-----------------------------------------------------------------------
virtual void Copy(CXTPDockingPaneBase* pClone, CXTPPaneToPaneMap* pMap, DWORD dwIgnoredOptions);
//-----------------------------------------------------------------------
// Summary:
// This member is called to recalculate the positions of
// tab groups/Items.
//-----------------------------------------------------------------------
virtual void Reposition();
//-----------------------------------------------------------------------
// Summary:
// This member is called to redraw the tabbed control, I.e. When
// an Icon has changed.
// Parameters:
// lpRect - The rectangular area of the window that is invalid.
// bAnimate - TRUE to animate changes in bounding rectangle.
//-----------------------------------------------------------------------
virtual void RedrawControl(LPCRECT lpRect, BOOL bAnimate);
//-----------------------------------------------------------------------
// Summary:
// This member is called to access the visual elements of the docking
// pane tabs. I.e. Tab colors, styles, etc...
// Returns:
// Pointer to CXTPTabPaintManager that contains the visual elements
// of the docking pane tabs.
//-----------------------------------------------------------------------
virtual CXTPTabPaintManager* GetPaintManager() const;
//-----------------------------------------------------------------------
// Summary:
// This member function is called in a derived class to set a pointer
// the tab paint manager.
// Parameters:
// pPaintManager - Pointer to a CXTPTabPaintManager object.
//-----------------------------------------------------------------------
virtual void SetPaintManager(CXTPTabPaintManager* pPaintManager);
//-----------------------------------------------------------------------
// Summary:
// This member is called when the icon of the tab in the tabbed
// container needs to be drawn. I.e. On mouse over.
// Parameters:
// pDC - Pointer to the destination device context.
// pt - Specifies the location of the image.
// pItem - CXTPTabManagerItem object to draw icon on.
// bDraw - TRUE if the icon needs to be drawn, I.e. the icon size
// changed. FALSE if the icon does not need to be
// drawn or redrawn.
// szIcon - Size of the tab icon.
// Returns:
// TRUE if the icon was successfully drawn, FALSE if the icon
// was not drawn.
//-----------------------------------------------------------------------
virtual BOOL DrawIcon(CDC* pDC, CPoint pt, CXTPTabManagerItem* pItem, BOOL bDraw, CSize& szIcon) const;
//-----------------------------------------------------------------------
// Summary:
// This member is called to save/restore the settings of the pane.
// Parameters:
// pPX - Points to a CXTPPropExchange object.
// Returns:
// TRUE if successful; otherwise returns FALSE.
//-----------------------------------------------------------------------
virtual BOOL DoPropExchange(CXTPPropExchange* pPX);
//-----------------------------------------------------------------------
// Summary:
// This member is called to when tabs was changed.
//-----------------------------------------------------------------------
virtual void OnTabsChanged();
//-----------------------------------------------------------------------
// Summary:
// This member is called to create pane
//-----------------------------------------------------------------------
virtual void CreateContainer();
protected:
//{{AFX_CODEJOCK_PRIVATE
virtual void OnSizeParent(CWnd* pParent, CRect rect, LPVOID lParam);
virtual void OnFocusChanged();
virtual void SetDockingSite(CWnd* pFrame);
virtual void RemovePane(CXTPDockingPaneBase* pPane);
virtual void OnParentContainerChanged(CXTPDockingPaneBase* pContainer);
void ShowTitle(BOOL bShow);
void Show(BOOL bSetFocus);
void ShowPane(CXTPDockingPane* pPane, BOOL bSetFocus);
void _Swap(CXTPDockingPane* p1, CXTPDockingPane* p2);
void _InsertPane(CXTPDockingPane* pPane, BOOL bSetFocus = TRUE);
int HitTest(CPoint point) const;
void AdjustMinMaxInfoClientRect(LPMINMAXINFO pMinMaxInfo, BOOL bCaptionOnly = FALSE) const;
void InvalidatePane(BOOL bSelectionChanged);
void _RestoreFocus();
void EnsureSelectedTabVisible();
BOOL OnCaptionButtonDown(CXTPDockingPaneCaptionButton* pButton);
CXTPDockingPaneCaptionButton* HitTestCaptionButton(CPoint point) const;
void DeletePane();
void ClosePane(CXTPDockingPane* pPane);
BOOL IsPaneRestored() const;
BOOL IsAllowMaximize() const;
BOOL IsPaneMaximized() const;
BOOL IsPaneMinimized() const;
void Restore();
void Maximize();
void NormalizeDockingSize();
//}}AFX_CODEJOCK_PRIVATE
protected:
//{{AFX_CODEJOCK_PRIVATE
DECLARE_MESSAGE_MAP()
//{{AFX_VIRTUAL(CXTPDockingPaneTabbedContainer)
virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
LRESULT OnHelpHitTest(WPARAM, LPARAM);
BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual void OnFinalRelease();
//}}AFX_VIRTUAL
//{{AFX_MSG(CXTPDockingPaneTabbedContainer)
afx_msg void OnPaint();
afx_msg LRESULT OnPrintClient(WPARAM wParam, LPARAM /*lParam*/);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT /*nFlags*/, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnCaptureChanged(CWnd* pWnd);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnMouseLeave();
afx_msg void OnDestroy();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg LRESULT OnGetObject(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
//}}AFX_CODEJOCK_PRIVATE
protected:
//{{AFX_CODEJOCK_PRIVATE
// System accessibility support.
virtual HRESULT GetAccessibleParent(IDispatch** ppdispParent);
virtual HRESULT GetAccessibleChildCount(long* pcountChildren);
virtual HRESULT GetAccessibleChild(VARIANT varChild, IDispatch** ppdispChild);
virtual HRESULT GetAccessibleName(VARIANT varChild, BSTR* pszName);
virtual HRESULT GetAccessibleRole(VARIANT varChild, VARIANT* pvarRole);
virtual HRESULT AccessibleLocation(long *pxLeft, long *pyTop, long *pcxWidth, long* pcyHeight, VARIANT varChild);
virtual HRESULT AccessibleHitTest(long xLeft, long yTop, VARIANT* pvarChild);
virtual HRESULT GetAccessibleState(VARIANT varChild, VARIANT* pvarState);
virtual HRESULT GetAccessibleDefaultAction(VARIANT varChild, BSTR* pszDefaultAction);
virtual HRESULT AccessibleDoDefaultAction(VARIANT varChild);
virtual CCmdTarget* GetAccessible();
DECLARE_INTERFACE_MAP()
//}}AFX_CODEJOCK_PRIVATE
protected:
BOOL m_bActive; // TRUE if Tabbed container has active caption
BOOL m_bTitleVisible; // TRUE if title is visible
int m_nLockReposition; // InvalidatePane method currently executed.
BOOL m_bDelayRedraw; // TRUE to redraw pane after small delay
CXTPDockingPane* m_pSelectedPane; // Pointer to selected pane
CXTPDockingPane* m_pTrackingPane; // Pointer to dragging pane
CArray<CRect, CRect&> m_lstRects; // Array of previous tabs positions
COleDropTarget* m_pDropTarget; // Pointer to Ole Drop Target
BOOL m_bMaximized; // TRUE if Pane is currently maximized
BOOL m_bEnsureSelectedTab; // TRUE to check if selected tab is visible after delay
private:
class CContainerDropTarget;
private:
friend class CXTPDockingPaneManager;
friend class CXTPDockingPane;
friend class CXTPDockingPaneContext;
friend class CXTPDockingPaneMiniWnd;
friend class CXTPDockingPaneLayout;
friend class CXTPDockingPaneAutoHidePanel;
friend class CXTPDockingPaneAutoHideWnd;
friend class CXTPDockingPaneCaptionButton;
friend class CContainerDropTarget;
friend class CXTPDockingPaneSidePanel;
};
AFX_INLINE BOOL CXTPDockingPaneTabbedContainer::IsActive() const {
return m_bActive;
}
AFX_INLINE CXTPDockingPane* CXTPDockingPaneTabbedContainer::GetSelected() const {
return m_pSelectedPane;
}
AFX_INLINE HWND CXTPDockingPaneTabbedContainer::GetPaneHwnd() const {
return CWnd::GetSafeHwnd();
}
#endif // #if !defined(__XTPDOCKINGPANETABBEDCONTAINER_H__)
| 41.610503 | 148 | 0.555217 | [
"object"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.