hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
588 values
lang
stringclasses
305 values
max_stars_repo_path
stringlengths
3
363
max_stars_repo_name
stringlengths
5
118
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringdate
2015-01-01 00:00:35
2022-03-31 23:43:49
max_stars_repo_stars_event_max_datetime
stringdate
2015-01-01 12:37:38
2022-03-31 23:59:52
max_issues_repo_path
stringlengths
3
363
max_issues_repo_name
stringlengths
5
118
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
134k
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
363
max_forks_repo_name
stringlengths
5
135
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringdate
2015-01-01 00:01:02
2022-03-31 23:27:27
max_forks_repo_forks_event_max_datetime
stringdate
2015-01-03 08:55:07
2022-03-31 23:59:24
content
stringlengths
5
1.05M
avg_line_length
float64
1.13
1.04M
max_line_length
int64
1
1.05M
alphanum_fraction
float64
0
1
c11520ef42dc727f8179dd750f43f4e0fdadbba5
6,441
h
C
wxSightGL/src/sight/model.h
aziesemer/gme-ufrgs
ccc0d6767d2e0bf6afe4176c2be5762a79d3e797
[ "BSD-2-Clause" ]
38
2015-05-05T01:42:16.000Z
2021-09-11T15:41:48.000Z
wxSightGL/src/sight/model.h
aziesemer/gme-ufrgs
ccc0d6767d2e0bf6afe4176c2be5762a79d3e797
[ "BSD-2-Clause" ]
19
2015-10-05T18:39:04.000Z
2021-07-29T16:27:26.000Z
wxSightGL/src/sight/model.h
aziesemer/gme-ufrgs
ccc0d6767d2e0bf6afe4176c2be5762a79d3e797
[ "BSD-2-Clause" ]
22
2015-07-15T15:14:16.000Z
2021-09-11T15:41:49.000Z
/* * Model.h * SightGL * * Created by Lenna on 4/26/07. * Copyright 2007 __MyCompanyName__. All rights reserved. * */ #ifndef MODEL_H #define MODEL_H #include <utility> using std::pair; #include <string> using std::string; #include <vector> using std::vector; #include <fstream> using std::ofstream; #include "object.h" #include "opengl.h" #include "stipple.h" #include "layer.h" #include "txGpu.h" //__________________________________________________________________________________________________ class ObjectReference { private: Object * clsObject; int clsLayer; public: ObjectReference( Object * object, int layer) : clsObject( object ), clsLayer( layer ) {} // ObjectReference( Object * object, int layer, int group) : clsObject( object ), clsLayer( layer ), clsGroup(group) {} ObjectReference() : clsObject( NULL ), clsLayer( -1 ) {} Object * operator->() const { return clsObject; } Object *getObject() const { return clsObject; } int getLayer() const { return clsLayer; } int getGroup() const { return clsObject->getGroup( ); } void setGroup( const int g){ clsObject->setGroup( g ); } }; // ----------------------------------------------------------------------------- //picture is the photo of the model //when we draw, we transform the photo :p // ----------------------------------------------------------------------------- class Model { private: vector <Layer> * clsLayers; int clsModelId; int clsScale; int clsLayerIndex; TXmatrix clsPicture; vector < ObjectReference > clsContents;//object + layer string clsName; Vertex clsMin; Vertex clsMax; int clsDividendo, clsDivisor; public: Model(){ clsLayerIndex = 0; } void setModelId( int ID ){ clsModelId = ID; } int getModelId(){ return clsModelId; } void setLayers(vector <Layer> * layers){ clsLayers = layers; } int getLayer(){ return clsLayerIndex; } void setName(string name){ clsName = name; } string getName(){ return clsName; } void setScale( int dvd, int dvs ){ clsScale = dvd/dvs; clsDividendo = dvd; clsDivisor = dvs; } int getScale(){ return clsScale; } int getDVD(){return clsDividendo;} int getDVS(){return clsDivisor;} void setMinMax(Vertex min, Vertex max){clsMin = min; clsMax = max;} void setMinMax(); Vertex getMax(){return clsMax;} Vertex getMin(){return clsMin;} void gimmeObjects( vector <ObjectReference> & vec ); void gimmeObjectsOnly( vector <ObjectReference> & vec ); void saveCallsOnly( ofstream &file); void saveChanges(); void picMe(); bool empty(){ return clsContents.empty();} bool addContent( Object *newObject, int layer ); vector <ObjectReference > getContents(){ return clsContents; } void draw(); void drawFillFromModel( const Vertex translation , const Vertex rotation, const bool mirrorX, bool hasmirror ); void drawEdgeFromModel( const Vertex translation , const Vertex rotation, const bool mirrorX, bool hasmirror ); void drawFromModel(const Vertex translation, const Vertex Rotation, const bool mirrorX, const bool hasmirror ); void drawLayerFromModel( const Vertex translation, const Vertex Rotation, const bool mirrorX, const bool hasmirror, int layer ); void drawFromPicture( const Vertex translation , const Vertex rotation, const bool mirrorX, bool hasmirror ); }; // ----------------------------------------------------------------------------- enum sgtHierarchy { SGT_ACTIVE, SGT_IDLE, SGT_OPEN }; //active: cam be selected //idle: no selection //open: sons cam be selected // ----------------------------------------------------------------------------- class sgtComponent : public Object { private: Model* clsModelIndex; Vertex clsTranslation; //translaton from model Vertex clsRotation; bool clsMirrorX; bool hasMirror; bool clsDirty;//to see sgtHierarchy clsActiveHierarchy; Vertex clsMax, clsMin; vector < Object * > clsObjects;//object + layer public: sgtComponent(); sgtComponent(Vertex t, Model* m); bool mirrorX(){ return clsMirrorX; } bool hMirror(){ return hasMirror; } bool hasTranslation(){ return (clsTranslation.x != 0 || clsTranslation.y != 0); } void setModelPt( Model * model ); Model* getModelPt(){ return clsModelIndex; } int getModelId(){ return clsModelIndex->getModelId(); } void drawMe(){ clsModelIndex->drawFromModel( clsTranslation, clsRotation, clsMirrorX, hasMirror ); } void drawMe(int layer){ clsModelIndex->drawLayerFromModel( clsTranslation, clsRotation, clsMirrorX, hasMirror, layer ); } void drawPic(){clsModelIndex->drawFromPicture( clsTranslation, clsRotation, clsMirrorX, hasMirror ); } //void drawMe(){ clsModelIndex->drawFromPicture( clsTranslation, clsRotation, clsMirrorX, hasMirror ); } void gimmeObjects( vector <ObjectReference> & vec ); Vertex getTranslation(){ return clsTranslation; } void reflatenize(); void setMinMax(); void setTranslation(int x, int y); void setMirror(bool X); void setRotation(int x, int y){ clsRotation = Vertex(x,y); } void mirror(){ hasMirror = true; } void setHierarchy(sgtHierarchy h); sgtHierarchy getHierarchyStatus(){return clsActiveHierarchy; } virtual void draw( const float z ) const; virtual void drawEdges( const float z ) const; virtual void drawEditMode( const int z, const int x1, const int y1) const; virtual void resize( const int x1, const int y1, const int x2, const int y2) {} virtual Object* clone()const{ return new sgtComponent(*this); } virtual Vertex getMin()const { return clsMin; } virtual Vertex getMax()const { return clsMax; } virtual void setGroup( int g ){ } virtual int getGroup() const { return 0; } int getLayer(){ return clsModelIndex->getLayer(); } virtual void translate(const int x, const int y); virtual void rotate(const int x, const int y) {} virtual void mirroring(const bool inX) {} Object* contains( Vertex point );//return a pointer to this or a son virtual bool contains( const int x, const int y ) const;// return true if the object contains the vertex virtual bool inn(Vertex min, Vertex max) const;// return true if the object is all into the box virtual bool intersected(Vertex min, Vertex max) const;// return true if the object is intersected by the line virtual bool intersected(Object * obj) const{ return false; } }; #endif
30.671429
132
0.672256
9cb4f6752da49d2a82e4b14cfbe7dea1dc7d5936
4,406
c
C
stage0/editinp/readlin.c
bitwize/rscheme
1c933d3418205038df0f90e7bffdcfa2bff75951
[ "TCL" ]
21
2015-07-27T06:14:35.000Z
2022-01-27T01:50:27.000Z
stage0/editinp/readlin.c
ecraven/rscheme
f7de3a1e2367b1828135d3c613877865f57f04da
[ "TCL" ]
1
2019-08-21T12:47:11.000Z
2019-08-21T12:47:11.000Z
stage0/editinp/readlin.c
ecraven/rscheme
f7de3a1e2367b1828135d3c613877865f57f04da
[ "TCL" ]
7
2016-06-03T02:03:17.000Z
2021-05-06T15:05:39.000Z
/********************************************** THIS FILE WAS AUTOMATICALLY GENERATED, AND MAY BE AUTOMATICALLY RE-GENERATED WHEN THE COMPILER OR SOURCE CHANGES. DO NOT MODIFY THIS FILE BY HAND! RScheme Build (v0.7.3.4-b7u, 2007-05-30) **********************************************/ /******************************** Preamble ********************************/ #define _MODULE_EDITINP #define _SCM_READLIN #define _C_READLIN #include "editinp_p.h" #include <rscheme/vinsns.h> extern struct module_descr module_editinp; extern struct part_descr editinp_part_readlin; static char sccsid[] = "@(#)editinp modules/editinp/readlin.scm [244776960] (RS v0.7.3.4-b7u, 2007-05-30)"; /************************** Function Definitions **************************/ /*********************** Raw glue `input-isa-tty?' ***********************/ static char rsfn_input_isa_tty_name[] = "input-isa-tty?"; #define FUNCTION rsfn_input_isa_tty_name PROLOGUE(input_isa_tty) BEGIN_FWD(input_isa_tty) FWD_MONOTONE(input_isa_tty_0) END_FWD(input_isa_tty) #define FPLACE_CODE (1000+0) MONOTONE(input_isa_tty_0) { { REG0 = rb_to_bo(rdln_isa_tty()); RETURN1(); }} #undef FPLACE_CODE EPILOGUE(input_isa_tty) BEGIN_BACK(input_isa_tty) BACK_MONOTONE(input_isa_tty_0) END_BACK(input_isa_tty) static struct function_descr input_isa_tty_descr = { &editinp_part_readlin, JUMP_TABLE( input_isa_tty ), rsfn_input_isa_tty_name }; #undef FUNCTION /********************** Raw glue `readline-enabled?' **********************/ static char rsfn_readline_enabled_name[] = "readline-enabled?"; #define FUNCTION rsfn_readline_enabled_name PROLOGUE(readline_enabled) BEGIN_FWD(readline_enabled) FWD_MONOTONE(readline_enabled_0) END_FWD(readline_enabled) #define FPLACE_CODE (1000+0) MONOTONE(readline_enabled_0) { { REG0 = rb_to_bo(rdln_enabled()); RETURN1(); }} #undef FPLACE_CODE EPILOGUE(readline_enabled) BEGIN_BACK(readline_enabled) BACK_MONOTONE(readline_enabled_0) END_BACK(readline_enabled) static struct function_descr readline_enabled_descr = { &editinp_part_readlin, JUMP_TABLE( readline_enabled ), rsfn_readline_enabled_name }; #undef FUNCTION /******************* Raw glue `readline-add-to-history' *******************/ #define str REG0 static char rsfn_readline_add_to_history_name[] = "readline-add-to-history"; #define FUNCTION rsfn_readline_add_to_history_name PROLOGUE(readline_add_to_history) BEGIN_FWD(readline_add_to_history) FWD_MONOTONE(readline_add_to_history_0) END_FWD(readline_add_to_history) #define FPLACE_CODE (1000+0) MONOTONE(readline_add_to_history_0) { { rdln_add_history( str ); RETURN0(); }} #undef FPLACE_CODE EPILOGUE(readline_add_to_history) BEGIN_BACK(readline_add_to_history) BACK_MONOTONE(readline_add_to_history_0) END_BACK(readline_add_to_history) static struct function_descr readline_add_to_history_descr = { &editinp_part_readlin, JUMP_TABLE( readline_add_to_history ), rsfn_readline_add_to_history_name }; #undef FUNCTION #undef str /********************* Raw glue `readline-read-line' *********************/ #define completions REG0 #define prompt REG1 static char rsfn_readline_read_line_name[] = "readline-read-line"; #define FUNCTION rsfn_readline_read_line_name PROLOGUE(readline_read_line) BEGIN_FWD(readline_read_line) FWD_MONOTONE(readline_read_line_0) END_FWD(readline_read_line) #define FPLACE_CODE (1000+0) MONOTONE(readline_read_line_0) { { REG0 = read_console_line( completions, string_text(prompt) ); RETURN1(); }} #undef FPLACE_CODE EPILOGUE(readline_read_line) BEGIN_BACK(readline_read_line) BACK_MONOTONE(readline_read_line_0) END_BACK(readline_read_line) static struct function_descr readline_read_line_descr = { &editinp_part_readlin, JUMP_TABLE( readline_read_line ), rsfn_readline_read_line_name }; #undef FUNCTION #undef completions #undef prompt /******************************* Postamble *******************************/ /**************************** Part Link Table ****************************/ static struct function_descr *(part_readlin_tab[]) = { &input_isa_tty_descr, &readline_enabled_descr, &readline_add_to_history_descr, &readline_read_line_descr, NULL }; struct part_descr editinp_part_readlin = { 244776960, &module_editinp, part_readlin_tab, "readlin", 0, sccsid }; #undef _MODULE_EDITINP #undef _SCM_READLIN #undef _C_READLIN
24.752809
107
0.705856
144b10f745f6c1648936ed3e3b6e226275c351d0
375
h
C
qqtw/qqheaders7.2/QQDSResultRelationInfoModel.h
onezens/QQTweak
04b9efd1d93eba8ef8fec5cf9a20276637765777
[ "MIT" ]
5
2018-02-20T14:24:17.000Z
2020-08-06T09:31:21.000Z
qqtw/qqheaders7.2/QQDSResultRelationInfoModel.h
onezens/QQTweak
04b9efd1d93eba8ef8fec5cf9a20276637765777
[ "MIT" ]
1
2020-06-10T07:49:16.000Z
2020-06-12T02:08:35.000Z
qqtw/qqheaders7.2/QQDSResultRelationInfoModel.h
onezens/SmartQQ
04b9efd1d93eba8ef8fec5cf9a20276637765777
[ "MIT" ]
null
null
null
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "QQDynamicDefaultItemModel.h" @interface QQDSResultRelationInfoModel : QQDynamicDefaultItemModel { } - (int)age; - (int)gender; - (id)headerLineIconUrl; - (id)headerLineText; - (id)middleLineText; - (id)uinORGroupCode; @end
17.045455
83
0.701333
005ae68f00720cac93579813e34f17f31bb01080
142
h
C
src/rgb_signal.h
suda/SensorReporter
efd89334fc778f5adde91650899a0ba8f77fa5eb
[ "MIT" ]
1
2019-07-02T07:53:37.000Z
2019-07-02T07:53:37.000Z
src/rgb_signal.h
suda/SensorReporter
efd89334fc778f5adde91650899a0ba8f77fa5eb
[ "MIT" ]
null
null
null
src/rgb_signal.h
suda/SensorReporter
efd89334fc778f5adde91650899a0ba8f77fa5eb
[ "MIT" ]
null
null
null
#pragma once #define RGB_BRIGHTNESS 16 class RGBSignal { public: void begin(); void blinkOk(); void blinkError(char count); };
12.909091
32
0.669014
537fdb8ff447dc279c08f3d93094250425008222
1,892
h
C
shared/source/kernel/implicit_args.h
maleadt/compute-runtime
5d90e2ab1defd413dc9633fe237a44c2a1298185
[ "Intel", "MIT" ]
null
null
null
shared/source/kernel/implicit_args.h
maleadt/compute-runtime
5d90e2ab1defd413dc9633fe237a44c2a1298185
[ "Intel", "MIT" ]
null
null
null
shared/source/kernel/implicit_args.h
maleadt/compute-runtime
5d90e2ab1defd413dc9633fe237a44c2a1298185
[ "Intel", "MIT" ]
null
null
null
/* * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include <array> #include <cstdint> #include <optional> #include <type_traits> namespace NEO { struct KernelDescriptor; struct HardwareInfo; struct ImplicitArgs { uint8_t structSize; uint8_t structVersion; uint8_t numWorkDim; uint8_t simdWidth; uint32_t localSizeX; uint32_t localSizeY; uint32_t localSizeZ; uint64_t globalSizeX; uint64_t globalSizeY; uint64_t globalSizeZ; uint64_t printfBufferPtr; uint64_t globalOffsetX; uint64_t globalOffsetY; uint64_t globalOffsetZ; uint64_t localIdTablePtr; uint32_t groupCountX; uint32_t groupCountY; uint32_t groupCountZ; uint32_t reserved; }; static_assert((sizeof(ImplicitArgs) & 31) == 0, "Implicit args size need to be aligned to 32"); static_assert(std::is_pod<ImplicitArgs>::value); constexpr const char *implicitArgsRelocationSymbolNames[] = {"INTEL_PATCH_CROSS_THREAD_OFFSET_OFF_R0", "__INTEL_PATCH_CROSS_THREAD_OFFSET_OFF_R0"}; namespace ImplicitArgsHelper { std::array<uint8_t, 3> getDimensionOrderForLocalIds(const uint8_t *workgroupDimensionsOrder, std::optional<std::pair<bool /* localIdsGeneratedByRuntime */, uint32_t /* walkOrderForHwGenerationOfLocalIds */>> hwGenerationOfLocalIdsParams); uint32_t getGrfSize(uint32_t simd, uint32_t grfSize); uint32_t getSizeForImplicitArgsPatching(const ImplicitArgs *pImplicitArgs, const KernelDescriptor &kernelDescriptor, const HardwareInfo &hardwareInfo); void *patchImplicitArgs(void *ptrToPatch, const ImplicitArgs &implicitArgs, const KernelDescriptor &kernelDescriptor, const HardwareInfo &hardwareInfo, std::optional<std::pair<bool /* localIdsGeneratedByRuntime */, uint32_t /* walkOrderForHwGenerationOfLocalIds */>> hwGenerationOfLocalIdsParams); } // namespace ImplicitArgsHelper } // namespace NEO
35.698113
297
0.786469
1570b1ab5450ec625abbe3ed854c45206daa3c8a
3,621
c
C
Source/Arvore.c
Globson/Arvore-BST
5ca7d9427d86fa9879efa440700dc2d852b7d512
[ "MIT" ]
null
null
null
Source/Arvore.c
Globson/Arvore-BST
5ca7d9427d86fa9879efa440700dc2d852b7d512
[ "MIT" ]
null
null
null
Source/Arvore.c
Globson/Arvore-BST
5ca7d9427d86fa9879efa440700dc2d852b7d512
[ "MIT" ]
null
null
null
#include "../Header/Arvore.h" void Inicializa(Pont *No){ *No = NULL; } void Insere(Pont *No,int V){ if(*No == NULL){ *No=(Pont)malloc(sizeof(T_Arvore)); (*No)->Esq = NULL; (*No)->Dir = NULL; (*No)-> Chave = V; } else{ if (V < ((*No)->Chave)) Insere(&((*No)->Esq),V); else Insere(&((*No)->Dir),V); } } Pont MaiorDireita(Pont *No){ if((*No)->Dir != NULL){ return MaiorDireita(&(*No)->Dir);} else{ Pont Aux = *No; if ((*No)->Esq != NULL){ *No = (*No)->Esq; }else{ *No = NULL;} return Aux; } } Pont MenorEsquerda(Pont *No){ if((*No)->Esq != NULL){ return MenorEsquerda(&(*No)->Esq);} else{ Pont Aux = *No; if((*No)->Dir != NULL){ *No = (*No)->Dir;} else{ *No = NULL;} return Aux; } } int Pesquisa(Pont No,int V){ if(No != NULL){ if(No->Chave == V) return 1; else if(No->Chave < V){ return (Pesquisa(No->Dir, V));} else if(No->Chave > V){ return (Pesquisa(No->Esq, V));} } return 0; } void Remover(Pont *No,int V){ if(Pesquisa(*No,V) == 0){ printf("%d Nao encontrado na Arvore!\n",V); return; } if(V < (*No)->Chave){ Remover(&(*No)->Esq,V); }else//{ if(V > (*No)->Chave){ Remover(&(*No)->Dir,V); }else{ Pont Aux = *No; if(((*No)->Esq == NULL) && ((*No)->Dir == NULL)){ free(Aux); *No = NULL; }else{ if((*No)->Esq == NULL){ (*No) = (*No)->Dir; Aux->Dir = NULL; free(Aux); Aux = NULL; }else{ if((*No)->Dir == NULL){ (*No) =(*No)->Esq; Aux->Esq = NULL; free(Aux); Aux = NULL; }else{ Aux = MaiorDireita(&(*No)->Esq); Aux->Esq = (*No)->Esq; Aux->Dir = (*No)->Dir; (*No)->Esq = (*No)->Dir = NULL; free((*No)); *No = Aux; Aux = NULL; } } } } //} } void Ordem(Pont No){ if(No != NULL){ Ordem(No->Esq); printf("\n%d",No->Chave); Ordem(No->Dir); } } void PreOrdem(Pont No){ if(No != NULL){ printf("\n%d",No->Chave); PreOrdem(No->Esq); PreOrdem(No->Dir); } } void PosOrdem(Pont No){ if(No != NULL){ PosOrdem(No->Esq); PosOrdem(No->Dir); printf("\n%d",No->Chave); } } int ContarNos(Pont No){ if(No == NULL){ return 0; }else{ return 1 + ContarNos(No->Esq) + ContarNos(No->Dir); } } int ContarFolhas(Pont No){ if(No == NULL){ return 0; } if(No->Esq == NULL && No->Dir == NULL){ return 1; } return ContarFolhas(No->Esq) + ContarFolhas(No->Dir); } int Maior(int a,int b){ if(a >b){ return a; }else{ return b; } } int Altura(Pont No){ if((No == NULL) || (No->Esq == NULL) || (No->Dir = NULL)){ return 0; }else{ return 1 + Maior(Altura(No->Esq),Altura(No->Dir)); } } int SomaPares(Pont No){ if(No == NULL){ return 0; }else{ if(No->Chave % 2 == 0){ return No->Chave + SomaPares(No->Esq) + SomaPares(No->Dir); }else{ return SomaPares(No->Esq) + SomaPares(No->Dir); } } } int MaiorNo(Pont No){ if(No == NULL){ return 0; }else{ Pont Aux = No; int M; while(Aux->Dir != NULL){ Aux = Aux->Dir; } M=Aux->Chave; return M; } } void Primos(Pont No){ if(No != NULL){ int k=0; for(int i=1;i<=No->Chave;i++){ if(No->Chave % i == 0){ k++; } } if(k == 2){ printf("\n%d",No->Chave); } Primos(No->Esq); Primos(No->Dir); } }
18.287879
65
0.454294
afc55b0d370240193583aea25be480f69763bf7c
5,943
h
C
lib/kahypar/kahypar/partition/registries/register_initial_partitioning_algorithms.h
sjkelly/LSOracle
21688c5d542740dfc8577349fa615ee655acd92c
[ "MIT" ]
null
null
null
lib/kahypar/kahypar/partition/registries/register_initial_partitioning_algorithms.h
sjkelly/LSOracle
21688c5d542740dfc8577349fa615ee655acd92c
[ "MIT" ]
1
2021-07-26T22:09:49.000Z
2021-07-26T22:09:49.000Z
lib/kahypar/kahypar/partition/registries/register_initial_partitioning_algorithms.h
sjkelly/LSOracle
21688c5d542740dfc8577349fa615ee655acd92c
[ "MIT" ]
2
2021-07-26T14:46:51.000Z
2021-11-09T11:32:09.000Z
/******************************************************************************* * This file is part of KaHyPar. * * Copyright (C) 2018 Sebastian Schlag <sebastian.schlag@kit.edu> * * KaHyPar 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. * * KaHyPar 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 KaHyPar. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ #pragma once #include "kahypar/meta/policy_registry.h" #include "kahypar/partition/context.h" #include "kahypar/partition/initial_partitioning/initial_partitioning.h" #define REGISTER_INITIAL_PARTITIONER(id, ip) \ static meta::Registrar<InitialPartitioningFactory> register_ ## ip( \ id, \ [](Hypergraph& hypergraph, Context& context) -> IInitialPartitioner* { \ return new ip(hypergraph, context); \ }) namespace kahypar { using BFSInitialPartitionerBFS = BFSInitialPartitioner<BFSStartNodeSelectionPolicy<> >; using LPInitialPartitionerBFS_FM = LabelPropagationInitialPartitioner<BFSStartNodeSelectionPolicy<>, FMGainComputationPolicy>; using GHGInitialPartitionerBFS_FM_SEQ = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, FMGainComputationPolicy, SequentialQueueSelectionPolicy>; using GHGInitialPartitionerBFS_FM_GLO = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, FMGainComputationPolicy, GlobalQueueSelectionPolicy>; using GHGInitialPartitionerBFS_FM_RND = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, FMGainComputationPolicy, RoundRobinQueueSelectionPolicy>; using GHGInitialPartitionerBFS_MAXP_SEQ = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, MaxPinGainComputationPolicy, SequentialQueueSelectionPolicy>; using GHGInitialPartitionerBFS_MAXP_GLO = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, MaxPinGainComputationPolicy, GlobalQueueSelectionPolicy>; using GHGInitialPartitionerBFS_MAXP_RND = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, MaxPinGainComputationPolicy, RoundRobinQueueSelectionPolicy>; using GHGInitialPartitionerBFS_MAXN_SEQ = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, MaxNetGainComputationPolicy, SequentialQueueSelectionPolicy>; using GHGInitialPartitionerBFS_MAXN_GLO = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, MaxNetGainComputationPolicy, GlobalQueueSelectionPolicy>; using GHGInitialPartitionerBFS_MAXN_RND = GreedyHypergraphGrowingInitialPartitioner<BFSStartNodeSelectionPolicy<>, MaxNetGainComputationPolicy, RoundRobinQueueSelectionPolicy>; REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::random, RandomInitialPartitioner); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::bfs, BFSInitialPartitionerBFS); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::lp, LPInitialPartitionerBFS_FM); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::bin_packing, BinPackingInitialPartitioner); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_sequential, GHGInitialPartitionerBFS_FM_SEQ); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_global, GHGInitialPartitionerBFS_FM_GLO); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_round, GHGInitialPartitionerBFS_FM_RND); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_sequential_maxpin, GHGInitialPartitionerBFS_MAXP_SEQ); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_global_maxpin, GHGInitialPartitionerBFS_MAXP_GLO); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_round_maxpin, GHGInitialPartitionerBFS_MAXP_RND); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_sequential_maxnet, GHGInitialPartitionerBFS_MAXN_SEQ); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_global_maxnet, GHGInitialPartitionerBFS_MAXN_GLO); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::greedy_round_maxnet, GHGInitialPartitionerBFS_MAXN_RND); REGISTER_INITIAL_PARTITIONER(InitialPartitionerAlgorithm::pool, PoolInitialPartitioner); } // namespace kahypar
58.841584
90
0.656739
638473f9b78ddde6a3604d195bb357e6f5cec6e8
241
h
C
DemoInstagram/Classes/Controller/Geo/DIGeoViewController.h
TolyaAfanasev/demoinstagram
0e323401cad398bf3847ed441e5d989b484e2191
[ "MIT" ]
null
null
null
DemoInstagram/Classes/Controller/Geo/DIGeoViewController.h
TolyaAfanasev/demoinstagram
0e323401cad398bf3847ed441e5d989b484e2191
[ "MIT" ]
null
null
null
DemoInstagram/Classes/Controller/Geo/DIGeoViewController.h
TolyaAfanasev/demoinstagram
0e323401cad398bf3847ed441e5d989b484e2191
[ "MIT" ]
null
null
null
// // DIGeoViewController.h // DemoInstagram // // Created by Anatoliy Afanasev on 1/23/16. // Copyright © 2016 Anatoliy Afanasev. All rights reserved. // #import <UIKit/UIKit.h> @interface DIGeoViewController : UIViewController @end
17.214286
60
0.726141
17add1f67b619d07a7a83306a2318a8cfb44c2b5
4,696
h
C
src/atlas/mesh/detail/MeshImpl.h
mlange05/atlas
d8198435a9e39fbf67bfc467fe734203414af608
[ "Apache-2.0" ]
null
null
null
src/atlas/mesh/detail/MeshImpl.h
mlange05/atlas
d8198435a9e39fbf67bfc467fe734203414af608
[ "Apache-2.0" ]
null
null
null
src/atlas/mesh/detail/MeshImpl.h
mlange05/atlas
d8198435a9e39fbf67bfc467fe734203414af608
[ "Apache-2.0" ]
null
null
null
/* * (C) Copyright 2013 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an intergovernmental organisation * nor does it submit to any jurisdiction. */ #pragma once #include <iosfwd> #include "eckit/memory/Owned.h" #include "eckit/memory/SharedPtr.h" #include "atlas/mesh/PartitionPolygon.h" #include "atlas/mesh/detail/PartitionGraph.h" #include "atlas/projection/Projection.h" #include "atlas/util/Metadata.h" //---------------------------------------------------------------------------------------------------------------------- namespace atlas { class Grid; class Mesh; namespace mesh { class PartitionPolygon; class Nodes; class HybridElements; typedef HybridElements Edges; typedef HybridElements Cells; } // namespace mesh } // namespace atlas //---------------------------------------------------------------------------------------------------------------------- namespace atlas { namespace mesh { namespace detail { //---------------------------------------------------------------------------------------------------------------------- class MeshObserver; class MeshImpl : public eckit::Owned { public: // methods /// @brief Construct a empty MeshImpl explicit MeshImpl(); /// @brief Construct a mesh from a Stream (serialization) explicit MeshImpl( eckit::Stream& ); /// @brief Serialization to Stream void encode( eckit::Stream& s ) const; /// Destructor /// @note No need to be virtual since this is not a base class. ~MeshImpl(); util::Metadata& metadata() { return metadata_; } const util::Metadata& metadata() const { return metadata_; } void print( std::ostream& ) const; const Nodes& nodes() const { return *nodes_; } Nodes& nodes() { return *nodes_; } const Cells& cells() const { return *cells_; } Cells& cells() { return *cells_; } const Edges& edges() const { return *edges_; } Edges& edges() { return *edges_; } const HybridElements& facets() const { return *facets_; } HybridElements& facets() { return *facets_; } const HybridElements& ridges() const { return *ridges_; } HybridElements& ridges() { return *ridges_; } const HybridElements& peaks() const { return *peaks_; } HybridElements& peaks() { return *peaks_; } bool generated() const; /// @brief Return the memory footprint of the mesh size_t footprint() const; idx_t partition() const; idx_t nb_partitions() const; void cloneToDevice() const; void cloneFromDevice() const; void syncHostDevice() const; const Projection& projection() const { return projection_; } const PartitionGraph& partitionGraph() const; PartitionGraph::Neighbours nearestNeighbourPartitions() const; const PartitionPolygon& polygon( idx_t halo = 0 ) const; const Grid& grid() const { return *grid_; } void attachObserver( MeshObserver& ) const; void detachObserver( MeshObserver& ) const; private: // methods friend class ::atlas::Mesh; friend std::ostream& operator<<( std::ostream& s, const MeshImpl& p ) { p.print( s ); return s; } void createElements(); void setProjection( const Projection& ); void setGrid( const Grid& ); private: // members util::Metadata metadata_; eckit::SharedPtr<Nodes> nodes_; // dimensionality : 2D | 3D // -------- eckit::SharedPtr<HybridElements> cells_; // 2D | 3D eckit::SharedPtr<HybridElements> facets_; // 1D | 2D eckit::SharedPtr<HybridElements> ridges_; // 0D | 1D eckit::SharedPtr<HybridElements> peaks_; // NA | 0D eckit::SharedPtr<HybridElements> edges_; // alias to facets of 2D mesh, ridges of 3D mesh idx_t dimensionality_; Projection projection_; std::unique_ptr<Grid> grid_; mutable eckit::SharedPtr<PartitionGraph> partition_graph_; mutable std::vector<eckit::SharedPtr<PartitionPolygon>> polygons_; mutable std::vector<MeshObserver*> mesh_observers_; }; //---------------------------------------------------------------------------------------------------------------------- class MeshObserver { public: virtual void onMeshDestruction( MeshImpl& ) = 0; }; //---------------------------------------------------------------------------------------------------------------------- } // namespace detail } // namespace mesh } // namespace atlas
28.809816
120
0.583901
8b1bbaf0cdd66efafb18224d349be36f41d7df6d
2,664
h
C
Source/Foundation/bsfUtility/Math/BsRect3.h
Milerius/bsf
8715b344d6b7893f64fd5dccaaf10603a27c7a15
[ "MIT" ]
3
2020-04-14T06:23:18.000Z
2020-06-02T11:07:08.000Z
Source/Foundation/bsfUtility/Math/BsRect3.h
cwmagnus/bsf
c735aead580e86e69ef228f3b8d99b474b72f2c7
[ "MIT" ]
null
null
null
Source/Foundation/bsfUtility/Math/BsRect3.h
cwmagnus/bsf
c735aead580e86e69ef228f3b8d99b474b72f2c7
[ "MIT" ]
4
2019-06-23T09:55:47.000Z
2019-07-08T17:23:05.000Z
//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// #pragma once #include "Prerequisites/BsPrerequisitesUtil.h" #include "Math/BsVector3.h" namespace bs { /** @addtogroup Math * @{ */ /** * Represents a rectangle in three dimensional space. It is represented by two axes that extend from the specified * origin. Axes should be perpendicular to each other and they extend in both positive and negative directions from the * origin by the amount specified by extents. */ class BS_UTILITY_EXPORT Rect3 { public: Rect3() = default; Rect3(const Vector3& center, const std::array<Vector3, 2>& axes, const std::array<float, 2>& extents) :mCenter(center), mAxisHorz(axes[0]), mAxisVert(axes[1]), mExtentHorz(extents[0]), mExtentVert(extents[1]) { } /** * Find the nearest points of the provided ray and the rectangle. * * @return A set of nearest points and nearest distance. First value in the set corresponds to nearest point on * the ray, and the second to the nearest point on the rectangle. They are same in the case of intersection. * When ray is parallel to the rectangle there are two sets of nearest points but only one the set nearest * to the ray origin is returned. */ std::pair<std::array<Vector3, 2>, float> getNearestPoint(const Ray& ray) const; /** * Find the nearest point on the rectangle to the provided point. * * @return Nearest point and distance to nearest point. */ std::pair<Vector3, float> getNearestPoint(const Vector3& point) const; /** * Ray/rectangle intersection. * * @return Boolean result and distance to intersection point. */ std::pair<bool, float> intersects(const Ray& ray) const; /** Gets the origin of the rectangle. */ const Vector3& getCenter() const { return mCenter; } /** Returns the rectangle's horizontal axis. */ const Vector3& getAxisHorz() const { return mAxisHorz; } /** Returns the rectangle's vertical axis. */ const Vector3& getAxisVert() const { return mAxisVert; } /** Gets the extent of the rectangle along its horizontal axis. */ const float& getExtentHorz() const { return mExtentHorz; } /** Gets the extent of the rectangle along its vertical axis. */ const float& getExtentVertical() const { return mExtentVert; } private: Vector3 mCenter{BsZero}; Vector3 mAxisHorz{BsZero}; Vector3 mAxisVert{BsZero}; float mExtentHorz = 0.0f; float mExtentVert = 0.0f; }; /** @} */ }
33.721519
124
0.676426
a031538afcc803d75123f183e972b1ddd815617d
9,081
h
C
src/nnet2/get-feature-transform.h
spxia/kaldi
e03474ae7b5f4eacad505859bb2a5c4e6ccde7ca
[ "Apache-2.0" ]
null
null
null
src/nnet2/get-feature-transform.h
spxia/kaldi
e03474ae7b5f4eacad505859bb2a5c4e6ccde7ca
[ "Apache-2.0" ]
null
null
null
src/nnet2/get-feature-transform.h
spxia/kaldi
e03474ae7b5f4eacad505859bb2a5c4e6ccde7ca
[ "Apache-2.0" ]
null
null
null
// nnet2/get-feature-transform.h // Copyright 2009-2011 Jan Silovsky // 2013 Johns Hopkins University (author: Daniel Povey) // See ../../COPYING for clarification regarding multiple authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, // MERCHANTABLITY OR NON-INFRINGEMENT. // See the Apache 2 License for the specific language governing permissions and // limitations under the License. #ifndef KALDI_NNET2_GET_FEATURE_TRANSFORM_H_ #define KALDI_NNET2_GET_FEATURE_TRANSFORM_H_ #include "base/kaldi-common.h" #include "util/common-utils.h" #include "matrix/matrix-lib.h" #include "transform/lda-estimate.h" namespace kaldi { /** @file This file is modified from transform/lda-estimate.h It contains a class intended to be used in preconditioning data for neural network training. See the documentation for class FeatureTransformEstimate for more details. */ struct FeatureTransformEstimateOptions { bool remove_offset; int32 dim; BaseFloat within_class_factor; BaseFloat max_singular_value; FeatureTransformEstimateOptions(): remove_offset(true), dim(-1), within_class_factor(0.001), max_singular_value(5.0) { } void Register(OptionsItf *opts) { opts->Register("remove-offset", &remove_offset, "If true, output an affine " "transform that makes the projected data mean equal to zero."); opts->Register("dim", &dim, "Dimension to project to with LDA"); opts->Register("within-class-factor", &within_class_factor, "If 1.0, do " "conventional LDA where the within-class variance will be " "unit in the projected space. May be set to less than 1.0, " "which scales the features to have less variance, particularly " "for dimensions where between-class variance is small. "); opts->Register("max-singular-value", &max_singular_value, "If >0, maximum " "allowed singular value of final transform (they are floored " "to this)"); } }; /** Class for computing a feature transform used for preconditioning of the training data in neural-networks. By preconditioning here, all we really mean is an affine transform of the input data-- say if we set up the classification as going from vectors x_i to labels y_i, then this would be a linear transform on X, so we replace x_i with x'_i = A x_i + b. The statistics we use to obtain this transform are the within-class and between class variance statistics, and the global data mean, that we would use to estimate LDA. When designing this, we had a few principles in mind: - We want to remove the global mean of the input features (this is well established, I think there is a paper by LeCun explaining why this is a good thing). - We would like the transform to make the training process roughly invariant to linear transformations of the input features, meaning that whatever linear transformation you apply prior to this transform, it should 'undo' it. - We want directions in which there is a lot of between-class variance to be given a higher variance than directions that have mostly within-class variance-- it has been our experience that these 'nuisance directions' will interfere with the training if they are given too large a scaling. It is essential to our method that the number of classes is higher than the dimension of the input feature space, which is normal for speech recognition tasks (~5000 > ~250). Basically our method is as follows: - First subtract the mean. - Get the within-class and between-class stats, as for LDA. - Normalize the space as for LDA, so that the within-class covariance matrix is unit and the between-class covariance matrix is diagonalized - At this stage, if the user asked for dimension reduction then reduce the dimension by taking out dimensions with least between-class variance [note: the current scripts do not do this by default] - Apply a transform that reduces the variance of dimensions with low between-class variance, as we'll describe below. - Finally, do an SVD of the resulting transform, A = U S V^T, apply a maximum to the diagonal elements of the matrix S (e.g. 5.0), and reconstruct A' = U S' V^T; this is the final transform. The point of this stage is to stop the transform from 'blowing up' any dimensions of the space excessively; this stage was introduced in response to a problem we encountered at one point, and I think normally not very many dimensions of S end up getting floored. We need to explain the step that applies the dimension-specific scaling, which we described above as, "Apply a transform that reduces the variance of dimensions with low between-class variance". For a particular dimension, let the between-class diagonal covariance element be \f$\lambda_i\f$, and the within-class diagonal covariance is 1 at this point (since we have normalized the within-class covariance to unity); hence, the total variance is \f$\lambda_i + 1\f$. Below, "within-class-factor" is a constant that we set by default to 0.001. We scale the i'th dimension of the features by: \f$ sqrt( (within-class-factor + \lambda_i) / (1 + \lambda_i) ) \f$ If \f$\lambda_i >> 1\f$, this scaling factor approaches 1 (we don't need to scale up dimensions with high between-class variance as they already naturally have a higher variance than other dimensions. As \f$\lambda_i\f$ becomes small, this scaling factor approaches sqrt(within-class-factor), so dimensions with very small between-class variance get assigned a small variance equal to within-class-factor, and for dimensions with intermediate between-class variance, they end up with a variance roughly equal to \f$\lambda_i\f$: consider that the variance was originally \f$(1 +c\lambda_i)\f$, so by scaling the features by approximately \f$\sqrt((\lambda_i) /(1 + \lambda_i))\f$, the variance becomes approximately \f$\lambda_i\f$ [this iscclear after noting that the variance gets scaled by the square of thecfeature scale]. */ class FeatureTransformEstimate: public LdaEstimate { public: /// Estimates the LDA transform matrix m. If Mfull != NULL, it also outputs /// the full matrix (without dimensionality reduction), which is useful for /// some purposes. If opts.remove_offset == true, it will output both matrices /// with an extra column which corresponds to mean-offset removal (the matrix /// should be multiplied by the feature with a 1 appended to give the correct /// result, as with other Kaldi transforms.) /// "within_cholesky" is a pointer to an SpMatrix that, if non-NULL, will /// be set to the Cholesky factor of the within-class covariance matrix. /// This is used for perturbing features. void Estimate(const FeatureTransformEstimateOptions &opts, Matrix<BaseFloat> *M, TpMatrix<BaseFloat> *within_cholesky) const; protected: static void EstimateInternal(const FeatureTransformEstimateOptions &opts, const SpMatrix<double> &total_covar, const SpMatrix<double> &between_covar, const Vector<double> &mean, Matrix<BaseFloat> *M, TpMatrix<BaseFloat> *C); }; class FeatureTransformEstimateMulti: public FeatureTransformEstimate { public: /// This is as FeatureTransformEstimate, but for use in /// nnet-get-feature-transform-multi.cc, see the usage message /// of that program for a description of what it does. void Estimate(const FeatureTransformEstimateOptions &opts, const std::vector<std::vector<int32> > &indexes, Matrix<BaseFloat> *M) const; private: void EstimateTransformPart(const FeatureTransformEstimateOptions &opts, const std::vector<int32> &indexes, const SpMatrix<double> &total_covar, const SpMatrix<double> &between_covar, const Vector<double> &mean, Matrix<BaseFloat> *M) const; }; } // End namespace kaldi #endif // KALDI_NNET2_GET_FEATURE_TRANSFORM_H_
49.895604
92
0.684947
e21868f5e528b1c4b231dd6f9b3f25bd4f60723c
2,432
h
C
usr/libexec/seld/NFRemoteAdminSession.h
zhangkn/iOS14Header
4323e9459ed6f6f5504ecbea2710bfd6c3d7c946
[ "MIT" ]
1
2020-11-04T15:43:01.000Z
2020-11-04T15:43:01.000Z
usr/libexec/seld/NFRemoteAdminSession.h
zhangkn/iOS14Header
4323e9459ed6f6f5504ecbea2710bfd6c3d7c946
[ "MIT" ]
null
null
null
usr/libexec/seld/NFRemoteAdminSession.h
zhangkn/iOS14Header
4323e9459ed6f6f5504ecbea2710bfd6c3d7c946
[ "MIT" ]
null
null
null
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> #import "NFAdminSession-Protocol.h" @class NFRemoteAdminState, NFSecureElementManagerSession, NSMutableDictionary, NSString, NSURL; @protocol NFRemoteAdminConnection, NFRemoteAdminSessionDelegate; @interface NFRemoteAdminSession : NSObject <NFAdminSession> { id <NFRemoteAdminConnection> _connection; // 8 = 0x8 NFSecureElementManagerSession *_seSession; // 16 = 0x10 _Bool _allocateSESession; // 24 = 0x18 NSMutableDictionary *_endMetric; // 32 = 0x20 unsigned long long _returnCode; // 40 = 0x28 long long _abort; // 48 = 0x30 id <NFRemoteAdminSessionDelegate> _delegate; // 56 = 0x38 NFRemoteAdminState *_serverState; // 64 = 0x40 NSURL *_serverURL; // 72 = 0x48 NSString *_targetSEID; // 80 = 0x50 } - (void).cxx_destruct; // IMP=0x000000010002aac8 @property(retain, nonatomic) NSString *targetSEID; // @synthesize targetSEID=_targetSEID; @property(retain, nonatomic) NSURL *serverURL; // @synthesize serverURL=_serverURL; @property(retain, nonatomic) NFRemoteAdminState *serverState; // @synthesize serverState=_serverState; @property(nonatomic) id <NFRemoteAdminSessionDelegate> delegate; // @synthesize delegate=_delegate; - (unsigned long long)run; // IMP=0x000000010002a2a0 - (unsigned int)_deactiveAllAppletsOnSE:(id)arg1; // IMP=0x000000010002a0b0 - (_Bool)_openSessionWithTimeout:(unsigned long long)arg1; // IMP=0x0000000100029a34 - (_Bool)performRequest; // IMP=0x0000000100027f0c - (void)postAWDEndMetric; // IMP=0x0000000100027e44 - (void)postAWDStartMetric:(id)arg1; // IMP=0x0000000100027c08 - (void)processAppletChanged:(id)arg1 regionIdentifier:(id)arg2; // IMP=0x0000000100027a34 - (void)processNotification:(id)arg1 executionStatus:(_Bool)arg2 regionIdentifier:(id)arg3; // IMP=0x00000001000275d8 - (void)_preprocessNotification:(id)arg1; // IMP=0x000000010002689c @property(retain, nonatomic) NFSecureElementManagerSession *secureElementManagerSession; - (void)abort:(long long)arg1; // IMP=0x0000000100026718 - (id)init; // IMP=0x00000001000266ac // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
45.037037
120
0.769737
8bad7f633e08fd590c656948fdc7ebb368b2ceb8
2,050
c
C
cmake_targets/basic_simulator/ue/CMakeFiles/RRC_Rel14/SupportedBandCombinationAdd-v1270.c
kikikos/openairinterface5g
54d541c22cdfcb774774089291c93e4e79294a1d
[ "Apache-2.0" ]
null
null
null
cmake_targets/basic_simulator/ue/CMakeFiles/RRC_Rel14/SupportedBandCombinationAdd-v1270.c
kikikos/openairinterface5g
54d541c22cdfcb774774089291c93e4e79294a1d
[ "Apache-2.0" ]
null
null
null
cmake_targets/basic_simulator/ue/CMakeFiles/RRC_Rel14/SupportedBandCombinationAdd-v1270.c
kikikos/openairinterface5g
54d541c22cdfcb774774089291c93e4e79294a1d
[ "Apache-2.0" ]
1
2020-02-10T14:17:39.000Z
2020-02-10T14:17:39.000Z
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "EUTRA-RRC-Definitions" * found in "/home/user/openairinterface5g/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1" * `asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D /home/user/openairinterface5g/cmake_targets/basic_simulator/ue/CMakeFiles/RRC_Rel14` */ #include "SupportedBandCombinationAdd-v1270.h" asn_per_constraints_t asn_PER_type_SupportedBandCombinationAdd_v1270_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_SupportedBandCombinationAdd_v1270_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_BandCombinationParameters_v1270, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_SupportedBandCombinationAdd_v1270_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_SupportedBandCombinationAdd_v1270_specs_1 = { sizeof(struct SupportedBandCombinationAdd_v1270), offsetof(struct SupportedBandCombinationAdd_v1270, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_SupportedBandCombinationAdd_v1270 = { "SupportedBandCombinationAdd-v1270", "SupportedBandCombinationAdd-v1270", &asn_OP_SEQUENCE_OF, asn_DEF_SupportedBandCombinationAdd_v1270_tags_1, sizeof(asn_DEF_SupportedBandCombinationAdd_v1270_tags_1) /sizeof(asn_DEF_SupportedBandCombinationAdd_v1270_tags_1[0]), /* 1 */ asn_DEF_SupportedBandCombinationAdd_v1270_tags_1, /* Same as above */ sizeof(asn_DEF_SupportedBandCombinationAdd_v1270_tags_1) /sizeof(asn_DEF_SupportedBandCombinationAdd_v1270_tags_1[0]), /* 1 */ { 0, &asn_PER_type_SupportedBandCombinationAdd_v1270_constr_1, SEQUENCE_OF_constraint }, asn_MBR_SupportedBandCombinationAdd_v1270_1, 1, /* Single element */ &asn_SPC_SupportedBandCombinationAdd_v1270_specs_1 /* Additional specs */ };
41
161
0.783415
acd52237ec78d7d87d4926621c7fd215a54bcd4c
1,011
h
C
Interfaces/MediaInfoInterface.h
elytraflyer/Conaud
4a0cb4db1099430cde9eab7d1a27750b19a2df2a
[ "MIT" ]
1
2022-03-14T06:18:36.000Z
2022-03-14T06:18:36.000Z
Interfaces/MediaInfoInterface.h
elytraflyer/Conaud
4a0cb4db1099430cde9eab7d1a27750b19a2df2a
[ "MIT" ]
null
null
null
Interfaces/MediaInfoInterface.h
elytraflyer/Conaud
4a0cb4db1099430cde9eab7d1a27750b19a2df2a
[ "MIT" ]
null
null
null
#pragma once #include "MediaInfoDLL.h" #define MediaInfoNameSpace MediaInfoDLL #include <string> using namespace MediaInfoNameSpace; using namespace std; namespace MII{ class MAINFO{ private: MediaInfo MI; public: MAINFO(string Path){ MI.Open(__T(Path)); } ~MAINFO(){ MI.Close(); } inline string GetAudioSize(){ MI.Option(__T("Inform"),__T("General;%FileSize%")); return MI.Inform(); } inline string GetAudioFormat(){ MI.Option(__T("Inform"),__T("Audio;%Format%")); return MI.Inform(); } inline string GetAudioChannels(){ MI.Option(__T("Inform"),__T("Audio;%Channels%")); return MI.Inform(); } inline string GetAudioBitRate(){ MI.Option(__T("Inform"),__T("Audio;%BitRate/String%")); return MI.Inform(); } }; }
22.466667
68
0.509397
d9cdb56ca5cea372e8cec1d8e268a42c93bc0abf
1,160
h
C
Piece.h
khayriddine/jeux_echecv2
fbfaa6cb4f5c484554dc42352d10d186986f3b34
[ "FTL" ]
null
null
null
Piece.h
khayriddine/jeux_echecv2
fbfaa6cb4f5c484554dc42352d10d186986f3b34
[ "FTL" ]
null
null
null
Piece.h
khayriddine/jeux_echecv2
fbfaa6cb4f5c484554dc42352d10d186986f3b34
[ "FTL" ]
null
null
null
#ifndef PIECE_H #define PIECE_H //#include "Position.h" #include "Deplacement.h" //#include "Echiquier.h" #include<iostream> #include<string> #include <cmath> #include <SDL/SDL.h> #include <SDL/SDL_image.h> using namespace std ; class Piece { public: Piece(); ~Piece(); Piece(string n, string c, int v, Position p ); Piece(Position p,string c); string Getnom() { return nom; } SDL_Surface* Getsymbole() { return symbole; } string Getcouleur() { return couleur; } int Getvaleur() { return valeur; } Position Getpos() { return pos; } void Setpos(Position val) { pos = val; } virtual bool verifer_deplacement(Position p)=0; virtual bool verifer_chemain(Position p,Piece* lp[],int n,Piece* lp_adv[],int n_adv) = 0; virtual int liste_deplacement_possible(Deplacement *liste_dep,Piece* lp[],int n,Piece* lp_adv[],int n_adv) =0; void deplacer(Position p); void afficher(); protected: string nom; string couleur; int valeur; Position pos; SDL_Surface* symbole; }; #endif // PIECE_H
17.846154
115
0.614655
3daa657e558a64c7907b64224bb8821c277e1b62
7,756
h
C
src/viewer/common.h
benardp/contours_viewer
16eb17c916272d34e73039f0969e46abc0ec30ca
[ "BSD-3-Clause" ]
8
2019-05-17T15:33:13.000Z
2021-09-13T10:54:27.000Z
src/viewer/common.h
benardp/contours_viewer
16eb17c916272d34e73039f0969e46abc0ec30ca
[ "BSD-3-Clause" ]
null
null
null
src/viewer/common.h
benardp/contours_viewer
16eb17c916272d34e73039f0969e46abc0ec30ca
[ "BSD-3-Clause" ]
4
2021-01-19T11:28:42.000Z
2021-12-24T04:43:15.000Z
#ifndef COMMON_H #define COMMON_H #include <algorithm> #include <atomic> #include <chrono> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <queue> #include <set> #include <string> #include <vector> #include <Eigen/Core> #include <Eigen/Geometry> #define GRAIN_SIZE 1024 // #define SINGLE_PRECISION /* Application precision -- can be set to single or double precision */ #if defined(SINGLE_PRECISION) typedef float real_t; const float EPSILON = 1e-6; #else typedef double real_t; const float EPSILON = 1e-8; #endif /* Useful Eigen typedefs based on the current precision */ typedef Eigen::Matrix<int32_t, 2, 1> Vector2i; typedef Eigen::Matrix<int32_t, 3, 1> Vector3i; typedef Eigen::Matrix<int32_t, 4, 1> Vector4i; typedef Eigen::Matrix<uint32_t, 2, 1> Vector2u; typedef Eigen::Matrix<uint32_t, 3, 1> Vector3u; typedef Eigen::Matrix<uint32_t, 4, 1> Vector4u; typedef Eigen::Matrix<uint8_t, 4, 1> Vector4u8; typedef Eigen::Matrix<real_t, 2, 1> Vector2f; typedef Eigen::Matrix<real_t, 3, 1> Vector3f; typedef Eigen::Matrix<real_t, 4, 1> Vector4f; typedef Eigen::Matrix<int32_t, Eigen::Dynamic, 1> VectorXi; typedef Eigen::Matrix<uint32_t, Eigen::Dynamic, 1> VectorXu; typedef Eigen::Matrix<uint8_t, Eigen::Dynamic, 1> VectorXu8; typedef Eigen::Matrix<bool, Eigen::Dynamic, 1> VectorXb; typedef Eigen::Matrix<real_t, Eigen::Dynamic, 1> VectorXf; typedef Eigen::Matrix<int32_t, Eigen::Dynamic, Eigen::Dynamic> MatrixXi; typedef Eigen::Matrix<uint32_t, Eigen::Dynamic, Eigen::Dynamic> MatrixXu; typedef Eigen::Matrix<uint8_t, Eigen::Dynamic, Eigen::Dynamic> MatrixXu8; typedef Eigen::Matrix<real_t, Eigen::Dynamic, Eigen::Dynamic> MatrixXf; typedef Eigen::Matrix<real_t, 3, Eigen::Dynamic> Matrix3Xf; typedef Eigen::Matrix<real_t, 2, Eigen::Dynamic> Matrix2Xf; typedef Eigen::Matrix<real_t, 2, 2> Matrix2f; typedef Eigen::Matrix<real_t, 3, 3> Matrix3f; typedef Eigen::Matrix<real_t, 4, 4> Matrix4f; typedef Eigen::Quaternion<real_t> Quaternionf; typedef Eigen::Transform<real_t, 3, Eigen::Affine> Affine3f; typedef Eigen::Translation<real_t, 3> Translation3f; typedef Eigen::AngleAxis<real_t> AngleAxisf; typedef Eigen::Map<MatrixXu> MapXu; typedef Eigen::Map<MatrixXf> MapXf; using std::cout; using std::cerr; using std::endl; typedef enum { FRONT, BACK, CONTOUR, UNDEFINED } FacingType; typedef enum { MESH_CONTOUR, INTERPOLATED_CONTOUR } ContourMode; typedef enum { VISIBLE, INVISIBLE, VISIBLE_AND_INVISIBLE } VisibilityMode; typedef unsigned short nature_t; namespace VertexNature { static const nature_t S_VERTEX = 0; static const nature_t INTERSECTION_3D = (1 << 1); static const nature_t INTERSECTION_2D = (1 << 2); static const nature_t BOUNDARY_CURTAIN_FOLD = (1 << 3); static const nature_t CONTOUR_CURTAIN_FOLD = (1 << 4); static const nature_t BIFURCATION = (1 << 5); static const nature_t CURTAIN_FOLD = BOUNDARY_CURTAIN_FOLD | CONTOUR_CURTAIN_FOLD; static const nature_t RAY_INTERSECTION = (1 << 6); } // namespace VertexNature namespace EdgeNature { static const nature_t NO_FEATURE = 0; static const nature_t SHARP_CONTOUR = (1 << 0); static const nature_t SMOOTH_CONTOUR = (1 << 1); static const nature_t CONTOUR = SHARP_CONTOUR | SMOOTH_CONTOUR; static const nature_t BOUNDARY = (1 << 2); static const nature_t SURFACE_INTERSECTION = (1 << 3); static const nature_t IMAGE_INTERSECTION = (1 << 4); } // namespace EdgeNature typedef Vector4f Color; const Color frontFaceColor = Color(254.0/255.0, 242.0/255.0, 192.0/255.0, 1.0); const Color backFaceColor = Color(139.0/255.0, 191.0/255.0, 230.0/255.0, 1.0); const Color undefinedFaceColor = Color(250.0/255.0, 50.0/255.0, 0.0, 1.0); const Color inconsistentFaceColor = Color(0.8, 0.1, 0.8, 1.0); const Color wireframeColor = Color(0.3, 0.3, 0.3, 1.0); const Color normalsColor = Color(0.7, 0.7, 0., 1.0); const Color contourColor = Color(0.6, 0.0, 0., 1.0); const Color hiddenContourColor = Color(0.8, 0.8, 0.8, 1.0); const Color boundariesColor = Color(0.1, 0.0, 0.8, 1.0); const Color surfIntersectionsColor = Color(0.0, 0.5, 0.1, 1.0); const Color intersection2DColor = Color(0.0, 1.0, 0.0, 1.0); const Color intersection3DColor = Color(0.0, 1.0, 1.0, 1.0); const Color curtainFoldColor = Color(1.0, 0.6, 0.0, 1.0); const Color bifurcationColor = Color(1.0, 0.0, 0.0, 1.0); // Paul Green-Armytage "A Colour Alphabet and the Limits of Colour Coding." // (2010) const Color alphabetColors[26] = { Color(240.0/255.0, 163.0/255.0, 255.0/255.0, 1.0), Color(0.0/255.0, 117.0/255.0, 220.0/255.0, 1.0), Color(153.0/255.0, 63.0/255.0, 0.0/255.0, 1.0), Color(76.0/255.0, 0.0/255.0, 92.0/255.0, 1.0), Color(43.0/255.0, 206.0/255.0, 72.0/255.0, 1.0), Color(255.0/255.0, 204.0/255.0, 153.0/255.0, 1.0), Color(128.0/255.0, 128.0/255.0, 128.0/255.0, 1.0), Color(148.0/255.0, 255.0/255.0, 181.0/255.0, 1.0), Color(143.0/255.0, 124.0/255.0, 0.0/255.0, 1.0), Color(157.0/255.0, 204.0/255.0, 0.0/255.0, 1.0), Color(194.0/255.0, 0.0/255.0, 136.0/255.0, 1.0), Color(0.0/255.0, 51.0/255.0, 128.0/255.0, 1.0), Color(25.0/255.0, 25.0/255.0, 25.0/255.0, 1.0), Color(0.0/255.0, 92.0/255.0, 49.0/255.0, 1.0), Color(153.0/255.0, 0.0/255.0, 0.0/255.0, 1.0), Color(255.0/255.0, 255.0/255.0, 128.0/255.0, 1.0), Color(255.0/255.0, 164.0/255.0, 5.0/255.0, 1.0), Color(255.0/255.0, 168.0/255.0, 187.0/255.0, 1.0), Color(224.0/255.0, 255.0/255.0, 102.0/255.0, 1.0), Color(116.0/255.0, 10.0/255.0, 255.0/255.0, 1.0), Color(66.0/255.0, 102.0/255.0, 0.0/255.0, 1.0), Color(255.0/255.0, 0.0/255.0, 16.0/255.0, 1.0), Color(94.0/255.0, 241.0/255.0, 242.0/255.0, 1.0), Color(0.0/255.0, 153.0/255.0, 143.0/255.0, 1.0), Color(255.0/255.0, 255.0/255.0, 0.0/255.0, 1.0), Color(255.0/255.0, 80.0/255.0, 5.0/255.0, 1.0)}; inline Vector3f project(const Vector3f &obj, const Matrix4f &model, const Matrix4f &proj, const Vector2i &viewportSize) { Vector4f tmp; tmp << obj, 1; tmp = model * tmp; tmp = proj * tmp; tmp = tmp.array() / tmp(3); tmp = tmp.array() * 0.5f + 0.5f; tmp(0) = tmp(0) * viewportSize.x(); tmp(1) = tmp(1) * viewportSize.y(); return tmp.head(3); } inline Vector3f unproject(const Vector3f &win, const Matrix4f &model, const Matrix4f &proj, const Vector2i &viewportSize) { Matrix4f Inverse = (proj * model).inverse(); Vector4f tmp; tmp << win, 1; tmp(0) = tmp(0) / viewportSize.x(); tmp(1) = tmp(1) / viewportSize.y(); tmp = tmp.array() * 2.0f - 1.0f; Vector4f obj = Inverse * tmp; obj /= obj(3); return obj.head(3); } inline void projectToViewport(const Matrix3Xf &chain, std::vector<Vector2f> &polyline, const Matrix4f &projectionMatrix, const Matrix4f &viewMatrix, const Vector2i &viewport) { polyline.reserve(polyline.size() + chain.cols()); for (int j = 0; j < chain.cols(); ++j) { Vector3f pos2D = project(chain.col(j), viewMatrix, projectionMatrix, viewport); polyline.push_back(pos2D.head<2>()); } } template <typename T> void delete_pointed_to(T *const ptr) { delete ptr; } inline std::string memString(size_t size, bool precise = false) { double value = (double)size; const char *suffixes[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB"}; int suffix = 0; while (suffix < 5 && value > 1024.0f) { value /= 1024.0f; ++suffix; } std::ostringstream os; os << std::setprecision(suffix == 0 ? 0 : (precise ? 4 : 1)) << std::fixed << value << " " << suffixes[suffix]; return os.str(); } #endif
39.370558
105
0.659103
ad18e398af853be023be13385916dbef335086c2
675
c
C
isogram/isogram.c
olepunchy/exercism-c-solutions
dcc3e87db5d378da61dcdb235a2594f95eb94fd6
[ "BSD-3-Clause" ]
null
null
null
isogram/isogram.c
olepunchy/exercism-c-solutions
dcc3e87db5d378da61dcdb235a2594f95eb94fd6
[ "BSD-3-Clause" ]
null
null
null
isogram/isogram.c
olepunchy/exercism-c-solutions
dcc3e87db5d378da61dcdb235a2594f95eb94fd6
[ "BSD-3-Clause" ]
null
null
null
#include "isogram.h" #include <ctype.h> #include <string.h> #define MAX_SIZE 256 bool is_isogram(const char phrase[]) { if (phrase == NULL) { return false; } char usedLetters[MAX_SIZE] = {0}; for (size_t index = 0; index < strlen(phrase); index++) { if (phrase[index] == '\0' || phrase[index] == '-') { continue; } if (isalpha(phrase[index])) { char letter = tolower(phrase[index]); char *foundLetter = strchr(usedLetters, letter); if (foundLetter != NULL) { return false; } else { size_t position = strlen(usedLetters); usedLetters[position] = letter; } } } return true; }
18.75
59
0.576296
3848852d9f1f83a40767d5d2aea181654f1f8782
17,978
c
C
modules/kitefast-controller/src/common/c_math/util.c
OpenFAST/KiteFAST
a7329f7c454aab102fadd77771b741a923abd0a7
[ "Apache-2.0" ]
6
2020-12-22T18:21:36.000Z
2021-11-16T10:13:27.000Z
modules/kitefast-controller/src/common/c_math/util.c
OpenFAST/KiteFAST
a7329f7c454aab102fadd77771b741a923abd0a7
[ "Apache-2.0" ]
null
null
null
modules/kitefast-controller/src/common/c_math/util.c
OpenFAST/KiteFAST
a7329f7c454aab102fadd77771b741a923abd0a7
[ "Apache-2.0" ]
2
2020-10-13T11:39:01.000Z
2021-04-20T21:04:46.000Z
#include "common/c_math/util.h" #include <assert.h> #include <float.h> #include <math.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <string.h> #include "common/c_math/cal_params.h" #include "common/c_math/mat3.h" #include "common/c_math/vec2.h" #include "common/c_math/vec3.h" int32_t MinInt32(int32_t x, int32_t y) { return (x < y) ? x : y; } int32_t MaxInt32(int32_t x, int32_t y) { return (x > y) ? x : y; } uint32_t MinUint32(uint32_t x, uint32_t y) { return (x < y) ? x : y; } uint32_t MaxUint32(uint32_t x, uint32_t y) { return (x > y) ? x : y; } int64_t MinInt64(int64_t x, int64_t y) { return (x < y) ? x : y; } int64_t MaxInt64(int64_t x, int64_t y) { return (x > y) ? x : y; } uint64_t MinUint64(uint64_t x, uint64_t y) { return (x < y) ? x : y; } uint64_t MaxUint64(uint64_t x, uint64_t y) { return (x > y) ? x : y; } uint32_t MaxUnsignedValue(int32_t bits) { if (bits <= 0) { return 0U; } else if (bits < 32) { return (1U << bits) - 1U; } else { return UINT32_MAX; } } int32_t MinSignedValue(int32_t bits) { if (bits <= 0) { return 0; } else if (bits < 32) { return -(1 << (bits - 1)); } else { return INT32_MIN; } } int32_t MaxSignedValue(int32_t bits) { if (bits <= 0) { return 0; } else if (bits < 32) { return (1 << (bits - 1)) - 1; } else { return INT32_MAX; } } int32_t Sign(double x) { return (0.0 < x) - (x < 0.0); } int32_t SignInt32(int32_t x) { return (0 < x) - (x < 0); } bool IsApproximatelyEqual(double x, double y) { return fabs(x - y) <= (fabs(x) < fabs(y) ? fabs(y) : fabs(x)) * DBL_EPSILON; } bool IsApproximatelyEqualVec3(const Vec3 *u, const Vec3 *v) { assert(u != NULL && v != NULL); return IsApproximatelyEqual(u->x, v->x) && IsApproximatelyEqual(u->y, v->y) && IsApproximatelyEqual(u->z, v->z); } static int32_t GreaterThan(const void *a, const void *b) { return *(const double *)a > *(const double *)b; } static int32_t LessThan(const void *a, const void *b) { return *(const double *)a < *(const double *)b; } static int32_t GreaterThanInt32(const void *a, const void *b) { return *(const int32_t *)a > *(const int32_t *)b; } static int32_t GreaterThanInt64(const void *a, const void *b) { return *(const int64_t *)a > *(const int64_t *)b; } static int32_t GreaterThanUint32(const void *a, const void *b) { return *(const uint32_t *)a > *(const uint32_t *)b; } static const void *MaxArrayAny(const void *x, int32_t n, int32_t size, int32_t (*comp)(const void *, const void *), int32_t *maxind) { assert(x != NULL); assert(n > 0); assert(size > 0); assert(comp != NULL); const uint8_t *curr = x, *max = x; if (maxind != NULL) { *maxind = 0; } for (int32_t i = 1; i < n; ++i) { curr += size; if (comp(curr, max) > 0) { max = curr; if (maxind != NULL) { *maxind = i; } } } return max; } double MaxArray(const double *x, int32_t n, int32_t *maxind) { return *(const double *)MaxArrayAny(x, n, (int32_t)sizeof(*x), &GreaterThan, maxind); } double MinArray(const double *x, int32_t n, int32_t *minind) { return *(const double *)MaxArrayAny(x, n, (int32_t)sizeof(*x), &LessThan, minind); } int32_t MaxArrayInt32(const int32_t *x, int32_t n, int32_t *maxind) { return *(const int32_t *)MaxArrayAny(x, n, (int32_t)sizeof(*x), &GreaterThanInt32, maxind); } int64_t MaxArrayInt64(const int64_t *x, int32_t n, int32_t *maxind) { return *(const int64_t *)MaxArrayAny(x, n, (int32_t)sizeof(*x), &GreaterThanInt64, maxind); } uint32_t MaxArrayUint32(const uint32_t *x, int32_t n, int32_t *maxind) { return *(const uint32_t *)MaxArrayAny(x, n, (int32_t)sizeof(*x), &GreaterThanUint32, maxind); } double VarArray(const double *x, int32_t n) { if (n == 0) return 0.0; assert(x != NULL); // The simplest "one-pass" formula for computing variance is // numerically unstable. A two-pass formula is still more numerically // stable, but computationally expensive. // See: N. Highham, Accuracy and Stability of Numerical Algorithms, 2nd Ed. // Philadelphia: SIAM, 2002, ch. 1, sec. 1.9. pp. 12-13. double m = 0.0, q = 0.0; for (int32_t i = 0; i < n; ++i) { double delta = x[i] - m; q += (i * (delta * delta)) / (i + 1); m += delta / (i + 1); } assert(q >= 0.0); return fmax(q / n, 0.0); } double MeanPair(double x, double y) { if (Sign(x) == Sign(y) && isfinite(x) && isfinite(y)) { return x + (y - x) / 2.0; } else { // If a and b are finite with mismatched signs, a + b cannot // overflow. When infinite values are present the standard formula // is used. return (x + y) / 2.0; } } double MeanArray(const double *x, int32_t n) { assert(x != NULL && n > 0); double sum = x[0]; for (int32_t i = 1; i < n; ++i) { sum += x[i]; } return sum / n; } void SwapInPlace(double *x, double *y) { assert(x != NULL && y != NULL); double tmp = *x; *x = *y; *y = tmp; } void SwapInPlacef(float *x, float *y) { assert(x != NULL && y != NULL); float tmp = *x; *x = *y; *y = tmp; } double Saturate(double x, double low, double high) { assert(low <= high); return fmin(fmax(x, low), high); } bool IsSaturated(double x, double low, double high) { assert(low <= high); return x <= low || high <= x; } const Vec2 *SaturateVec2(const Vec2 *x, const Vec2 *low, const Vec2 *high, Vec2 *y) { y->x = Saturate(x->x, low->x, high->x); y->y = Saturate(x->y, low->y, high->y); return y; } const Vec3 *SaturateVec3(const Vec3 *x, const Vec3 *low, const Vec3 *high, Vec3 *y) { y->x = Saturate(x->x, low->x, high->x); y->y = Saturate(x->y, low->y, high->y); y->z = Saturate(x->z, low->z, high->z); return y; } const Vec3 *SaturateVec3ByScalar(const Vec3 *x, double low, double high, Vec3 *y) { y->x = Saturate(x->x, low, high); y->y = Saturate(x->y, low, high); y->z = Saturate(x->z, low, high); return y; } const Vec *SaturateVec(const Vec *x, const Vec *low, const Vec *high, Vec *y) { assert(x->length == y->length); for (int32_t i = 0; i < x->length; ++i) { y->d[i] = Saturate(x->d[i], low->d[i], high->d[i]); } return y; } const double *SaturateArrayByScalar(const double *x, int32_t n, double low, double high, double *y) { for (int32_t i = 0; i < n; ++i) { y[i] = Saturate(x[i], low, high); } return y; } int32_t SaturateInt32(int32_t x, int32_t low, int32_t high) { assert(low <= high); return MinInt32(MaxInt32(x, low), high); } uint32_t SaturateUint32(uint32_t x, uint32_t low, uint32_t high) { assert(low <= high); return MinUint32(MaxUint32(x, low), high); } int64_t SaturateInt64(int64_t x, int64_t low, int64_t high) { assert(low <= high); return MinInt64(MaxInt64(x, low), high); } uint64_t SaturateUint64(uint64_t x, uint64_t low, uint64_t high) { assert(low <= high); return MinUint64(MaxUint64(x, low), high); } int32_t SaturateSigned(int32_t x, int32_t bits) { return SaturateInt32(x, MinSignedValue(bits), MaxSignedValue(bits)); } uint32_t SaturateUnsigned(uint32_t x, int32_t bits) { return SaturateUint32(x, 0U, MaxUnsignedValue(bits)); } double SaturateWrapped(double x, double range_start, double range_end, double wrap_left, double wrap_right) { // All inputs must be between wrap_left and wrap_right. assert(x >= wrap_left && x <= wrap_right); assert(range_start >= wrap_left && range_start <= wrap_right); assert(range_end >= wrap_left && range_end <= wrap_right); assert(range_start != range_end); double wrap_range = wrap_right - wrap_left; double x_sat; if (range_end > range_start) { x_sat = Saturate(x, range_start, range_end); } else { // Range crosses wrap, so unwrap range_end. if (x < range_end) { // x is in range, both x and range_end need to be unwrapped. x_sat = Saturate(x + wrap_range, range_start, range_end + wrap_range); } else { // x may be in range without unwrap. x_sat = Saturate(x, range_start, range_end + wrap_range); } } // Find shortest distance from x to range_start and range_end. double x_start_dist = fmin(fabs(x - range_start), fabs(x + wrap_range - range_start)); double x_end_dist = fmin(fabs(x - range_end), fabs(x + wrap_range - range_end)); // Saturation may not pick closest end of range. // If saturated, check that it picked closest end. if (x_sat == range_start && x_end_dist < x_start_dist) { x_sat = range_end; } else if (x_sat == range_end && x_start_dist <= x_end_dist) { x_sat = range_start; } return Wrap(x_sat, wrap_left, wrap_right); } const Vec3 *FabsVec3(const Vec3 *v_in, Vec3 *v_out) { assert(v_in != NULL && v_out != NULL); v_out->x = fabs(v_in->x); v_out->y = fabs(v_in->y); v_out->z = fabs(v_in->z); return v_out; } double Mix(double x0, double x1, double c) { double c_sat = Saturate(c, 0.0, 1.0); return (1.0 - c_sat) * x0 + c_sat * x1; } double Crossfade(double y0, double y1, double x, double x_low, double x_high) { assert(x_low <= x_high); return Mix(y0, y1, (x - x_low) / fmax(x_high - x_low, DBL_MIN)); } const Vec2 *CrossfadeVec2(const Vec2 *y0, const Vec2 *y1, double x, double x_low, double x_high, Vec2 *y_out) { assert(y0 != NULL && y1 != NULL && y_out != NULL); y_out->x = Crossfade(y0->x, y1->x, x, x_low, x_high); y_out->y = Crossfade(y0->y, y1->y, x, x_low, x_high); return y_out; } const Vec3 *CrossfadeVec3(const Vec3 *y0, const Vec3 *y1, double x, double x_low, double x_high, Vec3 *y_out) { assert(y0 != NULL && y1 != NULL && y_out != NULL); y_out->x = Crossfade(y0->x, y1->x, x, x_low, x_high); y_out->y = Crossfade(y0->y, y1->y, x, x_low, x_high); y_out->z = Crossfade(y0->z, y1->z, x, x_low, x_high); return y_out; } const Mat3 *CrossfadeMat3(const Mat3 *y0, const Mat3 *y1, double x, double x_low, double x_high, Mat3 *y_out) { assert(y0 != NULL && y1 != NULL && y_out != NULL); CrossfadeArray(&y0->d[0][0], &y1->d[0][0], 9, x, x_low, x_high, &y_out->d[0][0]); return y_out; } const double *CrossfadeArray(const double *y0, const double *y1, int32_t n, double x, double x_low, double x_high, double *y_out) { assert(y0 != NULL && y1 != NULL && y_out != NULL); assert(n > 0); for (int32_t i = 0; i < n; ++i) { y_out[i] = Crossfade(y0[i], y1[i], x, x_low, x_high); } return y_out; } double InterpIndex(const double x[], int32_t n, double x_i, InterpOption opt, int32_t *ind) { assert(x != NULL); assert(n >= 2); // Finds the highest index less than n - 1 for which x_i >= // x[index]. int32_t index = n - 2; for (int32_t i = 1; i < n - 1; ++i) { assert(x[i] > x[i - 1]); if (x_i < x[i]) { index = i - 1; break; } } double x_low = x[index]; double x_high = x[index + 1]; double fractional_ind = (double)index + (x_i - x_low) / (x_high - x_low); if (opt & kInterpOptionSaturate) { fractional_ind = Saturate(fractional_ind, 0.0, (double)(n - 1)); } if (ind != NULL) *ind = index; return fractional_ind; } double Interp1(const double x[], const double y[], int32_t n, double x_i, InterpOption opt) { assert(x != NULL && y != NULL); int32_t s0; double s = InterpIndex(x, n, x_i, opt, &s0); double z0 = y[s0]; double z1 = y[s0 + 1]; return z0 + (z1 - z0) * (s - (double)s0); } double Interp1WarpY(const double x[], const double y[], int32_t n, double x_i, InterpOption opt, double (*warp_func)(double), double (*unwarp_func)(double)) { assert(x != NULL && y != NULL); assert(warp_func != NULL && unwarp_func != NULL); assert(n >= 2); int32_t s0; double s = InterpIndex(x, n, x_i, opt, &s0); double z0 = warp_func(y[s0]); double z1 = warp_func(y[s0 + 1]); return unwarp_func(z0 + (z1 - z0) * (s - (double)s0)); } double Interp2(const double x[], const double y[], int32_t nx, int32_t ny, const double *z, double x_i, double y_i, InterpOption opt) { // Find the rows above and below the target coordinates. Here s0 is the // index of the row above the target. int32_t s0; double s = InterpIndex(y, ny, y_i, opt, &s0); // For the rows directly above and below the datapoint, interpolate // "horizontally" to find the value at the target x-coordinate. double z0 = Interp1(x, z + s0 * nx, nx, x_i, opt); double z1 = Interp1(x, z + (s0 + 1) * nx, nx, x_i, opt); // Interpolate "vertically" between z0 and z1. return z0 + (z1 - z0) * (s - (double)s0); } // Interpolates a periodic function defined by a lookup table. The input x_i is // wrapped into the lookup table's domain. double CircularInterp1(const double x[], const double y[], int32_t n, double x_i) { assert(n > 0); assert(y != NULL && y[0] == y[n - 1]); assert(x != NULL); x_i = Wrap(x_i, x[0], x[n - 1]); return Interp1(x, y, n, x_i, kInterpOptionSaturate); } void Interp1Vec3(const double x[], const Vec3 y[], int32_t n, double x_i, InterpOption opt, Vec3 *y_out) { int32_t s0; double s = InterpIndex(x, n, x_i, opt, &s0); Vec3LinComb(1.0 - (s - (double)s0), &y[s0], s - (double)s0, &y[s0 + 1], y_out); } double Sigmoid(double x, double width) { return 0.5 + 1.0 / PI * atan2(x, width / 6.31 / 2.0); } void PolyFit2(const double x[3], const double y[3], double coeff[3]) { Mat3 v = {{{x[0] * x[0], x[0], 1.0}, {x[1] * x[1], x[1], 1.0}, {x[2] * x[2], x[2], 1.0}}}; Vec3 p = {y[0], y[1], y[2]}; Mat3Vec3Mult(Mat3Inv(&v, &v), &p, &p); coeff[0] = p.x; coeff[1] = p.y; coeff[2] = p.z; } double PolyVal(const double c[], double x, int32_t n) { assert(c != NULL); assert(n > 0); double b = 0.0; for (int32_t i = 0; i < n; ++i) { b = c[i] + x * b; } return b; } void PolyDer(const double c[], int32_t n, double dc[]) { assert(c != NULL && dc != NULL); assert(n > 0); for (int32_t i = 0; i < n; ++i) { dc[i] = c[i] * (n - i); } } // TODO(paulae): Change bias sign convention so that it's easier to // just read off the bias value (both *Cal and *EncoderCal). double ApplyCal(double raw_val, const CalParams *cal) { return cal->scale * (raw_val + (double)cal->bias_count) + cal->bias; } float ApplyCal32(float raw_val, const CalParams32 *cal) { return cal->scale * (raw_val + (float)cal->bias_count) + cal->bias; } // TODO(paulae): Consider including saturation as a part of InvertCal/CalParams. double InvertCal(double cal_val, const CalParams *cal) { return (cal_val - cal->bias) / cal->scale - (double)cal->bias_count; } float InvertCal32(float cal_val, const CalParams32 *cal) { return (cal_val - cal->bias) / cal->scale - (float)cal->bias_count; } double ApplyEncoderCal(int32_t raw_val, const EncoderCalParams *ecal) { assert(0 <= raw_val && raw_val <= ecal->encoder_counts); assert(ecal->cal.scale != 0.0 && ecal->encoder_counts > 0); double cal_val_range = fabs(ecal->cal.scale * ecal->encoder_counts); double cal_val = fmod(ApplyCal(raw_val, &ecal->cal), cal_val_range); if (cal_val < ecal->cal_val_center - cal_val_range / 2.0) { cal_val += cal_val_range; } if (cal_val > ecal->cal_val_center + cal_val_range / 2.0) { cal_val -= cal_val_range; } return cal_val; } int32_t InvertEncoderCal(double cal_val, const EncoderCalParams *ecal) { assert(ecal->encoder_counts > 0); int32_t raw_int = (int32_t)InvertCal(cal_val, &ecal->cal) % ecal->encoder_counts; if (raw_int < 0) { raw_int += ecal->encoder_counts; } return raw_int; } double Wrap(double x, double left, double right) { assert(left < right); // Respect the number line. double wrap0 = fmod(x - left, right - left); if (wrap0 >= 0.0) return wrap0 + left; else return wrap0 + right; } int32_t WrapInt32(int32_t x, int32_t left, int32_t right) { assert(left < right); // Respect the number line. int32_t wrap0 = (x - left) % (right - left); if (wrap0 >= 0) { wrap0 += left; } else { wrap0 += right; } return wrap0; } double Asin(double x) { return asin(Saturate(x, -1.0, 1.0)); } double Acos(double x) { return acos(Saturate(x, -1.0, 1.0)); } double Sqrt(double x) { return sqrt(fmax(x, 0.0)); } double Square(double x) { return x * x; } double ThirdPower(double x) { return x * x * x; } double FourthPower(double x) { x *= x; x *= x; return x; } double Exp10(double x) { // The numeric literal here is the natural logarithm of 10; defined in // <math.h> as M_LN10. return exp(x * 2.30258509299404568402); } const int32_t *Slice(int32_t start, int32_t incr, int32_t end, int32_t length, int32_t *arr) { assert(start >= 0 && end >= 0 && length >= 0); assert(end <= length); memset(arr, 0, sizeof(int32_t) * (size_t)length); for (int32_t i = start; i < end; i += incr) { arr[i] = 1; } return arr; } void SplitVec3Arr(const Vec3 vs[], int32_t n, double xs[], double ys[], double zs[]) { for (int32_t i = 0; i < n; ++i) { xs[i] = vs[i].x; ys[i] = vs[i].y; zs[i] = vs[i].z; } } void JoinVec3Arr(const double xs[], const double ys[], const double zs[], int32_t n, Vec3 vs[]) { for (int32_t i = 0; i < n; ++i) { vs[i].x = xs[i]; vs[i].y = ys[i]; vs[i].z = zs[i]; } } double DegToRad(double deg) { return deg / 180.0 * PI; } double RadToDeg(double rad) { return rad / PI * 180.0; }
29.185065
80
0.598732
a84bffe8a708a62a5be90f70e2f93a0fd1a940a8
916
h
C
Code/CryEngine/CryCommon/IGameRef.h
Vondoe90/AngryBoids
9f6739958a16b450196b28c4533a040a9bc03eb1
[ "MIT" ]
1
2016-07-04T15:02:50.000Z
2016-07-04T15:02:50.000Z
Code/CryEngine/CryCommon/IGameRef.h
Vondoe90/AngryBoids
9f6739958a16b450196b28c4533a040a9bc03eb1
[ "MIT" ]
null
null
null
Code/CryEngine/CryCommon/IGameRef.h
Vondoe90/AngryBoids
9f6739958a16b450196b28c4533a040a9bc03eb1
[ "MIT" ]
1
2021-02-12T07:29:14.000Z
2021-02-12T07:29:14.000Z
/************************************************************************* Crytek Source File. Copyright (C), Crytek Studios, 2001-2004. ------------------------------------------------------------------------- $Id$ $DateTime$ Description: ------------------------------------------------------------------------- History: - 2:8:2004 10:59 : Created by Marcio Martins *************************************************************************/ #ifndef __IGAMEMODPTR_H__ #define __IGAMEMODPTR_H__ #if _MSC_VER > 1000 # pragma once #endif struct IGame; struct IGameRef { IGameRef(): m_ptr(0) {} IGameRef(IGame **ptr): m_ptr(ptr) {}; ~IGameRef() {}; IGame *operator ->() const { return m_ptr ? *m_ptr : 0; }; operator IGame*() const { return m_ptr ? *m_ptr : 0; }; IGameRef &operator =(IGame **ptr) { m_ptr = ptr; return *this; }; private: IGame **m_ptr; }; #endif //__IGAMEMODPTR_H__
24.756757
74
0.441048
6ddb1beddec047e4dae5fc383027894c49cff1cc
8,720
h
C
core/lib/AFE-Web-Server/AFE-Web-Server.h
tschaban/AFE-Firmware
b2c7c76e0f2efb6d8e02b81a5d08e39e30016502
[ "MIT" ]
36
2017-06-05T21:27:44.000Z
2022-02-13T21:04:04.000Z
core/lib/AFE-Web-Server/AFE-Web-Server.h
tschaban/AFE-Firmware
b2c7c76e0f2efb6d8e02b81a5d08e39e30016502
[ "MIT" ]
661
2017-05-28T12:01:53.000Z
2022-02-13T08:51:25.000Z
core/lib/AFE-Web-Server/AFE-Web-Server.h
tschaban/AFE-Firmware
b2c7c76e0f2efb6d8e02b81a5d08e39e30016502
[ "MIT" ]
46
2017-12-12T21:11:32.000Z
2022-02-10T21:52:26.000Z
/* AFE Firmware for smarthome devices, More info: https://afe.smartnydom.pl/ */ #ifndef _AFE_Web_Server_h #define _AFE_Web_Server_h #include <AFE-API-JSONRPC.h> #include <AFE-Data-Access.h> #include <AFE-Device.h> #include <AFE-Firmware-Pro.h> #include <AFE-Sites-Generator.h> #ifdef AFE_ESP32 #include <WebServer.h> #else /* ESP8266 */ #include <ESP8266WebServer.h> #endif // ESP32/ESP8266 #ifndef AFE_CONFIG_OTA_NOT_UPGRADABLE #include <WiFiClient.h> #ifdef AFE_ESP32 /* ESP32 */ #include <Update.h> #else /* ESP8266 */ #include <WiFiUdp.h> #include <esp8266httpupdate.h> #endif // ESP32/ESP8266 #endif // AFE_CONFIG_OTA_NOT_UPGRADABLE #if AFE_LANGUAGE == 0 #include <pl_PL.h> #else #include <en_EN.h> #endif #ifdef AFE_CONFIG_HARDWARE_LED #include <AFE-LED.h> #endif // AFE_CONFIG_HARDWARE_LED #ifdef AFE_CONFIG_HARDWARE_I2C #include <Wire.h> #endif // AFE_CONFIG_HARDWARE_I2C #ifdef DEBUG #include <Streaming.h> #endif struct AFE_SITE_PARAMETERS { uint8_t ID; boolean twoColumns = true; int8_t deviceID = -1; boolean reboot = false; uint8_t rebootMode = 0; uint16_t rebootTime = 0; boolean form = true; boolean formButton = true; uint8_t option = AFE_HARDWARE_ITEM_NOT_EXIST; }; class AFEWebServer { private: AFEDevice *Device; AFEFirmwarePro *FirmwarePro; AFEDataAccess *Data; AFEJSONRPC *RestAPI; #ifdef AFE_CONFIG_HARDWARE_LED AFELED *SystemLED; #endif #ifdef AFE_CONFIG_HARDWARE_I2C TwoWire *WirePort0; #ifdef AFE_ESP32 TwoWire *WirePort1; #endif // AFE_ESP32 #endif // AFE_CONFIG_HARDWARE_I2C // It stores last HTTP API request HTTPCOMMAND httpCommand; // Once HTTP API requet is recieved it's set to true boolean receivedHTTPCommand = false; /* when it's set to true device configuration is refreshed. Required by * generate() method */ boolean _refreshConfiguration = false; /* Used to auto-logoff from the config panel */ unsigned long howLongInConfigMode = 0; AFESitesGenerator Site; boolean upgradeSuccess = false; #if defined(AFE_CONFIG_HARDWARE_LED) || defined(AFE_CONFIG_HARDWARE_I2C) void begin(AFEDataAccess *, AFEDevice *, AFEFirmwarePro *, AFEJSONRPC *); #endif // AFE_CONFIG_HARDWARE_LED || AFE_CONFIG_HARDWARE_I2C /* Method gets url Option parameter value */ boolean getOptionName(); uint8_t getOption(); uint8_t getCommand(); uint8_t getSiteID(); uint8_t getID(); /* Generates HTML response (site) */ String generateSite(AFE_SITE_PARAMETERS *siteConfig, String &page); /* Methods get POST data (for saveing) */ void get(DEVICE &data); void get(NETWORK &data); void get(MQTT &data); void get(PASSWORD &data); void get(PRO_VERSION &data); #ifdef AFE_CONFIG_API_DOMOTICZ_ENABLED void get(DOMOTICZ &data); #endif // AFE_CONFIG_API_DOMOTICZ_ENABLED #ifdef AFE_CONFIG_HARDWARE_RELAY void get(RELAY &data); #endif // AFE_CONFIG_HARDWARE_RELAY #ifdef AFE_CONFIG_HARDWARE_SWITCH void get(SWITCH &data); #endif // AFE_CONFIG_HARDWARE_SWITCH #ifdef AFE_CONFIG_HARDWARE_LED void get(LED &data); uint8_t getSystemLEDData(); #endif // AFE_CONFIG_HARDWARE_LED #ifdef AFE_CONFIG_HARDWARE_DS18B20 void get(DS18B20 &data); #endif // AFE_CONFIG_HARDWARE_DS18B20 #ifdef AFE_CONFIG_HARDWARE_DHT void get(DHT &data); #endif // AFE_CONFIG_HARDWARE_DHT #ifdef AFE_CONFIG_FUNCTIONALITY_REGULATOR void get(REGULATOR &data); #endif // AFE_CONFIG_FUNCTIONALITY_REGULATOR #ifdef AFE_CONFIG_FUNCTIONALITY_THERMAL_PROTECTOR void get(THERMAL_PROTECTOR &data); #endif // AFE_CONFIG_FUNCTIONALITY_THERMAL_PROTECTOR #if defined(T3_CONFIG) void getPIRData(uint8_t id, PIR *); #endif #ifdef AFE_CONFIG_HARDWARE_CONTACTRON void get(CONTACTRON &data); #endif // AFE_CONFIG_HARDWARE_CONTACTRON #ifdef AFE_CONFIG_HARDWARE_GATE void get(GATE &data); #endif // AFE_CONFIG_HARDWARE_GATE #ifdef AFE_CONFIG_HARDWARE_UART void getSerialPortData(SERIALPORT *); #endif // AFE_CONFIG_HARDWARE_UART #ifdef AFE_CONFIG_HARDWARE_I2C void get(I2CPORT &data); #endif // AFE_CONFIG_HARDWARE_I2C #ifdef AFE_CONFIG_HARDWARE_HPMA115S0 void get(HPMA115S0 &data); #endif // AFE_CONFIG_HARDWARE_HPMA115S0 #ifdef AFE_CONFIG_HARDWARE_BMEX80 void get(BMEX80 &data); #endif // AFE_CONFIG_HARDWARE_BMEX80 #ifdef AFE_CONFIG_HARDWARE_BH1750 void get(BH1750 &data); #endif // AFE_CONFIG_HARDWARE_BH1750 #ifdef AFE_CONFIG_HARDWARE_AS3935 void get(AS3935 &data); #endif // AFE_CONFIG_HARDWARE_AS3935 #ifdef AFE_CONFIG_HARDWARE_ANEMOMETER void get(ANEMOMETER &data); #endif // AFE_CONFIG_HARDWARE_ANEMOMETER #ifdef AFE_CONFIG_HARDWARE_RAINMETER void get(RAINMETER &data); #endif // AFE_CONFIG_HARDWARE_RAINMETER #ifdef AFE_CONFIG_HARDWARE_ADC_VCC void get(ADCINPUT &data); #endif // AFE_CONFIG_HARDWARE_ADC_VCC #ifdef AFE_CONFIG_HARDWARE_BINARY_SENSOR void get(BINARY_SENSOR &data); #endif // AFE_CONFIG_HARDWARE_BINARY_SENSOR #ifdef AFE_CONFIG_HARDWARE_PN532_SENSOR void get(PN532_SENSOR &data); void processMiFareCard(); void get(MIFARE_CARD &data); #endif // AFE_CONFIG_HARDWARE_PN532_SENSOR #ifdef AFE_CONFIG_HARDWARE_CLED #ifdef AFE_CONFIG_HARDWARE_CLED_ACCESS_CONTROL_EFFECT void get(CLED &CLEDData, CLED_EFFECTS &CLEDEffectsData); #endif // AFE_CONFIG_HARDWARE_CLED_ACCESS_CONTROL_EFFECT #ifdef AFE_CONFIG_HARDWARE_CLED_BACKLIGHT_EFFECT void get(CLED &CLEDData, CLED_BACKLIGHT &CLEDBacklightData); #endif // AFE_CONFIG_HARDWARE_CLED_BACKLIGHT_EFFECT #endif // AFE_CONFIG_HARDWARE_CLED #ifdef AFE_CONFIG_HARDWARE_TSL2561 void get(TSL2561 &data); #endif // AFE_CONFIG_HARDWARE_TSL2561 #ifndef AFE_CONFIG_OTA_NOT_UPGRADABLE uint16_t getOTAFirmwareId(); boolean upgradeOTAWAN(uint16_t firmwareId); boolean upgradOTAFile(void); #endif // AFE_CONFIG_OTA_NOT_UPGRADABLE public: #ifdef AFE_ESP32 /* ESP82xx */ WebServer server; #else /* ESP8266 */ ESP8266WebServer server; #endif // ESP32/ESP8266 AFEWebServer(); /* Method pushes HTML site from WebServer */ void publishHTML(const String &page); /* Method initialize WebServer and Updater server */ #if defined(AFE_CONFIG_HARDWARE_LED) && !defined(AFE_CONFIG_HARDWARE_I2C) void begin(AFEDataAccess *, AFEDevice *, AFEFirmwarePro *, AFEJSONRPC *, AFELED *); #elif defined(AFE_CONFIG_HARDWARE_LED) && defined(AFE_CONFIG_HARDWARE_I2C) #ifdef AFE_ESP32 void begin(AFEDataAccess *_Data, AFEDevice *_Device, AFEFirmwarePro *_FirmwarePro, AFEJSONRPC *_RestAPI, AFELED *_Led, TwoWire *_WirePort0, TwoWire *_WirePort1); #else void begin(AFEDataAccess *, AFEDevice *, AFEFirmwarePro *, AFEJSONRPC *, AFELED *, TwoWire *); #endif // AFE_ESP32 #elif !defined(AFE_CONFIG_HARDWARE_LED) && defined(AFE_CONFIG_HARDWARE_I2C) #ifdef AFE_ESP32 void begin(AFEDataAccess *, AFEDevice *, AFEFirmwarePro *, AFEJSONRPC *, TwoWire *, TwoWire *); #else void begin(AFEDataAccess *, AFEDevice *, AFEFirmwarePro *, AFEJSONRPC *, TwoWire *); #endif // AFE_ESP32 #else void begin(AFEDataAccess *, AFEDevice *, AFEFirmwarePro *, AFEJSONRPC *); #endif #ifdef AFE_CONFIG_HARDWARE_LED /* Method inherits global system LED */ void initSystemLED(AFELED *); #endif // AFE_CONFIG_HARDWARE_LED /* Method listens for HTTP requests */ void listener(); #ifdef AFE_ESP32 /* Method listens for onNotFound */ void onNotFound(WebServer::THandlerFunction fn); /* Method adds URL for listen */ void handle(const char *uri, WebServer::THandlerFunction handler); void handleFirmwareUpgrade(const char *uri, WebServer::THandlerFunction handlerUpgrade, WebServer::THandlerFunction handlerUpload); #else // ESP8266 /* Method listens for onNotFound */ void onNotFound(ESP8266WebServer::THandlerFunction fn); /* Method adds URL for listen */ void handle(const char *uri, ESP8266WebServer::THandlerFunction handler); void handleFirmwareUpgrade(const char *uri, ESP8266WebServer::THandlerFunction handlerUpgrade, ESP8266WebServer::THandlerFunction handlerUpload); #endif // ESP32/ESP8266 String getHeaderValue(String header, String headerName); /* Method generate HTML side. It reads also data from HTTP requests * arguments * and pass them to Configuration Panel class. * True: site generated * False: HTTP API */ boolean generate(boolean upload = false); /* Method listens for HTTP API requests. If get True command is in * httpCommand */ boolean httpAPIlistener(); /* Method reads HTTP API Command */ HTTPCOMMAND getHTTPCommand(); /* Method pushes JSON response to HTTP API request */ // void sendJSON(String json); void sendJSON(const String &json); }; #endif // _AFE_Web_Server_h
27.770701
79
0.754817
b8866d766a18c23a93c1b621effde37c621672d3
238
h
C
Pods/WLMElectronicInvoice/WLMElectronicInvoice/ElectronicInvoiceApply/Controller/WLMEInvoiceProtocolVC.h
yangguanghei/iOS-Component-Pro
2aa2de0ba63d3075b2fb84a25b73dc6e72b8dffa
[ "MIT" ]
652
2018-09-21T09:31:44.000Z
2022-03-29T10:37:20.000Z
Pods/WLMElectronicInvoice/WLMElectronicInvoice/ElectronicInvoiceApply/Controller/WLMEInvoiceProtocolVC.h
msdgwzhy6/iOS-Component-Pro
52e896a0eacd78a2ff087aa4bb1e36cda52086a7
[ "MIT" ]
9
2018-09-25T12:40:26.000Z
2022-02-15T06:57:57.000Z
Pods/WLMElectronicInvoice/WLMElectronicInvoice/ElectronicInvoiceApply/Controller/WLMEInvoiceProtocolVC.h
msdgwzhy6/iOS-Component-Pro
52e896a0eacd78a2ff087aa4bb1e36cda52086a7
[ "MIT" ]
110
2018-09-21T13:07:33.000Z
2022-03-09T11:18:49.000Z
// // WLMEInvoiceProtocolVC.h // WLMElectronicInvoice // // Created by 刘光强 on 2018/5/16. // Copyright © 2018年 quangqiang. All rights reserved. // #import <UIKit/UIKit.h> @interface WLMEInvoiceProtocolVC : WLBaseViewController @end
17
55
0.731092
ed0fe6404aa0548583068e16f7211b8b16ccbaf9
7,226
h
C
work_queue.h
ngvrnd/simpleworkqueue
dfc25d28c74d61642e629f88e0e5d334da6888f1
[ "MIT" ]
null
null
null
work_queue.h
ngvrnd/simpleworkqueue
dfc25d28c74d61642e629f88e0e5d334da6888f1
[ "MIT" ]
null
null
null
work_queue.h
ngvrnd/simpleworkqueue
dfc25d28c74d61642e629f88e0e5d334da6888f1
[ "MIT" ]
null
null
null
#ifndef WORK_QUEUE_H #define WORK_QUEUE_H #include <algorithm> #include <queue> #include <mutex> #include <condition_variable> #include <atomic> using namespace std::chrono_literals; /*! * work_queue - a templated class to manage a work queue between producer and consumer threads. * the work items are the template parameter T. */ template <class T> class work_queue { public: /*! * \brief work_queue creates an instance of a work queue with given capacity, * wait interval on dequeue and atomic boolean halt flag. * * \param halt_flag a reference to an atomic<bool> variable. When the variable becomes true, * any pending dequeue calls will return within one wait interval. * \param max_depth the maximum number of queued work items -- older items will be dropped * when this limit is exceeded. Defaults to SIZE_MAX, i.e. essentially unbounded. * \param wait_interval_ms wait interval in whole milliseconds, defaulting to 100ms * the dequeue method will wait for this amount of time for new work to arrive before * stopping to check the halt_flag. NOTE THAT the dequeue method still waits until new work * is available. * The condition on which the dequeue method returns is (work available || halting). * \param flush_on_halt defaults to false; when the halt_flag is set, should the queue flush remaining work or * allow it to be processed? */ work_queue(std::atomic<bool> & halt_flag, size_t max_depth = SIZE_MAX, int wait_interval_ms = 100) : shutting_down(halt_flag) , wait_interval(wait_interval_ms) , n_dropped(0) , n_handled(0) , max(max_depth) , m() , cv() , unguarded_queue() { } ~work_queue() { } /*! * \brief enqueue adds the work item to the queue, dropping the oldest item if the queue is saturated; * if the queue is shutting down, the item is not enqueued (i.e. the std::unique_ptr to it is not * moved and the caller retains ownership). Empty std::unique_ptrs are ignored -- i.e. not pushed. * \param work_item a std::unique_ptr<T> to a work item to be enqueued for processing. */ void enqueue(std::unique_ptr<T> work_item) { { // locked context std::unique_lock<std::mutex> l(m); // don't enqueue when shutting down, or when passed an "empty" unique_ptr. if (shutting_down || !work_item) return; if (unguarded_queue.size() >= max) { n_dropped++; unguarded_queue.pop(); } unguarded_queue.push(std::move(work_item)); } // end locked context cv.notify_one(); } /*! * \brief enqueue adds all the elements of the vector "bulk" to the queue, unless the queue is shutting down, * in which case the items are unaffected (i.e. the std::unique_ptrs in bulk are not * moved and the caller retains ownership). Empty std::unique_ptrs in bulk are ignored-- i.e. * not pushed. * This supports bulk enqueueing without toggling the lock for each entry. * \param bulk a std::vector of std::unique_ptr<T> objects */ void enqueue(std::vector<std::unique_ptr<T> > & bulk) { { // locked context: std::unique_lock<std::mutex> l(m); if (shutting_down) return; // only count non-empty unique_ptrs, since only those are pushed. size_t bulk_size = 0; for (auto & work_item: bulk) if (work_item) bulk_size++; // nothing to do: if (bulk_size == 0) return; const int plus_bulk = (unguarded_queue.size() + bulk_size); if (plus_bulk > max) { for (int i = 0; i < plus_bulk - max; i++) { n_dropped++; unguarded_queue.pop(); } } for (auto & work_item: bulk) { unguarded_queue.push(std::move(work_item)); } } // end locked context cv.notify_one(); } /*! * \brief dequeue remove the oldest work item on the queue, and return it * \return a work item if available; otherwise blocks until shutting down or a work item becomes available. * * Returns the null value of T in the case of shutdown. See also parameter wait_interval, default 100ms. * The atomic variable represented locally as shutting_down is set by the caller to initiate an orderly shutdown. */ std::unique_ptr<T> dequeue() { std::unique_lock<std::mutex> l(m); auto waiting = unguarded_queue.empty() && !shutting_down; while (waiting) { waiting = !cv.wait_for(l, wait_interval*1ms, [&]{ return (shutting_down || !unguarded_queue.empty()); }); } if (shutting_down) { return std::unique_ptr<T>{}; } else if (!unguarded_queue.empty()) { n_handled++; std::unique_ptr<T> val = std::move(unguarded_queue.front()); unguarded_queue.pop(); return val; } } /*! * \brief size returns the number of work items in the queue * \return the count of items in the queue (or 0 if shutting down) */ size_t size() const { std::unique_lock<std::mutex> l(m); if (shutting_down) return 0; return unguarded_queue.size(); } /*! * \brief dropped returns the number of work items dropped so far because the queue was saturated. * resets the counter of dropped items to zero. * intended to be called rarely/for diagnostic or debugging purposes. * \return number items dropped since last call */ int dropped () { std::unique_lock<std::mutex> l(m); int so_far = n_dropped; n_dropped = 0; return so_far; } /*! * \brief handled returns the number of work items handled (dequeued) so far. * resets the counter of handled items to zero. * intended to be called rarely/for diagnostic or debugging purposes. * \return number of work items handled since last call */ int handled () { std::unique_lock<std::mutex> l(m); int so_far = n_handled; n_handled = 0; return so_far; } size_t getMax() const { std::unique_lock<std::mutex> l(m); return max; } void setMax(const size_t &value) { std::unique_lock<std::mutex> l(m); max = value; } int getWaitInterval() const { std::unique_lock<std::mutex> l(m); return wait_interval; } void setWaitInterval(int value) { std::unique_lock<std::mutex> l(m); wait_interval = value; } private: std::atomic<bool> & shutting_down; int wait_interval; // units 1msec int n_dropped; int n_handled; size_t max; mutable std::mutex m; std::condition_variable cv; std::queue<std::unique_ptr<T> > unguarded_queue; }; #endif // WORK_QUEUE_H
33.766355
117
0.599779
ed4899a7dfcfbb9f8e482de959162b0e8348aebe
3,062
h
C
release/src-rt/include/emf/igs/igs_cfg.h
ghsecuritylab/tomato_egg
50473a46347f4631eb4878a0f47955cc64c87293
[ "FSFAP" ]
278
2015-11-03T03:01:20.000Z
2022-01-20T18:21:05.000Z
release/src-rt/include/emf/igs/igs_cfg.h
ghsecuritylab/tomato_egg
50473a46347f4631eb4878a0f47955cc64c87293
[ "FSFAP" ]
374
2015-11-03T12:37:22.000Z
2021-12-17T14:18:08.000Z
release/src-rt/include/emf/igs/igs_cfg.h
ghsecuritylab/tomato_egg
50473a46347f4631eb4878a0f47955cc64c87293
[ "FSFAP" ]
96
2015-11-22T07:47:26.000Z
2022-01-20T19:52:19.000Z
/* * Copyright (C) 2009, Broadcom Corporation * All Rights Reserved. * * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation; * the contents of this file may not be disclosed to third parties, copied * or duplicated in any form, in whole or in part, without the prior * written permission of Broadcom Corporation. * */ #ifndef _IGS_CFG_H_ #define _IGS_CFG_H_ #define SUCCESS 0 #define FAILURE -1 #define IGSCFG_MAX_ARG_SIZE 1024 #define IGSCFG_CMD_BR_ADD 1 #define IGSCFG_CMD_BR_DEL 2 #define IGSCFG_CMD_BR_LIST 3 #define IGSCFG_CMD_IGSDB_LIST 4 #define IGSCFG_CMD_RTPORT_LIST 5 #define IGSCFG_CMD_IGS_STATS 6 #define IGSCFG_OPER_TYPE_GET 1 #define IGSCFG_OPER_TYPE_SET 2 #define IGSCFG_STATUS_SUCCESS 1 #define IGSCFG_STATUS_FAILURE 2 #define IGSCFG_STATUS_CMD_UNKNOWN 3 #define IGSCFG_STATUS_OPER_UNKNOWN 4 #define IGSCFG_STATUS_INVALID_IF 5 typedef struct igs_cfg_request { uint8 inst_id[16]; /* Bridge name as instance id */ uint32 command_id; /* Command identifier */ uint32 oper_type; /* Operation type: GET, SET */ uint32 status; /* Command status */ uint32 size; /* Size of the argument */ uint8 arg[IGSCFG_MAX_ARG_SIZE]; /* Command arguments */ } igs_cfg_request_t; typedef struct igs_cfg_sdb_list { uint32 num_entries; /* Num of entries in IGSDB */ struct sdb_entry { uint32 mgrp_ip; /* Multicast group address */ uint32 mh_ip; /* Member IP address */ uint8 if_name[16]; /* Interface member is present */ } sdb_entry[0]; } igs_cfg_sdb_list_t; typedef struct igs_cfg_rtport { uint32 mr_ip; /* IP address of mcast router */ uint8 if_name[16]; /* Name of the interface */ } igs_cfg_rtport_t; typedef struct igs_cfg_rtport_list { uint32 num_entries; /* Number of entries in RTPORT list */ igs_cfg_rtport_t rtport_entry[0]; /* Interface entry data */ } igs_cfg_rtport_list_t; /* * IGMP Snooping Layer Statistics */ typedef struct igs_stats { uint32 igmp_packets; /* IGMP packets received */ uint32 igmp_queries; /* IGMP membership quries received */ uint32 igmp_reports; /* IGMP membership reports */ uint32 igmp_v2reports; /* IGMP v2 membership reports */ uint32 igmp_leaves; /* IGMP membership leaves */ uint32 igmp_not_handled; /* IGMP frames not handled */ uint32 igmp_mem_timeouts; /* IGMP membership timeouts */ uint32 igmp_frames_fwd; /* IGMP membership quries received */ uint32 igmp_frames_sentup; /* IGMP membership reports seen */ uint32 igmp_mcast_groups; /* Current total of mcast groups */ uint32 igmp_mcast_members; /* Current total of mcast members */ } igs_stats_t; extern void igs_cfg_request_process(igs_cfg_request_t *cfg); #endif /* _IGS_CFG_H_ */
34.022222
74
0.661332
071a697a63e038a8d8ecbcf91ab1999d40ff31c1
2,416
h
C
System/Library/PrivateFrameworks/HomeSharing.framework/Support/itunescloudd/ICCloudContentTasteUpdateItem.h
lechium/tvOS130Headers
6b47cdcd4a6f453b399aa9d742b5d0f7e3f732fd
[ "MIT" ]
11
2019-11-06T04:48:48.000Z
2022-02-09T17:48:15.000Z
System/Library/PrivateFrameworks/HomeSharing.framework/Support/itunescloudd/ICCloudContentTasteUpdateItem.h
lechium/tvOS130Headers
6b47cdcd4a6f453b399aa9d742b5d0f7e3f732fd
[ "MIT" ]
1
2020-04-16T01:41:56.000Z
2020-04-16T04:32:00.000Z
System/Library/PrivateFrameworks/HomeSharing.framework/Support/itunescloudd/ICCloudContentTasteUpdateItem.h
lechium/tvOS130Headers
6b47cdcd4a6f453b399aa9d742b5d0f7e3f732fd
[ "MIT" ]
3
2019-12-22T20:17:53.000Z
2021-01-25T09:47:49.000Z
/* * This header is generated by classdump-dyld 1.0 * on Tuesday, November 5, 2019 at 2:41:49 AM Mountain Standard Time * Operating System: Version 13.0 (Build 17J586) * Image Source: /System/Library/PrivateFrameworks/HomeSharing.framework/Support/itunescloudd * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ @class ICConnectionConfiguration, NSString, NSDate; @interface ICCloudContentTasteUpdateItem : NSObject { long long _storeID; ICConnectionConfiguration* _configuration; long long _contentTasteType; long long _contentTasteItem; NSString* _globalPlaylistID; NSDate* _updateActionTimeStamp; } @property (assign,nonatomic) long long storeID; //@synthesize storeID=_storeID - In the implementation block @property (nonatomic,retain) ICConnectionConfiguration * configuration; //@synthesize configuration=_configuration - In the implementation block @property (assign,nonatomic) long long contentTasteType; //@synthesize contentTasteType=_contentTasteType - In the implementation block @property (assign,nonatomic) long long contentTasteItem; //@synthesize contentTasteItem=_contentTasteItem - In the implementation block @property (nonatomic,copy) NSString * globalPlaylistID; //@synthesize globalPlaylistID=_globalPlaylistID - In the implementation block @property (nonatomic,retain) NSDate * updateActionTimeStamp; //@synthesize updateActionTimeStamp=_updateActionTimeStamp - In the implementation block -(BOOL)isEqual:(id)arg1 ; -(unsigned long long)hash; -(id)description; -(id)uniqueIdentifier; -(ICConnectionConfiguration *)configuration; -(void)setConfiguration:(ICConnectionConfiguration *)arg1 ; -(long long)storeID; -(NSString *)globalPlaylistID; -(void)setGlobalPlaylistID:(NSString *)arg1 ; -(void)setStoreID:(long long)arg1 ; -(id)initWithStoreItemID:(long long)arg1 mediaContentTasteItem:(long long)arg2 contentTaste:(long long)arg3 configuration:(id)arg4 ; -(id)initWithGlobalPlaylistID:(id)arg1 contentTaste:(long long)arg2 configuration:(id)arg3 ; -(long long)contentTasteType; -(void)setContentTasteType:(long long)arg1 ; -(long long)contentTasteItem; -(void)setContentTasteItem:(long long)arg1 ; -(NSDate *)updateActionTimeStamp; -(void)setUpdateActionTimeStamp:(NSDate *)arg1 ; @end
49.306122
173
0.752483
725baaceaaa7f3e4af415f0f456ff0bbf6337637
1,052
h
C
DissertationExperiment/stdafx.h
jasondevans/dissertation
e0b6d1a7ff7fc94613f87c183a8dfdbf2a6464c4
[ "MIT" ]
null
null
null
DissertationExperiment/stdafx.h
jasondevans/dissertation
e0b6d1a7ff7fc94613f87c183a8dfdbf2a6464c4
[ "MIT" ]
null
null
null
DissertationExperiment/stdafx.h
jasondevans/dissertation
e0b6d1a7ff7fc94613f87c183a8dfdbf2a6464c4
[ "MIT" ]
null
null
null
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include "targetver.h" #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define NOMINMAX // Windows Header Files: #include <WinSock2.h> #include <windows.h> // C RunTime Header Files #include <stdlib.h> #include <malloc.h> #include <memory.h> #include <tchar.h> #include <time.h> #include <math.h> #include <direct.h> // Additional headers #include <iostream> #include <iomanip> #include <fstream> #include <sstream> #include <vector> #include <list> #include <map> #include <algorithm> #include <iterator> #include <limits> #include <codecvt> // Boost headers #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> #include <boost/random/uniform_real_distribution.hpp> #include <boost/function.hpp> #include <boost/function_equal.hpp> #include <boost/bind.hpp> #include <boost/ref.hpp>
21.916667
89
0.745247
8e820fb54c322c58ef3fa3337ae82a1cda8213f7
13,111
h
C
Descending Europa/Temp/StagingArea/Data/il2cppOutput/mscorlib_System_Collections_ObjectModel_ReadOnlyCo3300849205MethodDeclarations.h
screwylightbulb/europa
3dcc98369c8066cb2310143329535206751c8846
[ "MIT" ]
11
2016-07-22T19:58:09.000Z
2021-09-21T12:51:40.000Z
Descending Europa/Temp/StagingArea/Data/il2cppOutput/mscorlib_System_Collections_ObjectModel_ReadOnlyCo3300849205MethodDeclarations.h
screwylightbulb/europa
3dcc98369c8066cb2310143329535206751c8846
[ "MIT" ]
1
2018-05-07T14:32:13.000Z
2018-05-08T09:15:30.000Z
iOS/Classes/Native/mscorlib_System_Collections_ObjectModel_ReadOnlyCo3300849205MethodDeclarations.h
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "MIT" ]
null
null
null
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <assert.h> #include <exception> #include "codegen/il2cpp-codegen.h" #include "mscorlib_System_Collections_ObjectModel_ReadOnlyCo1432926611MethodDeclarations.h" // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::.ctor(System.Collections.Generic.IList`1<T>) #define ReadOnlyCollection_1__ctor_m2791335848(__this, ___list0, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, Il2CppObject*, const MethodInfo*))ReadOnlyCollection_1__ctor_m1366664402_gshared)(__this, ___list0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.ICollection<T>.Add(T) #define ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_Add_m553158034(__this, ___item0, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, Rigidbody2D_t1743771669 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_Add_m2541166012_gshared)(__this, ___item0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.ICollection<T>.Clear() #define ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_Clear_m1974720888(__this, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_Clear_m3473426062_gshared)(__this, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.IList<T>.Insert(System.Int32,T) #define ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_Insert_m2814425593(__this, ___index0, ___item1, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, Rigidbody2D_t1743771669 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_Insert_m3496388003_gshared)(__this, ___index0, ___item1, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.ICollection<T>.Remove(T) #define ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_Remove_m704452001(__this, ___item0, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, Rigidbody2D_t1743771669 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_Remove_m348744375_gshared)(__this, ___item0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.IList<T>.RemoveAt(System.Int32) #define ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_RemoveAt_m688278463(__this, ___index0, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_RemoveAt_m1370240873_gshared)(__this, ___index0, method) // T System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.IList<T>.get_Item(System.Int32) #define ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_get_Item_m3618446659(__this, ___index0, method) (( Rigidbody2D_t1743771669 * (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_get_Item_m3534609325_gshared)(__this, ___index0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.IList<T>.set_Item(System.Int32,T) #define ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_set_Item_m643195024(__this, ___index0, ___value1, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, Rigidbody2D_t1743771669 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_IListU3CTU3E_set_Item_m3174042042_gshared)(__this, ___index0, ___value1, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.Generic.ICollection<T>.get_IsReadOnly() #define ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_get_IsReadOnly_m1235632334(__this, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_Generic_ICollectionU3CTU3E_get_IsReadOnly_m2459576056_gshared)(__this, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.ICollection.CopyTo(System.Array,System.Int32) #define ReadOnlyCollection_1_System_Collections_ICollection_CopyTo_m2714359383(__this, ___array0, ___index1, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, Il2CppArray *, int32_t, const MethodInfo*))ReadOnlyCollection_1_System_Collections_ICollection_CopyTo_m1945557633_gshared)(__this, ___array0, ___index1, method) // System.Collections.IEnumerator System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IEnumerable.GetEnumerator() #define ReadOnlyCollection_1_System_Collections_IEnumerable_GetEnumerator_m3499017746(__this, method) (( Il2CppObject * (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IEnumerable_GetEnumerator_m3330065468_gshared)(__this, method) // System.Int32 System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.Add(System.Object) #define ReadOnlyCollection_1_System_Collections_IList_Add_m2468245791(__this, ___value0, method) (( int32_t (*) (ReadOnlyCollection_1_t3300849205 *, Il2CppObject *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_Add_m1628967861_gshared)(__this, ___value0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.Clear() #define ReadOnlyCollection_1_System_Collections_IList_Clear_m640549221(__this, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_Clear_m514207119_gshared)(__this, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.Contains(System.Object) #define ReadOnlyCollection_1_System_Collections_IList_Contains_m1431665933(__this, ___value0, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, Il2CppObject *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_Contains_m736178103_gshared)(__this, ___value0, method) // System.Int32 System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.IndexOf(System.Object) #define ReadOnlyCollection_1_System_Collections_IList_IndexOf_m3178430455(__this, ___value0, method) (( int32_t (*) (ReadOnlyCollection_1_t3300849205 *, Il2CppObject *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_IndexOf_m3658311565_gshared)(__this, ___value0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.Insert(System.Int32,System.Object) #define ReadOnlyCollection_1_System_Collections_IList_Insert_m3157808034(__this, ___index0, ___value1, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, Il2CppObject *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_Insert_m2823806264_gshared)(__this, ___index0, ___value1, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.Remove(System.Object) #define ReadOnlyCollection_1_System_Collections_IList_Remove_m1513231942(__this, ___value0, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, Il2CppObject *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_Remove_m2498539760_gshared)(__this, ___value0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.RemoveAt(System.Int32) #define ReadOnlyCollection_1_System_Collections_IList_RemoveAt_m1250905650(__this, ___index0, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_RemoveAt_m1730676936_gshared)(__this, ___index0, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.ICollection.get_IsSynchronized() #define ReadOnlyCollection_1_System_Collections_ICollection_get_IsSynchronized_m1729536815(__this, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_ICollection_get_IsSynchronized_m1373829189_gshared)(__this, method) // System.Object System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.ICollection.get_SyncRoot() #define ReadOnlyCollection_1_System_Collections_ICollection_get_SyncRoot_m2683245275(__this, method) (( Il2CppObject * (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_ICollection_get_SyncRoot_m918746289_gshared)(__this, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.get_IsFixedSize() #define ReadOnlyCollection_1_System_Collections_IList_get_IsFixedSize_m1817131580(__this, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_get_IsFixedSize_m932754534_gshared)(__this, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.get_IsReadOnly() #define ReadOnlyCollection_1_System_Collections_IList_get_IsReadOnly_m512625981(__this, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_get_IsReadOnly_m2423760339_gshared)(__this, method) // System.Object System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.get_Item(System.Int32) #define ReadOnlyCollection_1_System_Collections_IList_get_Item_m2683943330(__this, ___index0, method) (( Il2CppObject * (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_get_Item_m3512499704_gshared)(__this, ___index0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::System.Collections.IList.set_Item(System.Int32,System.Object) #define ReadOnlyCollection_1_System_Collections_IList_set_Item_m3020562169(__this, ___index0, ___value1, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, Il2CppObject *, const MethodInfo*))ReadOnlyCollection_1_System_Collections_IList_set_Item_m4167408399_gshared)(__this, ___index0, ___value1, method) // System.Boolean System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::Contains(T) #define ReadOnlyCollection_1_Contains_m1548982246(__this, ___value0, method) (( bool (*) (ReadOnlyCollection_1_t3300849205 *, Rigidbody2D_t1743771669 *, const MethodInfo*))ReadOnlyCollection_1_Contains_m687553276_gshared)(__this, ___value0, method) // System.Void System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::CopyTo(T[],System.Int32) #define ReadOnlyCollection_1_CopyTo_m4140101314(__this, ___array0, ___index1, method) (( void (*) (ReadOnlyCollection_1_t3300849205 *, Rigidbody2DU5BU5D_t23929848*, int32_t, const MethodInfo*))ReadOnlyCollection_1_CopyTo_m475587820_gshared)(__this, ___array0, ___index1, method) // System.Collections.Generic.IEnumerator`1<T> System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::GetEnumerator() #define ReadOnlyCollection_1_GetEnumerator_m3212541513(__this, method) (( Il2CppObject* (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_GetEnumerator_m809369055_gshared)(__this, method) // System.Int32 System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::IndexOf(T) #define ReadOnlyCollection_1_IndexOf_m1316394438(__this, ___value0, method) (( int32_t (*) (ReadOnlyCollection_1_t3300849205 *, Rigidbody2D_t1743771669 *, const MethodInfo*))ReadOnlyCollection_1_IndexOf_m817393776_gshared)(__this, ___value0, method) // System.Int32 System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::get_Count() #define ReadOnlyCollection_1_get_Count_m1970829429(__this, method) (( int32_t (*) (ReadOnlyCollection_1_t3300849205 *, const MethodInfo*))ReadOnlyCollection_1_get_Count_m3681678091_gshared)(__this, method) // T System.Collections.ObjectModel.ReadOnlyCollection`1<UnityEngine.Rigidbody2D>::get_Item(System.Int32) #define ReadOnlyCollection_1_get_Item_m3843728515(__this, ___index0, method) (( Rigidbody2D_t1743771669 * (*) (ReadOnlyCollection_1_t3300849205 *, int32_t, const MethodInfo*))ReadOnlyCollection_1_get_Item_m2421641197_gshared)(__this, ___index0, method)
165.962025
360
0.860117
c25cda0a270d1b9b0198f61a36a522148170d83f
21,697
h
C
test/performance-regression/full-apps/qmcpack/src/QMCWaveFunctions/EinsplineOrb.h
FeiyangJin/hclib
d23c850dce914e2d80cae733670820812a1edeee
[ "BSD-3-Clause" ]
55
2015-07-28T01:32:58.000Z
2022-02-27T16:27:46.000Z
test/performance-regression/full-apps/qmcpack/src/QMCWaveFunctions/EinsplineOrb.h
FeiyangJin/hclib
d23c850dce914e2d80cae733670820812a1edeee
[ "BSD-3-Clause" ]
66
2015-06-15T20:38:19.000Z
2020-08-26T00:11:43.000Z
test/performance-regression/full-apps/qmcpack/src/QMCWaveFunctions/EinsplineOrb.h
FeiyangJin/hclib
d23c850dce914e2d80cae733670820812a1edeee
[ "BSD-3-Clause" ]
26
2015-10-26T22:11:51.000Z
2021-03-02T22:09:15.000Z
////////////////////////////////////////////////////////////////// // (c) Copyright 2006- by Jeongnim Kim and Ken Esler // ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // National Center for Supercomputing Applications & // // Materials Computation Center // // University of Illinois, Urbana-Champaign // // Urbana, IL 61801 // // e-mail: jnkim@ncsa.uiuc.edu // // // // Supported by // // National Center for Supercomputing Applications, UIUC // // Materials Computation Center, UIUC // ////////////////////////////////////////////////////////////////// #ifndef QMCPLUSPLUS_EINSPLINE_ORB_H #define QMCPLUSPLUS_EINSPLINE_ORB_H #include <Configuration.h> #if defined(__xlC__) #include <type_traits/scalar_traits.h> #else #include "QMCWaveFunctions/EinsplineWrapper.h" #endif #include "Numerics/HDFNumericAttrib.h" #include "Lattice/CrystalLattice.h" #include <cmath> namespace qmcplusplus { #if defined(__xlC__) template<typename T, unsigned D> class EinsplineOrb { public: typedef typename scalar_traits<T>::real_type real_type; typedef TinyVector<real_type,D> PosType; PosType kVec; void evaluate (const PosType& u, T &psi) {} void evaluate (const PosType& u, T &psi, TinyVector<T,D> &grad, Tensor<T,D> &hess) {} void read (hid_t h5file, const string& groupPath) { APP_ABORT("Using xlC compiler. Cannot use EinsplineOrb"); } }; #else template<typename T, int N> class EinsplineOrb //: public QMCTraits { }; #if OHMMS_DIM==2 template<> class EinsplineOrb<double,2> //: public QMCTraits { public: CrystalLattice<double,OHMMS_DIM> Lattice; typedef TinyVector<double,2> PosType; PosType Center, uCenter, uMin, uMax; // Reflection controls whether or not to reflect the orbital // across each axis. PosType Reflection; vector<PosType> uCenters, Reflections; double Radius, Energy; bool Localized; BsplineClass_2d_d *Bspline; // UBspline_2d_d *Spline; PosType kVec; inline void evaluate (const PosType& r, double &psi) { psi = (*Bspline)(r); // eval_UBspline_2d_d (Spline, r[0], r[1], &psi); } inline void evaluate (const PosType& r, double &psi, TinyVector<double,2> &grad, double &lapl) { Bspline->evaluate (r, psi, grad, lapl); // eval_UBspline_2d_d_vgl (Spline, r[0], r[1], &psi, &(grad[0]), &lapl); } inline void evaluate (const PosType& r, double &psi, TinyVector<double,2> &grad, Tensor<double,2> &hess) { Bspline->evaluate (r, psi, grad, hess); // eval_UBspline_2d_d_vgh (Spline, r[0], r[1], &psi, // &(grad[0]), &(hess(0,0))); } void read (hid_t h5file, string baseName) { } EinsplineOrb() : Center(PosType()), Radius(0.0), Energy(0.0), Localized(false), Reflection(1.0, 1.0) { } }; template<> class EinsplineOrb<complex<double>,2> //: public QMCTraits { public: CrystalLattice<double,OHMMS_DIM> Lattice; typedef TinyVector<double,2> PosType; PosType Center, uCenter, uMin, uMax; // Reflection controls whether or not to reflect the orbital // across each axis. PosType Reflection; vector<PosType> uCenters, Reflections; double Radius, Energy; bool Localized; BsplineClass_2d_z *Bspline; // UBspline_2d_z *Spline; PosType kVec; inline void evaluate (const PosType& r, complex<double> &psi) { psi = (*Bspline)(r); // eval_UBspline_2d_z (Spline, r[0], r[1], &psi); } inline void evaluate (const PosType& r, complex<double> &psi, TinyVector<complex<double>,2> &grad, complex<double> &lapl) { Bspline->evaluate (r, psi, grad, lapl); // eval_UBspline_2d_z_vgl (Spline, r[0], r[1], // &psi, &(grad[0]), &lapl); } inline void evaluate (const PosType& r, complex<double> &psi, TinyVector<complex<double>,2> &grad, Tensor<complex<double>,2> &hess) { Bspline->evaluate (r, psi, grad, hess); // eval_UBspline_2d_z_vgh (Spline, r[0], r[1], // &psi, &(grad[0]), &(hess(0,0))); } void read (hid_t h5file, const string& baseName) { } EinsplineOrb() : Center(PosType()), Radius(0.0), Energy(0.0), Localized(false), Reflection(1.0, 1.0) { } }; #elif OHMMS_DIM==3 template<> class EinsplineOrb<double,3> //: public QMCTraits { public: CrystalLattice<double,OHMMS_DIM> Lattice; typedef TinyVector<double,3> PosType; PosType Center, uCenter, uMin, uMax; // Reflection controls whether or not to reflect the orbital // across each axis. PosType Reflection; vector<PosType> uCenters, Reflections; double Radius, Energy; bool Localized; BsplineClass_3d_d *Bspline; // UBspline_3d_d *Spline; PosType kVec; inline void evaluate (const PosType& u, double &psi) { if (Localized) { PosType udiff = u - uCenter; udiff[0] -= round (udiff[0]); udiff[1] -= round (udiff[1]); udiff[2] -= round (udiff[2]); PosType rdiff = Lattice.toCart (udiff); if (dot (rdiff,rdiff) < Radius*Radius) { //for (int i=0; i<3; i++) { // assert (udiff[i] > -0.5); // assert (udiff[i] < 0.5); //} for (int i=0; i<3; i++) udiff[i] *= Reflection[i]; udiff[0]+=0.5; udiff[1]+=0.5; udiff[2]+=0.5; psi = (*Bspline)(udiff); // eval_UBspline_3d_d (Spline, udiff[0], udiff[1], udiff[2], &psi); } else psi = 0.0; } else psi = (*Bspline)(u); // eval_UBspline_3d_d (Spline, u[0], u[1], u[2], &psi); } inline void evaluate (const PosType& u, double &psi, TinyVector<double,3> &grad, Tensor<double,3> &hess) { if (Localized) { PosType udiff = u - uCenter; PosType urad = udiff; udiff[0] -= round (udiff[0]); udiff[1] -= round (udiff[1]); udiff[2] -= round (udiff[2]); PosType rdiff = Lattice.toCart (udiff); if (dot (rdiff,rdiff) < Radius*Radius) { PosType uBox = uMax - uMin; for (int i=0; i<3; i++) udiff[i] *= Reflection[i]; udiff[0]+=0.5; udiff[1]+=0.5; udiff[2]+=0.5; Bspline->evaluate (udiff, psi, grad, hess); // eval_UBspline_3d_d_vgh (Spline, udiff[0], udiff[1], udiff[2], // &psi, &(grad[0]), &(hess(0,0))); for (int i=0; i<3; i++) { grad[i] *= Reflection[i]; for (int j=0; j<3; j++) hess(i,j) *= Reflection[i]*Reflection[j]; } } else { psi = grad[0] = grad[1] = grad[2] = 0.0; hess(0,0) = hess(0,1) = hess(0,2) = 0.0; hess(1,0) = hess(1,1) = hess(1,2) = 0.0; hess(2,0) = hess(2,1) = hess(2,2) = 0.0; } } else Bspline->evaluate (u, psi, grad, hess); // eval_UBspline_3d_d_vgh (Spline, u[0], u[1], u[2], // &psi, &(grad[0]), &(hess(0,0))); } void read (hid_t h5file, const string& groupPath) { uMin = PosType(0.0, 0.0, 0.0); uMax = PosType(1.0, 1.0, 1.0); Center = PosType(0.5, 0.5, 0.5); // This controls the relative grid spacing at the edges versus // the center for nonuniform grids PosType clusterfactor(0.0, 0.0, 0.0); vector<PosType> centers; string centerName = groupPath + "center"; string centersName = groupPath + "centers"; string reflectName = groupPath + "reflections"; string vectorName = groupPath + "eigenvector"; string valueName = groupPath + "eigenvalue"; string radiusName = groupPath + "radius"; string uminName = groupPath + "umin"; string umaxName = groupPath + "umax"; string xfactorName = groupPath + "xgrid/clusterfactor"; string yfactorName = groupPath + "ygrid/clusterfactor"; string zfactorName = groupPath + "zgrid/clusterfactor"; HDFAttribIO<PosType> h_Center(Center); HDFAttribIO<PosType> h_uMin(uMin); HDFAttribIO<PosType> h_uMax(uMax); HDFAttribIO<double> h_Radius(Radius); HDFAttribIO<double> h_Energy(Energy); HDFAttribIO<vector<PosType> > h_Centers(centers); HDFAttribIO<vector<PosType> > h_Reflections (Reflections); HDFAttribIO<double> h_xfactor (clusterfactor[0]); HDFAttribIO<double> h_yfactor (clusterfactor[1]); HDFAttribIO<double> h_zfactor (clusterfactor[2]); h_Center.read (h5file, centerName.c_str()); h_Centers.read(h5file, centersName.c_str()); uCenter = Lattice.toUnit (Center); h_Reflections.read (h5file, reflectName.c_str()); h_Center.read (h5file, centerName.c_str()); h_Centers.read (h5file, centersName.c_str()); h_Radius.read (h5file, radiusName.c_str()); h_Energy.read (h5file, valueName.c_str()); h_uMin.read (h5file, uminName.c_str()); h_uMax.read (h5file, umaxName.c_str()); h_Radius.read (h5file, radiusName.c_str()); h_xfactor.read (h5file, xfactorName.c_str()); h_yfactor.read (h5file, yfactorName.c_str()); h_zfactor.read (h5file, zfactorName.c_str()); if (Reflections.size() > 0) Reflection = Reflections[0]; else Reflection = PosType (1.0, 1.0, 1.0); // Localized = Radius > 0.0; Localized = (uMin[0] > 0.0); bool nonuniform = ((clusterfactor[0] > 0.0) && (clusterfactor[1] > 0.0) && (clusterfactor[2] > 0.0)); uCenter = Lattice.toUnit (Center); uCenters.resize(centers.size()); for (int i=0; i<centers.size(); i++) uCenters[i] = Lattice.toUnit (centers[i]); Array<complex<double>,3> rawData; Array<double,3> realData; HDFAttribIO<Array<complex<double>,3> > h_rawData(rawData); h_rawData.read(h5file, vectorName.c_str()); int nx, ny, nz; nx = rawData.size(0); ny=rawData.size(1); nz=rawData.size(2); if (!Localized) { nx--; ny--; nz--; } realData.resize(nx,ny,nz); for (int ix=0; ix<nx; ix++) for (int iy=0; iy<ny; iy++) for (int iz=0; iz<nz; iz++) realData(ix,iy,iz) = rawData(ix,iy,iz).real(); Ugrid x_grid, y_grid, z_grid; BCtype_d xBC, yBC, zBC; double dx, dy, dz; if (Localized) { xBC.lCode = NATURAL; xBC.rCode = NATURAL; yBC.lCode = NATURAL; yBC.rCode = NATURAL; zBC.lCode = NATURAL; zBC.rCode = NATURAL; x_grid.start = uMin[0]; x_grid.end = uMax[0]; x_grid.num = nx; y_grid.start = uMin[1]; y_grid.end = uMax[1]; y_grid.num = ny; z_grid.start = uMin[2]; z_grid.end = uMax[2]; z_grid.num = nz; dx = (uMax[0] - uMin[0]) / (double)(nx-1); dy = (uMax[1] - uMin[1]) / (double)(ny-1); dz = (uMax[2] - uMin[2]) / (double)(nz-1); } else { uMin[0] = uMin[1] = uMin[2] = 0.0; uMax[0] = uMax[1] = uMax[2] = 1.0; xBC.lCode = PERIODIC; xBC.rCode = PERIODIC; yBC.lCode = PERIODIC; yBC.rCode = PERIODIC; zBC.lCode = PERIODIC; zBC.rCode = PERIODIC; x_grid.start = 0.0; x_grid.end = 1.0; x_grid.num = nx; y_grid.start = 0.0; y_grid.end = 1.0; y_grid.num = ny; z_grid.start = 0.0; z_grid.end = 1.0; z_grid.num = nz; dx = 1.0 / (double)nx; dy = 1.0 / (double)ny; dz = 1.0 / (double)nz; } if (Localized) fprintf(stderr, " Center = (%8.5f, %8.5f %8.5f) Radius = %8.5f Mesh = %dx%dx%d\n", Center[0], Center[1], Center[2], Radius, nx, ny, nz); if (nonuniform) Bspline = new NUBsplineClass_3d_d (uMin, uMax, clusterfactor, xBC, yBC, zBC, realData); else Bspline = new UBsplineClass_3d_d (uMin, uMax, xBC, yBC, zBC, realData); // Spline = create_UBspline_3d_d (x_grid, y_grid, z_grid, // xBC, yBC, zBC, realData.data()); // Now test spline to make sure it interpolates the data // for (int ix=0; ix<nx-1; ix++) // for (int iy=0; iy<ny-1; iy++) // for (int iz=0; iz<nz-1; iz++) { // double ux = uMin[0] + dx*(double)ix; // double uy = uMin[1] + dy*(double)iy; // double uz = uMin[2] + dz*(double)iz; // double val; // eval_UBspline_3d_d (Spline, ux, uy, uz, &val); // if (std::fabs((val - realData(ix,iy,iz))) > 1.0e-12) { // cerr << "Error in spline interpolation at ix=" << ix // << " iy=" << iy << " iz=" << iz << endl; // } // } } EinsplineOrb() : Center(PosType()), Radius(0.0), Energy(0.0), Localized(false), Reflection(1.0, 1.0, 1.0) { } EinsplineOrb(EinsplineOrb &orb) { Lattice = orb.Lattice; Center = orb.Center; uCenter = orb.uCenter; uMin = orb.uMin; uMax = orb.uMax; uCenters.resize(orb.uCenters.size()); uCenters = orb.uCenters; Radius = orb.Radius; Energy = orb.Energy; Localized = orb.Localized; // Spline = orb.Spline; Bspline = orb.Bspline; kVec = orb.kVec; Reflection = orb.Reflection; Reflections.resize(orb.Reflections.size()); Reflections = orb.Reflections; } }; template<> class EinsplineOrb<complex<double>,3> //: public QMCTraits { public: CrystalLattice<double,OHMMS_DIM> Lattice; typedef TinyVector<double,3> PosType; PosType Center, uCenter, uMin, uMax; // Reflection controls whether or not to reflect the orbital // across each axis. PosType Reflection; vector<PosType> uCenters, Reflections; double Radius, Energy; bool Localized; BsplineClass_3d_z *Bspline; // UBspline_3d_z *Spline; PosType kVec; inline void evaluate (const PosType& u, complex<double> &psi) { if (Localized) { PosType udiff = u - uCenter; udiff[0] -= round (udiff[0]); udiff[1] -= round (udiff[1]); udiff[2] -= round (udiff[2]); PosType rdiff = Lattice.toCart (udiff); if (dot (rdiff,rdiff) <= Radius*Radius) { //for (int i=0; i<3; i++) { // assert (udiff[i] > -0.5); // assert (udiff[i] < 0.5); //} udiff = Reflection * udiff; udiff[0]+=0.5; udiff[1]+=0.5; udiff[2]+=0.5; psi = (*Bspline)(udiff); // eval_UBspline_3d_z (Spline, udiff[0], udiff[1], udiff[2], &psi); } else //psi = 1.0e-10; psi = complex<double>(); } else psi = (*Bspline)(u); // eval_UBspline_3d_z (Spline, u[0], u[1], u[2], &psi); } inline void evaluate (const PosType& u, complex<double> &psi, TinyVector<complex<double>,3> &grad, Tensor<complex<double>,3> &hess) { if (Localized) { PosType udiff = u - uCenter; udiff[0] -= round (udiff[0]); udiff[1] -= round (udiff[1]); udiff[2] -= round (udiff[2]); PosType rdiff = Lattice.toCart (udiff); if (dot (rdiff,rdiff) <= Radius*Radius) { // PosType uBox = uMax - uMin; // udiff[0]+=0.5; udiff[1]+=0.5; udiff[2]+=0.5; // Bspline->evaluate (udiff, psi, grad, hess); // eval_UBspline_3d_z_vgh (Spline, udiff[0], udiff[1], udiff[2], // &psi, &(grad[0]), &(hess(0,0))); PosType uBox = uMax - uMin; for (int i=0; i<3; i++) udiff[i] *= Reflection[i]; udiff[0]+=0.5; udiff[1]+=0.5; udiff[2]+=0.5; Bspline->evaluate (udiff, psi, grad, hess); // eval_UBspline_3d_d_vgh (Spline, udiff[0], udiff[1], udiff[2], // &psi, &(grad[0]), &(hess(0,0))); for (int i=0; i<3; i++) { grad[i] *= Reflection[i]; for (int j=0; j<3; j++) hess(i,j) *= Reflection[i]*Reflection[j]; } } else { //psi = 1.0e-10; psi = complex<double>(); grad[0] = grad[1] = grad[2] = complex<double>(); hess(0,0) = hess(0,1) = hess(0,2) = complex<double>(); hess(1,0) = hess(1,1) = hess(1,2) = complex<double>(); hess(2,0) = hess(2,1) = hess(2,2) = complex<double>(); } } else Bspline->evaluate (u, psi, grad, hess); // eval_UBspline_3d_z_vgh (Spline, u[0], u[1], u[2], // &psi, &(grad[0]), &(hess(0,0))); } void read (hid_t h5file, const string& groupPath) { uMin = PosType(0.0, 0.0, 0.0); uMax = PosType(1.0, 1.0, 1.0); Center = PosType(0.5, 0.5, 0.5); vector<PosType> centers; PosType clusterfactor (0.0, 0.0, 0.0); string centerName = groupPath + "center"; string centersName = groupPath + "centers"; string reflectName = groupPath + "reflections"; string vectorName = groupPath + "eigenvector"; string valueName = groupPath + "eigenvalue"; string radiusName = groupPath + "radius"; string uminName = groupPath + "umin"; string umaxName = groupPath + "umax"; string xfactorName = groupPath + "xgrid/clusterfactor"; string yfactorName = groupPath + "ygrid/clusterfactor"; string zfactorName = groupPath + "zgrid/clusterfactor"; HDFAttribIO<PosType> h_Center(Center); HDFAttribIO<PosType> h_uMin(uMin); HDFAttribIO<PosType> h_uMax(uMax); HDFAttribIO<double> h_Radius(Radius); HDFAttribIO<double> h_Energy(Energy); HDFAttribIO<vector<PosType> > h_Centers(centers); HDFAttribIO<vector<PosType> > h_Reflections(Reflections); HDFAttribIO<double> h_xfactor (clusterfactor[0]); HDFAttribIO<double> h_yfactor (clusterfactor[1]); HDFAttribIO<double> h_zfactor (clusterfactor[2]); h_Center.read (h5file, centerName.c_str()); h_Centers.read (h5file, centersName.c_str()); h_Radius.read (h5file, radiusName.c_str()); h_Energy.read (h5file, valueName.c_str()); h_uMin.read (h5file, uminName.c_str()); h_uMax.read (h5file, umaxName.c_str()); h_Radius.read (h5file, radiusName.c_str()); h_xfactor.read (h5file, xfactorName.c_str()); h_yfactor.read (h5file, yfactorName.c_str()); h_zfactor.read (h5file, zfactorName.c_str()); // Localized = Radius > 0.0; Localized = (uMin[0] > 0.0); bool nonuniform = ((clusterfactor[0] > 0.0) && (clusterfactor[1] > 0.0) && (clusterfactor[2] > 0.0)); uCenter = Lattice.toUnit (Center); uCenters.resize(centers.size()); for (int i=0; i<centers.size(); i++) uCenters[i] = Lattice.toUnit (centers[i]); h_Reflections.read (h5file, reflectName.c_str()); if (Reflections.size() > 0) Reflection = Reflections[0]; else Reflection = PosType (1.0, 1.0, 1.0); Array<complex<double>,3> rawData; HDFAttribIO<Array<complex<double>,3> > h_rawData(rawData); h_rawData.read(h5file, vectorName.c_str()); int nx, ny, nz; nx = rawData.size(0); ny=rawData.size(1); nz=rawData.size(2); Ugrid x_grid, y_grid, z_grid; BCtype_z xBC, yBC, zBC; if (Localized) { xBC.lCode = NATURAL; xBC.rCode = NATURAL; yBC.lCode = NATURAL; yBC.rCode = NATURAL; zBC.lCode = NATURAL; zBC.rCode = NATURAL; if (nonuniform) Bspline = new NUBsplineClass_3d_z (uMin, uMax, clusterfactor, xBC, yBC, zBC, rawData); else Bspline = new UBsplineClass_3d_z (uMin, uMax, xBC, yBC, zBC, rawData); // x_grid.start = uMin[0]; x_grid.end = uMax[0]; x_grid.num = nx; // y_grid.start = uMin[1]; y_grid.end = uMax[1]; y_grid.num = ny; // z_grid.start = uMin[2]; z_grid.end = uMax[2]; z_grid.num = nz; // Spline = create_UBspline_3d_z (x_grid, y_grid, z_grid, // xBC, yBC, zBC, rawData.data()); } else { Array<complex<double>,3> splineData(nx-1,ny-1,nz-1); for (int ix=0; ix<nx-1; ix++) for (int iy=0; iy<ny-1; iy++) for (int iz=0; iz<nz-1; iz++) splineData(ix,iy,iz) = rawData(ix,iy,iz); xBC.lCode = PERIODIC; xBC.rCode = PERIODIC; yBC.lCode = PERIODIC; yBC.rCode = PERIODIC; zBC.lCode = PERIODIC; zBC.rCode = PERIODIC; TinyVector<double,3> start (0.0, 0.0, 0.0), end (1.0, 1.0, 1.0); Bspline = new UBsplineClass_3d_z (start, end, xBC, yBC, zBC, splineData); // x_grid.start = 0.0; x_grid.end = 1.0; x_grid.num = nx-1; // y_grid.start = 0.0; y_grid.end = 1.0; y_grid.num = ny-1; // z_grid.start = 0.0; z_grid.end = 1.0; z_grid.num = nz-1; // Spline = create_UBspline_3d_z (x_grid, y_grid, z_grid, // xBC, yBC, zBC, splineData.data()); } if (Localized) fprintf(stderr, " uCenter = (%8.5f, %8.5f %8.5f) Radius = %8.5f Mesh = %dx%dx%d\n", uCenter[0], uCenter[1], uCenter[2], Radius, nx, ny, nz); } EinsplineOrb() : Center(PosType()), Radius(0.0), Energy(0.0), Localized(false) { } EinsplineOrb(EinsplineOrb &orb) { Lattice = orb.Lattice; Center = orb.Center; uCenter = orb.uCenter; uMin = orb.uMin; uMax = orb.uMax; uCenters.resize(orb.uCenters.size()); uCenters = orb.uCenters; Radius = orb.Radius; Energy = orb.Energy; Localized = orb.Localized; // Spline = orb.Spline; Bspline = orb.Bspline; kVec = orb.kVec; Reflection = orb.Reflection; Reflections.resize(orb.Reflections.size()); Reflections = orb.Reflections; } }; #endif #endif } #endif
33.125191
94
0.565147
b05403d1285e40b5e87e335277e85a3232b89fb0
170
h
C
include/fcntl.h
ZOSOpenTools/m4port
e83113598b8286066509d30e012d3950a3cda9e5
[ "Apache-2.0" ]
3
2021-08-11T22:58:39.000Z
2021-12-12T23:12:21.000Z
include/fcntl.h
ZOSOpenTools/m4port
e83113598b8286066509d30e012d3950a3cda9e5
[ "Apache-2.0" ]
1
2021-08-14T00:01:49.000Z
2021-11-10T05:09:13.000Z
include/fcntl.h
ZOSOpenTools/m4port
e83113598b8286066509d30e012d3950a3cda9e5
[ "Apache-2.0" ]
null
null
null
#ifndef __AUTOTOOL_FCNTL__ #define __AUTOTOOL_FCNTL__ 1 #define O_SEARCH 0x1000 #define O_DIRECTORY 0x2000 #define O_CLOEXEC 0x4000 #include_next <fcntl.h> #endif
17
29
0.8
fcb1a1c11ad03d155d2974a4ff8a5cb9aeaa22ff
530
h
C
Coffee Timer/Coffee Timer/CTRTimerModel.h
chuyen-de/ios-app
75412d1e1366f3505ffde4a8bb3e595635b893dd
[ "BSD-3-Clause" ]
8
2015-04-01T06:39:02.000Z
2022-01-02T21:16:46.000Z
Coffee Timer/Coffee Timer/CTRTimerModel.h
chuyen-de/ios-app
75412d1e1366f3505ffde4a8bb3e595635b893dd
[ "BSD-3-Clause" ]
1
2015-03-11T05:30:20.000Z
2015-04-15T02:38:04.000Z
Coffee Timer/Coffee Timer/CTRTimerModel.h
chuyen-de/ios-app
75412d1e1366f3505ffde4a8bb3e595635b893dd
[ "BSD-3-Clause" ]
18
2015-03-22T16:03:54.000Z
2021-02-11T09:01:04.000Z
// // CTRTimerModel.h // Coffee Timer // // Created by Ash Furrow on 2013-05-05. // Copyright (c) 2013 Ash Furrow. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> typedef enum : int32_t { CTRTimerModelTypeCoffee = 0, CTRTimerModelTypeTea }CTRTimerModelType; @interface CTRTimerModel : NSManagedObject @property (nonatomic, retain) NSString * name; @property (nonatomic) int32_t duration; @property (nonatomic) int32_t type; @property (nonatomic) int32_t displayOrder; @end
21.2
55
0.741509
11cfbf398a5090cfd657580fbd50fb3b6ba39d91
7,532
c
C
qemu/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
hyunjoy/scripts
01114d3627730d695b5ebe61093c719744432ffa
[ "Apache-2.0" ]
44
2022-03-16T08:32:31.000Z
2022-03-31T16:02:35.000Z
qemu/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
hyunjoy/scripts
01114d3627730d695b5ebe61093c719744432ffa
[ "Apache-2.0" ]
1
2022-03-29T02:30:28.000Z
2022-03-30T03:40:46.000Z
qemu/tests/tcg/mips/user/ase/msa/interleave/test_msa_ilvl_b.c
hyunjoy/scripts
01114d3627730d695b5ebe61093c719744432ffa
[ "Apache-2.0" ]
18
2022-03-19T04:41:04.000Z
2022-03-31T03:32:12.000Z
/* * Test program for MSA instruction ILVL.B * * Copyright (C) 2019 Wave Computing, Inc. * Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ #include <sys/time.h> #include <stdint.h> #include "../../../../include/wrappers_msa.h" #include "../../../../include/test_inputs_128.h" #include "../../../../include/test_utils_128.h" #define TEST_COUNT_TOTAL ( \ (PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \ (RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT)) int32_t main(void) { char *isa_ase_name = "MSA"; char *group_name = "Interleave"; char *instruction_name = "ILVL.B"; int32_t ret; uint32_t i, j; struct timeval start, end; double elapsed_time; uint64_t b128_result[TEST_COUNT_TOTAL][2]; uint64_t b128_expect[TEST_COUNT_TOTAL][2] = { { 0xffffffffffffffffULL, 0xffffffffffffffffULL, }, /* 0 */ { 0xff00ff00ff00ff00ULL, 0xff00ff00ff00ff00ULL, }, { 0xffaaffaaffaaffaaULL, 0xffaaffaaffaaffaaULL, }, { 0xff55ff55ff55ff55ULL, 0xff55ff55ff55ff55ULL, }, { 0xffccffccffccffccULL, 0xffccffccffccffccULL, }, { 0xff33ff33ff33ff33ULL, 0xff33ff33ff33ff33ULL, }, { 0xffe3ff8eff38ffe3ULL, 0xff38ffe3ff8eff38ULL, }, { 0xff1cff71ffc7ff1cULL, 0xffc7ff1cff71ffc7ULL, }, { 0x00ff00ff00ff00ffULL, 0x00ff00ff00ff00ffULL, }, /* 8 */ { 0x0000000000000000ULL, 0x0000000000000000ULL, }, { 0x00aa00aa00aa00aaULL, 0x00aa00aa00aa00aaULL, }, { 0x0055005500550055ULL, 0x0055005500550055ULL, }, { 0x00cc00cc00cc00ccULL, 0x00cc00cc00cc00ccULL, }, { 0x0033003300330033ULL, 0x0033003300330033ULL, }, { 0x00e3008e003800e3ULL, 0x003800e3008e0038ULL, }, { 0x001c007100c7001cULL, 0x00c7001c007100c7ULL, }, { 0xaaffaaffaaffaaffULL, 0xaaffaaffaaffaaffULL, }, /* 16 */ { 0xaa00aa00aa00aa00ULL, 0xaa00aa00aa00aa00ULL, }, { 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, }, { 0xaa55aa55aa55aa55ULL, 0xaa55aa55aa55aa55ULL, }, { 0xaaccaaccaaccaaccULL, 0xaaccaaccaaccaaccULL, }, { 0xaa33aa33aa33aa33ULL, 0xaa33aa33aa33aa33ULL, }, { 0xaae3aa8eaa38aae3ULL, 0xaa38aae3aa8eaa38ULL, }, { 0xaa1caa71aac7aa1cULL, 0xaac7aa1caa71aac7ULL, }, { 0x55ff55ff55ff55ffULL, 0x55ff55ff55ff55ffULL, }, /* 24 */ { 0x5500550055005500ULL, 0x5500550055005500ULL, }, { 0x55aa55aa55aa55aaULL, 0x55aa55aa55aa55aaULL, }, { 0x5555555555555555ULL, 0x5555555555555555ULL, }, { 0x55cc55cc55cc55ccULL, 0x55cc55cc55cc55ccULL, }, { 0x5533553355335533ULL, 0x5533553355335533ULL, }, { 0x55e3558e553855e3ULL, 0x553855e3558e5538ULL, }, { 0x551c557155c7551cULL, 0x55c7551c557155c7ULL, }, { 0xccffccffccffccffULL, 0xccffccffccffccffULL, }, /* 32 */ { 0xcc00cc00cc00cc00ULL, 0xcc00cc00cc00cc00ULL, }, { 0xccaaccaaccaaccaaULL, 0xccaaccaaccaaccaaULL, }, { 0xcc55cc55cc55cc55ULL, 0xcc55cc55cc55cc55ULL, }, { 0xccccccccccccccccULL, 0xccccccccccccccccULL, }, { 0xcc33cc33cc33cc33ULL, 0xcc33cc33cc33cc33ULL, }, { 0xcce3cc8ecc38cce3ULL, 0xcc38cce3cc8ecc38ULL, }, { 0xcc1ccc71ccc7cc1cULL, 0xccc7cc1ccc71ccc7ULL, }, { 0x33ff33ff33ff33ffULL, 0x33ff33ff33ff33ffULL, }, /* 40 */ { 0x3300330033003300ULL, 0x3300330033003300ULL, }, { 0x33aa33aa33aa33aaULL, 0x33aa33aa33aa33aaULL, }, { 0x3355335533553355ULL, 0x3355335533553355ULL, }, { 0x33cc33cc33cc33ccULL, 0x33cc33cc33cc33ccULL, }, { 0x3333333333333333ULL, 0x3333333333333333ULL, }, { 0x33e3338e333833e3ULL, 0x333833e3338e3338ULL, }, { 0x331c337133c7331cULL, 0x33c7331c337133c7ULL, }, { 0xe3ff8eff38ffe3ffULL, 0x38ffe3ff8eff38ffULL, }, /* 48 */ { 0xe3008e003800e300ULL, 0x3800e3008e003800ULL, }, { 0xe3aa8eaa38aae3aaULL, 0x38aae3aa8eaa38aaULL, }, { 0xe3558e553855e355ULL, 0x3855e3558e553855ULL, }, { 0xe3cc8ecc38cce3ccULL, 0x38cce3cc8ecc38ccULL, }, { 0xe3338e333833e333ULL, 0x3833e3338e333833ULL, }, { 0xe3e38e8e3838e3e3ULL, 0x3838e3e38e8e3838ULL, }, { 0xe31c8e7138c7e31cULL, 0x38c7e31c8e7138c7ULL, }, { 0x1cff71ffc7ff1cffULL, 0xc7ff1cff71ffc7ffULL, }, /* 56 */ { 0x1c007100c7001c00ULL, 0xc7001c007100c700ULL, }, { 0x1caa71aac7aa1caaULL, 0xc7aa1caa71aac7aaULL, }, { 0x1c557155c7551c55ULL, 0xc7551c557155c755ULL, }, { 0x1ccc71ccc7cc1cccULL, 0xc7cc1ccc71ccc7ccULL, }, { 0x1c337133c7331c33ULL, 0xc7331c337133c733ULL, }, { 0x1ce3718ec7381ce3ULL, 0xc7381ce3718ec738ULL, }, { 0x1c1c7171c7c71c1cULL, 0xc7c71c1c7171c7c7ULL, }, { 0xfefe7b7bb0b00c0cULL, 0x4b4b67670b0b5e5eULL, }, /* 64 */ { 0xfe157b3fb0520cfcULL, 0x4b1267f70bbb5e1aULL, }, { 0xfeab7b2bb0250c14ULL, 0x4b2767d80bc65effULL, }, { 0xfea97b42b0e20ca0ULL, 0x4b8d67f10b885ed8ULL, }, { 0x15fe3f7b52b0fc0cULL, 0x124bf767bb0b1a5eULL, }, { 0x15153f3f5252fcfcULL, 0x1212f7f7bbbb1a1aULL, }, { 0x15ab3f2b5225fc14ULL, 0x1227f7d8bbc61affULL, }, { 0x15a93f4252e2fca0ULL, 0x128df7f1bb881ad8ULL, }, { 0xabfe2b7b25b0140cULL, 0x274bd867c60bff5eULL, }, /* 72 */ { 0xab152b3f255214fcULL, 0x2712d8f7c6bbff1aULL, }, { 0xabab2b2b25251414ULL, 0x2727d8d8c6c6ffffULL, }, { 0xaba92b4225e214a0ULL, 0x278dd8f1c688ffd8ULL, }, { 0xa9fe427be2b0a00cULL, 0x8d4bf167880bd85eULL, }, { 0xa915423fe252a0fcULL, 0x8d12f1f788bbd81aULL, }, { 0xa9ab422be225a014ULL, 0x8d27f1d888c6d8ffULL, }, { 0xa9a94242e2e2a0a0ULL, 0x8d8df1f18888d8d8ULL, }, }; reset_msa_registers(); gettimeofday(&start, NULL); for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) { for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { do_msa_ILVL_B(b128_pattern[i], b128_pattern[j], b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); } } for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) { for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { do_msa_ILVL_B(b128_random[i], b128_random[j], b128_result[((PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT)) + RANDOM_INPUTS_SHORT_COUNT * i + j]); } } gettimeofday(&end, NULL); elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0; elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0; ret = check_results_128(isa_ase_name, group_name, instruction_name, TEST_COUNT_TOTAL, elapsed_time, &b128_result[0][0], &b128_expect[0][0]); return ret; }
47.371069
75
0.667021
6914eeee32affa67f5f109f581db452bc87d892c
225
h
C
Example/BUDemo/BUDBuglyConfig.framework/Headers/BUDBuglyConfig.h
431910864/Bytedance-UnionAD
94fbf841f93ace35c521005408a862ba64248a2f
[ "MIT" ]
null
null
null
Example/BUDemo/BUDBuglyConfig.framework/Headers/BUDBuglyConfig.h
431910864/Bytedance-UnionAD
94fbf841f93ace35c521005408a862ba64248a2f
[ "MIT" ]
null
null
null
Example/BUDemo/BUDBuglyConfig.framework/Headers/BUDBuglyConfig.h
431910864/Bytedance-UnionAD
94fbf841f93ace35c521005408a862ba64248a2f
[ "MIT" ]
null
null
null
// // BUDBuglyConfig.h // BUDBuglyConfig // // Created by bytedance on 2020/9/9. // #import <Foundation/Foundation.h> @interface BUDBuglyConfig : NSObject + (void)startWithBugly:(Class)bugly andConfig:(id)config; @end
15
57
0.715556
6978f7ebb1ee4daca04510d1fc7396a8690ba532
4,257
h
C
engine/stl/Types/TypeId.h
azhirnov/AE
31a42b9bf3bdd86304d565d66e4710e7d89d7392
[ "MIT" ]
2
2019-11-14T17:55:26.000Z
2022-01-12T09:38:29.000Z
engine/stl/Types/TypeId.h
azhirnov/AE
31a42b9bf3bdd86304d565d66e4710e7d89d7392
[ "MIT" ]
null
null
null
engine/stl/Types/TypeId.h
azhirnov/AE
31a42b9bf3bdd86304d565d66e4710e7d89d7392
[ "MIT" ]
1
2020-04-11T16:04:31.000Z
2020-04-11T16:04:31.000Z
// Copyright (c) 2018-2020, Zhirnov Andrey. For more information see 'LICENSE' #pragma once #include "stl/Common.h" namespace AE::STL::_ae_stl_hidden_ { // // Static Type ID // template <uint UID> struct StaticTypeID final { private: size_t _value; public: constexpr StaticTypeID () : _value{~size_t(0)} {} ND_ constexpr bool operator == (StaticTypeID<UID> rhs) const { return _value == rhs._value; } ND_ constexpr bool operator != (StaticTypeID<UID> rhs) const { return _value != rhs._value; } ND_ constexpr bool operator > (StaticTypeID<UID> rhs) const { return _value > rhs._value; } ND_ constexpr bool operator < (StaticTypeID<UID> rhs) const { return _value < rhs._value; } ND_ constexpr bool operator >= (StaticTypeID<UID> rhs) const { return _value >= rhs._value; } ND_ constexpr bool operator <= (StaticTypeID<UID> rhs) const { return _value <= rhs._value; } ND_ constexpr size_t Get () const { return _value; } ND_ constexpr const char * Name () const { return ""; } }; template <uint UID> struct BaseStaticTypeIdOf { protected: static inline size_t _counter = 0; }; template <typename T, uint UID> struct StaticTypeIdOf : BaseStaticTypeIdOf<UID> { ND_ static StaticTypeID<UID> Get () { static size_t id = BaseStaticTypeIdOf<UID>::_counter++; return BitCast< StaticTypeID<UID> >( id ); } }; template <typename T, uint UID> struct StaticTypeIdOf< const T, UID > final : StaticTypeIdOf<T, UID> {}; template <typename T, uint UID> struct StaticTypeIdOf< volatile T, UID > final : StaticTypeIdOf<T, UID> {}; template <typename T, uint UID> struct StaticTypeIdOf< const volatile T, UID > final : StaticTypeIdOf<T, UID> {}; } // AE::STL::_ae_stl_hidden_ namespace std { template <uint32_t UID> struct hash< AE::STL::_ae_stl_hidden_::StaticTypeID<UID> > { ND_ size_t operator () (const AE::STL::_ae_stl_hidden_::StaticTypeID<UID> &value) const { return value.Get(); } }; } // std //----------------------------------------------------------------------------- namespace AE::STL::_ae_stl_hidden_ { // // STD Type ID // struct StdTypeID final { private: enum UnknownType {}; std::type_index _value; public: StdTypeID () : _value{ typeid(UnknownType) } {} StdTypeID (const std::type_index &value) : _value{ value } {} ND_ bool operator == (StdTypeID rhs) const { return _value == rhs._value; } ND_ bool operator != (StdTypeID rhs) const { return _value != rhs._value; } ND_ bool operator > (StdTypeID rhs) const { return _value > rhs._value; } ND_ bool operator < (StdTypeID rhs) const { return _value < rhs._value; } ND_ bool operator >= (StdTypeID rhs) const { return _value >= rhs._value; } ND_ bool operator <= (StdTypeID rhs) const { return _value <= rhs._value; } ND_ std::type_index Get () const { return _value; } ND_ const char * Name () const { return _value.name(); } }; template <typename T> struct StdTypeIdOf final { ND_ static StdTypeID Get () { return StdTypeID( typeid(T) ); } }; } // AE::STL::_ae_stl_hidden_ namespace std { template <> struct hash< AE::STL::_ae_stl_hidden_::StdTypeID > { ND_ size_t operator () (const AE::STL::_ae_stl_hidden_::StdTypeID &value) const { return std::hash< std::type_index >{}( value.Get() ); } }; } // std #if 0 namespace AE::STL { using TypeId = _ae_stl_hidden_::StaticTypeID<0>; /* ================================================= TypeIdOf ================================================= */ template <typename T> ND_ forceinline static TypeId TypeIdOf () { return _ae_stl_hidden_::StaticTypeIdOf<T,0>::Get(); } template <typename T> ND_ forceinline static TypeId TypeIdOf (const T&) { return TypeIdOf<T>(); } } // AE::STL #else namespace AE::STL { using TypeId = _ae_stl_hidden_::StdTypeID; /* ================================================= TypeIdOf ================================================= */ template <typename T> ND_ forceinline static TypeId TypeIdOf () { return _ae_stl_hidden_::StdTypeIdOf<T>::Get(); } template <typename T> ND_ forceinline static TypeId TypeIdOf (const T&) { return TypeIdOf<T>(); } } // AE::STL #endif
24.894737
114
0.624148
927750e71cb355155619dd1825ababf1f43f88f5
5,073
c
C
vmdir/common/threadcontext.c
debojyoti-majumder/lightwave
1ff3beaafb7351140b9372e3a46b2a288f53832e
[ "Apache-2.0" ]
357
2015-04-20T00:16:30.000Z
2022-03-17T05:34:09.000Z
vmdir/common/threadcontext.c
tdeleeuw/lightwave
baae9b03ddeeb6299ab891f9c1e2957b86d37cc5
[ "Apache-2.0" ]
38
2015-11-19T05:20:53.000Z
2022-03-31T07:21:59.000Z
vmdir/common/threadcontext.c
tdeleeuw/lightwave
baae9b03ddeeb6299ab891f9c1e2957b86d37cc5
[ "Apache-2.0" ]
135
2015-04-21T15:23:21.000Z
2022-03-30T11:46:36.000Z
/* * Copyright © 2012-2015 VMware, 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. */ #include "includes.h" PVMDIR_THREAD_CONTEXT pThreadContext = NULL; static VOID _VmDirInitThreadContextOnce(VOID); // Protects key from being created more than once static VOID _VmDirInitThreadContextOnce(VOID) { DWORD dwError = 0; dwError = pthread_key_create(&pThreadContext->threadLogContext, NULL); if (dwError) { VMDIR_LOG_ERROR( VMDIR_LOG_MASK_ALL, "_VmDirInitThreadContextOnce failed (%d)", dwError); VMDIR_SAFE_FREE_MEMORY(pThreadContext); } } VOID VmDirFreeThreadContext(VOID) { VMDIR_SAFE_FREE_MEMORY(pThreadContext); } VOID VmDirFreeThreadLogContext( PVMDIR_THREAD_LOG_CONTEXT pThreadLogContext ) { if (pThreadLogContext) { VMDIR_SAFE_FREE_MEMORY(pThreadLogContext->pszRequestId); VMDIR_SAFE_FREE_MEMORY(pThreadLogContext->pszSessionId); VMDIR_SAFE_FREE_MEMORY(pThreadLogContext->pszUserId); VMDIR_SAFE_FREE_MEMORY(pThreadLogContext); } } DWORD VmDirInitThreadContext(VOID) { DWORD dwError = 0; dwError = VmDirAllocateMemory( sizeof(VMDIR_THREAD_CONTEXT), (PVOID*)&pThreadContext); BAIL_ON_VMDIR_ERROR(dwError); pThreadContext->threadContextOnce = PTHREAD_ONCE_INIT; dwError = pthread_once(&pThreadContext->threadContextOnce, _VmDirInitThreadContextOnce); BAIL_ON_VMDIR_ERROR(dwError); cleanup: return dwError; error: goto cleanup; } DWORD VmDirGetThreadContext( PVMDIR_THREAD_CONTEXT* ppThreadContext ) { DWORD dwError = 0; if (!ppThreadContext) { dwError = VMDIR_ERROR_INVALID_PARAMETER; BAIL_ON_VMDIR_ERROR(dwError); } *ppThreadContext = pThreadContext; cleanup: return dwError; error: goto cleanup; } DWORD VmDirGetThreadLogContextValue( PVMDIR_THREAD_LOG_CONTEXT* ppThreadLogContext ) { DWORD dwError = 0; PVMDIR_THREAD_LOG_CONTEXT pThreadLogContext = NULL; if (!ppThreadLogContext) { dwError = VMDIR_ERROR_INVALID_PARAMETER; BAIL_ON_VMDIR_ERROR(dwError); } if (pThreadContext) { pThreadLogContext = pthread_getspecific(pThreadContext->threadLogContext); } *ppThreadLogContext = pThreadLogContext; cleanup: return dwError; error: VMDIR_LOG_ERROR( VMDIR_LOG_MASK_ALL, "VmDirGetThreadLogContextValue failed (%d)", dwError); goto cleanup; } DWORD VmDirSetThreadLogContextValue( PVMDIR_THREAD_LOG_CONTEXT pThreadLogContext ) { DWORD dwError = 0; assert(pThreadContext); dwError = pthread_setspecific( pThreadContext->threadLogContext, (PVOID)pThreadLogContext); BAIL_ON_VMDIR_ERROR(dwError); cleanup: return dwError; error: VMDIR_LOG_ERROR( VMDIR_LOG_MASK_ALL, "VmDirSetThreadLogContextValue failed (%d)", dwError); goto cleanup; } VOID VmDirUnsetAndFreeThrLogCtx( PVMDIR_THREAD_LOG_CONTEXT pThrLogCtx ) { PVMDIR_THREAD_LOG_CONTEXT pLocalLogCtx = NULL; if (pThrLogCtx) { VmDirGetThreadLogContextValue(&pLocalLogCtx); if (pLocalLogCtx) { if (pLocalLogCtx == pThrLogCtx) { VmDirSetThreadLogContextValue(NULL); } else { VMDIR_LOG_WARNING(VMDIR_LOG_MASK_ALL, "%s thrlogctx mismatch. curr ctx (%p), parm ctx (%p)", __FUNCTION__, pLocalLogCtx, pThrLogCtx); } } VmDirFreeThreadLogContext(pThrLogCtx); } } DWORD VmDirAllocAndSetThrLogCtx( PVMDIR_THREAD_LOG_CONTEXT* ppThrLogCtx ) { DWORD dwError = 0; PVMDIR_THREAD_LOG_CONTEXT pCurrLogCtx = NULL; PVMDIR_THREAD_LOG_CONTEXT pLocalLogCtx = NULL; if (!ppThrLogCtx) { BAIL_WITH_VMDIR_ERROR(dwError, VMDIR_ERROR_INVALID_PARAMETER); } dwError = VmDirGetThreadLogContextValue(&pCurrLogCtx); BAIL_ON_VMDIR_ERROR(dwError); if (pCurrLogCtx) { BAIL_WITH_VMDIR_ERROR(dwError, VMDIR_ERROR_INVALID_STATE); } dwError = VmDirAllocateMemory(sizeof(VMDIR_THREAD_LOG_CONTEXT), (PVOID)&pLocalLogCtx); BAIL_ON_VMDIR_ERROR(dwError); dwError = VmDirSetThreadLogContextValue(pLocalLogCtx); BAIL_ON_VMDIR_ERROR(dwError); *ppThrLogCtx = pLocalLogCtx; pLocalLogCtx = NULL; cleanup: return dwError; error: VmDirUnsetAndFreeThrLogCtx(pLocalLogCtx); goto cleanup; }
22.546667
108
0.693278
1f7e9d9c877ee82efbf3c21465aeaa3c2e4f5d2a
1,064
h
C
QMXMFunModule/Classes/XMFun/DeviceConfigManager/ElectricityConfig/ElectricityConfig.h
wangdongyang/QMXMFunModule
9dd9537051f2235884e988bdec023ee130475f34
[ "MIT" ]
null
null
null
QMXMFunModule/Classes/XMFun/DeviceConfigManager/ElectricityConfig/ElectricityConfig.h
wangdongyang/QMXMFunModule
9dd9537051f2235884e988bdec023ee130475f34
[ "MIT" ]
null
null
null
QMXMFunModule/Classes/XMFun/DeviceConfigManager/ElectricityConfig/ElectricityConfig.h
wangdongyang/QMXMFunModule
9dd9537051f2235884e988bdec023ee130475f34
[ "MIT" ]
null
null
null
// // ElectricityConfig.h // FunSDKDemo // // Created by zhang on 2019/5/10. // Copyright © 2019 zhang. All rights reserved. // /****** * 获取低功耗设备剩余电量 * 设备上报功能目前包括两方面,一方面是电量上报,另一方面是存储卡状态上报 * 直接用GetConfig方法获取的可能会不准确,使用设备主动上报的方式获取的电量实时性最好 *****/ @protocol ElectricityConfigDelegate <NSObject> @optional //获取设备电量上报回调信息 - (void)startUploadElectricityResult:(NSInteger)result; //设置设备电量上报开关回调 - (void)stopUploadElectricityResult:(NSInteger)result; //设备电量上报 - (void)deviceUploadElectricityResult:(NSInteger)result; @end #import "FunMsgListener.h" NS_ASSUME_NONNULL_BEGIN @interface ElectricityConfig : FunMsgListener @property (nonatomic) int percent; //剩余电量 百分比 @property (nonatomic) int electable; //充电状态 0:未充电 1:正在充电 2:电充满 3:未知(表示各数据不准确) @property (nonatomic) int storageStatus; //TF卡状态: -2:设备存储未知 -1:存储设备被拔出 0:没有存储设备 1:有存储设备 2:存储设备插入 @property (nonatomic, assign) id <ElectricityConfigDelegate> delegate; #pragma mark 设置设备开始上报s状态 (包括电量,存储状态) - (void)startUploadElectricity; #pragma mark 停止设备上报电量 - (void)stopUploadElectricity; @end NS_ASSUME_NONNULL_END
24.181818
96
0.775376
1f891fd53ee60fb3419a914590a9243963a3f32f
561
c
C
execution/path.c
ikamikaz3/my_42sh
af39b6a7c27e4855c803071bfb62063efb6d28ef
[ "MIT" ]
null
null
null
execution/path.c
ikamikaz3/my_42sh
af39b6a7c27e4855c803071bfb62063efb6d28ef
[ "MIT" ]
null
null
null
execution/path.c
ikamikaz3/my_42sh
af39b6a7c27e4855c803071bfb62063efb6d28ef
[ "MIT" ]
null
null
null
/* ** path.c for path in /home/ayasch_d/Home/rendu/PSU_2014_42sh ** ** Made by Dan Ayasch ** Login <ayasch_d@epitech.net> ** ** Started on Tue May 5 16:00:28 2015 Dan Ayasch ** Last update Sat May 23 15:50:34 2015 Dan Ayasch */ #include <stdlib.h> #include "list.h" char *path(char **env) { char *name; int x; int y; x = 0; y = 0; while (env[y] != NULL) { if (env[y][x] == 'P' && env[y][x + 1] == 'A' && env[y][x + 2] == 'T' && env[y][x + 3] == 'H') name = my_strcpy(env[y]); y++; } return (name); }
18.096774
74
0.515152
f79a56f76127a8e44918b742efeae3a66f61023c
6,540
c
C
src/redland/rasqal-0.9.33/src/rasqal_rowsource_distinct.c
aram148/libOmexMeta
331a0a48570a212aaa2b6cb3fe72b9f43ac828af
[ "Apache-2.0" ]
6
2020-07-07T11:23:29.000Z
2021-11-19T09:49:02.000Z
src/redland/rasqal-0.9.33/src/rasqal_rowsource_distinct.c
aram148/libOmexMeta
331a0a48570a212aaa2b6cb3fe72b9f43ac828af
[ "Apache-2.0" ]
79
2020-06-23T15:32:44.000Z
2022-02-23T06:46:43.000Z
src/redland/rasqal-0.9.33/src/rasqal_rowsource_distinct.c
aram148/libOmexMeta
331a0a48570a212aaa2b6cb3fe72b9f43ac828af
[ "Apache-2.0" ]
5
2020-11-29T04:29:54.000Z
2021-08-17T15:55:41.000Z
/* -*- Mode: c; c-basic-offset: 2 -*- * * rasqal_rowsource_distinct.c - Rasqal distinct rowsource class * * Copyright (C) 2009, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the following three licenses as alternatives: * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version * 3. Apache License, V2.0 or any newer version * * You may not use this file except in compliance with at least one of * the above three licenses. * * See LICENSE.html or LICENSE.txt at the top of this package for the * complete terms and further detail along with the license texts for * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. * */ #ifdef HAVE_CONFIG_H #include <rasqal_config.h> #endif #ifdef WIN32 #include <win32_rasqal_config.h> #endif #include <stdio.h> #include <string.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #include "raptor2.h" #include "rasqal.h" #include "rasqal_internal.h" #define DEBUG_FH stderr typedef struct { /* inner rowsource to distinct */ rasqal_rowsource *rowsource; /* map for distincting row values */ rasqal_map *map; /* offset into results for current row */ int offset; } rasqal_distinct_rowsource_context; static int rasqal_distinct_rowsource_init_common(rasqal_rowsource *rowsource, void *user_data) { rasqal_query *query = rowsource->query; rasqal_distinct_rowsource_context *con; con = (rasqal_distinct_rowsource_context *) user_data; con->offset = 0; con->map = rasqal_engine_new_rowsort_map(1, query->compare_flags, NULL); if (!con->map) return 1; return 0; } static int rasqal_distinct_rowsource_init(rasqal_rowsource *rowsource, void *user_data) { /* rasqal_distinct_rowsource_context *con; con = (rasqal_distinct_rowsource_context*)user_data; */ return rasqal_distinct_rowsource_init_common(rowsource, user_data); } static int rasqal_distinct_rowsource_ensure_variables(rasqal_rowsource *rowsource, void *user_data) { rasqal_distinct_rowsource_context *con; con = (rasqal_distinct_rowsource_context *) user_data; rasqal_rowsource_ensure_variables(con->rowsource); rowsource->size = 0; rasqal_rowsource_copy_variables(rowsource, con->rowsource); return 0; } static int rasqal_distinct_rowsource_finish(rasqal_rowsource *rowsource, void *user_data) { rasqal_distinct_rowsource_context *con; con = (rasqal_distinct_rowsource_context *) user_data; if (con->rowsource) rasqal_free_rowsource(con->rowsource); if (con->map) rasqal_free_map(con->map); RASQAL_FREE(rasqal_distinct_rowsource_context, con); return 0; } static rasqal_row * rasqal_distinct_rowsource_read_row(rasqal_rowsource *rowsource, void *user_data) { rasqal_distinct_rowsource_context *con; rasqal_row *row = NULL; con = (rasqal_distinct_rowsource_context *) user_data; while (1) { int result; row = rasqal_rowsource_read_row(con->rowsource); if (!row) break; result = rasqal_engine_rowsort_map_add_row(con->map, row); RASQAL_DEBUG2("row is %s\n", result ? "not distinct" : "distinct"); if (!result) /* row was distinct (not a duplicate) so return it */ break; } if (row) { row = rasqal_new_row_from_row(row); rasqal_row_set_rowsource(row, rowsource); row->offset = con->offset++; } return row; } static int rasqal_distinct_rowsource_reset(rasqal_rowsource *rowsource, void *user_data) { rasqal_distinct_rowsource_context *con; int rc; con = (rasqal_distinct_rowsource_context *) user_data; if (con->map) rasqal_free_map(con->map); rc = rasqal_distinct_rowsource_init_common(rowsource, user_data); if (rc) return rc; return rasqal_rowsource_reset(con->rowsource); } static rasqal_rowsource * rasqal_distinct_rowsource_get_inner_rowsource(rasqal_rowsource *rowsource, void *user_data, int offset) { rasqal_distinct_rowsource_context *con; con = (rasqal_distinct_rowsource_context *) user_data; if (offset == 0) return con->rowsource; return NULL; } static const rasqal_rowsource_handler rasqal_distinct_rowsource_handler = { /* .version = */ 1, "distinct", /* .init = */ rasqal_distinct_rowsource_init, /* .finish = */ rasqal_distinct_rowsource_finish, /* .ensure_variables = */ rasqal_distinct_rowsource_ensure_variables, /* .read_row = */ rasqal_distinct_rowsource_read_row, /* .read_all_rows = */ NULL, /* .reset = */ rasqal_distinct_rowsource_reset, /* .set_requirements = */ NULL, /* .get_inner_rowsource = */ rasqal_distinct_rowsource_get_inner_rowsource, /* .set_origin = */ NULL, }; /** * rasqal_new_distinct_rowsource: * @world: world object * @query: query object * @rowsource: input rowsource * * INTERNAL - create a new DISTINCT rowsoruce * * The @rowsource becomes owned by the new rowsource * * Return value: new rowsource or NULL on failure */ rasqal_rowsource * rasqal_new_distinct_rowsource(rasqal_world *world, rasqal_query *query, rasqal_rowsource *rowsource) { rasqal_distinct_rowsource_context *con; int flags = 0; if (!world || !query || !rowsource) goto fail; con = RASQAL_CALLOC(rasqal_distinct_rowsource_context*, 1, sizeof(*con)); if (!con) goto fail; con->rowsource = rowsource; return rasqal_new_rowsource_from_handler(world, query, con, &rasqal_distinct_rowsource_handler, query->vars_table, flags); fail: if (rowsource) rasqal_free_rowsource(rowsource); return NULL; }
26.91358
86
0.632722
5abd0a3343e0887a7ed3fc86378a07775fc45402
2,076
h
C
eagleeye/basic/Dim.h
jianzfb/eagleeye
e28810033eb656b181b6291ca702da825c4946c2
[ "Apache-2.0" ]
12
2020-09-21T02:24:11.000Z
2022-03-10T03:02:03.000Z
eagleeye/basic/Dim.h
jianzfb/eagleeye
e28810033eb656b181b6291ca702da825c4946c2
[ "Apache-2.0" ]
1
2020-11-30T08:22:50.000Z
2020-11-30T08:22:50.000Z
eagleeye/basic/Dim.h
jianzfb/eagleeye
e28810033eb656b181b6291ca702da825c4946c2
[ "Apache-2.0" ]
3
2020-03-16T12:10:55.000Z
2021-07-20T09:58:15.000Z
#ifndef _EAGLEEYE_DIM_H_ #define _EAGLEEYE_DIM_H_ #include <algorithm> #include <functional> // for multiplies #include <memory> #include <numeric> #include <string> #include <vector> namespace eagleeye { class Dim { public: using value_type = int64_t; Dim() = default; explicit Dim(const std::vector<value_type> &x) { ConstructFrom(x); } // Dim(std::initializer_list<value_type> init_list) : // Dim(std::vector<value_type>(init_list)) {} void ConstructFrom(const std::vector<value_type> &x) { data_ = x; } value_type operator[](int offset) const { return data_[offset]; } value_type &operator[](int offset) { return data_[offset]; } std::vector<int64_t> Vectorize() const { return data_; } size_t size() const { return data_.size(); } bool empty() const { return data_.empty(); } value_type production() const; const std::vector<value_type> &data() const { return data_; } value_type count(int start, int end) const; Dim Slice(int start, int end) const; Dim Flatten2D(int col) const { return Dim(std::vector<value_type>( {Slice(0, col).production(), Slice(col, size()).production()})); } friend bool operator==(const Dim &a, const Dim &b) { if (a.size() != b.size()) return false; for (size_t i = 0; i < a.size(); i++) { if (a[i] != b[i]) return false; } return true; } friend bool operator!=(const Dim &a, const Dim &b) { if (a.size() != b.size()) return true; for (size_t i = 0; i < a.size(); i++) { if (a[i] != b[i]) return true; } return false; } friend Dim operator &(const Dim& a, const Dim& b){ std::vector<value_type> data; for (size_t i=0; i<a.size(); ++i){ data.push_back(a[i] < b[i] ? a[i] : b[i]); } Dim c(data); return c; } friend Dim operator |(const Dim& a, const Dim& b){ std::vector<value_type> data; for (size_t i=0; i<a.size(); ++i){ data.push_back(a[i] > b[i] ? a[i] : b[i]); } Dim c(data); return c; } private: std::vector<value_type> data_; }; } // namespace eagleeye #endif
25.95
72
0.614644
dc68bce7c71288342636ac8e1a141e9b61a634ab
1,172
h
C
Classes/MacTrek/Comm/PingStats.h
netrek/netrek-client-mactrek
28c343588bba6dc220d8da967b9c271d33c6cbfd
[ "ClArtistic" ]
null
null
null
Classes/MacTrek/Comm/PingStats.h
netrek/netrek-client-mactrek
28c343588bba6dc220d8da967b9c271d33c6cbfd
[ "ClArtistic" ]
null
null
null
Classes/MacTrek/Comm/PingStats.h
netrek/netrek-client-mactrek
28c343588bba6dc220d8da967b9c271d33c6cbfd
[ "ClArtistic" ]
null
null
null
//------------------------------------------- // File: PingStats.h // Class: PingStats // // Created by Chris Lukassen // Copyright (c) 2006 Luky Soft //------------------------------------------- #import <Cocoa/Cocoa.h> #import "BaseClass.h" @interface PingStats : BaseClass { int iloss_sc; // inc % loss 0--100, server to client int iloss_cs; // inc % loss 0--100, client to server int tloss_sc; // total % loss 0--100, server to client int tloss_cs; // total % loss 0--100, client to server int lag; // delay in ms of last ping int av; // rt time int sd; // std deviation } - (void) setIncrementalLossServerToClient: (int) rate_sc ClientToServer: (int) rate_cs; - (void) setTotalLossServerToClient: (int) rate_sc ClientToServer: (int) rate_cs; - (void) setLag: (int)newLag; - (void) setRoundTripTime: (int)time; - (void) setStandardDeviation: (int)deviation; - (int) incrementalLossFromServerToClient; - (int) incrementalLossFromClientToServer; - (int) totalLossFromServerToClient; - (int) totalLossFromClientToServer; - (int) lagOfLastPing; - (int) roundTripTime; - (int) standardDeviation; - (void) calculateLag; @end
30.051282
87
0.641638
09ac410588007a052aac01c084299e14d8d675cf
202
c
C
sm64ex-nightly/levels/bitfs/areas/1/3/geo.inc.c
alex-free/sm64ex-creator
e7089df69fb43f266b2165078d94245b33b8e72a
[ "Intel", "X11", "Unlicense" ]
2
2022-03-12T08:27:53.000Z
2022-03-12T18:26:06.000Z
levels/bitfs/areas/1/3/geo.inc.c
Daviz00/sm64
fd2ed5e0e72d04732034919f8442f8d2cc40fd67
[ "Unlicense" ]
null
null
null
levels/bitfs/areas/1/3/geo.inc.c
Daviz00/sm64
fd2ed5e0e72d04732034919f8442f8d2cc40fd67
[ "Unlicense" ]
null
null
null
// 0x0E0004C8 const GeoLayout bitfs_geo_0004C8[] = { GEO_CULLING_RADIUS(2100), GEO_OPEN_NODE(), GEO_DISPLAY_LIST(LAYER_OPAQUE, bitfs_seg7_dl_07003670), GEO_CLOSE_NODE(), GEO_END(), };
22.444444
61
0.722772
490cd5c51eb713f7d5135bd77d03c9ec7b93f96d
282
h
C
CEWeibo/CEWeibo/Classes/OAuth/Controller/CEOAuthViewController.h
insignificance/CEWeibo
0261b699c1ab8b94071be57c467a9bd487caf32d
[ "Apache-2.0" ]
2
2019-12-09T03:10:20.000Z
2020-03-04T03:58:28.000Z
CEWeibo/CEWeibo/Classes/OAuth/Controller/CEOAuthViewController.h
insignificance/CEWeibo
0261b699c1ab8b94071be57c467a9bd487caf32d
[ "Apache-2.0" ]
null
null
null
CEWeibo/CEWeibo/Classes/OAuth/Controller/CEOAuthViewController.h
insignificance/CEWeibo
0261b699c1ab8b94071be57c467a9bd487caf32d
[ "Apache-2.0" ]
null
null
null
// // CEOAuthViewController.h // CEWeibo // // Created by insignificance on 2020/1/6. // Copyright © 2020 insignificance. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface CEOAuthViewController : UIViewController @end NS_ASSUME_NONNULL_END
15.666667
57
0.758865
a706469b10a51c5bdfd09143ac6cdac09a345395
217
h
C
include/parseutils.h
asheptunov/chesslib
29146baff49723fe841dd3041718fe50d0b5645e
[ "MIT" ]
null
null
null
include/parseutils.h
asheptunov/chesslib
29146baff49723fe841dd3041718fe50d0b5645e
[ "MIT" ]
5
2019-11-21T04:27:22.000Z
2019-11-25T06:51:12.000Z
include/parseutils.h
asheptunov/chesslib
29146baff49723fe841dd3041718fe50d0b5645e
[ "MIT" ]
null
null
null
#pragma once #include "defs.h" #include "arraylist.h" pos_t pos_from_str(const char *label); char *pos_to_str(const pos_t pos); pc_t piece_from_char(const char label); const char *piece_to_str(const pc_t piece);
16.692308
43
0.760369
4c853d6298c11689ee373d2238cfc6d6097c403f
151,182
h
C
src/NEATController.h
demiurge-project/ARGoS3-pagmo2
a5f96a23794ce230d3f6946cceb17d45a2329da2
[ "Apache-2.0" ]
null
null
null
src/NEATController.h
demiurge-project/ARGoS3-pagmo2
a5f96a23794ce230d3f6946cceb17d45a2329da2
[ "Apache-2.0" ]
null
null
null
src/NEATController.h
demiurge-project/ARGoS3-pagmo2
a5f96a23794ce230d3f6946cceb17d45a2329da2
[ "Apache-2.0" ]
null
null
null
#ifndef EPUCK_NN_CONTROLLER #define EPUCK_NN_CONTROLLER #include <argos3/core/control_interface/ci_controller.h> #include <argos3/core/utility/math/range.h> #include <argos3/core/utility/math/rng.h> #include <argos3/core/utility/math/vector2.h> #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_range_and_bearing_actuator.h> #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_wheels_actuator.h> #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_ground_sensor.h> #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_light_sensor.h> #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_proximity_sensor.h> #include <argos3/plugins/robots/e-puck/control_interface/ci_epuck_range_and_bearing_sensor.h> #include <argos3/demiurge/epuck-dao/EpuckDAO.h> #include "NEAT/genome.h" #include "NEAT/network.h" #include <map> using namespace argos; class CEPuckNEATController : public CCI_Controller { public: virtual ~CEPuckNEATController(); virtual void Init(TConfigurationNode& t_node) = 0; virtual void ControlStep() = 0; virtual void Reset() = 0; virtual void Destroy() = 0; void LoadNetwork(const std::string& filename); void Display(int i); void DisplayNetwork(); inline void SetNetwork(NEAT::Network& net) { m_net = &net; } void set_weights_network(double* weights, int num_weights); UInt32 getRobotId(); protected: EpuckDAO* m_pcRobotState; // Actuators CCI_EPuckWheelsActuator* m_pcWheels; CCI_EPuckRangeAndBearingActuator* m_pcRABAct; CRange<Real> m_cWheelActuationRange; // Sensors CCI_EPuckProximitySensor* m_pcProximity; CCI_EPuckLightSensor* m_pcLight; CCI_EPuckGroundSensor* m_pcGround; CCI_EPuckRangeAndBearingSensor* m_pcRAB; public: // Network NEAT::Network* m_net; protected: CRange<Real> m_cNeuralNetworkOutputRange; std::vector<NEAT::Network*> m_cNetworkVector; // Path to the genome std::string m_strFile; // Range And Bearing Packet (which contains the id, timestamp, and the real // packet which contains the range, bearing and the data) struct RBPacket { UInt32 unId; UInt32 unTimestamp; CCI_EPuckRangeAndBearingSensor::SReceivedPacket cMessage; RBPacket(){}; RBPacket(UInt32 id, UInt32 timestamp, CCI_EPuckRangeAndBearingSensor::SReceivedPacket message) : unId(id), unTimestamp(timestamp), cMessage(message) {} }; SInt32 m_nId; std::map<UInt32, RBPacket> m_mapMessages; UInt32 m_unTimeStep; Real m_fLeftSpeed, m_fRightSpeed; argos::CRandom::CRNG* m_pcRNG; // Ground sensor samples (taken without a light spot) static const float m_GraySamplesLeft[4205]; static const float m_GraySamplesCenter[4205]; static const float m_GraySamplesRight[4205]; }; // Ground sensor samples obtained without using a light spot const float CEPuckNEATController::m_GraySamplesLeft[4205] = { 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.353538, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0.339228, 0, 0.363759, 0.37398, 0.331051, 0.316741, 0.394423, 0.341272, 0.322873, 0.286076, 0.331051, 0.369892, 0.202261, 0.296298, 0.187951, 0.253368, 0.298342, 0.37398, 0.302431, 0.329006, 0.365803, 0.371936, 0.355582, 0.339228, 0.329006, 0.329006, 0.286076, 0.314696, 0.320829, 0.341272, 0.351493, 0.339228, 0.339228, 0.369892, 0.365803, 0.382158, 0.367848, 0.343316, 0.363759, 0.341272, 0.298342, 0, 0.378069, 0.267678, 0.339228, 0.365803, 0.386246, 0.382158, 0.318785, 0.304475, 0.353538, 0.339228, 0.369892, 0.175685, 0.310608, 0.181818, 0.257457, 0.343316, 0.298342, 0.273811, 0.35967, 0.353538, 0.353538, 0.353538, 0.329006, 0.363759, 0.320829, 0.324918, 0.331051, 0.369892, 0.361715, 0.369892, 0.349449, 0.363759, 0.376025, 0.37398, 0.369892, 0.367848, 0.369892, 0.351493, 0.326962, 0, 0.343316, 0.290165, 0.296298, 0.351493, 0.363759, 0.369892, 0.298342, 0.277899, 0.302431, 0.320829, 0.345361, 0.308564, 0.322873, 0.351493, 0.118446, 0.0591614, 0.239058, 0.151154, 0.0468958, 0.376025, 0.322873, 0.37398, 0.369892, 0.353538, 0.351493, 0.324918, 0.326962, 0.369892, 0.357626, 0.357626, 0.341272, 0.363759, 0.369892, 0.365803, 0.357626, 0.259501, 0.339228, 0.341272, 0.339228, 0, 0.312652, 0.185907, 0.292209, 0.37398, 0.369892, 0.380113, 0.267678, 0.349449, 0.300386, 0.296298, 0.378069, 0.281988, 0.288121, 0.298342, 0.361715, 0.273811, 0.265634, 0.0428072, 0.0939142, 0.37398, 0.355582, 0.357626, 0.345361, 0.351493, 0.324918, 0.357626, 0.351493, 0.353538, 0.361715, 0.347405, 0.347405, 0.369892, 0.369892, 0.390335, 0.353538, 0.292209, 0.230881, 0.357626, 0.357626, 0, 0.369892, 0.108224, 0.0918699, 0.367848, 0.339228, 0.369892, 0.300386, 0.273811, 0.369892, 0.37398, 0.343316, 0.349449, 0.277899, 0.353538, 0.353538, 0.347405, 0.343316, 0.369892, 0.339228, 0.369892, 0.384202, 0.353538, 0.365803, 0.38829, 0.392379, 0.367848, 0.339228, 0.347405, 0.37398, 0.367848, 0.357626, 0.353538, 0.382158, 0.357626, 0.355582, 0.37398, 0.247235, 0.314696, 0.322873, 0, 0.284032, 0.108224, 0.234969, 0.349449, 0.339228, 0.349449, 0.361715, 0.284032, 0.271766, 0.353538, 0.300386, 0.314696, 0.341272, 0.279944, 0.157287, 0.136844, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.466559, 0.459664, 0.459664, 0.459664, 0.466559, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.459664, 0.00689497, 0.459664, 0.335555, 0.471156, 0.406803, 0.284992, 0.39761, 0.395311, 0.358538, 0.319467, 0.418295, 0.471156, 0, 0.211446, 0.42519, 0.455068, 0.461963, 0.402206, 0.406803, 0.197656, 0.445875, 0.450471, 0.422891, 0.464261, 0.473454, 0.415996, 0.475753, 0.459664, 0.466559, 0.484946, 0.450471, 0.461963, 0.471156, 0.43898, 0.478051, 0.484946, 0.466559, 0.461963, 0.459664, 0.457366, 0.0183866, 0.473454, 0.252815, 0.153988, 0.475753, 0.30108, 0.395311, 0.363135, 0.386118, 0.344748, 0.349345, 0.395311, 0.266605, 0.464261, 0.296484, 0.498736, 0.289589, 0.434383, 0.264307, 0.42519, 0.491841, 0.441278, 0.43898, 0.487244, 0.482648, 0.420593, 0.471156, 0.429786, 0.386118, 0.415996, 0.489543, 0.443576, 0.459664, 0.450471, 0.466559, 0.475753, 0.436681, 0.459664, 0.466559, 0.466559, 0.0436681, 0.496438, 0.284992, 0.489543, 0.360837, 0.429786, 0.42519, 0.335555, 0.436681, 0.468858, 0.379223, 0.388416, 0.415996, 0.393013, 0.35624, 0.147093, 0.255114, 0.422891, 0.307975, 0.275799, 0.478051, 0.464261, 0.461963, 0.475753, 0.496438, 0.434383, 0.480349, 0.429786, 0.374627, 0.42519, 0.461963, 0.459664, 0.43898, 0.443576, 0.475753, 0.484946, 0.473454, 0.432085, 0.43898, 0.448173, 0.0321765, 0.473454, 0.351643, 0.487244, 0.43898, 0.445875, 0.471156, 0.445875, 0.418295, 0.340152, 0.4114, 0.333257, 0.464261, 0.43898, 0.372328, 0.466559, 0.0919329, 0.00689497, 0.131004, 0.489543, 0.480349, 0.466559, 0.464261, 0.448173, 0.496438, 0.390715, 0.448173, 0.464261, 0.393013, 0.429786, 0.455068, 0.443576, 0.420593, 0.482648, 0.466559, 0.443576, 0.436681, 0.445875, 0.404505, 0.464261, 0.0344748, 0.461963, 0.0459664, 0, 0.108021, 0.434383, 0.418295, 0.43898, 0.335555, 0.445875, 0.294185, 0.443576, 0.464261, 0.43898, 0.137899, 0.0804413, 0.243622, 0.409101, 0.42519, 0.257412, 0.496438, 0.478051, 0.466559, 0.445875, 0.496438, 0.457366, 0.461963, 0.487244, 0.38382, 0.376925, 0.455068, 0.457366, 0.420593, 0.466559, 0.461963, 0.487244, 0.459664, 0.422891, 0.448173, 0.422891, 0.0275799, 0.436681, 0.340152, 0.466559, 0.432085, 0.409101, 0.480349, 0.429786, 0.441278, 0.422891, 0.218341, 0.388416, 0.32866, 0.464261, 0.487244, 0.376925, 0.305677, 0.432085, 0.158584, 0.319467, 0.466559, 0.489543, 0.360837, 0.461963, 0.478051, 0.443576, 0.450471, 0.482648, 0.340152, 0.418295, 0.443576, 0.443576, 0.402206, 0.478051, 0.475753, 0.448173, 0.461963, 0.466559, 0.466559, 0.448173, 0.0229832, 0.298782, 0.324063, 0.347047, 0.475753, 0.436681, 0.39761, 0.466559, 0.284992, 0.448173, 0.216042, 0.32866, 0.305677, 0.234429, 0.319467, 0.315105, 0.315105, 0.315105, 0.300263, 0.315105, 0.315105, 0.300263, 0.315105, 0.315105, 0.315105, 0.315105, 0.315105, 0.319346, 0.315105, 0.315105, 0.315105, 0.315105, 0.315105, 0.315105, 0.315105, 0.315105, 0.00977479, 0.34479, 0.315105, 0.204847, 0.296022, 0.317226, 0.291781, 0.336309, 0.336309, 0.323587, 0.2833, 0.308744, 0.289661, 0.266337, 0.262097, 0.308744, 0.300263, 0.2833, 0.312985, 0.300263, 0.336309, 0.336309, 0.304504, 0.312985, 0.336309, 0.319346, 0.336309, 0.336309, 0.336309, 0.351151, 0.293902, 0.289661, 0.306624, 0.296022, 0.279059, 0.308744, 0.321466, 0.319346, 0.336309, 0.321466, 0.0330986, 0.194245, 0.353272, 0.336309, 0.336309, 0.336309, 0.317226, 0.34055, 0.266337, 0.319346, 0.279059, 0.310865, 0.351151, 0.217569, 0.34055, 0.291781, 0.317226, 0.279059, 0.310865, 0.317226, 0.323587, 0.336309, 0.323587, 0.336309, 0.351151, 0.349031, 0.336309, 0.351151, 0.355392, 0.34055, 0.317226, 0.34055, 0.336309, 0.34479, 0.319346, 0.323587, 0.346911, 0.34479, 0.34267, 0.315105, 0.0288579, 0.177283, 0.268458, 0.34479, 0.336309, 0.336309, 0.321466, 0.336309, 0.264217, 0.336309, 0.276939, 0.276939, 0.202727, 0.351151, 0.353272, 0.306624, 0.34267, 0.323587, 0.22393, 0.336309, 0.323587, 0.323587, 0.336309, 0.336309, 0.351151, 0.351151, 0.336309, 0.351151, 0.351151, 0.34479, 0.336309, 0.338429, 0.336309, 0.34055, 0.312985, 0.336309, 0.336309, 0.359633, 0.338429, 0.338429, 0.0309783, 0.192125, 0.336309, 0.346911, 0.336309, 0.336309, 0.34267, 0.336309, 0.306624, 0.34479, 0.355392, 0.351151, 0.319346, 0.255736, 0.363873, 0.336309, 0.317226, 0.249374, 0.310865, 0, 0.336309, 0.319346, 0.336309, 0.351151, 0.355392, 0.34479, 0.349031, 0.353272, 0.357512, 0.351151, 0.325707, 0.336309, 0.336309, 0.351151, 0.336309, 0.336309, 0.336309, 0.346911, 0.349031, 0.346911, 0.0224969, 0.141237, 0.315105, 0.194245, 0.321466, 0.264217, 0.355392, 0.336309, 0.298143, 0.34479, 0.338429, 0.232412, 0.349031, 0.361753, 0.359633, 0.336309, 0.34479, 0, 0.315105, 0.274819, 0.317226, 0.336309, 0.34055, 0.349031, 0.353272, 0.357512, 0.349031, 0.355392, 0.349031, 0.323587, 0.336309, 0.336309, 0.349031, 0.351151, 0.851554, 0.336309, 0.336309, 0.34479, 0.355392, 0.355392, 0.0224969, 0.122153, 0.336309, 0.34267, 0.336309, 0.304504, 0.321466, 0.317226, 0.323587, 0.336309, 0.34479, 0.298143, 0.257856, 0.198486, 0.361753, 0.336309, 0.34267, 0.321466, 0.183644, 0.200606, 0.336309, 0.336309, 0.336309, 0.351151, 0.34479, 0.353272, 0.357512, 0.361753, 0.34479, 0.336309, 0.312985, 0.336309, 0.34055, 0.349031, 0.336309, 0.336309, 0.336309, 0.349031, 0.351151, 0.355392, 0.0161358, 0.117913, 0.349031, 0.240893, 0.300263, 0.323587, 0.34055, 0.353272, 0.298143, 0.336309, 0.336309, 0.34479, 0.279059, 0.270578, 0.245134, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.413043, 0.415029, 0.413043, 0.413043, 0.419002, 0.413043, 0.413043, 0.417016, 0.413043, 0.413043, 0.413043, 0.061441, 0.178642, 0.367355, 0.363382, 0.369341, 0.343517, 0.287897, 0.266046, 0.367355, 0.3753, 0.353449, 0.373314, 0.357422, 0.309748, 0.31372, 0.3753, 0.387219, 0.359409, 0.359409, 0.277964, 0.385233, 0.365368, 0.373314, 0.377287, 0.385233, 0.369341, 0.373314, 0.365368, 0.387219, 0.323653, 0.419002, 0.401124, 0.413043, 0.413043, 0.413043, 0.397151, 0.413043, 0.413043, 0.413043, 0.393179, 0.0852784, 0.214398, 0.383246, 0.383246, 0.379273, 0.359409, 0.31968, 0.379273, 0.204466, 0.399138, 0.31372, 0.317693, 0.275978, 0.22433, 0.377287, 0.333585, 0.281937, 0.337558, 0.317693, 0.38126, 0.385233, 0.367355, 0.389206, 0.371328, 0.379273, 0.361395, 0.311734, 0.273991, 0.371328, 0.373314, 0.413043, 0.419002, 0.413043, 0.413043, 0.397151, 0.403111, 0.403111, 0.413043, 0.391192, 0.389206, 0.079319, 0.244195, 0.329612, 0.399138, 0.323653, 0.399138, 0.403111, 0.365368, 0.387219, 0.357422, 0.329612, 0.329612, 0.273991, 0.293856, 0.272005, 0.208438, 0.357422, 0.28591, 0.373314, 0.391192, 0.389206, 0.379273, 0.379273, 0.383246, 0.355436, 0.335571, 0.333585, 0.301802, 0.359409, 0.373314, 0.401124, 0.413043, 0.405097, 0.399138, 0.413043, 0.413043, 0.405097, 0.403111, 0.367355, 0.3753, 0.0753461, 0.230289, 0.365368, 0.291869, 0.38126, 0.389206, 0.415029, 0.397151, 0.413043, 0.379273, 0.31968, 0.315707, 0.279951, 0.353449, 0.345504, 0.353449, 0.397151, 0.383246, 0.379273, 0.389206, 0.387219, 0.379273, 0.369341, 0.3753, 0.369341, 0.363382, 0.323653, 0.31968, 0.359409, 0.371328, 0.393179, 0.413043, 0.401124, 0.424962, 0.415029, 0.413043, 0.413043, 0.413043, 0.391192, 0.335571, 0.0713732, 0.236249, 0.315707, 0.413043, 0.323653, 0.426948, 0.391192, 0.424962, 0.395165, 0.389206, 0.367355, 0.323653, 0.25214, 0.31968, 0.367355, 0.391192, 0.397151, 0.349477, 0.335571, 0.379273, 0.387219, 0.3753, 0.351463, 0.379273, 0.379273, 0.363382, 0.323653, 0.331598, 0.307761, 0.371328, 0.397151, 0.391192, 0.424962, 0.422975, 0.422975, 0.405097, 0.397151, 0.413043, 0.391192, 0.363382, 0.0733597, 0.232276, 0.387219, 0.246181, 0.422975, 0.373314, 0.389206, 0.417016, 0.407084, 0.389206, 0.359409, 0.307761, 0.337558, 0.335571, 0.367355, 0.214398, 0.351463, 0.158777, 0.0971971, 0.192547, 0.395165, 0.371328, 0.351463, 0.367355, 0.367355, 0.373314, 0.357422, 0.34749, 0.303788, 0.345504, 0.387219, 0.413043, 0.417016, 0.397151, 0.419002, 0.413043, 0.403111, 0.405097, 0.387219, 0.357422, 0.0813055, 0.230289, 0.307761, 0.242208, 0.415029, 0.3753, 0.413043, 0.377287, 0.413043, 0.367355, 0.337558, 0.299815, 0.339544, 0.367355, 0.608965, 0.608965, 0.606659, 0.606659, 0.608965, 0.606659, 0.606659, 0.608965, 0.608965, 0.608965, 0.606659, 0.606659, 0.608965, 0.608965, 0.606659, 0.606659, 0.611271, 0.606659, 0.606659, 0.606659, 0.606659, 0.293057, 0.611271, 1, 0.608965, 0.578989, 0.530565, 0.578989, 0.606659, 0.426799, 0.519035, 0.592824, 0.549012, 0.532871, 0.576683, 0.565153, 0.535177, 0.578989, 0.528259, 0.519035, 0.537482, 0.565153, 0.565153, 0.5836, 0.590518, 0.553624, 0.581295, 0.578989, 0.604354, 0.560541, 0.618189, 0.622801, 0.59513, 0.597436, 0.604354, 0.585906, 0.565153, 0.604354, 0.565153, 0.574377, 0.606659, 0.267692, 0.613577, 0.472917, 0.55593, 0.382987, 0.382987, 0.604354, 0.611271, 0.602048, 1, 0.431411, 0.590518, 0.336869, 0.320728, 0.535177, 0.35301, 0.426799, 1, 0.380681, 0.592824, 0.592824, 0.597436, 0.597436, 0.625107, 0.588212, 0.578989, 0.615883, 0.608965, 0.608965, 0.551318, 0.549012, 0.604354, 0.602048, 0.606659, 0.604354, 0.59513, 0.611271, 0.59513, 0.576683, 0.576683, 0.258468, 0.532871, 0.436023, 0.632024, 0.581295, 0.530565, 0.59513, 0.615883, 0.509812, 0.535177, 0.525953, 0.5836, 0.5836, 0.472917, 0.606659, 0.31381, 0.461388, 0.5444, 0.40374, 0.606659, 0.592824, 0.606659, 0.620495, 0.606659, 0.627413, 0.599742, 0.629718, 0.604354, 0.63433, 0.588212, 0.537482, 0.549012, 0.5836, 0.585906, 0.578989, 0.613577, 0.613577, 0.608965, 0.565153, 0.581295, 0.272304, 0.604354, 0.606659, 0.491364, 0.597436, 0.592824, 0.539788, 0.525953, 0.523647, 0.588212, 0.429105, 0.602048, 0.36454, 0.521341, 0.602048, 0.597436, 0.615883, 0.530565, 0.491364, 0.588212, 0.581295, 0.602048, 0.599742, 0.627413, 0.625107, 0.606659, 0.620495, 0.611271, 0.625107, 0.611271, 0.581295, 0.572071, 0.597436, 0.567459, 0.576683, 0.606659, 0.5836, 0.592824, 0.576683, 0.553624, 0.267692, 0.608965, 0.470611, 0.618189, 0.542094, 0.514423, 0.567459, 0.574377, 0.525953, 0.567459, 0.625107, 0.468305, 0.590518, 0.316116, 0.442941, 0.565153, 0.63433, 0.528259, 0.581295, 0.576683, 0.5836, 0.597436, 0.597436, 0.622801, 0.606659, 0.618189, 0.615883, 0.578989, 0.622801, 0.611271, 0.576683, 0.576683, 0.569765, 0.569765, 0.562847, 0.590518, 0.613577, 0.599742, 0.565153, 0.562847, 0.31381, 0.539788, 0.604354, 0.408352, 0.581295, 0.406046, 0.578989, 0.588212, 0.532871, 0.495976, 0.592824, 0.468305, 0.530565, 0.482141, 0.608965, 0.316116, 0.472917, 0.486753, 0.371458, 0.59513, 0.574377, 0.608965, 0.608965, 0.655083, 0.620495, 0.608965, 0.613577, 0.59513, 0.620495, 0.627413, 0.592824, 0.590518, 0.565153, 0.565153, 0.553624, 0.608965, 0.618189, 0.604354, 0.581295, 0.562847, 0.288445, 0.588212, 0.592824, 0.470611, 1, 0.553624, 0.572071, 0.567459, 0.5836, 0.55593, 0.456776, 0.572071, 0.459082, 0.509812, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.339298, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.356728, 0.348013, 0.356728, 0.0371833, 0.170811, 0.295724, 0.20567, 0.345108, 0.147571, 0.159191, 0.208575, 0.127237, 0.127237, 0.153381, 0.255055, 0.365443, 0.275389, 0.350918, 0.362538, 0.287009, 0.196956, 0.353823, 0.202765, 0.362538, 0.307344, 0.350918, 0.353823, 0.368348, 0.371253, 0.362538, 0.379967, 0.356728, 0.374158, 0.365443, 0.356728, 0.371253, 0.365443, 0.348013, 0.356728, 0.333488, 0.345108, 0.324773, 0.348013, 0.0255635, 0.269579, 0.20567, 0.20567, 0.345108, 0.162096, 0.150476, 0.391587, 0.266674, 0.281199, 0.353823, 0.327678, 0.275389, 0.362538, 0.353823, 0.333488, 0.298629, 0.220195, 0.260864, 0.348013, 0.353823, 0.313154, 0.345108, 0.350918, 0.365443, 0.377062, 0.362538, 0.365443, 0.356728, 0.345108, 0.371253, 0.333488, 0.374158, 0.371253, 0.356728, 0.318963, 0.324773, 0.333488, 0.330583, 0.356728, 0.0284685, 0.25796, 0.127237, 0.0313734, 0.0981873, 0.356728, 0.162096, 0.156286, 0.353823, 0.2231, 0.368348, 0.333488, 0.313154, 0.371253, 0.313154, 0.313154, 0.196956, 0.310249, 0.321868, 0.292819, 0.356728, 0.307344, 0.333488, 0.345108, 0.356728, 0.368348, 0.356728, 0.377062, 0.356728, 0.371253, 0.368348, 0.345108, 0.382872, 0.356728, 0.350918, 0.278294, 0.292819, 0.336393, 0.318963, 0.356728, 0.0197536, 0.301534, 0.208575, 0.144666, 0.307344, 0.2231, 0.368348, 0.231815, 0.130142, 0.118522, 0.348013, 0.22891, 0.382872, 0.289914, 0.318963, 0.388682, 0.199861, 0.350918, 0.226005, 0.316059, 0.362538, 0.330583, 0.313154, 0.348013, 0.371253, 0.379967, 0.377062, 0.397397, 0.350918, 0.368348, 0.374158, 0.374158, 0.353823, 0.377062, 0.368348, 0.292819, 0.298629, 0.356728, 0.342203, 0.350918, 0.0139437, 0.231815, 0.316059, 0.25215, 0.167906, 0.356728, 0.310249, 0.388682, 0.304439, 0.333488, 0.313154, 0.278294, 0.356728, 0.345108, 0.382872, 0.220195, 0.316059, 0.336393, 0.281199, 0.260864, 0.342203, 0.316059, 0.342203, 0.339298, 0.385777, 0.391587, 0.374158, 0.379967, 0.368348, 0.382872, 0.362538, 0.374158, 0.379967, 0.350918, 0.348013, 0.304439, 0.330583, 0.365443, 0.365443, 0.182431, 0.00232392, 0.202765, 0.054613, 0.054613, 0.336393, 0.0778526, 0.165001, 0.371253, 0.356728, 0.272484, 0.385777, 0.20567, 0.374158, 0.101092, 0.0517081, 0.20567, 0.298629, 0.333488, 0.138857, 0.0604229, 0.333488, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.792494, 0, 0.124472, 0.222182, 0.30394, 0.30394, 0.30394, 0.30394, 0.170336, 0.319893, 0.305934, 0.264058, 0.30394, 0.278017, 0.270041, 0.264058, 0.282005, 0.305934, 0.30394, 0.254088, 0.30394, 0.309923, 0.268047, 0.319893, 0.30394, 0.30394, 0.270041, 0.278017, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.276023, 0.276023, 0.270041, 0.30394, 0.311917, 0.280011, 0.272035, 0.276023, 0, 0.150395, 0.230159, 0.309923, 0.17233, 0.280011, 0.30394, 0.30394, 0.30394, 0.30394, 0.218194, 0.270041, 0.222182, 0.30394, 0.321887, 0.280011, 0.280011, 0.30394, 0.266053, 0.315905, 0.309923, 0.30394, 0.30394, 0.305934, 0.30394, 0.30394, 0.278017, 0.30394, 0.270041, 0.264058, 0.30394, 0.30394, 0.282005, 0.30394, 0.812435, 0.30394, 0.30394, 0.30394, 0.268047, 0.274029, 0, 0.234147, 0.160365, 0.266053, 0.236141, 0.212212, 0.270041, 0.30394, 0.30394, 0.30394, 0.248106, 0.134442, 0.282005, 0.274029, 0.305934, 0.254088, 0.30394, 0.30394, 0.30394, 0.30394, 0.309923, 0.305934, 0.30394, 0.30394, 0.30394, 0.30394, 0.274029, 0.30394, 0.282005, 0.274029, 0.280011, 0.30394, 0.30394, 0.30394, 0.282005, 0.30394, 0.307929, 0.313911, 0.7905, 0.282005, 0, 0.307929, 0.176318, 0.278017, 0.30394, 0.278017, 0.240129, 0.283999, 0.282005, 0.283999, 0.264058, 0.176318, 0.258076, 0.0347372, 0.0287549, 0.30394, 0.20623, 0.30394, 0.315905, 0.30394, 0.30394, 0.30394, 0.30394, 0.30394, 0.305934, 0.270041, 0.274029, 0.26007, 0.264058, 0.258076, 0.270041, 0.30394, 0.276023, 0.30394, 0.30394, 0.30394, 0.307929, 0.313911, 0.30394, 0.226171, 0, 0.30394, 0.146407, 0.158371, 0.30394, 0.252094, 0.17233, 0.30394, 0.278017, 0.278017, 0.266053, 0, 0.282005, 0.30394, 0.30394, 0.276023, 0.30394, 0.30394, 0.30394, 0.268047, 0.315905, 0.307929, 0.30394, 0.305934, 0.311917, 0.30394, 0.30394, 0.270041, 0.272035, 0.258076, 0.282005, 0.30394, 0.26007, 0.283999, 0.30394, 0.30394, 0.307929, 0.319893, 0.30394, 0.264058, 0, 0.309923, 0.148401, 0.12846, 0.30394, 0.262064, 0.120483, 0.180306, 0.196259, 0.282005, 0.272035, 0.156377, 0.246112, 0.230159, 0.30394, 0.282005, 0.270041, 0.266053, 0.258076, 0.30394, 0.30394, 0.282005, 0.30394, 0.305934, 0.315905, 0.30394, 0.30394, 0.268047, 0.30394, 0.274029, 0.270041, 0.30394, 0.30394, 0.307929, 0.321887, 0.313911, 0.307929, 0.313911, 0.278017, 0.276023, 0, 0.1823, 0.214206, 0.202241, 0.384214, 0.386254, 0.386254, 0.386254, 0.384214, 0.384214, 0.386254, 0.384214, 0.386254, 0.386254, 0.386254, 0.384214, 0.384214, 0.386254, 0.398498, 0.384214, 0.384214, 0.384214, 0.384214, 0.384214, 0.384214, 0.0883193, 0.380132, 0.237287, 0.267897, 0.380132, 0.396457, 0.325035, 0.369929, 0.396457, 0.390335, 0.394417, 0.347482, 0.351563, 0.327075, 0.312791, 0.300547, 0.37401, 0.361766, 0.378092, 0.392376, 0.402579, 0.382173, 0.353604, 0.351563, 0.335238, 0.306669, 0.333197, 0.367888, 0.388295, 0.398498, 0.376051, 0.406661, 0.390335, 0.37197, 0.410742, 0.396457, 0.386254, 0.343401, 0.378092, 0.382173, 0.0658722, 0.263815, 0.306669, 0.388295, 0.384214, 0.351563, 0.394417, 0.390335, 0.378092, 0.386254, 0.378092, 0.384214, 0.345441, 0.304628, 0.314831, 0.361766, 0.382173, 0.267897, 0.392376, 0.400539, 0.398498, 0.384214, 0.37197, 0.363807, 0.349522, 0.335238, 0.333197, 0.357685, 0.382173, 0.394417, 0.386254, 0.398498, 0.384214, 0.392376, 0.390335, 0.398498, 0.392376, 0.384214, 0.37401, 0.396457, 0.0638315, 0.251571, 0.314831, 0.400539, 0.392376, 0.276059, 0.398498, 0.400539, 0.384214, 0.386254, 0.331157, 0.376051, 0.329116, 0.327075, 0.343401, 0.359726, 0.388295, 0.388295, 0.398498, 0.400539, 0.396457, 0.392376, 0.382173, 0.37401, 0.347482, 0.337279, 0.312791, 0.343401, 0.388295, 0.388295, 0.402579, 0.398498, 0.408701, 0.396457, 0.390335, 0.394417, 0.394417, 0.380132, 0.378092, 0.382173, 0.0638315, 0.229124, 0.34136, 0.398498, 0.396457, 0.337279, 0.396457, 0.398498, 0.369929, 0.384214, 0.37401, 0.327075, 0.300547, 0.349522, 0.320953, 0.363807, 0.361766, 0.357685, 0.394417, 0.271978, 0.394417, 0.392376, 0.367888, 0.386254, 0.359726, 0.353604, 0.339319, 0.327075, 0.37197, 0.394417, 0.398498, 0.392376, 0.386254, 0.392376, 0.386254, 0.398498, 0.380132, 0.378092, 0.376051, 0.382173, 0.0577096, 0.196474, 0.359726, 0.396457, 0.398498, 0.398498, 0.382173, 0.325035, 0.349522, 0.380132, 0.31075, 0.345441, 0.345441, 0.363807, 0.378092, 0.390335, 0.390335, 0.322994, 0.400539, 0.398498, 0.400539, 0.396457, 0.410742, 0.400539, 0.378092, 0.37197, 0.357685, 0.333197, 0.34136, 0.386254, 0.396457, 0.378092, 0.353604, 0.398498, 0.392376, 0.396457, 0.402579, 0.37401, 0.378092, 0.398498, 0.0638315, 0.218921, 0.331157, 0.398498, 0.386254, 0.325035, 0.398498, 0.34136, 0.367888, 0.392376, 0.269937, 0.320953, 0.349522, 0.376051, 0.369929, 0.367888, 0.363807, 0.403229, 0.414034, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.411873, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.403229, 0.150387, 0.38594, 0.264922, 0.271405, 0.342719, 0.368652, 0.439966, 0.431322, 0.403229, 0.403229, 0.38594, 0.396745, 0.377296, 0.403229, 0.422678, 0.366491, 0.427, 0.403229, 0.390262, 0.429161, 0.420517, 0.439966, 0.442127, 0.424839, 0.424839, 0.439966, 0.411873, 0.390262, 0.401068, 0.418356, 0.427, 0.429161, 0.433483, 0.429161, 0.411873, 0.368652, 0.34488, 0.318948, 0.366491, 0.370813, 0.143904, 0.368652, 0.234667, 0.221701, 0.38594, 0.392423, 0.433483, 0.422678, 0.422678, 0.396745, 0.403229, 0.381618, 0.396745, 0.366491, 0.390262, 0.396745, 0.429161, 0.411873, 0.351364, 0.431322, 0.442127, 0.429161, 0.422678, 0.411873, 0.439966, 0.433483, 0.429161, 0.394584, 0.392423, 0.403229, 0.424839, 0.433483, 0.442127, 0.439966, 0.414034, 0.38594, 0.360008, 0.349203, 0.351364, 0.366491, 0.139582, 0.34488, 0.288693, 0.245473, 0.390262, 0.38594, 0.442127, 0.409712, 0.439966, 0.403229, 0.396745, 0.403229, 0.403229, 0.409712, 0.418356, 0.375135, 0.351364, 0.422678, 0.288693, 0.429161, 0.442127, 0.414034, 0.431322, 0.414034, 0.44861, 0.439966, 0.431322, 0.420517, 0.396745, 0.407551, 0.433483, 0.431322, 0.452933, 0.429161, 0.424839, 0.392423, 0.36433, 0.366491, 0.360008, 0.379457, 0.154709, 0.377296, 0.303821, 0.347042, 0.390262, 0.372974, 0.357847, 0.381618, 0.452933, 0.390262, 0.401068, 0.411873, 0.372974, 0.439966, 0.44861, 0.381618, 0.392423, 0.390262, 0.416195, 0.407551, 0.416195, 0.429161, 0.414034, 0.411873, 0.439966, 0.439966, 0.439966, 0.418356, 0.411873, 0.422678, 0.439966, 0.44861, 0.427, 0.427, 0.398906, 0.362169, 0.327592, 0.349203, 0.370813, 0.396745, 0.143904, 0.334075, 0.238989, 0.230345, 0.366491, 0.351364, 0.396745, 0.379457, 0.407551, 0.383779, 0.411873, 0.420517, 0.394584, 0.381618, 0.377296, 0.429161, 0.347042, 0.403229, 0.383779, 0.414034, 0.420517, 0.416195, 0.414034, 0.433483, 0.435644, 0.431322, 0.442127, 0.424839, 0.424839, 0.414034, 0.435644, 0.435644, 0.424839, 0.403229, 0.383779, 0.360008, 0.316787, 0.312465, 0.403229, 0.416195, 0.143904, 0.321109, 0.30166, 0.310304, 0.247634, 0.377296, 0.439966, 0.321109, 0.446449, 0.38594, 0.409712, 0.403229, 0.427, 0.435644, 0.401068, 0.418356, 0.30166, 0.416195, 0.420517, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.283673, 0.291524, 0.291524, 0.293486, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.291524, 0.0776009, 0.279748, 0.207132, 0.281711, 0.283673, 0.287598, 0.289561, 0.27386, 0.283673, 0.26601, 0.279748, 0.275823, 0.27386, 0.277785, 0.256197, 0.283673, 0.285636, 0.281711, 0.27386, 0.271898, 0.287598, 0.283673, 0.287598, 0.289561, 0.285636, 0.295449, 0.293486, 0.285636, 0.287598, 0.289561, 0.283673, 0.299374, 0.289561, 0.291524, 0.289561, 0.293486, 0.287598, 0.283673, 0.281711, 0.287598, 0.0363865, 0.181618, 0.230683, 0.267972, 0.269935, 0.289561, 0.285636, 0.252272, 0.281711, 0.275823, 0.293486, 0.287598, 0.248347, 0.279748, 0.287598, 0.269935, 0.299374, 0.285636, 0.269935, 0.281711, 0.293486, 0.301337, 0.293486, 0.293486, 0.299374, 0.299374, 0.287598, 0.281711, 0.283673, 0.295449, 0.299374, 0.293486, 0.299374, 0.291524, 0.293486, 0.287598, 0.287598, 0.291524, 0.305262, 0.269935, 0.0363865, 0.128628, 0.271898, 0.299374, 0.305262, 0.289561, 0.297411, 0.283673, 0.281711, 0.289561, 0.291524, 0.289561, 0.285636, 0.293486, 0.299374, 0.289561, 0.295449, 0.291524, 0.291524, 0.293486, 0.289561, 0.303299, 0.291524, 0.293486, 0.291524, 0.293486, 0.287598, 0.281711, 0.287598, 0.295449, 0.299374, 0.303299, 0.299374, 0.293486, 0.295449, 0.291524, 0.287598, 0.289561, 0.301337, 0.277785, 0.0304987, 0.120778, 0.216945, 0.27386, 0.299374, 0.238534, 0.275823, 0.279748, 0.299374, 0.291524, 0.293486, 0.289561, 0.281711, 0.301337, 0.289561, 0.228721, 0.254234, 0.289561, 0.269935, 0.269935, 0.295449, 0.297411, 0.297411, 0.285636, 0.299374, 0.287598, 0.289561, 0.281711, 0.285636, 0.283673, 0.291524, 0.293486, 0.287598, 0.289561, 0.275823, 0.275823, 0.293486, 0.299374, 0.299374, 0.275823, 0.0363865, 0.122741, 0.279748, 0.293486, 0.289561, 0.295449, 0.299374, 0.283673, 0.283673, 0.26601, 0.277785, 0.287598, 0.269935, 0.281711, 0.291524, 0.285636, 0.289561, 0.283673, 0.262085, 0.295449, 0.293486, 0.299374, 0.295449, 0.297411, 0.297411, 0.299374, 0.295449, 0.285636, 0.289561, 0.283673, 0.295449, 0.299374, 0.289561, 0.289561, 0.293486, 0.293486, 0.283673, 0.295449, 0.299374, 0.285636, 0.0422743, 0.116853, 0.191431, 0.189469, 0.285636, 0.299374, 0.293486, 0.281711, 0.283673, 0.289561, 0.289561, 0.297411, 0.285636, 0.262085, 0.301337, 0.299374, 0.289561, 0.216945, 0.269935, 0.27386, 0.285636, 0.289561, 0.293486, 0.301337, 0.301337, 0.299374, 0.295449, 0.295449, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.933469, 0.0157927, 0.869445, 0.858774, 0.928133, 0.901457, 0.928133, 0.906792, 0.922798, 0.576002, 0.853439, 0.917463, 0.917463, 0.922798, 0.922798, 0.922798, 0.922798, 0.928133, 0.928133, 0.928133, 0.922798, 0.928133, 0.922798, 0.928133, 0.917463, 0.922798, 0.928133, 0.928133, 0.928133, 0.928133, 0.922798, 0.922798, 0.928133, 0.922798, 0.928133, 0.933469, 0.933469, 0.933469, 0.933469, 0.885451, 0.912127, 0.207864, 0.837433, 0.901457, 0.922798, 0.928133, 0.922798, 0.864109, 0.917463, 0.922798, 0.917463, 0.922798, 0.922798, 0.922798, 0.885451, 0.933469, 0.928133, 0.933469, 0.928133, 0.928133, 0.901457, 0.933469, 0.922798, 0.928133, 0.922798, 0.928133, 0.928133, 0.928133, 0.928133, 0.922798, 0.922798, 0.922798, 0.922798, 0.901457, 0.928133, 0.928133, 0.928133, 0.928133, 0.928133, 0.922798, 0.917463, 0.197194, 0.890786, 0.896121, 0.922798, 0.933469, 0.917463, 0.890786, 0.71472, 0.378595, 0.922798, 0.922798, 0.928133, 0.922798, 0.928133, 0.922798, 0.922798, 0.917463, 0.912127, 0.917463, 0.928133, 0.933469, 0.928133, 0.928133, 0.917463, 0.922798, 0.922798, 0.928133, 0.922798, 0.922798, 0.917463, 0.922798, 0.928133, 0.917463, 0.933469, 0.933469, 0.933469, 0.928133, 0.928133, 0.928133, 0.901457, 0.186523, 0.896121, 0.495972, 0.229206, 0.826762, 0.906792, 0.928133, 0.848103, 0.906792, 0.901457, 0.917463, 0.933469, 0.922798, 0.853439, 0.928133, 0.928133, 0.922798, 0.922798, 0.869445, 0.869445, 0.933469, 0.928133, 0.928133, 0.933469, 0.928133, 0.928133, 0.928133, 0.928133, 0.928133, 0.922798, 0.917463, 0.922798, 0.928133, 0.912127, 0.922798, 0.928133, 0.928133, 0.922798, 0.917463, 0.928133, 0.218535, 0.853439, 0.250547, 0.357253, 0.928133, 0.928133, 0.922798, 0.917463, 0.922798, 0.922798, 0.917463, 0.933469, 0.901457, 0.928133, 0.928133, 0.928133, 0.917463, 0.928133, 0.912127, 0.928133, 0.933469, 0.928133, 0.928133, 0.933469, 0.928133, 0.928133, 0.933469, 0.933469, 0.928133, 0.922798, 0.917463, 0.928133, 0.928133, 0.928133, 0.917463, 0.917463, 0.922798, 0.922798, 0.928133, 0.928133, 0.234541, 0.858774, 0.890786, 0.922798, 0.885451, 0.933469, 0.933469, 0.928133, 0.917463, 0.922798, 0.922798, 0.928133, 0.912127, 0.906792, 0.928133, 0.928133, 0.928133, 0.928133, 0.917463, 0.928133, 0.933469, 0.922798, 0.928133, 0.917463, 0.922798, 0.928133, 0.933469, 0.933469, 0.928133, 0.928133, 0.922798, 0.922798, 0.933469, 0.933469, 0.933469, 0.928133, 0.922798, 0.928133, 0.928133, 0.933469, 0.22387, 0.869445, 0.922798, 0.917463, 0.917463, 0.928133, 0.917463, 0.901457, 0.917463, 0.912127, 0.928133, 0.933469, 0.928133, 0.832097, 0.821427, 0.346655, 0.34453, 0.34453, 0.34453, 0.34453, 0.34453, 0.34453, 0.34453, 0.34453, 0.348779, 0.34453, 0.34453, 0.34453, 0.34453, 0.34453, 0.327533, 0.34453, 0.34453, 0.34453, 0.34453, 0.34453, 0.195806, 0.189432, 0.204305, 0.214928, 0.127818, 0.248922, 0.234049, 0.282916, 0.34453, 0.272293, 0.312661, 0.340281, 0.333907, 0.295664, 0.325408, 0.312661, 0.265919, 0.265919, 0.270168, 0.291414, 0.302038, 0.253171, 0.34453, 0.348779, 0.355153, 0.348779, 0.333907, 0.348779, 0.346655, 0.350904, 0.295664, 0.312661, 0.325408, 0.325408, 0.28929, 0.319035, 0.321159, 0.31691, 0.299913, 0.31691, 0.140566, 0.274417, 0.121444, 0.214928, 0.234049, 0.151189, 0.333907, 0.327533, 0.299913, 0.248922, 0.223426, 0.306287, 0.25742, 0.314785, 0.248922, 0.365776, 0.28929, 0.319035, 0.34453, 0.355153, 0.348779, 0.306287, 0.327533, 0.34453, 0.34453, 0.333907, 0.304162, 0.31691, 0.308411, 0.274417, 0.297788, 0.304162, 0.312661, 0.331782, 0.304162, 0.329658, 0.325408, 0.325408, 0.321159, 0.308411, 0.172435, 0.282916, 0.140566, 0.125693, 0.231925, 0.17031, 0.291414, 0.123569, 0.31691, 0.0959483, 0.270168, 0.314785, 0.25742, 0.291414, 0.338156, 0.359403, 0.321159, 0.238299, 0.350904, 0.306287, 0.348779, 0.34453, 0.331782, 0.348779, 0.359403, 0.348779, 0.304162, 0.319035, 0.310536, 0.28929, 0.280791, 0.302038, 0.31691, 0.336032, 0.310536, 0.331782, 0.331782, 0.312661, 0.331782, 0.323284, 0.155438, 0.270168, 0.127818, 0.161812, 0.333907, 0.236174, 0.26167, 0.26167, 0.291414, 0.255296, 0.28929, 0.293539, 0.304162, 0.291414, 0.25742, 0.340281, 0.325408, 0.234049, 0.355153, 0.253171, 0.350904, 0.350904, 0.319035, 0.333907, 0.359403, 0.329658, 0.336032, 0.325408, 0.302038, 0.272293, 0.28929, 0.297788, 0.327533, 0.325408, 0.306287, 0.333907, 0.338156, 0.331782, 0.327533, 0.312661, 0.151189, 0.242548, 0.11507, 0.327533, 0.214928, 0.2298, 0.276542, 0.153313, 0.304162, 0.225551, 0.231925, 0.282916, 0.244672, 0.287165, 0.265919, 0.365776, 0.2298, 0.34453, 0.253171, 0.338156, 0.34453, 0.340281, 0.346655, 0.346655, 0.361527, 0.355153, 0.31691, 0.323284, 0.306287, 0.278667, 0.282916, 0.282916, 0.325408, 0.348779, 0.338156, 0.325408, 0.308411, 0.321159, 0.312661, 0.319035, 0.149064, 0.268043, 0.11507, 0.20218, 0.323284, 0.280791, 0.274417, 0.246797, 0.282916, 0.253171, 0.25742, 0.255296, 0.299913, 0.28929, 0.323284, 0.361527, 0.28929, 0.340281, 0.333907, 0.219177, 0.333907, 0.325408, 0.329658, 0.323284, 0.363652, 0.340281, 0.323284, 0.327533, 0.308411, 0.287165, 0.259545, 0.31691, 0.327533, 0.333907, 0.325408, 0.325408, 0.325408, 0.325408, 0.321159, 0.312661, 0.140566, 0.274417, 0.121444, 0.323284, 0.274417, 0.297788, 0.282916, 0.157563, 0.265919, 0.278667, 0.306287, 0.287165, 0.293539, 0.28929, 0.176684, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.581924, 0.587176, 0.587176, 0.587176, 0.587176, 0.587176, 0.083027, 0.272083, 0.487396, 0.503151, 0.513654, 0.571421, 0.487396, 0.487396, 0.524157, 0.424378, 0.392868, 0.335101, 0.576673, 0.581924, 0.39812, 0.539912, 0.545163, 0.592427, 0.53466, 0.555666, 0.576673, 0.581924, 0.581924, 0.592427, 0.576673, 0.581924, 0.576673, 0.56617, 0.524157, 0.550415, 0.503151, 0.487396, 0.513654, 0.508403, 0.545163, 0.539912, 0.513654, 0.476893, 0.476893, 0.518906, 0.0987816, 0.177555, 0.581924, 0.576673, 0.581924, 0.576673, 0.513654, 0.550415, 0.513654, 0.335101, 0.571421, 0.524157, 0.56617, 0.539912, 0.487396, 0.592427, 0.597679, 0.581924, 0.539912, 0.518906, 0.576673, 0.581924, 0.592427, 0.581924, 0.581924, 0.571421, 0.571421, 0.56617, 0.560918, 0.571421, 0.539912, 0.524157, 0.56617, 0.550415, 0.587176, 0.576673, 0.587176, 0.592427, 0.56617, 0.503151, 0.0987816, 0.203813, 0.581924, 0.581924, 0.576673, 0.581924, 0.508403, 0.550415, 0.371862, 0.508403, 0.487396, 0.53466, 0.60293, 0.592427, 0.461139, 0.587176, 0.587176, 0.576673, 0.529409, 0.529409, 0.571421, 0.587176, 0.60293, 0.576673, 0.592427, 0.592427, 0.581924, 0.576673, 0.550415, 0.581924, 0.529409, 0.53466, 0.581924, 0.571421, 0.581924, 0.571421, 0.576673, 0.592427, 0.46639, 0.571421, 0.0987816, 0.214316, 0.581924, 0.592427, 0.56617, 0.560918, 0.524157, 0.581924, 0.461139, 0.503151, 0.487396, 0.518906, 0.576673, 0.539912, 0.518906, 0.53466, 0.56617, 0.581924, 0.503151, 0.539912, 0.56617, 0.597679, 0.581924, 0.581924, 0.60293, 0.581924, 0.576673, 0.56617, 0.560918, 0.571421, 0.508403, 0.56617, 0.581924, 0.576673, 0.581924, 0.571421, 0.576673, 0.592427, 0.46639, 0.508403, 0.0935301, 0.251077, 0.581924, 0.424378, 0.539912, 0.56617, 0.508403, 0.581924, 0.53466, 0.324598, 0.476893, 0.503151, 0.581924, 0.571421, 0.560918, 0.592427, 0.592427, 0.576673, 0.550415, 0.555666, 0.56617, 0.581924, 0.592427, 0.597679, 0.60293, 0.571421, 0.550415, 0.545163, 0.555666, 0.581924, 0.555666, 0.555666, 0.592427, 0.581924, 0.581924, 0.56617, 0.581924, 0.581924, 0.581924, 0.560918, 0.0777754, 0.23007, 0.581924, 0.555666, 0.581924, 0.571421, 0.524157, 0.539912, 0.545163, 0.555666, 0.503151, 0.550415, 0.560918, 0.555666, 0.371862, 0.513654, 0.592427, 0.576673, 0.56617, 0.476893, 0.56617, 0.581924, 0.576673, 0.592427, 0.592427, 0.581924, 0.53466, 0.560918, 0.555666, 0.571421, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0.509436, 0, 0.198346, 0.56647, 0.54573, 0.576839, 0.563877, 0.54573, 0.537953, 0.540545, 0.493882, 0.475735, 0.447218, 0.478327, 0.54573, 0.535361, 0.537953, 0.46018, 0.558692, 0.512029, 0.488697, 0.530176, 0.54573, 0.504252, 0.537953, 0.524991, 0.509436, 0.5561, 0.517214, 0.54573, 0.519806, 0.569062, 0.54573, 0.537953, 0.535361, 0.491289, 0.506844, 0.509436, 0.5561, 0.587209, 0.524991, 0, 0.454996, 0.385, 0.522399, 0.473143, 0.423887, 0.486105, 0.550915, 0.56647, 0.532768, 0.524991, 0.369446, 0.54573, 0.537953, 0.452403, 0.429071, 0.488697, 0.372038, 0.418702, 0.372038, 0.54573, 0.5561, 0.527583, 0.54573, 0.558692, 0.540545, 0.524991, 0.558692, 0.561285, 0.550915, 0.571654, 0.553508, 0.537953, 0.517214, 0.496474, 0.530176, 0.537953, 0.537953, 0.553508, 0.54573, 0.00909942, 0.47055, 0.530176, 0.364261, 0.506844, 0.315005, 0.530176, 0.5561, 0.540545, 0.483512, 0.597579, 0.527583, 0.535361, 0.532768, 0.473143, 0.379815, 0.436849, 0.47055, 0.473143, 0.478327, 0.537953, 0.569062, 0.530176, 0.561285, 0.558692, 0.530176, 0.524991, 0.558692, 0.589801, 0.571654, 0.561285, 0.561285, 0.54573, 0.524991, 0.517214, 0.537953, 0.527583, 0.563877, 0.563877, 0.532768, 0.00391458, 0.431664, 0.506844, 0.400555, 0.512029, 0, 0.483512, 0.46018, 0.571654, 0.524991, 0.563877, 0.532768, 0.5561, 0.519806, 0.379815, 1, 0.250194, 0.353891, 0.486105, 0.504252, 0.532768, 0.543138, 0.535361, 0.54573, 0.553508, 0.543138, 0.522399, 0.543138, 0.563877, 0.56647, 0.54573, 0.563877, 0.524991, 0.54573, 0.519806, 0.54573, 0.553508, 0.561285, 0.571654, 0.563877, 0, 0.346114, 0.392778, 0.5561, 0.527583, 0.439441, 0.452403, 0.532768, 0.5561, 0.527583, 0.56647, 0.408332, 0.569062, 0.457588, 0.462773, 0.423887, 0.416109, 0.475735, 0.535361, 0.522399, 0.532768, 0.524991, 0.532768, 0.54573, 0.561285, 0.499067, 0.535361, 0.558692, 0.558692, 0.5561, 0.537953, 0.54573, 0.553508, 0.561285, 0.563877, 0.574247, 0.5561, 0.558692, 0.569062, 0.582024, 0, 0.338337, 0.449811, 0.579432, 0.478327, 0.408332, 0.478327, 0.496474, 0.558692, 0.527583, 0, 0.527583, 0.550915, 0.530176, 0.493882, 0.499067, 0.486105, 0.540545, 0.530176, 0.535361, 0.558692, 0.537953, 0.519806, 0.540545, 0.558692, 0.550915, 0.550915, 0.54573, 0.561285, 0.548323, 0.56647, 0.553508, 0.54573, 0.558692, 0.54573, 0.582024, 0.550915, 0.54573, 0.571654, 0.5561, 0, 0.32019, 0.281303, 0.524991, 0.304635, 0.504252, 0.509436, 0.517214, 0.54573, 0.452403, 0.514621, 0.491289, 0.442034, 0.491289, 0.46018, 0.234126, 0.237318, 0.237318, 0.234126, 0.237318, 0.234126, 0.237318, 0.237318, 0.240511, 0.234126, 0.237318, 0.237318, 0.234126, 0.237318, 0.237318, 0.237318, 0.237318, 0.237318, 0.237318, 0.234126, 0.237318, 0.131971, 0.246895, 0.240511, 0.176664, 0.19901, 0.214972, 0.259665, 0.259665, 0.240511, 0.237318, 0.246895, 0.227741, 0.240511, 0.246895, 0.243703, 0.259665, 0.237318, 0.234126, 0.237318, 0.234126, 0.269242, 0.269242, 0.262857, 0.259665, 0.259665, 0.25328, 0.259665, 0.243703, 0.234126, 0.246895, 0.243703, 0.227741, 0.234126, 0.250088, 0.237318, 0.202203, 0.218164, 0.230934, 0.246895, 0.25328, 0.0681245, 0.246895, 0.237318, 0.21178, 0.205395, 0.259665, 0.262857, 0.250088, 0.230934, 0.243703, 0.259665, 0.259665, 0.243703, 0.234126, 0.240511, 0.250088, 0.240511, 0, 0.234126, 0.240511, 0.259665, 0.25328, 0.240511, 0.237318, 0.240511, 0.243703, 0.243703, 0.243703, 0.246895, 0.262857, 0.250088, 0.234126, 0.237318, 0.262857, 0.250088, 0.224549, 0.234126, 0.224549, 0.250088, 0.243703, 0.0649322, 0.25328, 0.230934, 0.224549, 0.240511, 0.243703, 1, 0.234126, 0.218164, 0.208587, 0.262857, 0.250088, 0.256472, 0.250088, 0.237318, 0.250088, 0.234126, 0.259665, 0.25328, 0.266049, 0.262857, 0.250088, 0.250088, 0.240511, 0.243703, 0.25328, 0.243703, 0.259665, 0.243703, 0.250088, 0.230934, 0.234126, 0.237318, 0.266049, 0.246895, 0.240511, 0.234126, 0.240511, 0.246895, 0.243703, 0.0745092, 0.246895, 0.237318, 0.234126, 0.259665, 0.240511, 0.224549, 0.246895, 0.237318, 0.234126, 0.224549, 0.224549, 0.224549, 0.221357, 0.243703, 0.240511, 0.240511, 0.259665, 0.259665, 0.259665, 0.262857, 0.25328, 0.25328, 0.243703, 0.246895, 0.259665, 0.237318, 0.240511, 0.262857, 0.262857, 0.259665, 0.243703, 0.227741, 0.240511, 0.269242, 0.243703, 0.224549, 0.234126, 0.240511, 0.243703, 0.0681245, 0.234126, 0.237318, 0.205395, 0.11601, 0.266049, 0.224549, 0.246895, 0.243703, 0.25328, 0.259665, 0.262857, 0.25328, 0.221357, 0.227741, 0.224549, 0.227741, 0.234126, 0.259665, 0.25328, 0.262857, 0.259665, 0.262857, 0.250088, 0.243703, 0.259665, 0.250088, 0.246895, 0.240511, 0.262857, 0.259665, 0.246895, 0.237318, 0.25328, 0.243703, 0.243703, 0.224549, 0.224549, 0.240511, 0.234126, 0.0585475, 0.25328, 0.109625, 0.173472, 0.15751, 0.221357, 0.240511, 0.237318, 0.230934, 0.234126, 0.262857, 0.259665, 0.259665, 0.250088, 0.25328, 0.250088, 0.227741, 0.262857, 0.266049, 0.25328, 0.259665, 0.259665, 0.259665, 0.21178, 0.230934, 0.259665, 0.243703, 0.250088, 0.259665, 0.266049, 0.256472, 0.243703, 0.234126, 0.25328, 0.25328, 0.256472, 0.21178, 0.218164, 0.240511, 0.230934, 0.0649322, 0.243703, 0.112817, 0.25328, 0.192626, 0.237318, 0.250088, 0.234126, 0.237318, 0.25328, 0.259665, 0.25328, 0.250088, 0.243703, 0.259665, 0.523001, 0.525502, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 1, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0.523001, 0, 0.292868, 0.497986, 0.482978, 0.525502, 0.475473, 0.502989, 0.450459, 0.487981, 0.482978, 0.475473, 0.475473, 0.427946, 0.43545, 0.502989, 0.455462, 0.457963, 0.523001, 0.523001, 0.517998, 0.545514, 0.545514, 0.538009, 0.543012, 0.523001, 0.530505, 0.538009, 0.525502, 0.422943, 0.485479, 0.507992, 1, 0.538009, 0.495485, 0.510494, 0.472972, 0.462966, 0.487981, 0.482978, 0.507992, 0, 0.22533, 0.480476, 0.480476, 0.450459, 0.440453, 0.480476, 0.515496, 0.520499, 0.555519, 0.517998, 0.535508, 0.477975, 0.485479, 0, 0.512995, 0.442955, 0.457963, 0.360407, 0.465468, 0.563024, 0.457963, 0.512995, 0.523001, 0.530505, 0.502989, 0.500488, 0.515496, 0.540511, 0.545514, 0.535508, 0.543012, 0.533006, 0.497986, 0.517998, 0.492983, 0.475473, 0.457963, 0.500488, 0.495485, 0, 0.110263, 0.45296, 0.360407, 0.495485, 0.457963, 0.507992, 0.460465, 0.465468, 0.507992, 0.290367, 0.285364, 0.495485, 0.205318, 0.210321, 0.465468, 0.33039, 0.33039, 0.512995, 0.480476, 0.530505, 0.510494, 0.550517, 0.538009, 0.525502, 0.512995, 0.490482, 0.507992, 0.505491, 0.430448, 0.500488, 0.497986, 0.517998, 0.517998, 0.490482, 0.492983, 0.470471, 0.510494, 0.500488, 0.482978, 0, 0.135278, 0.510494, 0.320384, 0.335393, 0.495485, 0.502989, 0.485479, 0.427946, 0.462966, 0.360407, 0.345399, 0.507992, 1, 0.437952, 0.357906, 0.250344, 0.502989, 0.41794, 0.495485, 0.543012, 0.517998, 0.550517, 0.538009, 0.538009, 0.525502, 0.497986, 0.540511, 0.523001, 0.507992, 0.492983, 0.492983, 0.538009, 0.517998, 0.490482, 0.500488, 0.482978, 0.515496, 0, 0.490482, 0, 0.102759, 0.530505, 0.407935, 0.515496, 0.507992, 0.457963, 0.442955, 0.355404, 0.565525, 0.457963, 0.533006, 0.500488, 0.352903, 0.437952, 0.520499, 0.495485, 0.510494, 0.545514, 0.533006, 0.568027, 0.543012, 0.515496, 0.530505, 0.558021, 0.500488, 0.507992, 0.540511, 0.530505, 0.533006, 0.545514, 0.525502, 0.530505, 0.500488, 0.517998, 0.490482, 0.505491, 0.515496, 0.500488, 0.43545, 0, 0.145284, 0.495485, 0.482978, 0.512995, 0.455462, 0.500488, 0.520499, 0.550517, 0.545514, 0.528004, 0.385422, 0.487981, 0.507992, 0.475473, 0.495485, 0.517998, 0.538009, 0.540511, 0.555519, 0.550517, 0.548015, 1, 0.535508, 0.520499, 0.497986, 0.512995, 0.517998, 0.517998, 0.538009, 0.553018, 0.555519, 0.555519, 0.490482, 0.523001, 0.502989, 0.445456, 0.487981, 0.475473, 0.490482, 0, 0.112765, 0.525502, 0.477975, 0.445456, 0.477975, 0.490482, 0.487981, 0.545514, 0.550517, 0.550517, 0.495485, 0.517998, 0.535508, 0.500488}; const float CEPuckNEATController::m_GraySamplesCenter[4205] = { 0.23196, 0.23196, 0.23196, 0.23196, 0.23196, 0.23196, 0.23196, 0.23196, 0.23196, 0.22996, 0.23196, 0.23196, 0.23196, 0.23196, 0.23196, 0.22996, 0.22596, 0.23196, 0.23196, 0.23196, 0.23196, 0.02396, 0.23996, 0.22996, 0.20596, 0.21796, 0.24196, 0.19596, 0.20796, 0.19796, 0.20396, 0.20196, 0.13596, 0.18396, 0.13796, 0.18396, 0.19396, 0.21796, 0.18196, 0.20396, 0.21996, 0.22596, 0.21996, 0.21196, 0.20796, 0.21396, 0.19596, 0.21796, 0.20396, 0.22796, 0.22996, 0.22396, 0.22596, 0.22396, 0.22796, 0.23396, 0.21796, 0.22996, 0.21996, 0.21796, 0.21996, 0.01196, 0.19796, 0.17996, 0.21996, 0.21996, 0.23196, 0.22996, 0.23796, 0.20796, 0.23796, 0.20196, 0.23796, 0.12996, 0.18996, 0.12196, 0.17996, 0.21996, 0.17396, 0.16396, 0.21396, 0.22396, 0.20796, 0.20796, 0.20396, 0.23196, 0.20396, 0.20396, 0.22396, 0.23596, 0.23196, 0.23596, 0.22796, 0.23396, 0.23996, 0.23996, 0.21996, 0.23396, 0.23796, 0.21996, 0.21996, 0.00796002, 0.22996, 0.18996, 0.16596, 0.21996, 0.22996, 0.23596, 0.19596, 0.18796, 0.23596, 0.20996, 0.21196, 0.20196, 0.19996, 0.21996, 0.07596, 0.05196, 0.14996, 0.08596, 0.03996, 0.21996, 0.19396, 0.21796, 0.22196, 0.21396, 0.21996, 0.21996, 0.21396, 0.21996, 0.22796, 0.21996, 0.21796, 0.21996, 0.22796, 0.21996, 0.21996, 0.16196, 0.22196, 0.21396, 0.20796, 0.01196, 0.20596, 0.12596, 0.17396, 0.22796, 0.21996, 0.23196, 0.17996, 0.21796, 0.19796, 0.18996, 0.22796, 0.19396, 0.18996, 0.20196, 0.21996, 0.17596, 0.14796, 0.03596, 0.05796, 0.22796, 0.21596, 0.21196, 0.20796, 0.22396, 0.22196, 0.23796, 0.21396, 0.23396, 0.23196, 0.21396, 0.20996, 0.21196, 0.23196, 0.23796, 0.21596, 0.16396, 0.15596, 0.23196, 0.23596, 0.01596, 0.23196, 0.07396, 0.07196, 0.22396, 0.20196, 0.23596, 0.18396, 0.17396, 0.23996, 0.23196, 0.21396, 0.21596, 0.17796, 0.20596, 0.21596, 0.21196, 0.19996, 0.21996, 0.20396, 0.22396, 0.21996, 0.21796, 0.21196, 0.23396, 0.23996, 0.23596, 0.21396, 0.22396, 0.23396, 0.22796, 0.22396, 0.21996, 0.21796, 0.23396, 0.21196, 0.21996, 0.16196, 0.20796, 0.20196, 0.01396, 0.20796, 0.10996, 0.14796, 0.21996, 0.21996, 0.20996, 0.22396, 0.18196, 0.19596, 0.22796, 0.20796, 0.21396, 0.20196, 0.18396, 0.10196, 0.09196, 0.399222, 0.388872, 0.388872, 0.388872, 0.386802, 0.388872, 0.388872, 0.399222, 0.388872, 0.388872, 0.388872, 0.388872, 0.388872, 0.372312, 0.386802, 0.388872, 0.388872, 0.388872, 0.388872, 0.386802, 0.388872, 0.0307603, 0.343331, 0.287441, 0.399222, 0.384732, 0.266741, 0.351611, 0.275021, 0.250181, 0.252251, 0.343331, 0.399222, 0.0121302, 0.192221, 0.337121, 0.355752, 0.364032, 0.328841, 0.339191, 0.152891, 0.366102, 0.374382, 0.345401, 0.374382, 0.372312, 0.364032, 0.399222, 0.372312, 0.368172, 0.376452, 0.376452, 0.388872, 0.368172, 0.382662, 0.376452, 0.380592, 0.386802, 0.345401, 0.345401, 0.359892, 0.0204102, 0.291581, 0.202571, 0.134261, 0.372312, 0.260531, 0.347471, 0.328841, 0.312281, 0.287441, 0.301931, 0.345401, 0.266741, 0.335051, 0.225341, 0.382662, 0.254321, 0.364032, 0.243971, 0.347471, 0.388872, 0.364032, 0.364032, 0.384732, 0.361962, 0.295721, 0.337121, 0.332981, 0.341261, 0.359892, 0.386802, 0.386802, 0.388872, 0.399222, 0.380592, 0.399222, 0.351611, 0.337121, 0.328841, 0.345401, 0.0390403, 0.345401, 0.214991, 0.405432, 0.297791, 0.359892, 0.361962, 0.293651, 0.399222, 0.407502, 0.341261, 0.332981, 0.268811, 0.285371, 0.256391, 0.140471, 0.227411, 0.364032, 0.260531, 0.241901, 0.399222, 0.376452, 0.378522, 0.378522, 0.372312, 0.343331, 0.328841, 0.345401, 0.353682, 0.380592, 0.374382, 0.388872, 0.374382, 0.376452, 0.384732, 0.401292, 0.364032, 0.339191, 0.328841, 0.341261, 0.0390403, 0.337121, 0.289511, 0.376452, 0.376452, 0.370242, 0.378522, 0.390942, 0.339191, 0.285371, 0.357822, 0.293651, 0.357822, 0.343331, 0.258461, 0.378522, 0.0990705, 0.0328303, 0.113561, 0.386802, 0.399222, 0.388872, 0.382662, 0.374382, 0.376452, 0.275021, 0.326771, 0.310211, 0.328841, 0.370242, 0.399222, 0.378522, 0.368172, 0.386802, 0.386802, 0.382662, 0.320561, 0.343331, 0.328841, 0.351611, 0.0390403, 0.353682, 0.0535304, 0, 0.107351, 0.361962, 0.335051, 0.364032, 0.295721, 0.376452, 0.270881, 0.341261, 0.341261, 0.301931, 0.115631, 0.0597404, 0.217061, 0.332981, 0.320561, 0.229481, 0.399222, 0.399222, 0.399222, 0.386802, 0.388872, 0.332981, 0.339191, 0.366102, 0.335051, 0.328841, 0.388872, 0.380592, 0.372312, 0.372312, 0.376452, 0.388872, 0.351611, 0.328841, 0.372312, 0.341261, 0.0369703, 0.372312, 0.268811, 0.384732, 0.339191, 0.347471, 0.372312, 0.349541, 0.384732, 0.353682, 0.223271, 0.351611, 0.252251, 0.316421, 0.378522, 0.304001, 0.241901, 0.345401, 0.144611, 0.285371, 0.390942, 0.388872, 0.314351, 0.399222, 0.378522, 0.347471, 0.341261, 0.316421, 0.345401, 0.366102, 0.347471, 0.382662, 0.347471, 0.372312, 0.368172, 0.368172, 0.366102, 0.374382, 0.351611, 0.372312, 0.0307603, 0.254321, 0.270881, 0.281231, 0.361962, 0.326771, 0.337121, 0.388872, 0.272951, 0.411642, 0.217061, 0.260531, 0.229481, 0.186011, 0.281231, 0.357685, 0.359894, 0.359894, 0.359894, 0.357685, 0.359894, 0.357685, 0.362102, 0.359894, 0.359894, 0.359894, 0.359894, 0.359894, 0.357685, 0.359894, 0.357685, 0.359894, 0.359894, 0.373145, 0.359894, 0.359894, 0.015371, 0.386396, 0.342226, 0.22076, 0.333392, 0.346643, 0.300265, 0.331184, 0.326767, 0.342226, 0.331184, 0.362102, 0.346643, 0.311307, 0.313516, 0.344435, 0.348852, 0.317933, 0.366519, 0.320141, 0.357685, 0.370936, 0.359894, 0.326767, 0.373145, 0.366519, 0.397438, 0.390813, 0.37977, 0.384187, 0.331184, 0.313516, 0.331184, 0.331184, 0.324558, 0.342226, 0.337809, 0.357685, 0.340018, 0.335601, 0.0286219, 0.216343, 0.377562, 0.37977, 0.362102, 0.373145, 0.357685, 0.373145, 0.313516, 0.348852, 0.311307, 0.326767, 0.390813, 0.238428, 0.388604, 0.317933, 0.368728, 0.313516, 0.364311, 0.370936, 0.37977, 0.373145, 0.377562, 0.377562, 0.390813, 0.340018, 0.346643, 0.375353, 0.373145, 0.370936, 0.359894, 0.324558, 0.373145, 0.373145, 0.359894, 0.359894, 0.362102, 0.362102, 0.35106, 0.320141, 0.00653708, 0.189841, 0.291431, 0.348852, 0.373145, 0.364311, 0.373145, 0.359894, 0.30689, 0.381979, 0.29364, 0.295848, 0.216343, 0.381979, 0.362102, 0.35106, 0.381979, 0.370936, 0.256095, 0.384187, 0.375353, 0.375353, 0.381979, 0.373145, 0.401855, 0.37977, 0.342226, 0.381979, 0.390813, 0.386396, 0.357685, 0.370936, 0.386396, 0.384187, 0.340018, 0.368728, 0.370936, 0.381979, 0.357685, 0.357685, 0.0175795, 0.216343, 0.346643, 0.364311, 0.368728, 0.373145, 0.37977, 0.384187, 0.342226, 0.37977, 0.386396, 0.384187, 0.357685, 0.27818, 0.399647, 0.362102, 0.346643, 0.284806, 0.342226, 0.364311, 0.357685, 0.362102, 0.370936, 0.377562, 0.386396, 0.377562, 0.373145, 0.384187, 0.381979, 0.377562, 0.364311, 0.368728, 0.384187, 0.384187, 0.359894, 0.364311, 0.373145, 0.386396, 0.368728, 0.357685, 0.010954, 0.154505, 0.320141, 0.218551, 0.357685, 0.295848, 0.401855, 0.384187, 0.344435, 0.386396, 0.37977, 0.245053, 0.386396, 0.37977, 0.390813, 0.368728, 0.377562, 0.373145, 0.353269, 0.317933, 0.368728, 0.384187, 0.368728, 0.373145, 0.390813, 0.386396, 0.362102, 0.375353, 0.397438, 0.357685, 0.373145, 0.377562, 0.39523, 0.39523, 0.373145, 0.35106, 0.373145, 0.366519, 0.366519, 0.377562, 0.00653708, 0.134629, 0.373145, 0.373145, 0.366519, 0.359894, 0.357685, 0.366519, 0.357685, 0.373145, 0.375353, 0.324558, 0.258304, 0.203092, 0.390813, 0.331184, 0.373145, 0.373145, 0.216343, 0.238428, 0.368728, 0.370936, 0.368728, 0.381979, 0.375353, 0.377562, 0.377562, 0.388604, 0.384187, 0.366519, 0.364311, 0.381979, 0.381979, 0.384187, 0.373145, 0.390813, 0.377562, 0.364311, 0.377562, 0.375353, 0.0043286, 0.13242, 0.390813, 0.271555, 0.346643, 0.37977, 0.37977, 0.390813, 0.346643, 0.370936, 0.366519, 0.364311, 0.287014, 0.282597, 0.280389, 0.418584, 0.418584, 0.42483, 0.420666, 0.420666, 0.418584, 0.420666, 0.420666, 0.418584, 0.420666, 0.418584, 0.420666, 0.420666, 0.420666, 0.420666, 0.428994, 0.418584, 0.420666, 0.420666, 0.420666, 0.420666, 0.0500718, 0.181237, 0.364452, 0.360288, 0.358206, 0.358206, 0.324894, 0.283255, 0.381108, 0.364452, 0.35196, 0.395682, 0.374862, 0.322812, 0.314484, 0.38319, 0.370698, 0.37278, 0.389436, 0.285337, 0.40401, 0.395682, 0.381108, 0.399846, 0.381108, 0.381108, 0.3936, 0.385272, 0.399846, 0.387354, 0.406092, 0.399846, 0.399846, 0.416502, 0.356124, 0.418584, 0.416502, 0.406092, 0.416502, 0.416502, 0.0667277, 0.214549, 0.3936, 0.399846, 0.395682, 0.366534, 0.333222, 0.356124, 0.197893, 0.3936, 0.285337, 0.36237, 0.314484, 0.247861, 0.381108, 0.314484, 0.308238, 0.345714, 0.34155, 0.416502, 0.40401, 0.401928, 0.3936, 0.364452, 0.368616, 0.364452, 0.35196, 0.306156, 0.381108, 0.349878, 0.401928, 0.40401, 0.401928, 0.416502, 0.418584, 0.428994, 0.406092, 0.401928, 0.408174, 0.389436, 0.0729737, 0.247861, 0.339468, 0.418584, 0.337386, 0.416502, 0.416502, 0.360288, 0.376944, 0.356124, 0.314484, 0.349878, 0.318648, 0.322812, 0.266599, 0.197893, 0.406092, 0.264517, 0.389436, 0.408174, 0.418584, 0.3936, 0.395682, 0.381108, 0.354042, 0.354042, 0.36237, 0.349878, 0.374862, 0.370698, 0.397764, 0.399846, 0.416502, 0.401928, 0.426912, 0.420666, 0.422748, 0.391518, 0.379026, 0.397764, 0.0771377, 0.212467, 0.354042, 0.291582, 0.401928, 0.416502, 0.431076, 0.38319, 0.406092, 0.381108, 0.34155, 0.34155, 0.312402, 0.391518, 0.345714, 0.349878, 0.408174, 0.399846, 0.401928, 0.3936, 0.401928, 0.387354, 0.381108, 0.395682, 0.366534, 0.381108, 0.347796, 0.370698, 0.374862, 0.379026, 0.376944, 0.408174, 0.416502, 0.416502, 0.426912, 0.416502, 0.416502, 0.406092, 0.408174, 0.385272, 0.0771377, 0.245779, 0.326976, 0.420666, 0.33114, 0.426912, 0.416502, 0.418584, 0.389436, 0.387354, 0.337386, 0.376944, 0.283255, 0.349878, 0.37278, 0.397764, 0.401928, 0.374862, 0.376944, 0.3936, 0.416502, 0.399846, 0.379026, 0.391518, 0.379026, 0.376944, 0.374862, 0.374862, 0.354042, 0.349878, 0.381108, 0.408174, 0.40401, 0.426912, 0.426912, 0.422748, 0.418584, 0.418584, 0.40401, 0.387354, 0.0750557, 0.247861, 0.381108, 0.260353, 0.428994, 0.387354, 0.397764, 0.42483, 0.3936, 0.374862, 0.391518, 0.349878, 0.379026, 0.35196, 0.374862, 0.218713, 0.389436, 0.158335, 0.0979575, 0.204139, 0.416502, 0.408174, 0.37278, 0.38319, 0.385272, 0.385272, 0.38319, 0.389436, 0.345714, 0.387354, 0.368616, 0.389436, 0.401928, 0.389436, 0.42483, 0.426912, 0.416502, 0.43524, 0.391518, 0.379026, 0.0833836, 0.243697, 0.322812, 0.258271, 0.426912, 0.387354, 0.399846, 0.374862, 0.385272, 0.356124, 0.360288, 0.335304, 0.374862, 0.374862, 0.426544, 0.4364, 0.426544, 0.426544, 0.418659, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.426544, 0.178175, 0.418659, 0.396976, 0.412746, 0.404861, 0.363466, 0.42063, 0.430486, 0.28659, 0.375293, 0.412746, 0.395005, 0.379236, 0.410774, 0.418659, 0.395005, 0.404861, 0.385149, 0.375293, 0.389092, 0.418659, 0.408803, 0.410774, 0.42063, 0.426544, 0.42063, 0.42063, 0.424573, 0.396976, 0.432458, 0.412746, 0.422602, 0.416688, 0.424573, 0.42063, 0.389092, 0.410774, 0.398947, 0.412746, 0.4364, 0.146636, 0.430486, 0.365437, 0.404861, 0.249138, 0.251109, 0.408803, 0.412746, 0.424573, 0.42063, 0.280677, 0.389092, 0.193945, 0.197887, 0.359524, 0.229426, 0.28659, 0.412746, 0.249138, 0.422602, 0.426544, 0.428515, 0.424573, 0.426544, 0.422602, 0.404861, 0.414717, 0.414717, 0.442313, 0.375293, 0.375293, 0.422602, 0.424573, 0.414717, 0.414717, 0.416688, 0.434429, 0.412746, 0.385149, 0.396976, 0.15255, 0.385149, 0.270821, 0.460054, 0.398947, 0.351639, 0.414717, 0.426544, 0.365437, 0.343754, 0.359524, 0.426544, 0.398947, 0.30236, 0.430486, 0.188031, 0.3201, 0.359524, 0.272792, 0.428515, 0.42063, 0.430486, 0.426544, 0.422602, 0.428515, 0.416688, 0.428515, 0.414717, 0.440342, 0.40289, 0.365437, 0.375293, 0.416688, 0.412746, 0.375293, 0.432458, 0.430486, 0.434429, 0.408803, 0.408803, 0.168319, 0.432458, 0.422602, 0.337841, 0.426544, 0.432458, 0.389092, 0.355581, 0.365437, 0.379236, 0.284619, 0.430486, 0.221541, 0.347697, 0.430486, 0.414717, 0.422602, 0.351639, 0.347697, 0.412746, 0.42063, 0.426544, 0.410774, 0.426544, 0.426544, 0.424573, 0.412746, 0.408803, 0.424573, 0.444285, 0.40289, 0.395005, 0.408803, 0.42063, 0.426544, 0.430486, 0.426544, 0.430486, 0.412746, 0.414717, 0.174233, 0.418659, 0.306302, 0.444285, 0.389092, 0.377264, 0.42063, 0.395005, 0.365437, 0.416688, 0.434429, 0.30236, 0.424573, 0.190002, 0.306302, 0.393034, 0.440342, 0.357553, 0.404861, 0.42063, 0.422602, 0.430486, 0.410774, 0.442313, 0.428515, 0.414717, 0.426544, 0.379236, 0.42063, 0.430486, 0.398947, 0.404861, 0.396976, 0.408803, 0.40289, 0.432458, 0.438371, 0.424573, 0.406832, 0.398947, 0.211685, 0.383178, 0.428515, 0.258994, 0.416688, 0.326014, 0.404861, 0.418659, 0.381207, 0.345726, 0.438371, 0.296446, 0.363466, 0.318129, 0.440342, 0.190002, 0.329956, 0.314187, 0.235339, 0.424573, 0.418659, 0.428515, 0.404861, 0.442313, 0.428515, 0.428515, 0.426544, 0.416688, 0.4364, 0.446256, 0.416688, 0.424573, 0.408803, 0.408803, 0.395005, 0.4364, 0.446256, 0.424573, 0.414717, 0.40289, 0.18606, 0.424573, 0.412746, 0.316158, 0.400919, 0.40289, 0.404861, 0.404861, 0.428515, 0.363466, 0.322071, 0.375293, 0.312215, 0.333898, 0.386433, 0.386433, 0.386433, 0.386433, 0.386433, 0.384157, 0.386433, 0.386433, 0.386433, 0.386433, 0.386433, 0.375051, 0.386433, 0.386433, 0.390986, 0.386433, 0.386433, 0.386433, 0.386433, 0.386433, 0.386433, 0.0768496, 0.206601, 0.324972, 0.245299, 0.38188, 0.190667, 0.174733, 0.211154, 0.158798, 0.151969, 0.188391, 0.28855, 0.38188, 0.311313, 0.347735, 0.375051, 0.311313, 0.231641, 0.386433, 0.23847, 0.400091, 0.372775, 0.38188, 0.375051, 0.386433, 0.388709, 0.375051, 0.400091, 0.375051, 0.386433, 0.386433, 0.375051, 0.377328, 0.379604, 0.375051, 0.375051, 0.386433, 0.384157, 0.375051, 0.38188, 0.0677442, 0.324972, 0.23847, 0.254405, 0.345459, 0.188391, 0.188391, 0.384157, 0.302208, 0.295379, 0.375051, 0.375051, 0.290826, 0.393262, 0.377328, 0.336353, 0.340906, 0.268063, 0.281721, 0.390986, 0.397815, 0.350011, 0.38188, 0.375051, 0.38188, 0.400091, 0.395538, 0.388709, 0.390986, 0.38188, 0.375051, 0.340906, 0.375051, 0.375051, 0.390986, 0.350011, 0.375051, 0.375051, 0.379604, 0.395538, 0.0677442, 0.299932, 0.172456, 0.0791259, 0.138311, 0.395538, 0.172456, 0.17018, 0.375051, 0.245299, 0.390986, 0.375051, 0.33863, 0.375051, 0.347735, 0.306761, 0.243023, 0.350011, 0.377328, 0.33863, 0.386433, 0.375051, 0.375051, 0.375051, 0.375051, 0.379604, 0.379604, 0.393262, 0.386433, 0.390986, 0.386433, 0.375051, 0.375051, 0.354564, 0.375051, 0.302208, 0.343182, 0.384157, 0.33863, 0.388709, 0.0609151, 0.329524, 0.254405, 0.177009, 0.336353, 0.256681, 0.390986, 0.243023, 0.156522, 0.142864, 0.404644, 0.247576, 0.386433, 0.322695, 0.331801, 0.384157, 0.240747, 0.388709, 0.277168, 0.375051, 0.384157, 0.375051, 0.937309, 0.384157, 0.393262, 0.402367, 0.400091, 0.402367, 0.379604, 0.384157, 0.390986, 0.390986, 0.379604, 0.38188, 0.375051, 0.336353, 0.33863, 0.384157, 0.384157, 0.375051, 0.0449807, 0.283997, 0.375051, 0.329524, 0.204325, 0.375051, 0.324972, 0.388709, 0.304484, 0.322695, 0.315866, 0.304484, 0.375051, 0.395538, 0.402367, 0.256681, 0.379604, 0.375051, 0.336353, 0.299932, 0.390986, 0.350011, 0.375051, 0.386433, 0.388709, 0.409196, 0.388709, 0.40692, 0.395538, 0.386433, 0.375051, 0.400091, 0.38188, 0.384157, 0.329524, 0.35684, 0.377328, 0.402367, 0.377328, 0.204325, 0.0381516, 0.224812, 0.131482, 0.099613, 0.375051, 0.092784, 0.204325, 0.38188, 0.377328, 0.295379, 0.395538, 0.227089, 0.384157, 0.122377, 0.0814023, 0.208878, 0.322695, 0.375051, 0.172456, 0.108718, 0.388709, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.338037, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.33598, 0.338037, 0, 0.1817, 0.255755, 0.331866, 0.344208, 0.323638, 0.338037, 0.204328, 0.327752, 0.346265, 0.315409, 0.342151, 0.325695, 0.329809, 0.307181, 0.333923, 0.346265, 0.344208, 0.319524, 0.342151, 0.342151, 0.327752, 0.348322, 0.344208, 0.33598, 0.319524, 0.331866, 0.348322, 0.342151, 0.342151, 0.323638, 0.313352, 0.325695, 0.35038, 0.319524, 0.325695, 0.348322, 0.315409, 0.294839, 0.315409, 0, 0.198157, 0.268097, 0.342151, 0.21667, 0.317466, 0.352437, 0.33598, 0.327752, 0.327752, 0.288668, 0.333923, 0.292782, 0.348322, 0.348322, 0.329809, 0.311295, 0.338037, 0.319524, 0.340094, 0.327752, 0.340094, 0.344208, 0.342151, 0.340094, 0.338037, 0.317466, 0.340094, 0.333923, 0.323638, 0.342151, 0.346265, 0.352437, 0.356551, 0.340094, 0.327752, 0.352437, 0.327752, 0.294839, 0.315409, 0, 0.290725, 0.187872, 0.307181, 0.292782, 0.261926, 0.338037, 0.344208, 0.35038, 0.352437, 0.296896, 0.1817, 0.327752, 0.319524, 0.358608, 0.292782, 0.327752, 0.331866, 0.331866, 0.327752, 0.35038, 0.342151, 0.342151, 0.348322, 0.329809, 0.360665, 0.319524, 0.346265, 0.338037, 0.340094, 0.338037, 0.315409, 0.342151, 0.360665, 0.348322, 0.348322, 0.331866, 0.333923, 0.313352, 0.338037, 0.00479293, 0.292782, 0.1961, 0.340094, 0.35038, 0.340094, 0.30101, 0.338037, 0.342151, 0.354494, 0.340094, 0.235184, 0.296896, 0.0623907, 0.0665048, 0.35038, 0.257812, 0.340094, 0.333923, 0.338037, 0.342151, 0.346265, 0.342151, 0.344208, 0.344208, 0.311295, 0.333923, 0.315409, 0.333923, 0.323638, 0.333923, 0.327752, 0.348322, 0.362722, 0.352437, 0.354494, 0.338037, 0.344208, 0.329809, 0.261926, 0.0150782, 0.333923, 0.179643, 0.1961, 0.352437, 0.317466, 0.23107, 0.338037, 0.331866, 0.327752, 0.325695, 0.319524, 0.333923, 0.338037, 0.344208, 0.311295, 0.364779, 0.327752, 0.331866, 0.303067, 0.344208, 0.352437, 0.354494, 0.352437, 0.340094, 0.331866, 0.342151, 0.333923, 0.338037, 0.323638, 0.35038, 0.344208, 0.340094, 0.348322, 0.358608, 0.356551, 0.329809, 0.342151, 0.338037, 0.294839, 0.0294777, 0.338037, 0.185814, 0.173472, 0.340094, 0.303067, 0.1817, 0.21667, 0.249583, 0.348322, 0.33598, 0.208442, 0.296896, 0.26604, 0.342151, 0.323638, 0.329809, 0.303067, 0.315409, 0.340094, 0.342151, 0.348322, 0.352437, 0.356551, 0.344208, 0.33598, 0.333923, 0.331866, 0.346265, 0.340094, 0.33598, 0.344208, 0.346265, 0.35038, 0.354494, 0.354494, 0.329809, 0.323638, 0.296896, 0.327752, 0, 0.222842, 0.226956, 0.218727, 0.393858, 0.388049, 0.389985, 0.391921, 0.391921, 0.40354, 0.389985, 0.391921, 0.389985, 0.391921, 0.391921, 0.391921, 0.391921, 0.391921, 0.391921, 0.353194, 0.391921, 0.391921, 0.391921, 0.391921, 0.391921, 0.105339, 0.374494, 0.250566, 0.29123, 0.366749, 0.37643, 0.329958, 0.316403, 0.378367, 0.374494, 0.360939, 0.328021, 0.335767, 0.351258, 0.347385, 0.329958, 0.380303, 0.370621, 0.370621, 0.380303, 0.384176, 0.374494, 0.366749, 0.366749, 0.364812, 0.35513, 0.359003, 0.347385, 0.360939, 0.366749, 0.366749, 0.386112, 0.37643, 0.37643, 0.386112, 0.38224, 0.378367, 0.362876, 0.326085, 0.380303, 0.0937203, 0, 0.320276, 0.38224, 0.389985, 0.343512, 0.388049, 0.37643, 0.360939, 0.370621, 0.326085, 0.339639, 0.364812, 0.339639, 0.339639, 0.37643, 0.38224, 0.29123, 0.37643, 0.37643, 0.37643, 0.378367, 0.372558, 0.339639, 0.370621, 0.364812, 0.359003, 0.329958, 0.349321, 0.359003, 0.374494, 0.38224, 0.37643, 0.38224, 0.384176, 0.37643, 0.380303, 0.370621, 0.37643, 0.38224, 0.0956567, 0.26993, 0.326085, 0.389985, 0.389985, 0.29123, 0.380303, 0.38224, 0.357067, 0.357067, 0.297039, 0.351258, 0.351258, 0.366749, 0.362876, 0.378367, 0.388049, 0.389985, 0.388049, 0.37643, 0.386112, 0.38224, 0.389985, 0.380303, 0.366749, 0.380303, 0.351258, 0.324148, 0.353194, 0.349321, 0.364812, 0.366749, 0.380303, 0.389985, 0.380303, 0.380303, 0.370621, 0.37643, 0.38224, 0.374494, 0.101466, 0.252503, 0.349321, 0.391921, 0.38224, 0.335767, 0.38224, 0.370621, 0.35513, 0.35513, 0.359003, 0.326085, 0.33383, 0.38224, 0.33383, 0.374494, 0.366749, 0.360939, 0.380303, 0.271866, 0.386112, 0.388049, 0.364812, 0.399667, 0.397731, 0.370621, 0.372558, 0.351258, 0.359003, 0.353194, 0.366749, 0.366749, 0.374494, 0.378367, 0.380303, 0.370621, 0.399667, 0.38224, 0.38224, 0.380303, 0.0879112, 0.223457, 0.372558, 0.391921, 0.389985, 0.38224, 0.347385, 0.300912, 0.337703, 0.337703, 0.289294, 0.362876, 0.364812, 0.389985, 0.389985, 0.391921, 0.378367, 0.31253, 0.38224, 0.395794, 0.389985, 0.38224, 0.370621, 0.389985, 0.380303, 0.388049, 0.380303, 0.364812, 0.357067, 0.353194, 0.35513, 0.359003, 0.374494, 0.386112, 0.374494, 0.393858, 0.391921, 0.380303, 0.374494, 0.374494, 0.0898476, 0.240884, 0.349321, 0.405476, 0.380303, 0.320276, 0.364812, 0.320276, 0.349321, 0.351258, 0.29123, 0.341576, 0.388049, 0.388049, 0.378367, 0.362876, 0.351258, 0.455323, 0.455323, 0.455323, 0.455323, 0.455323, 0.468584, 0.455323, 0.455323, 0.455323, 0.455323, 0.455323, 0.455323, 0.461953, 0.455323, 0.455323, 0.455323, 0.461953, 0.455323, 0.455323, 0.455323, 0.455323, 0.176851, 0.442062, 0.320507, 0.338188, 0.402281, 0.419962, 0.495105, 0.497315, 0.448693, 0.461953, 0.461953, 0.444273, 0.455323, 0.470794, 0.455323, 0.406701, 0.470794, 0.435432, 0.395651, 0.442062, 0.455323, 0.459743, 0.453113, 0.466373, 0.488474, 0.486264, 0.475214, 0.448693, 0.444273, 0.481844, 0.479634, 0.497315, 0.479634, 0.481844, 0.468584, 0.446483, 0.411121, 0.395651, 0.426592, 0.439852, 0.161381, 0.448693, 0.287356, 0.260835, 0.435432, 0.442062, 0.488474, 0.450903, 0.468584, 0.468584, 0.461953, 0.461953, 0.484054, 0.413331, 0.448693, 0.479634, 0.468584, 0.450903, 0.366919, 0.448693, 0.455323, 0.455323, 0.470794, 0.473004, 0.495105, 0.499525, 0.475214, 0.455323, 0.453113, 0.481844, 0.461953, 0.488474, 0.490684, 0.479634, 0.477424, 0.450903, 0.419962, 0.406701, 0.417751, 0.419962, 0.165801, 0.417751, 0.327138, 0.276306, 0.439852, 0.439852, 0.495105, 0.450903, 0.475214, 0.497315, 0.470794, 0.470794, 0.461953, 0.473004, 0.419962, 0.38681, 0.413331, 0.470794, 0.329348, 0.453113, 0.455323, 0.470794, 0.479634, 0.461953, 0.479634, 0.486264, 0.488474, 0.466373, 0.461953, 0.475214, 0.492895, 0.497315, 0.506155, 0.481844, 0.481844, 0.444273, 0.431012, 0.433222, 0.437642, 0.448693, 0.183482, 0.459743, 0.342608, 0.404491, 0.455323, 0.402281, 0.39123, 0.426592, 0.490684, 0.473004, 0.461953, 0.481844, 0.433222, 0.481844, 0.497315, 0.422172, 0.419962, 0.431012, 0.473004, 0.450903, 0.470794, 0.484054, 0.479634, 0.475214, 0.481844, 0.473004, 0.490684, 0.488474, 0.477424, 0.488474, 0.497315, 0.501735, 0.503945, 0.484054, 0.442062, 0.437642, 0.39344, 0.424382, 0.422172, 0.461953, 0.154751, 0.360289, 0.285146, 0.274096, 0.426592, 0.411121, 0.455323, 0.404491, 0.455323, 0.411121, 0.470794, 0.486264, 0.444273, 0.433222, 0.411121, 0.477424, 0.358079, 0.459743, 0.417751, 0.455323, 0.486264, 0.475214, 0.479634, 0.470794, 0.479634, 0.479634, 0.484054, 0.484054, 0.486264, 0.470794, 0.479634, 0.495105, 0.479634, 0.461953, 0.439852, 0.431012, 0.39344, 0.435432, 0.479634, 0.477424, 0.154751, 0.349239, 0.364709, 0.3846, 0.302827, 0.455323, 0.495105, 0.347028, 0.466373, 0.431012, 0.448693, 0.481844, 0.481844, 0.484054, 0.419962, 0.442062, 0.324928, 0.422172, 0.486264, 0.298934, 0.298934, 0.298934, 0.298934, 0.298934, 0.298934, 0.301101, 0.298934, 0.298934, 0.298934, 0.305436, 0.301101, 0.301101, 0.305436, 0.301101, 0.298934, 0.298934, 0.298934, 0.298934, 0.298934, 0.301101, 0.0908441, 0.296766, 0.225235, 0.281593, 0.294598, 0.292431, 0.296766, 0.28376, 0.288096, 0.268587, 0.290263, 0.28376, 0.28376, 0.285928, 0.257749, 0.288096, 0.288096, 0.28376, 0.28376, 0.270755, 0.277258, 0.301101, 0.290263, 0.298934, 0.279425, 0.294598, 0.307604, 0.290263, 0.294598, 0.294598, 0.294598, 0.296766, 0.290263, 0.298934, 0.298934, 0.294598, 0.298934, 0.28376, 0.290263, 0.292431, 0.0366541, 0.168878, 0.227403, 0.259917, 0.270755, 0.294598, 0.294598, 0.262084, 0.290263, 0.285928, 0.298934, 0.298934, 0.281593, 0.292431, 0.290263, 0.277258, 0.301101, 0.294598, 0.279425, 0.28376, 0.301101, 0.296766, 0.301101, 0.301101, 0.296766, 0.288096, 0.303269, 0.298934, 0.301101, 0.303269, 0.301101, 0.301101, 0.294598, 0.292431, 0.301101, 0.281593, 0.305436, 0.294598, 0.292431, 0.281593, 0.0388217, 0.140699, 0.296766, 0.292431, 0.298934, 0.294598, 0.301101, 0.292431, 0.294598, 0.301101, 0.294598, 0.301101, 0.296766, 0.296766, 0.305436, 0.303269, 0.311939, 0.296766, 0.296766, 0.301101, 0.314107, 0.298934, 0.298934, 0.307604, 0.292431, 0.294598, 0.309772, 0.298934, 0.301101, 0.301101, 0.301101, 0.296766, 0.298934, 0.292431, 0.305436, 0.292431, 0.296766, 0.294598, 0.303269, 0.290263, 0.0409893, 0.132028, 0.21223, 0.253414, 0.298934, 0.244744, 0.28376, 0.279425, 0.301101, 0.294598, 0.303269, 0.301101, 0.301101, 0.294598, 0.290263, 0.240408, 0.26642, 0.28376, 0.279425, 0.285928, 0.305436, 0.294598, 0.296766, 0.298934, 0.27509, 0.288096, 0.305436, 0.294598, 0.301101, 0.290263, 0.301101, 0.296766, 0.294598, 0.292431, 0.272922, 0.28376, 0.288096, 0.296766, 0.298934, 0.290263, 0.0366541, 0.134196, 0.277258, 0.288096, 0.288096, 0.290263, 0.294598, 0.292431, 0.288096, 0.27509, 0.28376, 0.303269, 0.272922, 0.296766, 0.298934, 0.301101, 0.303269, 0.28376, 0.26642, 0.298934, 0.301101, 0.298934, 0.301101, 0.307604, 0.309772, 0.292431, 0.309772, 0.305436, 0.305436, 0.292431, 0.294598, 0.294598, 0.288096, 0.298934, 0.290263, 0.28376, 0.288096, 0.292431, 0.294598, 0.290263, 0.0474921, 0.129861, 0.199224, 0.199224, 0.27509, 0.294598, 0.305436, 0.285928, 0.294598, 0.294598, 0.298934, 0.303269, 0.292431, 0.255582, 0.296766, 0.301101, 0.294598, 0.216565, 0.272922, 0.26642, 0.28376, 0.292431, 0.290263, 0.303269, 0.298934, 0.292431, 0.301101, 0.298934, 0.724293, 0.724293, 0.726896, 0.724293, 0.724293, 0.724293, 0.737309, 0.724293, 0.724293, 0.726896, 0.724293, 0.724293, 0.724293, 0.724293, 0.724293, 0.724293, 0.724293, 0.726896, 0.734706, 0.724293, 0.724293, 0.0266309, 0.521242, 0.484797, 0.6488, 0.518639, 0.667022, 0.531655, 0.599339, 0.266127, 0.435336, 0.599339, 0.654006, 0.674832, 0.677435, 0.654006, 0.680039, 0.687848, 0.65661, 0.627974, 0.646197, 0.703468, 0.651403, 0.677435, 0.6488, 0.693055, 0.703468, 0.693055, 0.682642, 0.693055, 0.578513, 0.667022, 0.674832, 0.687848, 0.693055, 0.700864, 0.71388, 0.661816, 0.664419, 0.474384, 0.552481, 0.0969177, 0.437939, 0.523845, 0.630577, 0.677435, 0.654006, 0.49521, 0.625371, 0.682642, 0.627974, 0.661816, 0.6488, 0.630577, 0.482194, 0.661816, 0.654006, 0.724293, 0.703468, 0.674832, 0.526449, 0.724293, 0.667022, 0.682642, 0.5681, 0.635784, 0.65661, 0.693055, 0.659213, 0.64099, 0.646197, 0.651403, 0.680039, 0.536862, 0.687848, 0.71388, 0.674832, 0.674832, 0.65661, 0.622768, 0.583719, 0.0917113, 0.492607, 0.521242, 0.635784, 0.680039, 0.627974, 0, 0.34943, 0.219269, 0.614958, 0.620165, 0.659213, 0.633181, 0.667022, 0.612355, 0.651403, 0.601942, 0.581116, 0.601942, 0.682642, 0.698261, 0.695658, 0.71388, 0.706071, 0.609752, 0.659213, 0.65661, 0.625371, 0.64099, 0.643593, 0.651403, 0.698261, 0.588926, 0.700864, 0.71388, 0.680039, 0.6488, 0.654006, 0.646197, 0.547274, 0.0917113, 0.521242, 0.224475, 0.109934, 0.380668, 0.560291, 0.703468, 0.437939, 0.57591, 0.542068, 0.609752, 0.677435, 0.635784, 0.440543, 0.661816, 0.643593, 0.677435, 0.674832, 0.463971, 0.4874, 0.71388, 0.674832, 0.71388, 0.716484, 0.614958, 0.661816, 0.693055, 0.693055, 0.677435, 0.630577, 0.622768, 0.706071, 0.71388, 0.57591, 0.583719, 0.635784, 0.664419, 0.630577, 0.557687, 0.6488, 0.104727, 0.458765, 0.104727, 0.161998, 0.654006, 0.71388, 0.630577, 0.651403, 0.687848, 0.674832, 0.620165, 0.719087, 0.508226, 0.604545, 0.604545, 0.643593, 0.700864, 0.680039, 0.596736, 0.680039, 0.711277, 0.698261, 0.698261, 0.6488, 0.604545, 0.617561, 0.667022, 0.685245, 0.693055, 0.674832, 0.664419, 0.693055, 0.706071, 0.682642, 0.570703, 0.604545, 0.609752, 0.607148, 0.630577, 0.674832, 0.0943145, 0.476988, 0.469178, 0.630577, 0.505623, 0.711277, 0.706071, 0.703468, 0.64099, 0.638387, 0.667022, 0.695658, 0.573307, 0.518639, 0.635784, 0.627974, 0.698261, 0.674832, 0.64099, 0.687848, 0.687848, 0.654006, 0.693055, 0.711277, 0.625371, 0.651403, 0.680039, 0.693055, 0.711277, 0.690451, 0.651403, 0.667022, 0.71388, 0.72169, 0.693055, 0.693055, 0.646197, 0.635784, 0.674832, 0.659213, 0.0969177, 0.393685, 0.607148, 0.560291, 0.588926, 0.6488, 0.630577, 0.622768, 0.661816, 0.588926, 0.677435, 0.700864, 0.667022, 0.391081, 0.409304, 0.284727, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.282864, 0.161767, 0.145, 0.176671, 0.176671, 0.135684, 0.241877, 0.213932, 0.253055, 0.264234, 0.236288, 0.269823, 0.295905, 0.28659, 0.279138, 0.26796, 0.251192, 0.230699, 0.215795, 0.234425, 0.197164, 0.228836, 0.228836, 0.284727, 0.292179, 0.297768, 0.282864, 0.297768, 0.284727, 0.282864, 0.295905, 0.271686, 0.249329, 0.260507, 0.269823, 0.260507, 0.28659, 0.271686, 0.269823, 0.284727, 0.269823, 0.141274, 0.241877, 0.122643, 0.193438, 0.204617, 0.145, 0.260507, 0.26237, 0.228836, 0.266097, 0.232562, 0.28659, 0.219521, 0.236288, 0.223247, 0.288453, 0.256781, 0.275412, 0.279138, 0.28659, 0.282864, 0.275412, 0.269823, 0.290316, 0.294042, 0.28659, 0.253055, 0.290316, 0.295905, 0.277275, 0.271686, 0.241877, 0.256781, 0.269823, 0.26796, 0.28659, 0.281001, 0.284727, 0.290316, 0.269823, 0.145, 0.254918, 0.141274, 0.137547, 0.215795, 0.145, 0.217658, 0.113328, 0.249329, 0.137547, 0.251192, 0.290316, 0.238151, 0.238151, 0.282864, 0.281001, 0.279138, 0.217658, 0.301494, 0.269823, 0.292179, 0.295905, 0.273549, 0.288453, 0.294042, 0.281001, 0.241877, 0.277275, 0.284727, 0.264234, 0.282864, 0.249329, 0.264234, 0.264234, 0.256781, 0.282864, 0.279138, 0.282864, 0.282864, 0.275412, 0.148726, 0.238151, 0.130095, 0.154315, 0.279138, 0.20089, 0.213932, 0.230699, 0.236288, 0.266097, 0.264234, 0.264234, 0.275412, 0.234425, 0.221384, 0.28659, 0.277275, 0.217658, 0.294042, 0.226973, 0.282864, 0.288453, 0.26796, 0.290316, 0.290316, 0.284727, 0.256781, 0.294042, 0.279138, 0.269823, 0.271686, 0.251192, 0.260507, 0.273549, 0.275412, 0.28659, 0.28659, 0.290316, 0.281001, 0.279138, 0.146863, 0.219521, 0.122643, 0.279138, 0.193438, 0.197164, 0.266097, 0.141274, 0.234425, 0.204617, 0.210206, 0.264234, 0.226973, 0.230699, 0.22511, 0.295905, 0.202754, 0.299631, 0.223247, 0.292179, 0.290316, 0.284727, 0.284727, 0.288453, 0.299631, 0.273549, 0.260507, 0.281001, 0.279138, 0.277275, 0.279138, 0.232562, 0.269823, 0.271686, 0.281001, 0.275412, 0.271686, 0.290316, 0.281001, 0.284727, 0.148726, 0.234425, 0.122643, 0.191575, 0.269823, 0.251192, 0.22511, 0.195301, 0.215795, 0.279138, 0.241877, 0.234425, 0.26796, 0.219521, 0.284727, 0.290316, 0.24374, 0.295905, 0.290316, 0.208343, 0.277275, 0.28659, 0.279138, 0.288453, 0.28659, 0.290316, 0.264234, 0.284727, 0.279138, 0.277275, 0.277275, 0.241877, 0.26237, 0.266097, 0.281001, 0.292179, 0.277275, 0.275412, 0.28659, 0.281001, 0.148726, 0.234425, 0.130095, 0.284727, 0.234425, 0.254918, 0.256781, 0.143137, 0.215795, 0.260507, 0.275412, 0.238151, 0.249329, 0.232562, 0.158041, 0.463691, 0.463691, 0.455133, 0.463691, 0.463691, 0.463691, 0.463691, 0.463691, 0.455133, 0.463691, 0.463691, 0.463691, 0.46797, 0.463691, 0.463691, 0.463691, 0.463691, 0.463691, 0.463691, 0.463691, 0.463691, 0.0186572, 0.198382, 0.455133, 0.4209, 0.41662, 0.455133, 0.386666, 0.4209, 0.429458, 0.335316, 0.292524, 0.258291, 0.46797, 0.46797, 0.288245, 0.395224, 0.408062, 0.438016, 0.429458, 0.446575, 0.455133, 0.455133, 0.446575, 0.450854, 0.433737, 0.46797, 0.450854, 0.446575, 0.425179, 0.4209, 0.378108, 0.403783, 0.4209, 0.403783, 0.412341, 0.425179, 0.390945, 0.36527, 0.378108, 0.395224, 0.0314947, 0.112799, 0.47225, 0.450854, 0.463691, 0.459412, 0.412341, 0.433737, 0.412341, 0.245453, 0.450854, 0.438016, 0.455133, 0.4209, 0.395224, 0.455133, 0.450854, 0.438016, 0.438016, 0.41662, 0.459412, 0.459412, 0.455133, 0.450854, 0.450854, 0.455133, 0.463691, 0.47225, 0.459412, 0.463691, 0.438016, 0.455133, 0.459412, 0.463691, 0.47225, 0.446575, 0.463691, 0.455133, 0.46797, 0.395224, 0.0357739, 0.142753, 0.459412, 0.450854, 0.459412, 0.47225, 0.412341, 0.446575, 0.288245, 0.408062, 0.382387, 0.438016, 0.485087, 0.463691, 0.339595, 0.455133, 0.459412, 0.429458, 0.429458, 0.433737, 0.450854, 0.459412, 0.450854, 0.442295, 0.459412, 0.46797, 0.459412, 0.480808, 0.450854, 0.450854, 0.433737, 0.429458, 0.46797, 0.46797, 0.463691, 0.446575, 0.450854, 0.463691, 0.378108, 0.46797, 0.0357739, 0.155591, 0.47225, 0.455133, 0.446575, 0.455133, 0.412341, 0.455133, 0.343874, 0.395224, 0.403783, 0.403783, 0.450854, 0.408062, 0.390945, 0.429458, 0.442295, 0.442295, 0.378108, 0.446575, 0.438016, 0.455133, 0.450854, 0.446575, 0.463691, 0.46797, 0.46797, 0.463691, 0.450854, 0.463691, 0.433737, 0.429458, 0.47225, 0.455133, 0.463691, 0.459412, 0.459412, 0.463691, 0.360991, 0.412341, 0.0272155, 0.185545, 0.463691, 0.335316, 0.438016, 0.463691, 0.382387, 0.463691, 0.425179, 0.241174, 0.386666, 0.395224, 0.455133, 0.463691, 0.446575, 0.476529, 0.459412, 0.450854, 0.429458, 0.446575, 0.450854, 0.455133, 0.442295, 0.455133, 0.47225, 0.450854, 0.446575, 0.429458, 0.455133, 0.47225, 0.450854, 0.429458, 0.480808, 0.450854, 0.446575, 0.446575, 0.463691, 0.476529, 0.446575, 0.438016, 0.0229364, 0.15987, 0.47225, 0.455133, 0.459412, 0.459412, 0.403783, 0.4209, 0.425179, 0.446575, 0.408062, 0.442295, 0.433737, 0.446575, 0.279687, 0.412341, 0.455133, 0.455133, 0.455133, 0.382387, 0.455133, 0.46797, 0.450854, 0.463691, 0.47225, 0.480808, 0.41662, 0.446575, 0.463691, 0.442295, 0.314954, 0.31717, 0.31717, 0.323819, 0.31717, 0.31717, 0.319387, 0.31717, 0.31717, 0.31717, 0.31717, 0.31717, 0.31717, 0.31717, 0.31717, 0.31717, 0.314954, 0.31717, 0.31717, 0.31717, 0.31717, 0, 0.124368, 0.323819, 0.332683, 0.326035, 0.323819, 0.326035, 0.310522, 0.301658, 0.279496, 0.297225, 0.270632, 0.297225, 0.326035, 0.334899, 0.343764, 0.288361, 0.314954, 0.290577, 0.303874, 0.328251, 0.337115, 0.312738, 0.328251, 0.334899, 0.323819, 0.334899, 0.328251, 0.328251, 0.319387, 0.328251, 0.337115, 0.31717, 0.326035, 0.310522, 0.321603, 0.334899, 0.330467, 0.321603, 0.301658, 0.0246432, 0.290577, 0.224094, 0.328251, 0.30609, 0.27728, 0.297225, 0.321603, 0.330467, 0.303874, 0.319387, 0.219661, 0.312738, 0.301658, 0.261768, 0.257335, 0.312738, 0.244039, 0.268416, 0.235174, 0.321603, 0.332683, 0.310522, 0.321603, 0.330467, 0.314954, 0.275064, 0.319387, 0.328251, 0.323819, 0.330467, 0.330467, 0.319387, 0.319387, 0.319387, 0.337115, 0.328251, 0.326035, 0.328251, 0.314954, 0.0357238, 0.288361, 0.301658, 0.23739, 0.326035, 0.217445, 0.323819, 0.328251, 0.323819, 0.290577, 0.323819, 0.292793, 0.310522, 0.297225, 0.27728, 0.23739, 0.279496, 0.301658, 0.297225, 0.301658, 0.323819, 0.330467, 0.334899, 0.343764, 0.326035, 0.319387, 0.283929, 0.334899, 0.323819, 0.334899, 0.337115, 0.343764, 0.323819, 0.330467, 0.330467, 0.341548, 0.330467, 0.348196, 0.337115, 0.310522, 0.040156, 0.275064, 0.319387, 0.250687, 0.326035, 0.308306, 0.290577, 0.283929, 0.332683, 0.31717, 0.323819, 0.323819, 0.308306, 0.295009, 0.235174, 0.292793, 0.179771, 0.241823, 0.295009, 0.310522, 0.323819, 0.319387, 0.330467, 0.334899, 0.323819, 0.319387, 0.290577, 0.326035, 0.332683, 0.332683, 0.334899, 0.334899, 0.330467, 0.323819, 0.323819, 0.339332, 0.330467, 0.341548, 0.332683, 0.319387, 0.0357238, 0.235174, 0.252903, 0.341548, 0.341548, 0.275064, 0.295009, 0.334899, 0.337115, 0.301658, 0.319387, 0.246255, 0.312738, 0.261768, 0.279496, 0.263984, 0.268416, 0.297225, 0.332683, 0.31717, 0.326035, 0.334899, 0.326035, 0.337115, 0.332683, 0.295009, 0.308306, 0.330467, 0.339332, 0.334899, 0.350412, 0.332683, 0.334899, 0.328251, 0.321603, 0.341548, 0.332683, 0.334899, 0.339332, 0.330467, 0.0312915, 0.208581, 0.261768, 0.337115, 0.295009, 0.252903, 0.303874, 0.295009, 0.341548, 0.319387, 0.299442, 0.319387, 0.319387, 0.308306, 0.303874, 0.310522, 0.314954, 0.321603, 0.330467, 0.319387, 0.30609, 0.330467, 0.323819, 0.334899, 0.328251, 0.314954, 0.308306, 0.330467, 0.332683, 0.341548, 0.341548, 0.343764, 0.348196, 0.339332, 0.341548, 0.337115, 0.332683, 0.330467, 0.326035, 0.337115, 0.0357238, 0.232958, 0.210797, 0.332683, 0.219661, 0.334899, 0.343764, 0.341548, 0.343764, 0.310522, 0.334899, 0.308306, 0.27728, 0.303874, 0.295009, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.253322, 0.256487, 0.253322, 0.253322, 0.253322, 0.259651, 0.253322, 0.253322, 0.256487, 0.253322, 0.145741, 0.259651, 0.240666, 0.190039, 0.218517, 0.234337, 0.275471, 0.278636, 0.256487, 0.256487, 0.265979, 0.234337, 0.256487, 0.253322, 0.253322, 0.262815, 0.250158, 0.246994, 0.253322, 0.253322, 0.275471, 0.2818, 0.275471, 0.262815, 0.262815, 0.265979, 0.275471, 0.265979, 0.256487, 0.265979, 0.253322, 0.234337, 0.240666, 0.259651, 0.259651, 0.231173, 0.240666, 0.253322, 0.275471, 0.265979, 0.0856221, 0.275471, 0.259651, 0.237502, 0.221681, 0.262815, 0.259651, 0.253322, 0.253322, 0.259651, 0.275471, 0.275471, 0.265979, 0.253322, 0.256487, 0.272307, 0.262815, 0.272307, 0.253322, 0.24383, 0.272307, 0.269143, 0.256487, 0.259651, 0.256487, 0.262815, 0.262815, 0.262815, 0.265979, 0.278636, 0.265979, 0.259651, 0.240666, 0.269143, 0.262815, 0.240666, 0.259651, 0.246994, 0.265979, 0.265979, 0.0856221, 0.269143, 0.256487, 0.250158, 0.256487, 0.24383, 0.253322, 0.237502, 0.234337, 0.228009, 0.275471, 0.265979, 0.275471, 0.272307, 0.256487, 0.275471, 0.256487, 0.275471, 0.269143, 0.272307, 0.272307, 0.262815, 0.269143, 0.269143, 0.253322, 0.269143, 0.262815, 0.275471, 0.256487, 0.272307, 0.24383, 0.253322, 0.253322, 0.265979, 0.246994, 0.246994, 0.259651, 0.265979, 0.269143, 0.259651, 0.0856221, 0.269143, 0.265979, 0.253322, 0.231173, 0.24383, 0.224845, 0.253322, 0.256487, 0.253322, 0.237502, 0.246994, 0.240666, 0.231173, 0.262815, 0.269143, 0.259651, 0.2818, 0.272307, 0.265979, 0.275471, 0.272307, 0.269143, 0.265979, 0.262815, 0.269143, 0.256487, 0.253322, 0.2818, 0.275471, 0.278636, 0.262815, 0.246994, 0.240666, 0.272307, 0.272307, 0.250158, 0.259651, 0.269143, 0.272307, 0.0887862, 0.272307, 0.262815, 0.231173, 0.12992, 0.265979, 0.224845, 0.269143, 0.265979, 0.275471, 0.2818, 0.2818, 0.275471, 0.24383, 0.24383, 0.246994, 0.250158, 0.250158, 0.272307, 0.262815, 0.272307, 0.272307, 0.2818, 0.275471, 0.272307, 0.278636, 0.265979, 0.265979, 0.259651, 0.275471, 0.275471, 0.269143, 0.259651, 0.262815, 0.256487, 0.24383, 0.253322, 0.259651, 0.262815, 0.265979, 0.0824579, 0.269143, 0.136249, 0.196368, 0.158398, 0.228009, 0.246994, 0.259651, 0.262815, 0.262815, 0.275471, 0.2818, 0.275471, 0.275471, 0.275471, 0.278636, 0.240666, 0.272307, 0.272307, 0.259651, 0.265979, 0.269143, 0.275471, 0.228009, 0.253322, 0.275471, 0.272307, 0.275471, 0.275471, 0.275471, 0.275471, 0.262815, 0.259651, 0.259651, 0.256487, 0.256487, 0.250158, 0.256487, 0.265979, 0.269143, 0.0887862, 0.265979, 0.139413, 0.278636, 0.186875, 0.231173, 0.256487, 0.259651, 0.259651, 0.272307, 0.275471, 0.265979, 0.272307, 0.275471, 0.275471, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.304078, 0.302135, 0.304078, 0.304078, 0.304078, 0.300192, 0.304078, 0.304078, 0.300192, 0.304078, 0.304078, 0, 0.17975, 0.255512, 0.251627, 0.288537, 0.255512, 0.26911, 0.265225, 0.274938, 0.280766, 0.274938, 0.249684, 0.232201, 0.226373, 0.26911, 0.255512, 0.236086, 0.288537, 0.29825, 0.29825, 0.309905, 0.280766, 0.274938, 0.286594, 0.290479, 0.290479, 0.302135, 0.302135, 0.228316, 0.26911, 0.29825, 0.284651, 0.29825, 0.29825, 0.304078, 0.288537, 0.280766, 0.278824, 0.296307, 0.288537, 0.00102958, 0.117586, 0.284651, 0.278824, 0.251627, 0.257455, 0.276881, 0.274938, 0.267168, 0.288537, 0.267168, 0.276881, 0.274938, 0.280766, 0.278824, 0.302135, 0.241914, 0.25357, 0.203062, 0.232201, 0.304078, 0.257455, 0.290479, 0.276881, 0.302135, 0.284651, 0.286594, 0.290479, 0.288537, 0.284651, 0.290479, 0.286594, 0.292422, 0.282709, 0.296307, 0.278824, 0.274938, 0.274938, 0.284651, 0.276881, 0, 0.0670785, 0.280766, 0.210832, 0.280766, 0.274938, 0.280766, 0.239971, 0.236086, 0.274938, 0.154496, 0.162267, 0.257455, 0.111759, 0.105931, 0.274938, 0.173922, 0.162267, 0.288537, 0.259397, 0.300192, 0.292422, 0.304078, 0.304078, 0.307963, 0.282709, 0.282709, 0.288537, 0.282709, 0.208889, 0.26134, 0.267168, 0.296307, 0.280766, 0.304078, 0.280766, 0.274938, 0.294364, 0.286594, 0.284651, 0, 0.0787342, 0.300192, 0.183635, 0.201119, 0.280766, 0.274938, 0.25357, 0.21666, 0.241914, 0.195291, 0.205004, 0.284651, 0.292422, 0.245799, 0.193348, 0.150611, 0.249684, 0.230258, 0.257455, 0.292422, 0.300192, 0.292422, 0.304078, 0.300192, 0.280766, 0.29825, 0.29825, 0.292422, 0.25357, 0.259397, 0.251627, 0.304078, 0.288537, 0.296307, 0.288537, 0.280766, 0.29825, 0.288537, 0.280766, 0, 0.059308, 0.29825, 0.236086, 0.292422, 0.304078, 0.259397, 0.226373, 0.17975, 0.296307, 0.251627, 0.282709, 0.282709, 0.208889, 0.259397, 0.276881, 0.278824, 0.271053, 0.292422, 0.278824, 0.307963, 0.29825, 0.280766, 0.296307, 0.288537, 0.276881, 0.300192, 0.290479, 0.286594, 0.286594, 0.294364, 0.280766, 0.29825, 0.286594, 0.302135, 0.276881, 0.278824, 0.302135, 0.282709, 0.259397, 0, 0.0806768, 0.265225, 0.276881, 0.304078, 0.251627, 0.282709, 0.29825, 0.286594, 0.286594, 0.276881, 0.218602, 0.274938, 0.265225, 0.274938, 0.278824, 0.278824, 0.300192, 0.296307, 0.300192, 0.315733, 0.29825, 0.292422, 0.304078, 0.300192, 0.302135, 0.29825, 0.296307, 0.284651, 0.292422, 0.284651, 0.29825, 0.302135, 0.274938, 0.29825, 0.284651, 0.280766, 0.286594, 0.274938, 0.292422, 0, 0.0651359, 0.29825, 0.26911, 0.265225, 0.274938, 0.290479, 0.274938, 0.284651, 0.280766, 0.296307, 0.286594, 0.29825, 0.307963, 0.284651}; const float CEPuckNEATController::m_GraySamplesRight[4205] = { 0.872714, 0.899225, 0.872714, 0.872714, 0.899225, 0.872714, 0.872714, 0.892597, 0.872714, 0.872714, 0.889283, 0.872714, 0.872714, 0.872714, 0.882655, 0.872714, 0.872714, 0.856144, 0.872714, 0.872714, 0.892597, 0.150285, 0.862772, 0.879341, 0.813063, 0.79318, 0.8694, 0.786552, 0.829633, 0.786552, 0.756727, 0.826319, 0.561208, 0.73353, 0.518127, 0.630799, 0.723588, 0.783238, 0.670566, 0.667252, 0.766669, 0.763355, 0.789866, 0.720274, 0.769983, 0.832947, 0.720274, 0.783238, 0.85283, 0.859458, 0.859458, 0.889283, 0.846202, 0.866086, 0.859458, 0.85283, 0.823005, 0.859458, 0.832947, 0.85283, 0.769983, 0.0707515, 0.85283, 0.710333, 0.836261, 0.826319, 0.879341, 0.819691, 0.859458, 0.819691, 0.8694, 0.813063, 0.836261, 0.544638, 0.594347, 0.47836, 0.627485, 0.779925, 0.653997, 0.587719, 0.687136, 0.773297, 0.746786, 0.644055, 0.753413, 0.816377, 0.789866, 0.750099, 0.832947, 0.846202, 0.823005, 0.872714, 0.85283, 0.819691, 0.813063, 0.882655, 0.829633, 0.849516, 0.832947, 0.839575, 0.803122, 0.0906349, 0.8694, 0.756727, 0.67388, 0.779925, 0.899225, 0.849516, 0.713647, 0.779925, 0.876027, 0.813063, 0.803122, 0.746786, 0.756727, 0.766669, 0.253016, 0.153599, 0.624172, 0.325921, 0.150285, 0.746786, 0.716961, 0.786552, 0.826319, 0.763355, 0.813063, 0.826319, 0.839575, 0.829633, 0.862772, 0.866086, 0.826319, 0.79318, 0.819691, 0.806436, 0.720274, 0.620858, 0.832947, 0.836261, 0.816377, 0.0972627, 0.823005, 0.518127, 0.624172, 0.829633, 0.829633, 0.862772, 0.624172, 0.879341, 0.700391, 0.730216, 0.859458, 0.803122, 0.743472, 0.756727, 0.813063, 0.624172, 0.524755, 0.153599, 0.236446, 0.813063, 0.753413, 0.763355, 0.816377, 0.842888, 0.823005, 0.876027, 0.849516, 0.859458, 0.806436, 0.859458, 0.760041, 0.85283, 0.872714, 0.859458, 0.746786, 0.663938, 0.600974, 0.849516, 0.885969, 0.0972627, 0.885969, 1, 0.312666, 0.80975, 0.769983, 0.819691, 0.73353, 0.713647, 0.846202, 0.892597, 0.839575, 0.859458, 0.647369, 0.773297, 0.763355, 0.799808, 0.726902, 0.753413, 0.743472, 0.823005, 0.776611, 0.740158, 0.79318, 0.816377, 0.846202, 0.846202, 0.819691, 0.823005, 0.885969, 0.872714, 0.829633, 0.786552, 0.806436, 0.826319, 0.803122, 0.796494, 0.640741, 0.786552, 0.773297, 0.110518, 0.769983, 0.41871, 0.498244, 0.806436, 0.799808, 0.836261, 0.806436, 0.700391, 0.700391, 0.85283, 0.783238, 0.79318, 0.726902, 0.670566, 0.412082, 0.465105, 0.68141, 0.707984, 0.68141, 0.68141, 0.68141, 0.68141, 0.68141, 0.68141, 0.663694, 0.68141, 0.68141, 0.675505, 0.68141, 0.68141, 0.68141, 0.68141, 0.68141, 0.645979, 0.68141, 0.68141, 0.678457, 0.0465927, 0.699126, 0.533778, 0.68141, 0.722747, 0.521968, 0.666647, 0.536731, 0.403862, 0.406815, 0.634168, 0.693221, 0, 0.380241, 0.640073, 0.640073, 0.678457, 0.610547, 0.610547, 0.318236, 0.690268, 0.68141, 0.640073, 0.648931, 0.702079, 0.619405, 0.660742, 0.702079, 0.6696, 0.637121, 0.722747, 0.693221, 0.687315, 0.687315, 0.68141, 0.702079, 0.699126, 0.595784, 0.548541, 0.554447, 0.00525578, 0.542636, 0.332999, 0.238514, 0.690268, 0.477678, 0.651884, 0.557399, 0.610547, 0.598736, 0.58102, 0.663694, 0.504252, 0.575115, 0.350715, 0.696173, 0.462915, 0.690268, 0, 0.660742, 0.705031, 0.663694, 0.705031, 0.702079, 0.628263, 1, 0.510157, 0.651884, 0.684363, 0.622357, 0.719794, 0.684363, 0.672552, 0.6696, 0.687315, 0.699126, 0.634168, 0.566257, 0.586926, 0.572163, 0.084977, 0.648931, 0.36843, 0.713889, 0.533778, 0.628263, 0.634168, 0.542636, 0.713889, 0.719794, 0.699126, 0.640073, 0.586926, 0.471773, 0.397957, 0.229656, 0.462915, 0.690268, 0.489489, 0.459962, 0.710937, 0.702079, 0.684363, 0.684363, 0.651884, 0.548541, 0.589878, 0.657789, 0.68141, 0.675505, 0.710937, 0.707984, 0.675505, 0.651884, 0.678457, 0.702079, 0.643026, 0.578068, 0.536731, 0.607594, 0.0288769, 0.619405, 0.462915, 0.705031, 0.660742, 0.651884, 0.68141, 0.68141, 0.634168, 0.572163, 0.713889, 0.58102, 0.62531, 0.536731, 0.439294, 0.693221, 0.146982, 0.0584033, 0.238514, 0.713889, 0.687315, 0.728652, 0.702079, 0.707984, 0.672552, 0.459962, 0.51311, 0.675505, 0.634168, 0.687315, 0.73751, 0.722747, 0.690268, 0.702079, 0.666647, 0.699126, 0.628263, 0.583973, 0.533778, 0.622357, 0.0406875, 0.634168, 0.0967876, 0, 0.217846, 0.643026, 0.533778, 0.687315, 0.530826, 0.713889, 0.572163, 0.645979, 0.607594, 0.483583, 0.173556, 0.152888, 0.436341, 0.610547, 0.643026, 1, 0.728652, 0.696173, 0.678457, 0.690268, 0.672552, 0.539683, 0.548541, 0.643026, 0.648931, 0.634168, 0.705031, 0.705031, 0.666647, 0.693221, 0.690268, 0.672552, 0.634168, 0.554447, 0.583973, 0.607594, 0.0406875, 0.601689, 0.474725, 0.678457, 0.663694, 0.637121, 0.696173, 0.648931, 0.749321, 0.678457, 0.445199, 0.607594, 0.415673, 0.521968, 0.651884, 0.572163, 0.474725, 0.693221, 0.285756, 0.495394, 0.68141, 0.660742, 0.548541, 0.705031, 0.696173, 0.589878, 0.545589, 0.62531, 0.672552, 0.678457, 0.707984, 0.722747, 0.62531, 0.666647, 0.702079, 0.643026, 0.643026, 0.648931, 0.583973, 0.640073, 0.0584033, 0.46882, 0.46882, 0.560352, 0.702079, 0.607594, 0.575115, 0.746368, 0.501299, 0.699126, 0.400909, 0.563305, 0.374336, 0.318236, 0.539683, 0.386933, 0.391395, 0.391395, 0.386933, 0.386933, 0.391395, 0.386933, 0.393625, 0.386933, 0.386933, 0.382472, 0.391395, 0.386933, 0.391395, 0.386933, 0.386933, 0.391395, 0.386933, 0.386933, 0.391395, 0.386933, 0, 0.4137, 0.384703, 0.262023, 0.360167, 0.357936, 0.295481, 0.360167, 0.342322, 0.362397, 0.349014, 0.391395, 0.384703, 0.353475, 0.337861, 0.389164, 0.398086, 0.320017, 0.375781, 0.324478, 0.380242, 0.360167, 0.386933, 0.393625, 0.382472, 0.41147, 0.418161, 0.415931, 0.41147, 0.407008, 0.362397, 0.342322, 0.364628, 0.353475, 0.353475, 0.37355, 0.355706, 0.349014, 0.355706, 0.353475, 0.00774001, 0.212951, 0.393625, 0.389164, 0.395856, 0.391395, 0.398086, 0.415931, 0.353475, 0.375781, 0.326709, 0.342322, 0.37355, 0.248639, 0.386933, 0.355706, 0.418161, 0.355706, 0.400317, 0.420392, 0.418161, 0.424853, 0.422622, 0.418161, 0.4137, 0.391395, 0.364628, 0.380242, 0.4137, 0.422622, 0.41147, 0.404778, 0.41147, 0.404778, 0.391395, 0.400317, 0.402547, 0.382472, 0.366859, 0.342322, 0.00550946, 0.206259, 0.304403, 0.395856, 0.395856, 0.398086, 0.380242, 0.386933, 0.326709, 0.400317, 0.313325, 0.306634, 0.206259, 0.384703, 0.366859, 0.380242, 0.41147, 0.420392, 0.282098, 0.420392, 0.424853, 0.418161, 0.420392, 0.424853, 0.404778, 0.389164, 0.364628, 0.395856, 0.415931, 0.402547, 0.409239, 0.407008, 0.415931, 0.407008, 0.393625, 0.398086, 0.404778, 0.404778, 0.366859, 0.366859, 0.00550946, 0.17057, 0.362397, 0.398086, 0.400317, 0.404778, 0.415931, 0.402547, 0.380242, 0.407008, 0.41147, 0.407008, 0.362397, 0.275406, 0.409239, 0.386933, 0.366859, 0.308864, 0.37132, 0.415931, 0.418161, 0.41147, 0.418161, 0.418161, 0.404778, 0.37132, 0.380242, 0.391395, 0.407008, 0.415931, 0.400317, 0.422622, 0.4137, 0.4137, 0.4137, 0.400317, 0.400317, 0.391395, 0.375781, 0.37355, 0.00104836, 0.172801, 0.389164, 0.237487, 0.409239, 0.315556, 0.420392, 0.391395, 0.357936, 0.409239, 0.400317, 0.246409, 0.37132, 0.389164, 0.404778, 0.395856, 0.420392, 0.4137, 0.400317, 0.357936, 0.409239, 0.4137, 0.420392, 0.415931, 0.41147, 0.398086, 0.386933, 0.393625, 0.4137, 0.407008, 0.415931, 0.420392, 0.418161, 0.431544, 0.400317, 0.37355, 0.398086, 0.384703, 0.404778, 0.382472, 0.00104836, 0.148265, 0.415931, 0.404778, 0.386933, 0.393625, 0.386933, 0.369089, 0.398086, 0.398086, 0.393625, 0.3334, 0.284328, 0.206259, 0.404778, 0.402547, 0.433775, 0.409239, 0.217412, 0.266484, 0.420392, 0.409239, 0.420392, 0.4137, 0.402547, 0.391395, 0.386933, 0.402547, 0.418161, 0.400317, 0.407008, 0.424853, 0.424853, 0.427083, 0.389164, 0.393625, 0.41147, 0.389164, 0.386933, 0.375781, 0, 0.134881, 0.402547, 0.286559, 0.357936, 0.404778, 0.391395, 0.420392, 0.375781, 0.404778, 0.375781, 0.382472, 0.29102, 0.273175, 0.279867, 0.434792, 0.434792, 0.434792, 0.432029, 0.434792, 0.434792, 0.434792, 0.434792, 0.434792, 0.426503, 0.434792, 0.434792, 0.434792, 0.440318, 0.434792, 0.434792, 0.434792, 0.434792, 0.434792, 0.434792, 0.434792, 0.0755968, 0.202697, 0.349138, 0.354664, 0.329797, 0.351901, 0.362953, 0.307692, 0.374005, 0.36019, 0.354664, 0.401636, 0.401636, 0.343612, 0.327034, 0.379531, 0.374005, 0.393347, 0.401636, 0.304929, 0.412688, 0.401636, 0.393347, 0.368479, 0.379531, 0.374005, 0.407162, 0.398873, 0.401636, 0.379531, 0.382294, 0.376768, 0.398873, 0.420977, 0.42374, 0.418214, 0.415451, 0.393347, 0.412688, 0.407162, 0.089412, 0.230327, 0.393347, 0.42374, 0.390584, 0.371242, 0.346375, 0.338086, 0.197171, 0.401636, 0.302166, 0.368479, 0.371242, 0.266247, 0.376768, 0.329797, 0.335323, 0.338086, 0.346375, 0.42374, 0.420977, 0.401636, 0.407162, 0.382294, 0.362953, 0.368479, 0.393347, 0.351901, 0.398873, 0.349138, 0.374005, 0.393347, 0.401636, 0.409925, 0.426503, 0.42374, 0.412688, 0.401636, 0.407162, 0.420977, 0.0977011, 0.26901, 0.340849, 0.434792, 0.346375, 0.418214, 0.409925, 0.329797, 0.376768, 0.365716, 0.293877, 0.376768, 0.351901, 0.362953, 0.282825, 0.210986, 0.407162, 0.310455, 0.39611, 0.39611, 0.409925, 0.393347, 0.393347, 0.39611, 0.329797, 0.362953, 0.401636, 0.376768, 0.39611, 0.343612, 0.368479, 0.385057, 0.376768, 0.382294, 0.420977, 0.432029, 0.393347, 0.39611, 0.407162, 0.393347, 0.0977011, 0.235853, 0.365716, 0.313218, 0.409925, 0.409925, 0.418214, 0.379531, 0.39611, 0.357427, 0.351901, 0.368479, 0.338086, 0.412688, 0.349138, 0.351901, 0.393347, 0.42374, 0.407162, 0.407162, 0.401636, 0.390584, 0.390584, 0.401636, 0.36019, 0.376768, 0.39611, 0.393347, 0.407162, 0.374005, 0.357427, 0.38782, 0.385057, 0.412688, 0.401636, 0.432029, 0.42374, 0.412688, 0.42374, 0.412688, 0.0728337, 0.274536, 0.346375, 0.432029, 0.343612, 0.426503, 0.401636, 0.38782, 0.357427, 0.349138, 0.409925, 0.407162, 0.329797, 0.368479, 0.371242, 0.393347, 0.418214, 0.374005, 0.365716, 0.38782, 0.415451, 0.418214, 0.379531, 0.401636, 0.374005, 0.379531, 0.382294, 0.401636, 0.390584, 0.412688, 0.362953, 0.368479, 0.338086, 0.412688, 0.429266, 0.429266, 0.437555, 0.429266, 0.418214, 0.429266, 0.111516, 0.249668, 0.371242, 0.282825, 0.437555, 0.390584, 0.376768, 0.368479, 0.368479, 0.376768, 0.407162, 0.390584, 0.415451, 0.385057, 0.36019, 0.23309, 0.36019, 0.180592, 0.119805, 0.20546, 0.415451, 0.401636, 0.39611, 0.398873, 0.385057, 0.38782, 0.407162, 0.407162, 0.385057, 0.412688, 0.351901, 0.36019, 0.371242, 0.374005, 0.426503, 0.440318, 0.426503, 0.440318, 0.412688, 0.418214, 0.0977011, 0.263484, 0.313218, 0.263484, 0.42374, 0.357427, 0.354664, 0.280062, 0.33256, 0.318744, 0.374005, 0.351901, 0.379531, 0.36019, 0.379511, 0.393257, 0.379511, 0.379511, 0.379511, 0.383439, 0.379511, 0.379511, 0.379511, 0.379511, 0.379511, 0.393257, 0.383439, 0.379511, 0.359875, 0.379511, 0.379511, 0.379511, 0.363802, 0.379511, 0.379511, 0.145839, 0.361839, 0.359875, 0.365766, 0.357911, 0.32453, 0.353984, 0.36773, 0.25973, 0.318639, 0.352021, 0.334348, 0.350057, 0.381475, 0.375584, 0.357911, 0.338275, 0.308821, 0.320602, 0.318639, 0.348093, 0.336311, 0.314712, 0.363802, 0.379511, 0.381475, 0.393257, 0.381475, 0.322566, 0.385402, 0.359875, 0.359875, 0.355948, 0.36773, 0.359875, 0.34613, 0.357911, 0.359875, 0.357911, 0.363802, 0.10853, 0.393257, 0.318639, 0.340239, 0.202784, 0.220457, 0.373621, 0.375584, 0.353984, 0.357911, 0.234203, 0.336311, 0.159584, 0.167439, 0.330421, 0.192966, 0.242057, 0.330421, 0.228312, 0.385402, 0.381475, 0.385402, 0.355948, 0.369693, 0.361839, 0.359875, 0.363802, 0.342202, 0.377548, 0.340239, 0.328457, 0.369693, 0.365766, 0.381475, 0.383439, 0.369693, 0.375584, 0.369693, 0.342202, 0.353984, 0.153694, 0.330421, 0.247948, 0.401111, 0.363802, 0.322566, 0.377548, 0.373621, 0.291148, 0.289184, 0.328457, 0.361839, 0.342202, 0.273475, 0.36773, 0.147803, 0.242057, 0.289184, 0.234203, 0.377548, 0.383439, 0.381475, 0.359875, 0.355948, 0.363802, 0.359875, 0.363802, 0.353984, 0.381475, 0.352021, 0.330421, 0.334348, 0.385402, 0.377548, 0.369693, 0.357911, 0.385402, 0.393257, 0.350057, 0.371657, 0.149766, 0.381475, 0.369693, 0.297039, 0.375584, 0.375584, 0.359875, 0.336311, 0.306857, 0.322566, 0.251875, 0.359875, 0.161548, 0.308821, 0.365766, 0.357911, 0.369693, 0.291148, 0.285257, 0.359875, 0.379511, 0.381475, 0.352021, 0.359875, 0.359875, 0.365766, 0.36773, 0.344166, 0.363802, 0.375584, 0.36773, 0.363802, 0.381475, 0.383439, 0.371657, 0.371657, 0.353984, 0.363802, 0.379511, 0.369693, 0.159584, 0.377548, 0.269548, 0.393257, 0.348093, 0.326493, 0.369693, 0.381475, 0.338275, 0.353984, 0.36773, 0.251875, 0.359875, 0.153694, 0.269548, 0.338275, 0.365766, 0.326493, 0.36773, 0.375584, 0.393257, 0.383439, 0.342202, 0.359875, 0.36773, 0.359875, 0.359875, 0.316675, 0.361839, 0.379511, 0.36773, 0.383439, 0.375584, 0.369693, 0.365766, 0.369693, 0.379511, 0.373621, 0.365766, 0.377548, 0.183148, 0.334348, 0.369693, 0.220457, 0.371657, 0.291148, 0.371657, 0.385402, 0.359875, 0.285257, 0.332384, 0.240093, 0.308821, 0.267584, 0.393257, 0.149766, 0.28133, 0.293112, 0.208675, 0.385402, 0.383439, 0.393257, 0.342202, 0.359875, 0.36773, 0.383439, 0.36773, 0.348093, 0.348093, 0.371657, 0.371657, 0.405039, 0.36773, 0.379511, 0.371657, 0.377548, 0.373621, 0.369693, 0.385402, 0.36773, 0.165475, 0.377548, 0.379511, 0.297039, 0.353984, 0.355948, 0.355948, 0.375584, 0.393257, 0.316675, 0.283293, 0.344166, 0.253839, 0.279366, 0.275424, 0.275424, 0.275424, 0.27808, 0.275424, 0.275424, 0.270112, 0.275424, 0.275424, 0.280736, 0.275424, 0.275424, 0.280736, 0.275424, 0.275424, 0.275424, 0.275424, 0.275424, 0.280736, 0.275424, 0.275424, 0, 0.11341, 0.224961, 0.137314, 0.275424, 0.0788824, 0.0656025, 0.108098, 0.0443548, 0.0549787, 0.0841943, 0.182465, 0.29136, 0.206369, 0.254177, 0.296672, 0.235585, 0.15325, 0.280736, 0.12669, 0.275424, 0.259488, 0.283392, 0.27808, 0.286048, 0.294016, 0.267456, 0.27808, 0.275424, 0.254177, 0.267456, 0.240897, 0.246209, 0.219649, 0.238241, 0.270112, 0.27808, 0.267456, 0.251521, 0.272768, 0, 0.227617, 0.142626, 0.150594, 0.232929, 0.0815384, 0.0629466, 0.246209, 0.185121, 0.171841, 0.235585, 0.259488, 0.209025, 0.272768, 0.267456, 0.256833, 0.246209, 0.169185, 0.187777, 0.248865, 0.283392, 0.240897, 0.270112, 0.29136, 0.29136, 0.307296, 0.288704, 0.296672, 0.27808, 0.280736, 0.272768, 0.224961, 0.240897, 0.240897, 0.259488, 0.254177, 0.2648, 0.283392, 0.254177, 0.275424, 0, 0.198401, 0.0735705, 0, 0.0523227, 0.262144, 0.0762264, 0.0735705, 0.248865, 0.132002, 0.275424, 0.259488, 0.243553, 0.270112, 0.243553, 0.219649, 0.13997, 0.280736, 0.286048, 0.256833, 0.296672, 0.254177, 0.272768, 0.2648, 0.294016, 0.294016, 0.267456, 0.29136, 0.275424, 0.283392, 0.270112, 0.240897, 0.251521, 0.246209, 0.238241, 0.211681, 0.232929, 0.262144, 0.224961, 0.254177, 0, 0.248865, 0.15325, 0.0868503, 0.238241, 0.15325, 0.270112, 0.116066, 0.0523227, 0.0416988, 0.283392, 0.142626, 0.294016, 0.206369, 0.219649, 0.288704, 0.15325, 0.275424, 0.179809, 0.270112, 0.29136, 0.283392, 0.286048, 0.29136, 0.280736, 0.280736, 0.280736, 0.296672, 0.280736, 0.283392, 0.27808, 0.270112, 0.240897, 0.267456, 0.238241, 0.251521, 0.270112, 0.27808, 0.246209, 0.254177, 0, 0.147938, 0.283392, 0.232929, 0.11341, 0.275424, 0.206369, 0.262144, 0.203713, 0.216993, 0.224961, 0.206369, 0.280736, 0.29136, 0.270112, 0.161218, 0.2648, 0.286048, 0.232929, 0.201057, 0.29136, 0.259488, 0.270112, 0.275424, 0.29136, 0.280736, 0.283392, 0.280736, 0.27808, 0.296672, 0.29136, 0.29136, 0.270112, 0.251521, 0.270112, 0.251521, 0.27808, 0.296672, 0.262144, 0.10013, 0, 0.132002, 0.0310749, 0.023107, 0.2648, 0.017795, 0.0841943, 0.270112, 0.246209, 0.177153, 0.286048, 0.124034, 0.29136, 0.025763, 0, 0.121378, 0.219649, 0.272768, 0.102786, 0.017795, 0.296672, 0.43119, 0.413608, 0.413608, 0.396027, 0.413608, 0.413608, 0.413608, 0.424597, 0.413608, 0.413608, 0.424597, 0.413608, 0.413608, 0.413608, 0.413608, 0.413608, 0.413608, 0.413608, 0.413608, 0.43119, 0.413608, 0.00923039, 0.231199, 0.303723, 0.428992, 0.396027, 0.396027, 0.396027, 0.255373, 0.409213, 0.411411, 0.398224, 0.439981, 0.435585, 0.437783, 0.413608, 0.422399, 0.437783, 0.428992, 0.409213, 0.398224, 0.415806, 0.404817, 0.420201, 0.435585, 0.424597, 0.413608, 0.426794, 0.413608, 0.439981, 0.444376, 0.413608, 0.404817, 0.444376, 0.435585, 0.40262, 0.428992, 0.387236, 0.360863, 0.356468, 0.367456, 0, 0.24878, 0.327898, 0.428992, 0.281746, 0.422399, 0.424597, 0.422399, 0.40262, 0.428992, 0.356468, 0.411411, 0.352072, 0.409213, 0.444376, 0.393829, 0.404817, 0.424597, 0.398224, 0.413608, 0.426794, 0.424597, 0.435585, 0.435585, 0.411411, 0.43119, 0.418004, 0.424597, 0.424597, 0.413608, 0.428992, 0.409213, 0.43119, 0.435585, 0.422399, 0.404817, 0.40262, 0.387236, 0.358666, 0.389433, 0.00923039, 0.360863, 0.226803, 0.38284, 0.385038, 0.314711, 0.400422, 0.422399, 0.411411, 0.433388, 0.358666, 0.229001, 0.418004, 0.437783, 0.435585, 0.369654, 0.428992, 0.369654, 0.411411, 0.40262, 0.433388, 0.426794, 0.422399, 0.428992, 0.413608, 0.450969, 0.418004, 0.424597, 0.422399, 0.420201, 0.424597, 0.418004, 0.426794, 0.453167, 0.426794, 0.418004, 0.393829, 0.38284, 0.37405, 0.409213, 0.0334052, 0.365259, 0.237792, 0.400422, 0.424597, 0.409213, 0.35427, 0.413608, 0.415806, 0.418004, 0.424597, 0.308118, 0.367456, 0.079557, 0.0971386, 0.43119, 0.343282, 0.396027, 0.43119, 0.407015, 0.444376, 0.424597, 0.420201, 0.424597, 0.426794, 0.398224, 0.40262, 0.380643, 0.407015, 0.396027, 0.422399, 0.404817, 0.424597, 0.426794, 0.40262, 0.418004, 0.380643, 0.37405, 0.407015, 0.343282, 0.0443937, 0.391631, 0.187245, 0.250978, 0.409213, 0.387236, 0.299328, 0.415806, 0.407015, 0.424597, 0.418004, 0.418004, 0.424597, 0.428992, 0.415806, 0.407015, 0.424597, 0.407015, 0.424597, 0.38284, 0.398224, 0.435585, 0.435585, 0.428992, 0.442178, 0.424597, 0.426794, 0.442178, 0.415806, 0.418004, 0.426794, 0.420201, 0.420201, 0.422399, 0.424597, 0.404817, 0.360863, 0.396027, 0.396027, 0.369654, 0.0356029, 0.413608, 0.202628, 0.187245, 0.437783, 0.38284, 0.215815, 0.270757, 0.319107, 0.424597, 0.424597, 0.266362, 0.35427, 0.332293, 0.415806, 0.398224, 0.422399, 0.37405, 0.38284, 0.407015, 0.411411, 0.428992, 0.435585, 0.424597, 0.435585, 0.43119, 0.439981, 0.435585, 0.424597, 0.426794, 0.411411, 0.422399, 0.424597, 0.413608, 0.398224, 0.391631, 0.332293, 0.338886, 0.327898, 0.389433, 0.00703268, 0.272955, 0.24878, 0.233396, 0.627106, 0.629537, 0.624675, 0.629537, 0.629537, 0.605227, 0.629537, 0.629537, 0.607658, 0.629537, 0.629537, 0.627106, 0.622244, 0.629537, 0.629537, 0.629537, 0.619813, 0.629537, 0.629537, 0.627106, 0.629537, 0.150626, 0.607658, 0.415607, 0.439917, 0.576054, 0.605227, 0.525003, 0.549313, 0.571192, 0.568761, 0.498262, 0.527434, 0.583347, 0.619813, 0.631968, 0.610089, 0.653847, 0.61252, 0.629537, 0.627106, 0.627106, 0.631968, 0.639261, 0.648985, 0.631968, 0.641692, 0.624675, 0.607658, 0.568761, 0.510417, 0.571192, 0.561468, 0.593072, 0.619813, 0.605227, 0.605227, 0.641692, 0.602796, 0.619813, 0.639261, 0.123885, 0.432624, 0.525003, 0.595503, 0.580917, 0.522572, 0.593072, 0.580917, 0.549313, 0.539589, 0.473952, 0.602796, 0.61252, 0.610089, 0.578485, 0.629537, 0.666002, 0.471521, 0.61252, 0.607658, 0.61252, 0.63683, 0.622244, 0.66114, 0.670864, 0.631968, 0.639261, 0.622244, 0.576054, 0.512848, 0.54202, 0.56633, 0.568761, 0.63683, 0.607658, 0.590641, 0.624675, 0.61252, 0.617382, 0.627106, 0.143333, 0.464228, 0.539589, 0.629537, 0.61252, 0.444779, 0.61252, 0.580917, 0.539589, 0.522572, 0.425331, 0.593072, 0.600365, 0.66114, 0.646554, 0.639261, 0.648985, 0.641692, 0.622244, 0.605227, 0.610089, 0.622244, 0.629537, 0.63683, 0.631968, 0.634399, 0.639261, 0.627106, 0.58821, 0.520141, 0.546882, 0.561468, 0.590641, 0.634399, 0.622244, 0.607658, 0.631968, 0.622244, 0.614951, 0.624675, 0.119023, 0.444779, 0.549313, 0.605227, 0.619813, 0.522572, 0.595503, 0.571192, 0.534727, 0.534727, 0.556606, 0.58821, 0.583347, 0.648985, 0.580917, 0.624675, 0.580917, 0.537158, 0.622244, 0.415607, 0.641692, 0.58821, 0.576054, 0.646554, 0.648985, 0.648985, 0.666002, 0.624675, 0.61252, 0.54202, 0.546882, 0.583347, 0.551744, 0.578485, 0.629537, 0.607658, 0.631968, 0.646554, 0.634399, 0.583347, 0.128747, 0.366987, 0.614951, 0.571192, 0.622244, 0.597934, 0.559037, 0.444779, 0.527434, 0.478814, 0.432624, 0.634399, 0.653847, 0.648985, 0.653847, 0.646554, 0.590641, 0.515279, 0.629537, 0.622244, 0.648985, 0.648985, 0.583347, 0.627106, 0.639261, 0.658709, 0.641692, 0.624675, 0.634399, 0.610089, 0.554175, 0.551744, 0.563899, 0.593072, 0.595503, 0.61252, 0.629537, 0.605227, 0.653847, 0.619813, 0.126316, 0.396159, 0.56633, 0.617382, 0.58821, 0.507986, 0.54202, 0.473952, 0.512848, 0.593072, 0.520141, 0.602796, 0.644123, 0.639261, 0.624675, 0.585779, 0.576054, 0.301888, 0.301888, 0.308031, 0.301888, 0.301888, 0.301888, 0.308031, 0.301888, 0.301888, 0.295745, 0.303936, 0.301888, 0.308031, 0.301888, 0.301888, 0.301888, 0.29165, 0.308031, 0.301888, 0.301888, 0.29984, 0.127836, 0.330555, 0.242506, 0.289602, 0.301888, 0.312126, 0.340794, 0.348984, 0.312126, 0.324412, 0.334651, 0.340794, 0.322365, 0.351032, 0.328508, 0.289602, 0.322365, 0.289602, 0.254792, 0.289602, 0.293697, 0.29984, 0.322365, 0.330555, 0.346937, 0.340794, 0.346937, 0.336698, 0.336698, 0.338746, 0.344889, 0.344889, 0.336698, 0.344889, 0.336698, 0.324412, 0.320317, 0.301888, 0.312126, 0.312126, 0.11555, 0.342841, 0.213838, 0.197457, 0.324412, 0.328508, 0.328508, 0.316222, 0.330555, 0.338746, 0.340794, 0.336698, 0.322365, 0.305983, 0.29984, 0.303936, 0.316222, 0.303936, 0.242506, 0.29984, 0.320317, 0.303936, 0.318269, 0.308031, 0.332603, 0.332603, 0.340794, 0.314174, 0.338746, 0.336698, 0.340794, 0.340794, 0.338746, 0.338746, 0.340794, 0.328508, 0.310079, 0.314174, 0.310079, 0.301888, 0.121693, 0.308031, 0.254792, 0.213838, 0.324412, 0.314174, 0.340794, 0.303936, 0.332603, 0.344889, 0.336698, 0.340794, 0.324412, 0.32646, 0.303936, 0.271173, 0.275268, 0.314174, 0.230219, 0.316222, 0.32646, 0.328508, 0.324412, 0.320317, 0.320317, 0.320317, 0.338746, 0.342841, 0.334651, 0.342841, 0.35308, 0.336698, 0.344889, 0.346937, 0.336698, 0.330555, 0.314174, 0.324412, 0.320317, 0.324412, 0.133979, 0.336698, 0.26503, 0.303936, 0.310079, 0.29165, 0.273221, 0.289602, 0.344889, 0.336698, 0.328508, 0.340794, 0.308031, 0.324412, 0.32646, 0.289602, 0.289602, 0.289602, 0.328508, 0.297793, 0.320317, 0.338746, 0.330555, 0.320317, 0.328508, 0.322365, 0.328508, 0.338746, 0.35308, 0.334651, 0.340794, 0.328508, 0.342841, 0.346937, 0.324412, 0.316222, 0.303936, 0.320317, 0.310079, 0.328508, 0.11555, 0.271173, 0.224076, 0.222029, 0.314174, 0.301888, 0.336698, 0.293697, 0.308031, 0.303936, 0.340794, 0.338746, 0.314174, 0.297793, 0.271173, 0.318269, 0.248649, 0.310079, 0.295745, 0.308031, 0.332603, 0.340794, 0.332603, 0.322365, 0.320317, 0.322365, 0.334651, 0.342841, 0.351032, 0.338746, 0.332603, 0.336698, 0.336698, 0.342841, 0.32646, 0.314174, 0.308031, 0.328508, 0.336698, 0.330555, 0.113502, 0.262982, 0.275268, 0.289602, 0.230219, 0.328508, 0.340794, 0.254792, 0.336698, 0.303936, 0.32646, 0.351032, 0.336698, 0.324412, 0.297793, 0.293697, 0.236363, 0.303936, 0.328508, 0.384872, 0.381266, 0.381266, 0.381266, 0.384872, 0.381266, 0.381266, 0.386675, 0.381266, 0.381266, 0.381266, 0.381266, 0.381266, 0.384872, 0.384872, 0.381266, 0.381266, 0.386675, 0.381266, 0.381266, 0.381266, 0.13965, 0.363235, 0.29652, 0.361432, 0.34881, 0.365038, 0.361432, 0.350613, 0.37225, 0.341598, 0.359629, 0.354219, 0.352416, 0.352416, 0.347007, 0.370447, 0.356022, 0.352416, 0.350613, 0.343401, 0.356022, 0.361432, 0.365038, 0.37766, 0.356022, 0.366841, 0.374053, 0.375856, 0.383069, 0.374053, 0.375856, 0.374053, 0.365038, 0.37225, 0.368644, 0.354219, 0.37225, 0.356022, 0.350613, 0.381266, 0.0855572, 0.240624, 0.305536, 0.307339, 0.337991, 0.366841, 0.370447, 0.334385, 0.363235, 0.361432, 0.379463, 0.381266, 0.359629, 0.356022, 0.368644, 0.354219, 0.379463, 0.366841, 0.356022, 0.356022, 0.370447, 0.374053, 0.379463, 0.379463, 0.366841, 0.361432, 0.381266, 0.379463, 0.388478, 0.374053, 0.368644, 0.381266, 0.37225, 0.375856, 0.379463, 0.356022, 0.356022, 0.345204, 0.365038, 0.370447, 0.0891634, 0.208168, 0.374053, 0.365038, 0.365038, 0.361432, 0.374053, 0.354219, 0.365038, 0.37766, 0.390281, 0.383069, 0.379463, 0.37766, 0.37225, 0.386675, 0.379463, 0.363235, 0.384872, 0.374053, 0.379463, 0.381266, 0.370447, 0.383069, 0.336188, 0.368644, 0.384872, 0.370447, 0.386675, 0.381266, 0.379463, 0.379463, 0.381266, 0.375856, 0.365038, 0.361432, 0.363235, 0.368644, 0.37225, 0.370447, 0.0891634, 0.202759, 0.276686, 0.330779, 0.356022, 0.305536, 0.356022, 0.352416, 0.386675, 0.37225, 0.386675, 0.384872, 0.368644, 0.37766, 0.356022, 0.312748, 0.334385, 0.356022, 0.354219, 0.357825, 0.365038, 0.381266, 0.375856, 0.375856, 0.365038, 0.359629, 0.37766, 0.375856, 0.390281, 0.375856, 0.370447, 0.370447, 0.379463, 0.375856, 0.356022, 0.34881, 0.363235, 0.356022, 0.345204, 0.37766, 0.0963758, 0.19194, 0.341598, 0.368644, 0.332582, 0.374053, 0.379463, 0.374053, 0.359629, 0.34881, 0.37225, 0.379463, 0.343401, 0.368644, 0.370447, 0.359629, 0.375856, 0.354219, 0.339794, 0.383069, 0.37225, 0.383069, 0.37766, 0.381266, 0.361432, 0.370447, 0.359629, 0.37766, 0.393887, 0.383069, 0.37766, 0.37766, 0.374053, 0.383069, 0.368644, 0.359629, 0.37225, 0.354219, 0.363235, 0.365038, 0.0981789, 0.19194, 0.276686, 0.276686, 0.347007, 0.37766, 0.381266, 0.366841, 0.384872, 0.384872, 0.383069, 0.383069, 0.361432, 0.328976, 0.366841, 0.381266, 0.375856, 0.292914, 0.350613, 0.368644, 0.356022, 0.37766, 0.375856, 0.381266, 0.368644, 0.365038, 0.37225, 0.37766, 0.57319, 0.551349, 0.551349, 0.578043, 0.556203, 0.551349, 0.551349, 0.524655, 0.551349, 0.568336, 0.551349, 0.553776, 0.568336, 0.568336, 0.553776, 0.568336, 0.57319, 0.553776, 0.553776, 0.553776, 0.551349, 0.0126189, 0.473694, 0.405746, 0.551349, 0.444574, 0.522229, 0.4106, 0.468841, 0.216463, 0.388759, 0.476121, 0.522229, 0.556203, 0.561056, 0.548923, 0.553776, 0.548923, 0.546496, 0.483401, 0.531936, 0.524655, 0.519802, 0.563483, 0.548923, 0.578043, 0.561056, 0.561056, 0.568336, 0.56591, 0.497962, 0.546496, 0.563483, 0.548923, 0.544069, 0.558629, 0.558629, 0.534362, 0.500388, 0.398466, 0.42516, 0.0660066, 0.364492, 0.393613, 0.505242, 0.524655, 0.534362, 0.405746, 0.534362, 0.546496, 0.510095, 0.529509, 0.529509, 0.478548, 0.369346, 0.536789, 0.514949, 0.604737, 0.544069, 0.553776, 0.434867, 0.568336, 0.578043, 0.56591, 0.500388, 0.505242, 0.527082, 0.514949, 0.536789, 0.529509, 0.539216, 0.534362, 0.548923, 0.449427, 0.546496, 0.553776, 0.514949, 0.536789, 0.507668, 0.495535, 0.466414, 0.0781402, 0.42516, 0.4106, 0.488255, 0.558629, 0.495535, 0.393613, 0.298971, 0.201903, 0.553776, 0.497962, 0.541642, 0.500388, 0.490681, 0.505242, 0.500388, 0.490681, 0.514949, 0.505242, 0.536789, 0.578043, 0.585323, 0.539216, 0.556203, 0.466414, 0.490681, 0.497962, 0.531936, 0.548923, 0.536789, 0.548923, 0.563483, 0.476121, 0.568336, 0.563483, 0.541642, 0.512522, 0.490681, 0.529509, 0.447001, 0.0781402, 0.357212, 0.187342, 0.0927005, 0.330518, 0.434867, 0.575616, 0.379053, 0.449427, 0.459134, 0.490681, 0.536789, 0.490681, 0.332945, 0.568336, 0.519802, 0.534362, 0.568336, 0.393613, 0.39604, 0.585323, 0.58047, 0.58047, 0.563483, 0.490681, 0.512522, 0.531936, 0.553776, 0.57319, 0.561056, 0.524655, 0.597457, 0.561056, 0.456707, 0.468841, 0.483401, 0.519802, 0.490681, 0.447001, 0.524655, 0.0999806, 0.364492, 0.114541, 0.146088, 0.541642, 0.531936, 0.524655, 0.548923, 0.568336, 0.551349, 0.495535, 0.539216, 0.420307, 0.463988, 0.468841, 0.478548, 0.563483, 0.56591, 0.483401, 0.59503, 0.568336, 0.558629, 0.58047, 0.56591, 0.463988, 0.490681, 0.531936, 0.544069, 0.548923, 0.553776, 0.58775, 0.582897, 0.551349, 0.539216, 0.430014, 0.476121, 0.427587, 0.442147, 0.490681, 0.519802, 0.0732868, 0.349932, 0.340225, 0.476121, 0.381479, 0.568336, 0.582897, 0.578043, 0.517375, 0.544069, 0.563483, 0.558629, 0.442147, 0.427587, 0.512522, 0.478548, 0.578043, 0.578043, 0.544069, 0.561056, 0.568336, 0.539216, 0.585323, 0.568336, 0.456707, 0.510095, 0.544069, 0.536789, 0.568336, 0.558629, 0.541642, 0.544069, 0.57319, 0.57319, 0.551349, 0.534362, 0.485828, 0.463988, 0.495535, 0.548923, 0.0635799, 0.308678, 0.444574, 0.408173, 0.466414, 0.531936, 0.522229, 0.510095, 0.510095, 0.500388, 0.556203, 0.556203, 0.527082, 0.308678, 0.284411, 0.307852, 0.307852, 0.316741, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.307852, 0.296, 0.307852, 0.307852, 0.301926, 0.168593, 0.159704, 0.171556, 0.168593, 0.153778, 0.26637, 0.224889, 0.257481, 0.257481, 0.221926, 0.281185, 0.313778, 0.319704, 0.290074, 0.275259, 0.269333, 0.218963, 0.189333, 0.207111, 0.257481, 0.260444, 0.183407, 0.263407, 0.304889, 0.307852, 0.298963, 0.307852, 0.307852, 0.304889, 0.298963, 0.307852, 0.233778, 0.275259, 0.272296, 0.26637, 0.304889, 0.298963, 0.313778, 0.301926, 0.301926, 0.147852, 0.260444, 0.127111, 0.201185, 0.210074, 0.144889, 0.257481, 0.24563, 0.207111, 0.310815, 0.248593, 0.319704, 0.233778, 0.224889, 0.216, 0.298963, 0.251556, 0.298963, 0.284148, 0.307852, 0.319704, 0.296, 0.298963, 0.304889, 0.296, 0.272296, 0.248593, 0.298963, 0.296, 0.307852, 0.313778, 0.230815, 0.263407, 0.26637, 0.278222, 0.298963, 0.307852, 0.313778, 0.304889, 0.293037, 0.168593, 0.263407, 0.159704, 0.133037, 0.221926, 0.136, 0.218963, 0.0945185, 0.227852, 0.136, 0.260444, 0.307852, 0.251556, 0.230815, 0.284148, 0.307852, 0.293037, 0.224889, 0.298963, 0.290074, 0.307852, 0.304889, 0.32563, 0.304889, 0.290074, 0.275259, 0.242667, 0.304889, 0.301926, 0.313778, 0.313778, 0.239704, 0.251556, 0.275259, 0.275259, 0.296, 0.304889, 0.307852, 0.307852, 0.307852, 0.168593, 0.248593, 0.130074, 0.162667, 0.293037, 0.207111, 0.213037, 0.218963, 0.233778, 0.307852, 0.298963, 0.272296, 0.278222, 0.207111, 0.221926, 0.293037, 0.290074, 0.233778, 0.307852, 0.230815, 0.319704, 0.304889, 0.307852, 0.296, 0.290074, 0.281185, 0.260444, 0.313778, 0.290074, 0.304889, 0.307852, 0.236741, 0.254519, 0.284148, 0.26637, 0.296, 0.304889, 0.307852, 0.301926, 0.301926, 0.150815, 0.239704, 0.127111, 0.307852, 0.189333, 0.201185, 0.227852, 0.103407, 0.269333, 0.24563, 0.233778, 0.298963, 0.221926, 0.210074, 0.216, 0.301926, 0.210074, 0.319704, 0.230815, 0.298963, 0.307852, 0.304889, 0.307852, 0.301926, 0.296, 0.275259, 0.248593, 0.301926, 0.304889, 0.304889, 0.313778, 0.248593, 0.251556, 0.290074, 0.284148, 0.298963, 0.298963, 0.307852, 0.307852, 0.284148, 0.153778, 0.260444, 0.124148, 0.207111, 0.275259, 0.242667, 0.210074, 0.174519, 0.239704, 0.307852, 0.257481, 0.239704, 0.298963, 0.204148, 0.263407, 0.304889, 0.248593, 0.319704, 0.313778, 0.198222, 0.319704, 0.307852, 0.284148, 0.290074, 0.298963, 0.275259, 0.248593, 0.301926, 0.307852, 0.307852, 0.307852, 0.224889, 0.251556, 0.272296, 0.275259, 0.301926, 0.313778, 0.301926, 0.290074, 0.298963, 0.147852, 0.242667, 0.130074, 0.301926, 0.239704, 0.257481, 0.248593, 0.133037, 0.257481, 0.287111, 0.307852, 0.272296, 0.269333, 0.213037, 0.141926, 0.384097, 0.384097, 0.384097, 0.38079, 0.384097, 0.384097, 0.38079, 0.384097, 0.384097, 0.384097, 0.384097, 0.384097, 0.387403, 0.384097, 0.384097, 0.384097, 0.384097, 0.384097, 0.390709, 0.384097, 0.384097, 0.0237064, 0.179104, 0.374178, 0.374178, 0.360952, 0.367565, 0.314664, 0.337808, 0.35434, 0.291519, 0.241924, 0.202248, 0.374178, 0.384097, 0.241924, 0.324583, 0.331195, 0.364259, 0.344421, 0.390709, 0.384097, 0.38079, 0.367565, 0.364259, 0.374178, 0.38079, 0.370871, 0.367565, 0.351033, 0.337808, 0.31797, 0.331195, 0.364259, 0.31797, 0.321276, 0.35434, 0.334502, 0.321276, 0.308051, 0.324583, 0.0270127, 0.099752, 0.374178, 0.38079, 0.364259, 0.367565, 0.344421, 0.351033, 0.327889, 0.208861, 0.390709, 0.337808, 0.364259, 0.347727, 0.308051, 0.38079, 0.357646, 0.364259, 0.347727, 0.357646, 0.38079, 0.370871, 0.364259, 0.360952, 0.38079, 0.370871, 0.374178, 0.35434, 0.384097, 0.364259, 0.347727, 0.347727, 0.374178, 0.331195, 0.364259, 0.364259, 0.38079, 0.38079, 0.35434, 0.324583, 0.0270127, 0.126203, 0.374178, 0.374178, 0.374178, 0.374178, 0.331195, 0.364259, 0.232005, 0.331195, 0.321276, 0.364259, 0.374178, 0.397322, 0.2816, 0.374178, 0.374178, 0.351033, 0.347727, 0.364259, 0.390709, 0.374178, 0.364259, 0.370871, 0.38079, 0.397322, 0.384097, 0.367565, 0.384097, 0.360952, 0.347727, 0.347727, 0.384097, 0.374178, 0.364259, 0.374178, 0.374178, 0.384097, 0.301438, 0.38079, 0.0468507, 0.149347, 0.387403, 0.390709, 0.374178, 0.38079, 0.351033, 0.390709, 0.2816, 0.344421, 0.377484, 0.337808, 0.374178, 0.35434, 0.331195, 0.35434, 0.374178, 0.387403, 0.35434, 0.390709, 0.384097, 0.394016, 0.374178, 0.38079, 0.387403, 0.374178, 0.400628, 0.374178, 0.407241, 0.38079, 0.351033, 0.367565, 0.387403, 0.374178, 0.374178, 0.387403, 0.387403, 0.387403, 0.31797, 0.351033, 0.0468507, 0.152653, 0.367565, 0.288213, 0.347727, 0.360952, 0.311357, 0.394016, 0.331195, 0.205555, 0.31797, 0.347727, 0.38079, 0.374178, 0.374178, 0.390709, 0.364259, 0.387403, 0.374178, 0.38079, 0.370871, 0.394016, 0.374178, 0.374178, 0.384097, 0.374178, 0.367565, 0.38079, 0.384097, 0.374178, 0.360952, 0.364259, 0.384097, 0.367565, 0.374178, 0.38079, 0.377484, 0.384097, 0.38079, 0.38079, 0.0435444, 0.159266, 0.364259, 0.364259, 0.367565, 0.367565, 0.321276, 0.341114, 0.341114, 0.351033, 0.35434, 0.351033, 0.374178, 0.364259, 0.225393, 0.347727, 0.364259, 0.370871, 0.364259, 0.324583, 0.374178, 0.370871, 0.374178, 0.374178, 0.38079, 0.38079, 0.344421, 0.374178, 0.347727, 0.360952, 0.451929, 0.451929, 0.451929, 0.451929, 0.458245, 0.451929, 0.451929, 0.45614, 0.451929, 0.451929, 0.451929, 0.451929, 0.451929, 0.46035, 0.46456, 0.451929, 0.451929, 0.451929, 0.451929, 0.451929, 0.451929, 0, 0.188788, 0.424563, 0.45614, 0.45614, 0.441404, 0.441404, 0.401406, 0.414037, 0.380355, 0.420352, 0.369829, 0.38246, 0.447719, 0.447719, 0.441404, 0.401406, 0.420352, 0.401406, 0.407722, 0.424563, 0.432983, 0.424563, 0.426668, 0.451929, 0.437193, 0.449824, 0.445614, 0.443509, 0.432983, 0.439299, 0.447719, 0.437193, 0.422458, 0.45614, 0.437193, 0.437193, 0.435088, 0.414037, 0.401406, 0.0414289, 0.395091, 0.323516, 0.416142, 0.426668, 0.376145, 0.416142, 0.422458, 0.445614, 0.418247, 0.411932, 0.298255, 0.401406, 0.401406, 0.359304, 0.350883, 0.416142, 0.317201, 0.336147, 0.321411, 0.432983, 0.458245, 0.432983, 0.432983, 0.435088, 0.403511, 0.371934, 0.418247, 0.422458, 0.449824, 0.449824, 0.432983, 0.428773, 0.428773, 0.426668, 0.439299, 0.428773, 0.435088, 0.409827, 0.395091, 0.05827, 0.401406, 0.407722, 0.315096, 0.441404, 0.289834, 0.443509, 0.435088, 0.445614, 0.371934, 0.409827, 0.405616, 0.365619, 0.401406, 0.38246, 0.327727, 0.369829, 0.401406, 0.38667, 0.424563, 0.454035, 0.445614, 0.439299, 0.424563, 0.45614, 0.401406, 0.361409, 0.420352, 0.432983, 0.45614, 0.46456, 0.443509, 0.447719, 0.432983, 0.432983, 0.46035, 0.46035, 0.447719, 0.414037, 0.401406, 0.00985199, 0.340357, 0.357199, 0.310886, 0.414037, 0.380355, 0.38246, 0.37404, 0.432983, 0.403511, 0.38667, 0.409827, 0.369829, 0.369829, 0.29615, 0.390881, 0.230891, 0.323516, 0.369829, 0.418247, 0.420352, 0.441404, 0.418247, 0.416142, 0.424563, 0.395091, 0.350883, 0.401406, 0.418247, 0.422458, 0.432983, 0.416142, 0.430878, 0.414037, 0.401406, 0.407722, 0.409827, 0.380355, 0.403511, 0.405616, 0.0287982, 0.30878, 0.298255, 0.416142, 0.422458, 0.336147, 0.376145, 0.422458, 0.405616, 0.405616, 0.388775, 0.30036, 0.371934, 0.319306, 0.342463, 0.350883, 0.348778, 0.37404, 0.409827, 0.405616, 0.426668, 0.424563, 0.428773, 0.416142, 0.424563, 0.359304, 0.369829, 0.395091, 0.411932, 0.426668, 0.426668, 0.432983, 0.428773, 0.418247, 0.409827, 0.432983, 0.409827, 0.409827, 0.395091, 0.395091, 0.0351136, 0.245627, 0.327727, 0.424563, 0.376145, 0.323516, 0.376145, 0.38246, 0.411932, 0.395091, 0.38246, 0.38667, 0.376145, 0.369829, 0.355093, 0.418247, 0.395091, 0.416142, 0.416142, 0.420352, 0.407722, 0.432983, 0.422458, 0.401406, 0.424563, 0.390881, 0.363514, 0.371934, 0.411932, 0.416142, 0.432983, 0.424563, 0.437193, 0.416142, 0.411932, 0.401406, 0.401406, 0.403511, 0.390881, 0.365619, 0.00774686, 0.319306, 0.243521, 0.428773, 0.256152, 0.424563, 0.432983, 0.437193, 0.403511, 0.37825, 0.407722, 0.357199, 0.331937, 0.367724, 0.365619, 0.292, 0.292, 0.292, 0.292, 0.292, 0.292, 0.297747, 0.292, 0.292, 0.294873, 0.292, 0.292, 0.297747, 0.294873, 0.292, 0.292, 0.292, 0.292, 0.292, 0.292, 0.292, 0.174177, 0.266136, 0.260389, 0.217283, 0.257515, 0.26901, 0.309242, 0.314989, 0.294873, 0.292, 0.303494, 0.263262, 0.283378, 0.274757, 0.283378, 0.280505, 0.274757, 0.274757, 0.283378, 0.294873, 0.312116, 0.300621, 0.297747, 0.292, 0.277631, 0.294873, 0.306368, 0.300621, 0.292, 0.312116, 0.289126, 0.248894, 0.257515, 0.274757, 0.257515, 0.274757, 0.274757, 0.303494, 0.314989, 0.297747, 0.110955, 0.306368, 0.294873, 0.266136, 0.266136, 0.283378, 0.274757, 0.271883, 0.283378, 0.294873, 0.312116, 0.306368, 0.303494, 0.283378, 0.303494, 0.303494, 0.294873, 0.312116, 0.277631, 0.260389, 0.294873, 0.297747, 0.300621, 0.292, 0.309242, 0.303494, 0.294873, 0.297747, 0.283378, 0.312116, 0.297747, 0.294873, 0.263262, 0.289126, 0.294873, 0.289126, 0.300621, 0.280505, 0.312116, 0.303494, 0.108081, 0.309242, 0.294873, 0.286252, 0.289126, 0.263262, 0.260389, 0.251767, 0.266136, 0.266136, 0.309242, 0.300621, 0.309242, 0.303494, 0.297747, 0.312116, 0.283378, 0.306368, 0.294873, 0.286252, 0.294873, 0.297747, 0.309242, 0.297747, 0.312116, 0.312116, 0.289126, 0.314989, 0.292, 0.303494, 0.277631, 0.286252, 0.260389, 0.280505, 0.266136, 0.297747, 0.300621, 0.300621, 0.306368, 0.300621, 0.113828, 0.303494, 0.306368, 0.292, 0.292, 0.271883, 0.234525, 0.280505, 0.289126, 0.289126, 0.274757, 0.283378, 0.274757, 0.277631, 0.300621, 0.314989, 0.283378, 0.312116, 0.297747, 0.286252, 0.289126, 0.271883, 0.309242, 0.297747, 0.312116, 0.306368, 0.294873, 0.289126, 0.309242, 0.320737, 0.303494, 0.300621, 0.274757, 0.260389, 0.289126, 0.266136, 0.289126, 0.306368, 0.312116, 0.297747, 0.119576, 0.303494, 0.303494, 0.266136, 0.154061, 0.274757, 0.234525, 0.303494, 0.300621, 0.300621, 0.320737, 0.314989, 0.309242, 0.277631, 0.283378, 0.283378, 0.274757, 0.274757, 0.294873, 0.283378, 0.294873, 0.300621, 0.306368, 0.300621, 0.312116, 0.309242, 0.309242, 0.300621, 0.283378, 0.312116, 0.306368, 0.300621, 0.292, 0.274757, 0.266136, 0.274757, 0.294873, 0.297747, 0.312116, 0.303494, 0.12245, 0.314989, 0.165556, 0.211535, 0.191419, 0.225904, 0.26901, 0.309242, 0.303494, 0.294873, 0.314989, 0.314989, 0.309242, 0.312116, 0.309242, 0.314989, 0.274757, 0.303494, 0.294873, 0.283378, 0.300621, 0.292, 0.306368, 0.260389, 0.294873, 0.312116, 0.309242, 0.309242, 0.306368, 0.314989, 0.306368, 0.306368, 0.292, 0.277631, 0.26901, 0.274757, 0.289126, 0.300621, 0.312116, 0.312116, 0.125323, 0.309242, 0.179924, 0.300621, 0.208661, 0.234525, 0.283378, 0.312116, 0.303494, 0.306368, 0.320737, 0.300621, 0.303494, 0.309242, 0.314989, 0.814392, 0.814392, 0.814392, 0.814392, 0.775399, 0.825027, 0.814392, 0.814392, 0.839206, 0.775399, 0.814392, 0.814392, 0.814392, 0.814392, 0.814392, 0.814392, 0.814392, 0.814392, 0.814392, 0.839206, 0.814392, 0, 0.442184, 0.587522, 0.63715, 0.715137, 0.690323, 0.725771, 0.736406, 0.793123, 0.732861, 0.761219, 0.708047, 0.63715, 0.64424, 0.803758, 0.647784, 0.63715, 0.796668, 0.796668, 0.825027, 0.867565, 0.768309, 0.743495, 0.764764, 0.786033, 0.810847, 0.793123, 0.786033, 0.676143, 0.764764, 0.786033, 0.736406, 0.807302, 0.828571, 0.828571, 0.810847, 0.693867, 0.800213, 0.786033, 0.786033, 0.0168025, 0.364197, 0.725771, 0.796668, 0.708047, 0.729316, 0.793123, 0.743495, 0.683233, 0.736406, 0.690323, 0.732861, 0.768309, 0.810847, 0.743495, 0.821482, 0.690323, 0.693867, 0.583977, 0.64424, 0.810847, 0.686778, 0.828571, 0.796668, 0.793123, 0.757675, 0.768309, 0.810847, 0.775399, 0.743495, 0.743495, 0.750585, 0.786033, 0.793123, 0.828571, 0.817937, 0.768309, 0.764764, 0.796668, 0.75413, 0.0168025, 0.186955, 0.814392, 0.63715, 0.782489, 0.828571, 0.782489, 0.661964, 0.598157, 0.697412, 0.424459, 0.40319, 0.683233, 0.332294, 0.296845, 0.764764, 0.488267, 0.445728, 0.743495, 0.697412, 0.786033, 0.775399, 0.786033, 0.796668, 0.782489, 0.789578, 0.778944, 0.782489, 0.722226, 0.541439, 0.654874, 0.683233, 0.796668, 0.825027, 0.817937, 0.810847, 0.828571, 0.817937, 0.764764, 0.786033, 0, 0.261397, 0.846296, 0.541439, 0.541439, 0.789578, 0.764764, 0.690323, 0.548529, 0.619426, 0.52726, 0.541439, 0.771854, 0.817937, 0.669054, 0.552074, 0.396101, 0.697412, 0.619426, 0.722226, 0.796668, 0.768309, 0.796668, 0.793123, 0.796668, 0.821482, 0.846296, 0.793123, 0.793123, 0.669054, 0.63715, 0.651329, 0.825027, 0.846296, 0.821482, 0.817937, 0.810847, 0.814392, 0.796668, 0.775399, 0, 0.194045, 0.796668, 0.690323, 0.832116, 0.810847, 0.729316, 0.654874, 0.456363, 0.750585, 0.661964, 0.807302, 0.775399, 0.530805, 0.768309, 0.732861, 0.775399, 0.771854, 0.771854, 0.786033, 0.786033, 0.796668, 0.768309, 0.796668, 0.764764, 0.786033, 0.814392, 0.821482, 0.757675, 0.729316, 0.736406, 0.700957, 0.807302, 0.817937, 0.835661, 0.821482, 0.810847, 0.803758, 0.796668, 0.697412, 0, 0.275576, 0.775399, 0.775399, 0.828571, 0.693867, 0.732861, 0.814392, 0.743495, 0.725771, 0.743495, 0.612336, 0.757675, 0.817937, 0.75413, 0.768309, 0.786033, 0.796668, 0.757675, 0.768309, 0.771854, 0.810847, 0.786033, 0.828571, 0.832116, 0.768309, 0.821482, 0.786033, 0.764764, 0.732861, 0.73995, 0.803758, 0.789578, 0.821482, 0.803758, 0.807302, 0.817937, 0.793123, 0.817937, 0.786033, 0, 0.208224, 0.817937, 0.817937, 0.764764, 0.732861, 0.782489, 0.750585, 0.683233, 0.722226, 0.782489, 0.672598, 0.796668, 0.828571, 0.796668}; #endif
89.615886
96
0.58716
716e2e998b2c8f0e77d52b9f384b1dc113e4647c
11,818
c
C
entropy_monitor.c
mkgin/zabbix_available_entropy
bf0e98dc41be54572e9ce3fde59747578259c23e
[ "BSD-3-Clause" ]
null
null
null
entropy_monitor.c
mkgin/zabbix_available_entropy
bf0e98dc41be54572e9ce3fde59747578259c23e
[ "BSD-3-Clause" ]
null
null
null
entropy_monitor.c
mkgin/zabbix_available_entropy
bf0e98dc41be54572e9ce3fde59747578259c23e
[ "BSD-3-Clause" ]
null
null
null
/****** * * avail_entropy_mon.c * * * collect available entropy for a number of iterations * with an sleep interval in between each iteration. * * after the number of iterations * print maximum, minimum and average * to stdout in a zabbix-sender friendly format * send information to syslog local1 * * the math may be a bit sloppy * ... what if entropy is over 32768? Maybe cap it at maximum * ... what if one is using alot of iterations * just keeping it simple for now. * ***********/ #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <unistd.h> #include <linux/random.h> #include <fcntl.h> #include <syslog.h> #include <sys/stat.h> #define TRUE 1 #define FALSE 0 // eventually, these will be default values and set by options // measure once a second, log results about once a minute #define ITERATIONS_DEFAULT 60 // iterations to between outputting data #define ITERATIONS_TESTING 10 // for testing // iterations to between outputting data #define SLEEP_DEFAULT 1 // sleep interval between iterations in seconds // should get these from proc filesytem #define READ_WAKEUP_THRESHOLD 64 #define WRITE_WAKEUP_THRESHOLD 128 void show_help() { fprintf ( stderr, "Usage: entropy_monitor -dhltvz\n" "Collect and output information about available entropy in /dev/random\n\n" " -d debugging output to stderr\n" " -h show this help\n" " -l log to syslog\n" " -v verbose output to stderr\n" " -z output for suitable for zabbix_sender to stdout\n" ); } int main (int argc, char **argv) { // constants const char dev_random_file[] = "/dev/random"; // flags to set with getopt. int debug_flag = FALSE; int zabbix_flag = FALSE; int syslog_flag = FALSE; int verbose_flag = FALSE; int test_flag = FALSE; // test values // other variables with a defaults int samples_of_avail_ent = ITERATIONS_DEFAULT; int error_found = FALSE; int read_wakeup_threshold = 0; int write_wakeup_threshold = 0; // int avail_ent; int result; int dev_random_filehandle; struct stat dev_random_stat; // getopt while (( result = getopt (argc, argv, "dhltvz")) != -1) { switch (result) { case 'd': debug_flag = TRUE; break; case 'h': show_help(); return 0; break; case 'l': syslog_flag = TRUE; break; case 't': //testing values test_flag = TRUE; read_wakeup_threshold = 3400; write_wakeup_threshold = 4000; samples_of_avail_ent = ITERATIONS_TESTING; break; case 'v': verbose_flag = TRUE; break; case 'z': zabbix_flag = TRUE; break; default: show_help(); abort (); } } if ( debug_flag ) { fprintf (stderr, "DEBUG: " "debug_flag: %d syslog_flag: %d test_flag: %d verbose_flag: %d zabbix_flag: %d\n", debug_flag, syslog_flag, test_flag, verbose_flag, zabbix_flag); } // open files dev_random_filehandle = open ( dev_random_file , O_RDONLY, O_NONBLOCK); // get inode number stat( dev_random_file, &dev_random_stat ); if ( debug_flag ) fprintf(stderr, "DEBUG: %s I-node number: %ld\n",dev_random_file , (long) dev_random_stat.st_ino); if ( syslog_flag ) { openlog ("entropy_monitor", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1); } if ( verbose_flag ) fprintf (stderr, "Collecting available entropy from %s for %d iterations every %d seconds\n", dev_random_file, samples_of_avail_ent, SLEEP_DEFAULT); // TODO log start if (!test_flag) { // get read_wakeup_threshold read_wakeup_threshold = READ_WAKEUP_THRESHOLD; // get write_wakeup_threshold write_wakeup_threshold = WRITE_WAKEUP_THRESHOLD; } // Log threshold values // could send threshold values to zabbix to set the triggers. // loop ... until error, maybe check for sigint or something else later while (!error_found) { // loop 60 iterations (about 60 s) long avail_entropy_sum = 0; int avail_entropy_avg = 0; int avail_entropy_high = 0; int avail_entropy_low = 0; int i; int below_read_wakeup_threshold_count = 0; int below_write_wakeup_threshold_count = 0; int consecutive_below_read_wakeup_threshold_count = 0; int consecutive_below_write_wakeup_threshold_count = 0; int max_consecutive_below_read_wakeup_threshold_count = 0; int max_consecutive_below_write_wakeup_threshold_count = 0; int avail_ent_previous = -1; for ( i = 1; i <= samples_of_avail_ent; i++) { // test dev random that dev random is random and get avail entropy result = ioctl (dev_random_filehandle, RNDGETENTCNT, &avail_ent); if (result) { fprintf (stderr, "/dev/random result = %d\n", result); fprintf (stderr, "/dev/random is not a random device\n"); // the available entropy is not valid set to -1 avail_ent = -1; error_found = TRUE; break; } // on first iteration set high and low available entropy to the current value if ( i == 1 ) { avail_entropy_high = avail_ent; avail_entropy_low = avail_ent; } // check for and set highs and lows if ( avail_ent > avail_entropy_high ) avail_entropy_high = avail_ent; if ( avail_ent < avail_entropy_low ) avail_entropy_low = avail_ent; // collect the sum to calculate the average later on avail_entropy_sum = avail_entropy_sum + avail_ent; if ( debug_flag || verbose_flag ) fprintf(stderr, "/dev/random avail_ent = %d iters %d sum %ld\n", avail_ent, i, avail_entropy_sum); // check if entropy is lower than the thresholds and increment counters // and if it is not the first iteration check for consecutive low entropy and increment counters if ( avail_ent < below_write_wakeup_threshold_count ) { below_write_wakeup_threshold_count++; // read is always lower than write if ( avail_ent < below_read_wakeup_threshold_count ) { below_read_wakeup_threshold_count++; } // if we are below a threshold check which processes and users are using /dev/random // log them (maybe log every sample as in theory these shouldn't last long) fprintf (stdout, "- kernel.random.entropy_avail.log \"%s\"\n", "low avalable entropy log text here" ); } // calculate consecutive low entropy streaks // and check if it is the biggest if ( avail_ent_previous != -1 ) // don't do this if it is the first iteration { // check read wakeup threshold if ( ( avail_ent_previous < read_wakeup_threshold ) && ( avail_ent < read_wakeup_threshold )) { // in a streak ... if not zero add one before printing, as a streak means at least 2 consecutive measurements consecutive_below_read_wakeup_threshold_count++ ; if (consecutive_below_read_wakeup_threshold_count > max_consecutive_below_read_wakeup_threshold_count) { // this is the longest streak max_consecutive_below_read_wakeup_threshold_count = consecutive_below_read_wakeup_threshold_count; } } else { // we are no longer in a streak zero the counter consecutive_below_read_wakeup_threshold_count = 0; } // check write wakeup threshold if ( ( avail_ent_previous < write_wakeup_threshold ) && ( avail_ent < write_wakeup_threshold )) { // in a streak ... if not zero add one before printing, as a streak means at least 2 consecutive measurements consecutive_below_write_wakeup_threshold_count++ ; if (consecutive_below_write_wakeup_threshold_count > max_consecutive_below_write_wakeup_threshold_count) { // this is the longest streak max_consecutive_below_write_wakeup_threshold_count = consecutive_below_write_wakeup_threshold_count; } } else { // we are no longer in a streak zero the counter consecutive_below_write_wakeup_threshold_count = 0; } } // remember entropy previous for the next time around avail_ent_previous = avail_ent; sleep ( SLEEP_DEFAULT ); } // end iteration loop // account for first measurement ( if there is a streak) if ( max_consecutive_below_read_wakeup_threshold_count > 0 ) max_consecutive_below_read_wakeup_threshold_count++; if ( max_consecutive_below_write_wakeup_threshold_count > 0 ) max_consecutive_below_write_wakeup_threshold_count++; avail_entropy_avg = (long) avail_entropy_sum / (long) samples_of_avail_ent ; // notify times below read or write wakeup threshold // send to zabbix always if enabled...even if value is 0, can alert of the zast value is > 0 if ( zabbix_flag ) { fprintf (stdout, "- kernel.random.entropy_avail.maxsamplesbelow_read_wu_threshhold %d\n", max_consecutive_below_read_wakeup_threshold_count ); fprintf (stdout, "- kernel.random.entropy_avail.maxsamplesbelow_write_wu_threshhold %d\n", max_consecutive_below_write_wakeup_threshold_count ); } // other only send if below threshold if ( max_consecutive_below_read_wakeup_threshold_count > 0 ) { if ( syslog_flag ) { syslog ( LOG_WARNING, "entropy below read wakeup value %d for a maximum of %d consecutive measurements", read_wakeup_threshold, max_consecutive_below_read_wakeup_threshold_count ); } if ( debug_flag || verbose_flag ) { fprintf (stderr, "entropy below read wakeup value %d for a maximum of %d consecutive measurements\n", write_wakeup_threshold, max_consecutive_below_read_wakeup_threshold_count); } } if ( max_consecutive_below_write_wakeup_threshold_count > 0 ) { if ( syslog_flag ) { syslog ( LOG_WARNING, "entropy below write wakeup value %d for a maximum of %d consecutive measurements", write_wakeup_threshold, max_consecutive_below_write_wakeup_threshold_count ); } if ( debug_flag || verbose_flag ) { fprintf (stderr, "entropy below write wakeup value %d for a maximum of %d consecutive measurements\n", write_wakeup_threshold, max_consecutive_below_write_wakeup_threshold_count); } } // info ... avg, log, high if ( syslog_flag ) { syslog ( LOG_INFO , "avail.low %d high %d mean %d for last period of (%d) iterations", avail_entropy_low, avail_entropy_high, avail_entropy_avg, samples_of_avail_ent ); } if ( debug_flag || verbose_flag ) { fprintf ( stderr, "avail.low %d high %d mean %d for last period of (%d) iterations\n", avail_entropy_low, avail_entropy_high, avail_entropy_avg, samples_of_avail_ent ); } if ( zabbix_flag ) { // data to stdout for piping to be piped to zabbix_sender fprintf (stdout, "- kernel.random.entropy_avail.mean %d\n", avail_entropy_avg ); fprintf (stdout, "- kernel.random.entropy_avail.high %d\n", avail_entropy_high ); fprintf (stdout, "- kernel.random.entropy_avail.low %d\n", avail_entropy_low ); } // console output mode? // this is probably not necessary. fflush_unlocked(stdout); } // print this even if no NO_STDERR set fprintf (stderr, "exiting due to error\n"); // send a log message too! if ( syslog_flag ) { syslog ( LOG_ERR , "exiting due to error"); closelog (); } close (dev_random_filehandle); return 1; }
37.047022
171
0.663141
2914cf59c1f5d0515e044cb6e0906d4a0271e007
5,625
h
C
source/VideoCore.h
ymah/pios
1cbdfcc85150e58c97e6de9b9617e71f27b2e386
[ "MIT" ]
null
null
null
source/VideoCore.h
ymah/pios
1cbdfcc85150e58c97e6de9b9617e71f27b2e386
[ "MIT" ]
null
null
null
source/VideoCore.h
ymah/pios
1cbdfcc85150e58c97e6de9b9617e71f27b2e386
[ "MIT" ]
null
null
null
// // FrameBuffer.h // BakingPi // // Created by Jeremy Pereira on 27/09/2012. // Copyright (c) 2012 Jeremy Pereira. All rights reserved. // #ifndef BakingPi_VideoCore_h #define BakingPi_VideoCore_h /*! * @brief The VideoCore driver */ #include "bptypes.h" struct VCPostBox; typedef struct VCPostBox VCPostBox; enum { /*! * @brief Number of supported postbox channels for the CPU */ VC_POSTBOX_CHANNELS = 8, }; enum PostBoxChannel { VC_FRAME_BUFFER_CHANNEL = 1, }; /*! * @prief pixel formats for diffewrent colours. * * In all cases, pixels are stored RGBA with alpha in the least significant * position. */ enum VCPixelFormat { VCPF_ALPHA_16_BITS = 0, VCPF_RED_16_BITS = 5, VCPF_GREEN_16_BITS = 6, VCPF_BLUE_16_BITS = 5, VCPF_ALPHA_16_BIT_POS = 0, VCPF_BLUE_16_BIT_POS = VCPF_ALPHA_16_BITS, VCPF_GREEN_16_BIT_POS = VCPF_BLUE_16_BIT_POS + VCPF_BLUE_16_BITS, VCPF_RED_16_BIT_POS = VCPF_GREEN_16_BIT_POS + VCPF_GREEN_16_BITS, VCPF_RED_32_BITS = 8, VCPF_GREEN_32_BITS = 8, VCPF_BLUE_32_BITS = 8, VCPF_ALPHA_32_BITS = 8, VCPF_ALPHA_32_BIT_POS = 0, VCPF_BLUE_32_BIT_POS = VCPF_ALPHA_32_BIT_POS + VCPF_ALPHA_32_BITS, VCPF_GREEN_32_BIT_POS = VCPF_BLUE_32_BIT_POS + VCPF_BLUE_32_BITS, VCPF_RED_32_BIT_POS = VCPF_GREEN_32_BIT_POS + VCPF_GREEN_32_BITS, }; typedef enum PostBoxChannel PostBoxChannel; typedef enum FBChannel FBChannel; /*! * @brief Bit positions of various important bits within postbox messages. */ enum VCBits { /*! * @brief How many low order bits of a message will be used for the channel */ VC_CHANNEL_BITS = 4, /*! * @brief Required alignment for a pointer to the frame buffer descriptor */ VC_DESCRIPTOR_ALIGNMENT = 12, }; /*! * @brief Masks out the channel bits of a message leaving just the value */ #define VC_VALUE_MASK (0xFFFFFFFFFFFFFFFFl << VC_CHANNEL_BITS) /*! * @brief MAsks out the value bits of a message leaving just the channel */ #define VC_CHANNEL_MASK (~VC_VALUE_MASK) /*! * @brief Mask to align a pointer to be used as a frame buffer descriptor */ #define VC_DESCRIPTOR_ALIGNMENT_MASK \ ~((~(uintptr_t) 0) << VC_DESCRIPTOR_ALIGNMENT) /*! * @brief A descriptor for requesting a frame buffer */ struct VCFrameBufferDescriptor { /*! * @brief Width in pixels */ uint32_t width; /*! * @brief Height in pixels */ uint32_t height; /*! * @brief Don't know but set to same as width */ uint32_t vWidth; /*! * @brief Don't know but set to same as height. Might be the width of a * raster line. */ uint32_t vHeight; /*! * @brief width of a raster line in bytes (set by GPU) */ uint32_t pitch; /*! * @brief Number of bits per pixel */ uint32_t bitDepth; /*! * @brief x offset of top left corner of screen */ uint32_t x; /*! * @brief y offset of top left corner of screen */ uint32_t y; /*! * @brief pointer to frame buffer (set by GPU) */ void* frameBufferPtr; /*! * @brief frame buffer size calculated by GPU */ uint32_t frameBufferSize; }; typedef struct VCFrameBufferDescriptor VCFrameBufferDescriptor; #if defined PIOS_SIMULATOR /*! * @brief Allocate a post box structure * @return frame buffer postbox */ VCPostBox* vc_postBoxAlloc(); /*! * @brief Check if the postbax has been written. * * Gives us access to the message that was written. Also clears the write * status flag so the postbox can be written again. * @param postbox postbox to check * @param message reference to the location where the message will be put if * the postbox was written. If NULL, the message written will be discarded. * @return true if the post box was written. */ bool vc_postBoxWasWritten(VCPostBox* postbox, uintptr_t* messageRef); /*! * @brief Set up a postbox read if we can. * * If the last read was done, we set the read value and the status bit. * @param postbox Postbox to try this on. * @param channel Channel to set. * @param message Message to send. * @return true if the postbox read was available i.e. the previously set read * value has been read. */ bool vc_tryMakeRead(VCPostBox* postbox, uint32_t channel, uintptr_t message); #endif /*! * @brief Get the video core driver * @return The videocore driver */ FBDriver* vc_driver(); /*! * @brief Low level send to mailbox. * * This function works by spinning on a status flag until it can write the * message. * @param postbox the address of the mailbox * @param message the message to write. The low four bits must be zero. * @param channel the mail box channel - 0 to 7 at the moment * @return true if the parameters validate OK */ bool vc_send(VCPostBox* postbox, uintptr_t message, uint32_t channel); /*! * @brief Read the postbox for data from the specified channel. * * This function works by spinning on a status flag until it can read some * data. This means that, if the GPU is not expecting to need to send * something, this method will hang. Also, any messages prior to the first * one for the specified channel will be discarded. * @param postbox Address of the GPU postbox. * @param channel Channel to read from, must be in the range 0-7. * @return The data on the channel or ((uintptr_t)-1) if the parameters are * incorrect. * Valid channel data will always have the low four bits clear. */ uintptr_t vc_read(VCPostBox* postbox, uint32_t channel); #endif
25.452489
79
0.686578
ad7e9e59a4f2445f18dcf58c409434fee30e40f1
704
h
C
GBxGTK/Private/GBxLogWindow.h
WhoBrokeTheBuild/GBx
457a0753d79195d3761b071c695ede1417c0601c
[ "MIT" ]
1
2019-02-23T19:56:30.000Z
2019-02-23T19:56:30.000Z
GBxGTK/Private/GBxLogWindow.h
WhoBrokeTheBuild/GBx
457a0753d79195d3761b071c695ede1417c0601c
[ "MIT" ]
null
null
null
GBxGTK/Private/GBxLogWindow.h
WhoBrokeTheBuild/GBx
457a0753d79195d3761b071c695ede1417c0601c
[ "MIT" ]
null
null
null
#ifndef GBX_LOG_WINDOW_H #define GBX_LOG_WINDOW_H #include <GBx/GBx.h> #include <GBx/Log.h> #include <gtk/gtk.h> #include <stdbool.h> typedef struct _GBxLogWindow GBxLogWindow; G_DECLARE_FINAL_TYPE( GBxLogWindow, gbx_log_window, GBX, LOG_WINDOW, GtkWindow ) struct _GBxLogWindow { GtkWindow GtkParent; GtkScrolledWindow * GtkScrolledWindow; GtkTextView * GtkTextView; GtkTextBuffer * GtkTextBuffer; }; GtkWidget * gbx_log_window_new(); void gbx_log_window_destroy(GBxLogWindow * self); gboolean gbx_log_window_delete(GBxLogWindow * self); void gbx_log_window_add_entry(GBxLogWindow * self, clog_color_t color, const char * message); #endif // GBX_LOG_WINDOW_H
18.526316
93
0.764205
1fcd53bdf460bcdb8ffb1e82f052937710afe1c8
124
h
C
ClassMatalaEfiRecorsion/RecSum.h
Code-Nat/MatalaKita-23-12-2019
ed997a87de1258d27bac00767e104a7a357c4fc4
[ "MIT" ]
null
null
null
ClassMatalaEfiRecorsion/RecSum.h
Code-Nat/MatalaKita-23-12-2019
ed997a87de1258d27bac00767e104a7a357c4fc4
[ "MIT" ]
null
null
null
ClassMatalaEfiRecorsion/RecSum.h
Code-Nat/MatalaKita-23-12-2019
ed997a87de1258d27bac00767e104a7a357c4fc4
[ "MIT" ]
null
null
null
#pragma once int RecSum(int* arr, int size) { if (!size) return 0; return arr[size-1] + RecSum(arr, size - 1); }
15.5
45
0.58871
abb39a1fc5386c5769cac1b52aa82deeccf67409
547
c
C
cbits/qrng_extras.c
JakeOShannessy/hs-gsl-random
aedaa8149190af6ecb20e8c3e16417d8db8cb592
[ "BSD-3-Clause" ]
5
2015-04-23T21:58:59.000Z
2021-08-10T21:42:57.000Z
cbits/qrng_extras.c
JakeOShannessy/hs-gsl-random
aedaa8149190af6ecb20e8c3e16417d8db8cb592
[ "BSD-3-Clause" ]
2
2015-04-23T21:58:43.000Z
2017-03-10T20:16:14.000Z
cbits/qrng_extras.c
JakeOShannessy/hs-gsl-random
aedaa8149190af6ecb20e8c3e16417d8db8cb592
[ "BSD-3-Clause" ]
6
2015-11-13T02:21:11.000Z
2021-08-10T21:42:59.000Z
#include "gsl/gsl_qrng.h" unsigned int gsl_qrng_get_dimension(gsl_qrng* p_qrng) { return p_qrng->dimension; } unsigned int gsl_qrng_get_max_dimension(gsl_qrng_type* p_qrng_type) { return p_qrng_type->max_dimension; } const gsl_qrng_type* gsl_qrng_get_niederreiter_2() { return gsl_qrng_niederreiter_2; } const gsl_qrng_type* gsl_qrng_get_sobol() { return gsl_qrng_sobol; } const gsl_qrng_type* gsl_qrng_get_halton() { return gsl_qrng_halton; } const gsl_qrng_type* gsl_qrng_get_reversehalton() { return gsl_qrng_reversehalton; }
17.09375
67
0.800731
865cc3de42be6b1b33c50d7b0529d717d88d5c0b
1,703
h
C
Puzzle/Source/GameEngine/GameEngineMain.h
RyanLin11/htn-2021
7f37980424a7eec97cf6a4f312882d09857936a2
[ "MIT" ]
null
null
null
Puzzle/Source/GameEngine/GameEngineMain.h
RyanLin11/htn-2021
7f37980424a7eec97cf6a4f312882d09857936a2
[ "MIT" ]
null
null
null
Puzzle/Source/GameEngine/GameEngineMain.h
RyanLin11/htn-2021
7f37980424a7eec97cf6a4f312882d09857936a2
[ "MIT" ]
null
null
null
#pragma once #include <SFML/Graphics.hpp> #include <SFML/System/Clock.hpp> #include <vector> #include "Game/GameBoard.h" #include "GameEngine/EntitySystem/Components/RenderComponent.h" #include "GameEngine/EntitySystem/Entity.h" namespace GameEngine { class GameEngineMain { public: ~GameEngineMain(); static GameEngineMain *GetInstance() { if (!sm_instance) sm_instance = new GameEngineMain(); return sm_instance; } // Returns time between update frames in seconds static float GetTimeDelta() { return GetInstance()->m_lastDT; } static float GetGameTime() { return sm_gameClock.getElapsedTime().asSeconds(); } sf::RenderWindow *GetRenderWindow() const { return m_renderWindow; } void Update(); void SetRenderTarget(sf::RenderTarget *target) { m_renderTarget = target; } void AddEntity(Entity *entity); void RemoveEntity(Entity *entity); void OnInitialised(); bool IsGameOver() const { return m_gameBoard && m_gameBoard->IsGameOver(); } private: GameEngineMain(); void CreateAndSetUpWindow(); void AddPendingEntities(); void RemovePendingEntities(); void UpdateWindowEvents(); void UpdateEntities(); void RenderEntities(); static float WINDOW_HEIGHT; static float WINDOW_WIDTH; static GameEngineMain *sm_instance; static sf::Clock sm_deltaTimeClock; static sf::Clock sm_gameClock; std::vector<Entity *> m_entitiesToAdd; std::vector<Entity *> m_entities; std::vector<Entity *> m_entitiesToRemove; sf::RenderTarget *m_renderTarget; sf::RenderWindow *m_renderWindow; // In future they will be different Game::GameBoard *m_gameBoard; float m_lastDT; bool m_windowInitialised; }; } // namespace GameEngine
25.044118
78
0.741045
ab0cc817a425e91fdf0a62d3cd7eca1dda45b8f0
10,848
c
C
toolbar_demo.c
evanshort73/mousejump
545d66a01d6b7ed36ffdea01d93664a848b2bc00
[ "MIT" ]
1
2021-05-31T07:51:16.000Z
2021-05-31T07:51:16.000Z
toolbar_demo.c
evashort/mousejump
e61ab3b05ab52746126af4652ccbc6ec042ab0c8
[ "MIT" ]
null
null
null
toolbar_demo.c
evashort/mousejump
e61ab3b05ab52746126af4652ccbc6ec042ab0c8
[ "MIT" ]
null
null
null
// https://docs.microsoft.com/en-us/windows/win32/controls/common-control-versions #define _WIN32_IE 0x0600 #define UNICODE #include <math.h> #include <ShellScalingApi.h> #include <commctrl.h> #include <windows.h> #include <windowsx.h> #pragma comment(lib, "user32") #pragma comment(lib, "gdi32") #pragma comment(lib, "SHCore") #pragma comment(lib, "comctl32") // https://docs.microsoft.com/en-us/windows/win32/controls/cookbook-overview #pragma comment(linker, "\"/manifestdependency:type='win32' \ name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") typedef struct { HWND window; HWND dialog; double textBoxWidthPt; double textBoxHeightPt; } Model; Model model = { .textBoxWidthPt = 23.25, .textBoxHeightPt = 17.25, }; int ptToIntPx(double pt, UINT dpi) { return (int)round(pt * (double)dpi / 72); } LRESULT CALLBACK WndProc( HWND window, UINT message, WPARAM wParam, LPARAM lParam ) { if (message == WM_ACTIVATE) { if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) { if (IsWindowVisible(model.dialog)) { SetActiveWindow(model.dialog); } } return 0; } else if (message == WM_DESTROY) { PostQuitMessage(0); return 0; } else { return DefWindowProc(window, message, wParam, lParam); } } HMENU dropdownMenuOut = NULL; HMENU getDropdownMenu() { if (dropdownMenuOut) { return dropdownMenuOut; } return dropdownMenuOut = LoadMenu(GetModuleHandle(NULL), L"INITIAL_MENU"); } UINT systemFontIn; HFONT systemFontOut = NULL; HFONT getSystemFont(UINT dpi) { if (systemFontOut) { if (dpi == systemFontIn) { return systemFontOut; } DeleteObject(systemFontOut); } systemFontIn = dpi; NONCLIENTMETRICS metrics; metrics.cbSize = sizeof(metrics); SystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS, sizeof(metrics), &metrics, 0, dpi ); return systemFontOut = CreateFontIndirect(&metrics.lfMessageFont); } BOOL CALLBACK SetFontRedraw(HWND child, LPARAM font){ SendMessage(child, WM_SETFONT, font, TRUE); return TRUE; } LRESULT CALLBACK DlgProc( HWND dialog, UINT message, WPARAM wParam, LPARAM lParam ) { if (message == WM_INITDIALOG) { SendMessage(dialog, WM_DPICHANGED, 0, 0); return TRUE; } else if (message == WM_ACTIVATE) { // make MouseJump topmost only when the dialog is active if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) { // if the dialog is re-created while MouseJump is not in the // foreground, the dialog recieves WM_ACTIVATE without actually // being activated. we don't ever want MouseJump to be topmost // when it's not active, hence the GetForegroundWindow check. if (GetForegroundWindow() == dialog) { SetWindowPos( GetWindowOwner(dialog), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); } } else if (LOWORD(wParam) == WA_INACTIVE) { HWND window = GetWindowOwner(dialog); SetWindowPos( window, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); HWND newlyActive = GetForegroundWindow(); if ( newlyActive && !( GetWindowLong(newlyActive, GWL_EXSTYLE) & WS_EX_TOPMOST ) ) { HWND insertAfter = GetWindow(newlyActive, GW_HWNDNEXT); if (insertAfter) { SetWindowPos( window, insertAfter, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); } } } return TRUE; } else if (message == WM_SIZE) { RECT client; GetClientRect(dialog, &client); HWND toolbar = GetDlgItem(dialog, 12345); RECT buttonRect; SendMessage(toolbar, TB_GETRECT, 1234, (LPARAM)&buttonRect); HWND textBox = GetDlgItem(dialog, 123456); RECT textBoxRect; GetWindowRect(textBox, &textBoxRect); int textBoxHeight = textBoxRect.bottom - textBoxRect.top; int controlTop = (client.bottom - textBoxHeight) / 2; SetWindowPos( textBox, NULL, 0, controlTop, client.right - buttonRect.right + buttonRect.left, textBoxHeight, SWP_NOZORDER | SWP_NOACTIVATE ); RECT toolbarFrame; GetWindowRect(toolbar, &toolbarFrame); ScreenToClient(dialog, (LPPOINT)&toolbarFrame.left); ScreenToClient(dialog, (LPPOINT)&toolbarFrame.right); POINT offset = { buttonRect.right, buttonRect.top }; MapWindowPoints(toolbar, dialog, &offset, 1); SetWindowPos( toolbar, NULL, toolbarFrame.left + client.right - offset.x, toolbarFrame.top + controlTop - offset.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); return 0; } else if (message == WM_GETMINMAXINFO) { HWND toolbar = GetDlgItem(dialog, 12345); UINT dpi = GetDpiForWindow(dialog); int textBoxWidthPx = ptToIntPx(model.textBoxWidthPt, dpi); RECT buttonRect; SendMessage(toolbar, TB_GETRECT, 1234, (LPARAM)&buttonRect); RECT textBoxRect; GetWindowRect(GetDlgItem(dialog, 123456), &textBoxRect); SIZE minSize = { .cx = textBoxWidthPx + buttonRect.right - buttonRect.left, .cy = textBoxRect.bottom - textBoxRect.top, }; LPMINMAXINFO minMaxInfo = (LPMINMAXINFO)lParam; RECT client, frame; GetClientRect(dialog, &client); GetWindowRect(dialog, &frame); minMaxInfo->ptMinTrackSize.x = frame.right + minSize.cx - client.right - frame.left; minMaxInfo->ptMinTrackSize.y = minSize.cy = frame.bottom + minSize.cy - client.bottom - frame.top; return 0; } else if (message == WM_DPICHANGED) { HWND toolbar = GetDlgItem(dialog, 12345); if (toolbar != NULL) { DestroyWindow(toolbar); } // https://docs.microsoft.com/en-us/windows/win32/controls/create-toolbars toolbar = CreateWindow( TOOLBARCLASSNAME, NULL, WS_VISIBLE | WS_CHILD | WS_TABSTOP | TBSTYLE_LIST, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, dialog, (HMENU)12345, GetWindowInstance(dialog), 0 ); SendMessage(toolbar, TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_DRAWDDARROWS); SendMessage(toolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(0, 0)); TBBUTTON button = { .iBitmap = 0, .idCommand = 1234, .fsState = TBSTATE_ENABLED, .fsStyle = BTNS_WHOLEDROPDOWN | BTNS_AUTOSIZE, .bReserved = { 0 }, .dwData = 0, .iString = -1, }; SendMessage(toolbar, TB_BUTTONSTRUCTSIZE, sizeof(button), 0); SendMessage(toolbar, TB_ADDBUTTONS, 1, (LPARAM)&button); UINT dpi = GetDpiForWindow(dialog); int textBoxHeightPx = ptToIntPx(model.textBoxHeightPt, dpi); SendMessage( toolbar, TB_SETPADDING, 0, MAKELPARAM(1, textBoxHeightPx) ); // this can be any arbitrary number SendMessage(toolbar, TB_SETBUTTONWIDTH, 0, MAKELPARAM(10, 10)); SendMessage(toolbar, TB_AUTOSIZE, 0, 0); HWND textBox = GetDlgItem(dialog, 123456); RECT textBoxRect; GetWindowRect(textBox, &textBoxRect); SetWindowPos( textBox, NULL, 0, 0, textBoxRect.right - textBoxRect.left, textBoxHeightPx, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); //EnumChildWindows(dialog, SetFontRedraw, (WPARAM)getSystemFont(dpi)); RECT frame; GetWindowRect(dialog, &frame); SetWindowPos( dialog, NULL, 0, 0, frame.right - frame.left, frame.bottom - frame.top, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); return 0; } else if ( message == WM_NOTIFY && ((LPNMHDR)lParam)->code == TBN_DROPDOWN ) { // https://docs.microsoft.com/en-us/windows/win32/controls/handle-drop-down-buttons LPNMTOOLBAR toolbarMessage = (LPNMTOOLBAR)lParam; RECT buttonRect; SendMessage( toolbarMessage->hdr.hwndFrom, TB_GETRECT, (WPARAM)toolbarMessage->iItem, (LPARAM)&buttonRect ); MapWindowPoints( toolbarMessage->hdr.hwndFrom, HWND_DESKTOP, (LPPOINT)&buttonRect, 2 ); buttonRect.bottom--; // unexplained off-by-one TPMPARAMS popupParams; popupParams.cbSize = sizeof(popupParams); popupParams.rcExclude = buttonRect; TrackPopupMenuEx( GetSubMenu(getDropdownMenu(), 0), TPM_VERTICAL | TPM_LEFTBUTTON | TPM_RIGHTALIGN, buttonRect.right, buttonRect.top, dialog, &popupParams ); return TRUE; }else if (message == WM_CLOSE) { PostQuitMessage(0); return TRUE; } else { return FALSE; } } int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); WNDCLASS windowClass = { .style = CS_HREDRAW | CS_VREDRAW, .lpfnWndProc = WndProc, .hInstance = hInstance, .hCursor = LoadCursor(0, IDC_ARROW), .hbrBackground = GetStockObject(WHITE_BRUSH), .lpszClassName = L"windowClass", }; RegisterClass(&windowClass); model.window = CreateWindow( L"windowClass", L"main window", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL ); model.dialog = CreateDialog(hInstance, L"TOOL", model.window, DlgProc); ShowWindow(model.window, SW_SHOWNORMAL); MSG message; while (GetMessage(&message, NULL, 0, 0)) { // https://devblogs.microsoft.com/oldnewthing/20120416-00/?p=7853 if (!IsDialogMessage(model.dialog, &message)) { TranslateMessage(&message); DispatchMessage(&message); } } if (systemFontOut != NULL) { DeleteFont(systemFontOut); } if (dropdownMenuOut) { DestroyMenu(dropdownMenuOut); } return 0; }
34.658147
91
0.601954
05da162bfe40d9f1efaa13eb00ea9e9e671cbeff
6,830
c
C
src/C/gnupg/gnupg-2.0.25/common/t-sexputil.c
GaloisInc/hacrypto
5c99d7ac73360e9b05452ac9380c1c7dc6784849
[ "BSD-3-Clause" ]
34
2015-02-04T18:03:14.000Z
2020-11-10T06:45:28.000Z
src/C/gnupg/gnupg-2.0.25/common/t-sexputil.c
GaloisInc/hacrypto
5c99d7ac73360e9b05452ac9380c1c7dc6784849
[ "BSD-3-Clause" ]
5
2015-06-30T21:17:00.000Z
2016-06-14T22:31:51.000Z
src/C/gnupg/gnupg-2.0.25/common/t-sexputil.c
GaloisInc/hacrypto
5c99d7ac73360e9b05452ac9380c1c7dc6784849
[ "BSD-3-Clause" ]
15
2015-10-29T14:21:58.000Z
2022-01-19T07:33:14.000Z
/* t-sexputil.c - Module test for sexputil.c * Copyright (C) 2007 Free Software Foundation, Inc. * * This file is part of GnuPG. * * GnuPG 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. * * GnuPG 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 <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stdlib.h> #include "util.h" #define pass() do { ; } while(0) #define fail(a) do { fprintf (stderr, "%s:%d: test %d failed\n",\ __FILE__,__LINE__, (a)); \ exit (1); \ } while(0) static void test_hash_algo_from_sigval (void) { int algo; /* A real world example. */ unsigned char example1_rsa_sha1[] = ("\x28\x37\x3A\x73\x69\x67\x2D\x76\x61\x6C\x28\x33\x3A\x72\x73\x61" "\x28\x31\x3A\x73\x31\x32\x38\x3A\x17\xD2\xE9\x5F\xB4\x24\xD4\x1E" "\x8C\xEE\x94\xDA\x41\x42\x1F\x26\x5E\xF4\x6D\xEC\x5B\xBD\x5B\x89" "\x7A\x69\x11\x43\xE9\xD2\x23\x21\x25\x64\xA6\xB0\x56\xEF\xB4\xE9" "\x06\xB2\x44\xF6\x80\x1E\xFF\x41\x23\xEB\xC9\xFA\xFD\x09\xBF\x9C" "\x8E\xCF\x7F\xC3\x7F\x3A\x40\x48\x89\xDC\xBA\xB7\xDB\x9E\xF1\xBA" "\x7C\x08\xEA\x74\x1D\x49\xE7\x65\xEF\x67\x79\xBC\x23\xD9\x49\xCD" "\x05\x99\xD3\xD8\xB7\x7B\xC7\x0E\xF2\xB3\x01\x48\x0F\xC8\xEB\x05" "\x7B\xFB\x61\xCC\x41\x04\x74\x6D\x33\x84\xB1\xE6\x6A\xD8\x0F\xBC" "\x27\xAC\x43\x45\xFA\x04\xD1\x22\x29\x29\x28\x34\x3A\x68\x61\x73" "\x68\x34\x3A\x73\x68\x61\x31\x29\x29"); /* The same but without the hash algo. */ unsigned char example1_rsa[] = ("\x28\x37\x3A\x73\x69\x67\x2D\x76\x61\x6C\x28\x33\x3A\x72\x73\x61" "\x28\x31\x3A\x73\x31\x32\x38\x3A\x17\xD2\xE9\x5F\xB4\x24\xD4\x1E" "\x8C\xEE\x94\xDA\x41\x42\x1F\x26\x5E\xF4\x6D\xEC\x5B\xBD\x5B\x89" "\x7A\x69\x11\x43\xE9\xD2\x23\x21\x25\x64\xA6\xB0\x56\xEF\xB4\xE9" "\x06\xB2\x44\xF6\x80\x1E\xFF\x41\x23\xEB\xC9\xFA\xFD\x09\xBF\x9C" "\x8E\xCF\x7F\xC3\x7F\x3A\x40\x48\x89\xDC\xBA\xB7\xDB\x9E\xF1\xBA" "\x7C\x08\xEA\x74\x1D\x49\xE7\x65\xEF\x67\x79\xBC\x23\xD9\x49\xCD" "\x05\x99\xD3\xD8\xB7\x7B\xC7\x0E\xF2\xB3\x01\x48\x0F\xC8\xEB\x05" "\x7B\xFB\x61\xCC\x41\x04\x74\x6D\x33\x84\xB1\xE6\x6A\xD8\x0F\xBC" "\x27\xAC\x43\x45\xFA\x04\xD1\x22\x29\x29\x29"); algo = hash_algo_from_sigval (example1_rsa_sha1); if (algo != GCRY_MD_SHA1) fail (0); algo = hash_algo_from_sigval (example1_rsa); if (algo) fail (0); } static void test_make_canon_sexp_from_rsa_pk (void) { struct { unsigned char *m; size_t mlen; unsigned char *e; size_t elen; unsigned char *result; size_t resultlen; gpg_err_code_t reverr; /* Expected error from the reverse fucntion. */ } tests[] = { { "\x82\xB4\x12\x48\x08\x48\xC0\x76\xAA\x8E\xF1\xF8\x7F\x5E\x9B\x89" "\xA9\x62\x92\xA2\x16\x1B\xF5\x9F\xE1\x41\xF3\xF0\x42\xB5\x5C\x46" "\xB8\x83\x9F\x39\x97\x73\xFF\xC5\xB2\xF4\x59\x5F\xBA\xC7\x0E\x03" "\x9D\x27\xC0\x86\x37\x31\x46\xE0\xA1\xFE\xA1\x41\xD4\xE3\xE9\xB3" "\x9B\xD5\x84\x65\xA5\x37\x35\x34\x07\x58\xB6\xBA\x21\xCA\x21\x72" "\x4C\xF3\xFC\x91\x47\xD1\x3C\x1D\xA5\x9C\x38\x4D\x58\x39\x92\x16" "\xB1\xE5\x43\xFE\xB5\x46\x4B\x43\xD1\x47\xB0\xE8\x2A\xDB\xF8\x34" "\xB0\x5A\x22\x3D\x14\xBB\xEA\x63\x65\xA7\xF1\xF2\xF8\x97\x74\xA7", 128, "\x40\x00\x00\x81", 4, "\x28\x31\x30\x3a\x70\x75\x62\x6c\x69\x63\x2d\x6b\x65\x79\x28\x33" "\x3a\x72\x73\x61\x28\x31\x3a\x6e\x31\x32\x39\x3a\x00\x82\xb4\x12" "\x48\x08\x48\xc0\x76\xaa\x8e\xf1\xf8\x7f\x5e\x9b\x89\xa9\x62\x92" "\xa2\x16\x1b\xf5\x9f\xe1\x41\xf3\xf0\x42\xb5\x5c\x46\xb8\x83\x9f" "\x39\x97\x73\xff\xc5\xb2\xf4\x59\x5f\xba\xc7\x0e\x03\x9d\x27\xc0" "\x86\x37\x31\x46\xe0\xa1\xfe\xa1\x41\xd4\xe3\xe9\xb3\x9b\xd5\x84" "\x65\xa5\x37\x35\x34\x07\x58\xb6\xba\x21\xca\x21\x72\x4c\xf3\xfc" "\x91\x47\xd1\x3c\x1d\xa5\x9c\x38\x4d\x58\x39\x92\x16\xb1\xe5\x43" "\xfe\xb5\x46\x4b\x43\xd1\x47\xb0\xe8\x2a\xdb\xf8\x34\xb0\x5a\x22" "\x3d\x14\xbb\xea\x63\x65\xa7\xf1\xf2\xf8\x97\x74\xa7\x29\x28\x31" "\x3a\x65\x34\x3a\x40\x00\x00\x81\x29\x29\x29", 171 }, { "\x63\xB4\x12\x48\x08\x48\xC0\x76\xAA\x8E\xF1\xF8\x7F\x5E\x9B\x89", 16, "\x03", 1, "\x28\x31\x30\x3a\x70\x75\x62\x6c\x69\x63\x2d\x6b\x65\x79\x28\x33" "\x3a\x72\x73\x61\x28\x31\x3a\x6e\x31\x36\x3a\x63\xb4\x12\x48\x08" "\x48\xc0\x76\xaa\x8e\xf1\xf8\x7f\x5e\x9b\x89\x29\x28\x31\x3a\x65" "\x31\x3a\x03\x29\x29\x29", 54, }, { "", 0, "", 0, "\x28\x31\x30\x3a\x70\x75\x62\x6c\x69\x63\x2d\x6b\x65\x79\x28\x33" "\x3a\x72\x73\x61\x28\x31\x3a\x6e\x31\x3a\x00\x29\x28\x31\x3a\x65" "\x31\x3a\x00\x29\x29\x29", 38, GPG_ERR_BAD_PUBKEY }, { NULL } }; int idx; gpg_error_t err; unsigned char *sexp; size_t length; const unsigned char *rsa_n, *rsa_e; size_t rsa_n_len, rsa_e_len; for (idx=0; tests[idx].m; idx++) { sexp = make_canon_sexp_from_rsa_pk (tests[idx].m, tests[idx].mlen, tests[idx].e, tests[idx].elen, &length); if (!sexp) { fprintf (stderr, "%s:%d: out of core\n", __FILE__, __LINE__); exit (1); } if (length != tests[idx].resultlen) fail (idx); if (memcmp (sexp, tests[idx].result, tests[idx].resultlen)) fail (idx); /* Test the reverse function. */ err = get_rsa_pk_from_canon_sexp (sexp, length, &rsa_n, &rsa_n_len, &rsa_e, &rsa_e_len); if (gpg_err_code (err) != tests[idx].reverr) fail (idx); if (!err) { if (tests[idx].mlen != rsa_n_len) fail (idx); if (memcmp (tests[idx].m, rsa_n, rsa_n_len)) fail (idx); if (tests[idx].elen != rsa_e_len) fail (idx); if (memcmp (tests[idx].e, rsa_e, rsa_e_len)) fail (idx); } xfree (sexp); } } int main (int argc, char **argv) { (void)argc; (void)argv; test_hash_algo_from_sigval (); test_make_canon_sexp_from_rsa_pk (); return 0; }
35.388601
76
0.601903
06b2a9f8a62ebc0316d4edc29a2604454d2ae3d7
300
h
C
PortfolioRebalancing/PortfolioRebalancing/Utilities/PortfolioUtility.h
dynamite8/PortfolioRebalancing
1299aa477f9b1da733ee6f628a61269538cab278
[ "MIT" ]
null
null
null
PortfolioRebalancing/PortfolioRebalancing/Utilities/PortfolioUtility.h
dynamite8/PortfolioRebalancing
1299aa477f9b1da733ee6f628a61269538cab278
[ "MIT" ]
null
null
null
PortfolioRebalancing/PortfolioRebalancing/Utilities/PortfolioUtility.h
dynamite8/PortfolioRebalancing
1299aa477f9b1da733ee6f628a61269538cab278
[ "MIT" ]
null
null
null
// // PortfolioUtility.h // PortfolioRebalancing // // Created by Jenny Chang Ho on 2015-10-24. // Copyright © 2015 TTGS. All rights reserved. // #import <Foundation/Foundation.h> @interface PortfolioUtility : NSObject + (NSDictionary *)getResponseFromJSONFileName:(NSString *)filename; @end
18.75
67
0.733333
614c0cb1f5fb1decb728749661f16d5439402dde
1,811
h
C
RotEncs.h
sonarthreader/led_matrix_v2
c68d7f1745b3b29c35acb56bb65d6083c7852e63
[ "Apache-2.0" ]
1
2022-02-25T06:13:14.000Z
2022-02-25T06:13:14.000Z
RotEncs.h
sonarthreader/led_matrix_v2
c68d7f1745b3b29c35acb56bb65d6083c7852e63
[ "Apache-2.0" ]
null
null
null
RotEncs.h
sonarthreader/led_matrix_v2
c68d7f1745b3b29c35acb56bb65d6083c7852e63
[ "Apache-2.0" ]
null
null
null
// interrupt handling void IRAM_ATTR buttonPressed0() { // BUTTON0 if (millis() - prevMillis > debounceTime) { mode = (mode + 1) % maxmode; prevMillis = millis(); Serial.print("Mode : "); Serial.println(mode); } } void IRAM_ATTR buttonPressed1() { // BUTTON1 if (millis() - prevMillis > debounceTime) { pattern = (pattern + 1) % maxpatterns; prevMillis = millis(); Serial.print("Pattern : "); Serial.println(pattern); } } void IRAM_ATTR turnedKnob0() { if (millis() - prevMillis > debounceTime) { prevMillis = millis(); // ROTATION DIRECTION if (digitalRead(ROTENC_0_DT) == HIGH) { // If Pin B is HIGH if (brightness < 8) { brightness += 1; } } else { if (brightness > 0) { brightness -=1; } } Serial.print("Brightness : "); Serial.println(brightness); } } void IRAM_ATTR turnedKnob1() { if (millis() - prevMillis > debounceTime) { prevMillis = millis(); // ROTATION DIRECTION if (digitalRead(ROTENC_1_DT) == HIGH) { // If Pin B is HIGH if (gain < 20) { gain += 1; } } else { if (gain > 0) { gain -=1; } } Serial.print("Mic Gain : "); Serial.println(gain); } } void setupRotEncs() { pinMode(ROTENC_0_SW, INPUT); pinMode(ROTENC_0_CLK, INPUT); pinMode(ROTENC_0_DT, INPUT); pinMode(ROTENC_1_SW, INPUT); pinMode(ROTENC_1_CLK, INPUT); pinMode(ROTENC_1_DT, INPUT); attachInterrupt(digitalPinToInterrupt(ROTENC_0_SW), buttonPressed0, RISING); attachInterrupt(digitalPinToInterrupt(ROTENC_1_SW), buttonPressed1, RISING); attachInterrupt(digitalPinToInterrupt(ROTENC_0_CLK), turnedKnob0, FALLING); attachInterrupt(digitalPinToInterrupt(ROTENC_1_CLK), turnedKnob1, FALLING); }
26.246377
78
0.621204
b22f4cd59324cf543db62859333c4a0eed2b6a8e
1,054
h
C
.RemoteTalk/Plugin/RemoteTalkVOICEROID/rtvr2TalkInterface.h
i-saint/RemoteTalk
3ac2528ab66ed923cb9c56596944effdeaecee50
[ "MIT" ]
36
2018-12-18T22:33:36.000Z
2021-10-31T07:03:15.000Z
.RemoteTalk/Plugin/RemoteTalkVOICEROID/rtvr2TalkInterface.h
i-saint/RemoteTalk
3ac2528ab66ed923cb9c56596944effdeaecee50
[ "MIT" ]
1
2020-04-04T16:13:43.000Z
2020-04-05T05:08:17.000Z
.RemoteTalk/Plugin/RemoteTalkVOICEROID/rtvr2TalkInterface.h
i-saint/RemoteTalk
3ac2528ab66ed923cb9c56596944effdeaecee50
[ "MIT" ]
3
2019-04-12T17:37:23.000Z
2020-09-30T15:50:31.000Z
#pragma once namespace rtvr2 { class TalkInterface : public ITalkInterface { public: rtDefSingleton(TalkInterface); TalkInterface(); ~TalkInterface() override; void release() override; const char* getClientName() const override; int getPluginVersion() const override; int getProtocolVersion() const override; bool getParams(rt::TalkParams& params) const override; bool setParams(const rt::TalkParams& params) override; int getNumCasts() const override; const rt::CastInfo* getCastInfo(int i) const override; bool setText(const char *text) override; bool isReady() const override; bool isPlaying() const override; bool play() override; bool stop() override; bool setCast(int v) override; bool isMainWindowVisible() override; bool prepareUI() override; void onPlay() override; void onStop() override; #ifdef rtDebug bool onDebug() override; #endif private: mutable rt::CastList m_casts; std::atomic_bool m_is_playing{ false }; }; } // namespace rtvr2
23.954545
58
0.705882
95f778ae92b248da2167cac80d515eeb8494ea2c
666
c
C
tests/bool/bool.c
RoelVdP/Angora
4e7f1fd07299b1f379bed2a35352ff02667df1f9
[ "Apache-2.0" ]
792
2018-03-19T08:39:08.000Z
2022-03-31T12:13:32.000Z
tests/bool/bool.c
RoelVdP/Angora
4e7f1fd07299b1f379bed2a35352ff02667df1f9
[ "Apache-2.0" ]
85
2018-07-12T10:16:49.000Z
2022-03-22T11:58:47.000Z
tests/bool/bool.c
RoelVdP/Angora
4e7f1fd07299b1f379bed2a35352ff02667df1f9
[ "Apache-2.0" ]
154
2018-03-19T12:21:54.000Z
2022-03-31T11:48:34.000Z
/* Test: check boolean */ #include "stdint.h" #include "stdio.h" #include "stdlib.h" #include "string.h" int __attribute__((noinline)) bar(int32_t y) { // may be unsolvable return y + y * y * 3 == 75; } int main(int argc, char **argv) { if (argc < 2) return 0; FILE *fp; char buf[255]; size_t ret; fp = fopen(argv[1], "rb"); if (!fp) { printf("st err\n"); return 0; } int len = 10; ret = fread(buf, sizeof *buf, len, fp); fclose(fp); if (ret < len) { printf("input fail \n"); return 0; } int32_t x = 0; memcpy(&x, buf + 1, 4); // x 0 - 1 if (bar(x) == 0) { printf("haha\n"); } return 0; }
13.591837
46
0.528529
c76af6f8f19965a525fb4670afa12f5533d96018
6,192
h
C
src/config/const.h
core-sxl/sxl
e4d8ded3cb3b6af05b7c751265eb13fb441e5f20
[ "Apache-2.0", "MIT" ]
1
2021-06-04T14:53:25.000Z
2021-06-04T14:53:25.000Z
src/config/const.h
core-sxl/sxl
e4d8ded3cb3b6af05b7c751265eb13fb441e5f20
[ "Apache-2.0", "MIT" ]
null
null
null
src/config/const.h
core-sxl/sxl
e4d8ded3cb3b6af05b7c751265eb13fb441e5f20
[ "Apache-2.0", "MIT" ]
null
null
null
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2017-2019 The SXL Developers // Copyright (c) 2020 The IDeer Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef CONFIG_CONST_H #define CONFIG_CONST_H #include <string> #include <unordered_map> using namespace std; namespace SYMB { static const string SXL = "SXL"; } struct CoinUnitTypeHash { size_t operator()(const string &unit) const noexcept { return std::hash<string>{}(unit); } }; namespace COIN_UNIT { static const string SASX = "sasx"; static const string QUSX = "qusx"; static const string MUSX = "musx"; static const string HUSX = "husx"; static const string SISX = "sisx"; static const string MISX = "misx"; static const string LESX = "lesx"; static const string FESX = "fesx"; static const string SX = "sx"; static const string KSX = "ksx"; static const string MSX = "msx"; } // namespace COIN_UNIT static const unordered_map<string, uint64_t, CoinUnitTypeHash> CoinUnitTypeTable{ {"sasx", 1}, // 0.00000001 {"qusx", 10}, // 0.0000001 {"musx", 100}, // 0.000001 {"husx", 1000}, // 0.00001 {"sisx", 10000}, // 0.0001 {"misx", 100000}, // 0.001 {"lesx", 1000000}, // 0.01 {"fesx", 10000000}, // 0.1 {"sx", 100000000}, // 1 {"ksx", 100000000000}, // 1000 {"msx", 100000000000000}, // 1000,000 }; static const uint64_t COIN = 100000000; // 10^8 = 1 SXL static const uint64_t CENT = 1000000; // 10^6 = 0.01 SXL static const uint32_t MAX_ASSET_NAME_LEN = 32; static const uint32_t MIN_ASSET_SYMBOL_LEN = 3; static const uint32_t MAX_ASSET_SYMBOL_LEN = 7; static const uint64_t MAX_ASSET_TOTAL_SUPPLY = 90000000000 * COIN; // 90 billion /** the total blocks of burn fee need */ static const uint32_t DEFAULT_BURN_BLOCK_SIZE = 50; static const uint64_t MAX_BLOCK_RUN_STEP = 12000000; static const int64_t INIT_FUEL_RATES = 100; // 100 unit / 100 step static const int64_t MIN_FUEL_RATES = 1; // 1 unit / 100 step /** The maximum allowed size for a serialized block, in bytes (network rule) */ static const uint32_t MAX_BLOCK_SIZE = 5000000; /** The maximum allowed tx count in the block */ static const uint32_t MAX_TX_COUNT = 50000; /** Default for -blockmaxsize which control the range of sizes the mining code vlll create **/ static const uint32_t DEFAULT_BLOCK_MAX_SIZE = 4750000; /** The maximum size for transactions we're willling to relay/mine */ static const uint32_t MAX_STANDARD_TX_SIZE = 1000; /** The maximum number of orphan blocks kept in memory */ static const uint32_t MAX_ORPHAN_BLOCKS = 750; /** Number of blocks that can be requested at any given time from a single peer. */ static const int32_t MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128; /** Timeout in seconds before considering a block download peer unresponsive. */ static const uint32_t BLOCK_DOWNLOAD_TIMEOUT = 60; /** Minimum disk space required */ static const uint64_t MIN_DISK_SPACE = 52428800; /** The maximum size of a blk?????.dat file (since 0.8) */ static const uint32_t MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB /** The pre-allocation chunk size for blk?????.dat files (since 0.8) */ static const uint32_t BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB /** The pre-allocation chunk size for rev?????.dat files (since 0.8) */ static const uint32_t UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB /** -dbcache default (MiB) */ static const int64_t DEFAULT_DB_CACHE = 100; /** max. -dbcache in (MiB) */ static const int64_t MAX_DB_CACHE = sizeof(void *) > 4 ? 4096 : 1024; /** min. -dbcache in (MiB) */ static const int64_t MIN_DB_CACHE = 4; /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ static const int32_t BLOCK_REWARD_MATURITY = 100; /** RegId's mature period measured by blocks */ static const int32_t REG_ID_MATURITY = 100; static const uint32_t MAX_RECENT_BLOCK_COUNT = 10000; // most recent block number limit static const uint32_t MAX_RPC_SIG_STR_LEN = 65 * 1024; // 65 KB max length of raw string to be signed via rpc call static const uint32_t MAX_SIGNATURE_SIZE = 100; // 100 B max size of tx or block signature static const uint32_t MAX_CONTRACT_CODE_SIZE = 65536; // 64 KB max for contract script size static const uint32_t MAX_CONTRACT_ARGUMENT_SIZE = 4096; // 4 KB max for contract argument size static const uint32_t MAX_COMMON_TX_MEMO_SIZE = 100; // 100 B max for memo size static const uint32_t MAX_CONTRACT_MEMO_SIZE = 100; // 100 B max for memo size static const uint32_t MAX_CONTRACT_KEY_SIZE = 512; // 512 B max for contract key size static const uint32_t MAX_MULSIG_NUMBER = 15; // m-n multisig, refer to n static const uint32_t MAX_MULSIG_SCRIPT_SIZE = 1000; // multisig script max size static const uint32_t MAX_TRANSFER_SIZE = 100; // maximun transfer pair size static const uint32_t MAX_RECORD_DOMAIN_SIZE = 10; // 10 B max for record domain size static const uint32_t MAX_RECORD_KEY_SIZE = 36; // 36 B max for record key size static const uint32_t MAX_RECORD_VALUE_SIZE = 2 * 1024; // 2 KB max for record key size static const string LUA_CONTRACT_LOCATION_PREFIX = "/tmp/lua/"; // prefix of lua contract file location static const string LUA_CONTRACT_HEADLINE = "mylib = require"; static const uint64_t INITIAL_BASE_COIN_SUPPLY = 12000000; // 12 million; unit: SXL static const uint32_t BLOCK_INTERVAL = 3; // 3 seconds static const uint64_t INITIAL_SUBSIDY_RATE = 5; // Initial subsidy rate upon vote casting static const uint64_t FIXED_SUBSIDY_RATE = 1; // Eventual/lasting subsidy rate for vote casting static const uint32_t ADJUST_SUBSIDY_RATE_PERIOD = 500; // Used in testnet or regtest only. static const uint32_t CONTRACT_CALL_RESERVED_FEES_RATIO = 10; // boosted by 10^2 static const string EMPTY_STRING = ""; #endif // CONFIG_CONST_H
47.630769
122
0.70365
a7a5f25e94d4843f4c6798f8a36a344511a512b1
1,136
h
C
include/il2cpp/System/Comparison_Detail.DataStore.DataStoreRatingTargetInt_.h
martmists-gh/BDSP
d6326c5d3ad9697ea65269ed47aa0b63abac2a0a
[ "MIT" ]
1
2022-01-15T20:20:27.000Z
2022-01-15T20:20:27.000Z
include/il2cpp/System/Comparison_Detail.DataStore.DataStoreRatingTargetInt_.h
martmists-gh/BDSP
d6326c5d3ad9697ea65269ed47aa0b63abac2a0a
[ "MIT" ]
null
null
null
include/il2cpp/System/Comparison_Detail.DataStore.DataStoreRatingTargetInt_.h
martmists-gh/BDSP
d6326c5d3ad9697ea65269ed47aa0b63abac2a0a
[ "MIT" ]
null
null
null
#pragma once #include "il2cpp.h" void System_Comparison_Detail_DataStore_DataStoreRatingTargetInt____ctor (System_Comparison_Detail_DataStore_DataStoreRatingTargetInt__o* __this, Il2CppObject* object, intptr_t method, const MethodInfo* method_info); int32_t System_Comparison_Detail_DataStore_DataStoreRatingTargetInt___Invoke (System_Comparison_Detail_DataStore_DataStoreRatingTargetInt__o* __this, NexPlugin_Detail_DataStore_DataStoreRatingTargetInt_o x, NexPlugin_Detail_DataStore_DataStoreRatingTargetInt_o y, const MethodInfo* method_info); System_IAsyncResult_o* System_Comparison_Detail_DataStore_DataStoreRatingTargetInt___BeginInvoke (System_Comparison_Detail_DataStore_DataStoreRatingTargetInt__o* __this, NexPlugin_Detail_DataStore_DataStoreRatingTargetInt_o x, NexPlugin_Detail_DataStore_DataStoreRatingTargetInt_o y, System_AsyncCallback_o* callback, Il2CppObject* object, const MethodInfo* method_info); int32_t System_Comparison_Detail_DataStore_DataStoreRatingTargetInt___EndInvoke (System_Comparison_Detail_DataStore_DataStoreRatingTargetInt__o* __this, System_IAsyncResult_o* result, const MethodInfo* method_info);
126.222222
371
0.916373
db796746c582457396e232d8fd2b36261b50f8cd
249
h
C
RCHadot/Helper/RCHelpers.h
RidgeCorn/RCHadot
9472255fdb4cdb60caf5ba708727e36ce3117a44
[ "MIT" ]
1
2016-05-25T07:33:21.000Z
2016-05-25T07:33:21.000Z
RCHadot/Helper/RCHelpers.h
RidgeCorn/RCHadot
9472255fdb4cdb60caf5ba708727e36ce3117a44
[ "MIT" ]
null
null
null
RCHadot/Helper/RCHelpers.h
RidgeCorn/RCHadot
9472255fdb4cdb60caf5ba708727e36ce3117a44
[ "MIT" ]
null
null
null
// // RCHelpers.h // RCHadot // // Created by Looping on 14-4-21. // Copyright (c) 2014 RidgeCorn. All rights reserved. // #import "RCModelHelper.h" #import "RCStyleSheetsHelper.h" #import "RCMapLocationHelper.h" #import "RCDisplayHelper.h"
19.153846
57
0.698795
71b03c5b71c77c2d6d37b4ba21f6ca5695d815d2
2,329
c
C
Resources/Windows/iXKeyLog-0.1/src/signal.c
dSalazar10/Course_Material-Operating_Systems
ba4d3c6e3a1090f85d73ff8afa64e438eb99a5f6
[ "MIT" ]
77
2015-03-16T04:16:24.000Z
2021-07-23T21:29:10.000Z
Resources/Windows/iXKeyLog-0.1/src/signal.c
dSalazar10/Course_Material-Operating_Systems
ba4d3c6e3a1090f85d73ff8afa64e438eb99a5f6
[ "MIT" ]
2
2016-05-18T21:20:28.000Z
2019-09-11T08:17:34.000Z
Resources/Windows/iXKeyLog-0.1/src/signal.c
dSalazar10/Course_Material-Operating_Systems
ba4d3c6e3a1090f85d73ff8afa64e438eb99a5f6
[ "MIT" ]
32
2015-03-16T05:55:13.000Z
2021-07-23T21:29:22.000Z
/** iXKeyLog - Copyright (c) 2011 by Victor Dorneanu All rights reserved. signal.c - Catch signal, implement signal handler etc. 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. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <unistd.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include "signal.h" #include "ixkeylog.h" #include "args.h" /** * This function handles select signals that the process may * receive. This gives us the chance to handle exits properly. * * @param sig The signal received */ void signal_handler(int sig) { if(g_ixkeylog_opts->debug > 0) M_DEBUG_INFO("caught signal: %d\n", sig); /* Specify here how to handle signals */ switch(sig) { case SIGHUP: break; /* TODO: Signal handler */ case SIGTERM: break; /* TODO: Signal handler */ case SIGINT: break; /* TODO: Signal handler */ default: break; } }
38.180328
80
0.696007
df984db26d76f684be2e8273989fd796efdc76e4
987
h
C
tetrahedron.h
tokarevart/polyspt
00e31ca69a1bd1018b574d93e6c629c466ea285a
[ "MIT" ]
null
null
null
tetrahedron.h
tokarevart/polyspt
00e31ca69a1bd1018b574d93e6c629c466ea285a
[ "MIT" ]
null
null
null
tetrahedron.h
tokarevart/polyspt
00e31ca69a1bd1018b574d93e6c629c466ea285a
[ "MIT" ]
null
null
null
#pragma once #include "simplex/simplex-3.h" namespace spt { template <std::size_t Dim, typename Real = typename spt::vec<Dim>::value_type> using tetrahedron = spt::simplex<3, Dim, Real>; template <typename Real> using tetrahedron2 = tetrahedron<2, Real>; using tetrahedron2f = tetrahedron2<float>; using tetrahedron2d = tetrahedron2<double>; template <typename Real> using tetrahedron3 = tetrahedron<3, Real>; using tetrahedron3f = tetrahedron3<float>; using tetrahedron3d = tetrahedron3<double>; template <std::size_t Dim, typename Real = typename spt::vec<Dim>::value_type> using tetrahedron_v = spt::simplex_v<3, Dim, Real>; template <typename Real> using tetrahedron2_v = tetrahedron_v<2, Real>; using tetrahedron2f_v = tetrahedron2_v<float>; using tetrahedron2d_v = tetrahedron2_v<double>; template <typename Real> using tetrahedron3_v = tetrahedron_v<3, Real>; using tetrahedron3f_v = tetrahedron3_v<float>; using tetrahedron3d_v = tetrahedron3_v<double>; } // namespace spt
36.555556
78
0.777102
dfdd5535069f4e779136e8bc3f7d827dda90f75a
1,478
c
C
extlibs/melBUFR/v5.2/src/B_Err_Print.c
oxelson/gempak
e7c477814d7084c87d3313c94e192d13d8341fa1
[ "BSD-3-Clause" ]
42
2015-06-03T15:26:21.000Z
2022-02-28T22:36:03.000Z
extlibs/melBUFR/v5.2/src/B_Err_Print.c
oxelson/gempak
e7c477814d7084c87d3313c94e192d13d8341fa1
[ "BSD-3-Clause" ]
60
2015-05-11T21:36:08.000Z
2022-03-29T16:22:42.000Z
extlibs/melBUFR/v5.2/src/B_Err_Print.c
oxelson/gempak
e7c477814d7084c87d3313c94e192d13d8341fa1
[ "BSD-3-Clause" ]
27
2016-06-06T21:55:14.000Z
2022-03-18T18:23:28.000Z
/* * BUFR_Err_Print - VERSION: %I% %E% %T% */ /* * BUFR_Err_Print(): Print BUFR error message and function names logged to * the standard error and bufr_log file. * * CHANGE LOG * * 022498 LAH: Added prints to bufr_log file. */ #include <mel_bufr.h> #if PROTOTYPE_NEEDED void BUFR_Err_Print( char* str ) #else void BUFR_Err_Print( str ) char* str; #endif { extern BUFR_Err_t BUFR_Error; extern BUFR_Cntl_t BUFR_Cntl; int i; if( !BUFR_Error.Set ) return; if( str != NULL ) { fprintf( stderr, "%s ", str ); fprintf( BUFR_Cntl.bufr_log, "%s ", str ); } fprintf( stderr, "%s\n", BUFR_Error.Message ); fprintf(BUFR_Cntl.bufr_log, "%s\n", BUFR_Error.Message ); if( BUFR_Error.SystemError != 0 ) { fprintf( stderr, "System error (%d): %s\n", BUFR_Error.SystemError, strerror(BUFR_Error.SystemError) ); fprintf(BUFR_Cntl.bufr_log, "System error (%d): %s\n", BUFR_Error.SystemError, strerror(BUFR_Error.SystemError) ); } fprintf( stderr, " Error occurred in %s()\n", BUFR_Error.Log[0] ); fprintf( BUFR_Cntl.bufr_log, " Error occurred in %s()\n", BUFR_Error.Log[0] ); for( i=1; i < BUFR_Error.NumLogs; i++ ) { fprintf( stderr, " which was called by %s()\n", BUFR_Error.Log[i] ); fprintf(BUFR_Cntl.bufr_log, " which was called by %s()\n", BUFR_Error.Log[i] ); } }
23.460317
85
0.589986
d7d34a21949160244fdf07d5656c7dbbb0be14a0
1,135
c
C
lib/wizards/nalle/area/monsters/pablo.c
vlehtola/questmud
8bc3099b5ad00a9e0261faeb6637c76b521b6dbe
[ "MIT" ]
null
null
null
lib/wizards/nalle/area/monsters/pablo.c
vlehtola/questmud
8bc3099b5ad00a9e0261faeb6637c76b521b6dbe
[ "MIT" ]
null
null
null
lib/wizards/nalle/area/monsters/pablo.c
vlehtola/questmud
8bc3099b5ad00a9e0261faeb6637c76b521b6dbe
[ "MIT" ]
null
null
null
inherit "obj/monster"; reset(arg) { string chat_str, a_chat_str; object weapon; ::reset(arg); if (arg) { return; } set_level(16); set_gender(1); set_race("human"); set_name("Pablo"); set_alias("pablo"); set_short("Pablo, talking to a lady"); set_long("Pablo seems to have seduced one of the knights' ladies,\n" + "who is listening from behind a bush.\n"); set_al(-5); set_aggressive(0); set_move_at_random(0); if (!chat_str) { chat_str = allocate(3); chat_str[0] = "Pablo sighs into the bushes: 'Oh my darling!'\n"; chat_str[1] = "A female voice whispers: 'What if Henry finds out?'\n"; chat_str[2] = "Pablo moans: 'Henry cannot stand between our true love!'\n"; } if (!a_chat_str) { a_chat_str = allocate(1); a_chat_str[0] = "Pablo screams: 'I confess it all!' \n"; } load_chat(10, chat_str); load_a_chat(10, a_chat_str); weapon = clone_object("/wizards/nalle/area/eq/knsword"); move_object(weapon, this_object()); init_command("wield sword"); }
28.375
74
0.591189
048fa4fe5b0c28a4466d135770211243208bbde1
124,951
c
C
ArmPlatformPkg/APMXGenePkg/Drivers/MellanoxDxe/hermon.c
christopherco/RPi-UEFI
48fd8bb20dd4d45a4cf0a8970a65837e45bbaa99
[ "BSD-2-Clause" ]
93
2016-10-27T12:03:57.000Z
2022-03-29T15:22:10.000Z
ArmPlatformPkg/APMXGenePkg/Drivers/MellanoxDxe/hermon.c
khezami/RPi-UEFI
5bfd48d674e6c7efea6e31f9eb97b9da90c20263
[ "BSD-2-Clause" ]
16
2016-11-02T02:08:40.000Z
2021-06-03T21:18:06.000Z
ArmPlatformPkg/APMXGenePkg/Drivers/MellanoxDxe/hermon.c
khezami/RPi-UEFI
5bfd48d674e6c7efea6e31f9eb97b9da90c20263
[ "BSD-2-Clause" ]
41
2016-11-02T00:05:02.000Z
2022-03-29T14:33:09.000Z
/* * Copyright (C) 2008 Michael Brown <mbrown@fensystems.co.uk>. * Copyright (C) 2008 Mellanox Technologies Ltd. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License * which accompanies this distribution. The full text of the license may be found at * http://opensource.org/licenses/bsd-license.php * * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. * **/ #include "hermon.h" extern unsigned poll_verbosity; extern VOID Mellanox_Callback_GetReceiveData(VOID *PrivateData, VOID *Packet, UINT32 Length); void WRITE_REG(struct hermon *hermon, unsigned int d, unsigned int *a) { EFI_PCI_IO_PROTOCOL *pci = hermon->pci; DBG("WriteReg 0x%p 0x%x\n", a, (d)); if (((UINT64)a & (UINT64)hermon->uar) == (UINT64)hermon->uar) pci->Mem.Write(pci, EfiPciIoWidthUint32, HERMON_PCI_UAR_BAR, (UINT64)a - (UINT64)hermon->uar, 1, &d); else if (((UINT64)a & (UINT64)hermon->config) == (UINT64)hermon->config) { pci->Mem.Write(pci, EfiPciIoWidthUint32, HERMON_PCI_CONFIG_BAR, (UINT64)a - (UINT64)hermon->config, 1, &d); } else DBG("Can't write to PCI mem: %p\n", a); } unsigned int READ_REG(struct hermon *hermon, unsigned int *a) { EFI_PCI_IO_PROTOCOL *pci = hermon->pci; unsigned int d = 0; if (((UINT64)a & (UINT64)hermon->uar) == (UINT64)hermon->uar) pci->Mem.Read(pci, EfiPciIoWidthUint32, HERMON_PCI_UAR_BAR, (UINT64)a - (UINT64)hermon->uar, 1, &d); else if (((UINT64)a & (UINT64)hermon->config) == (UINT64)hermon->config) { pci->Mem.Read(pci, EfiPciIoWidthUint32, HERMON_PCI_CONFIG_BAR, (UINT64)a - (UINT64)hermon->config, 1, &d); } else DBG("Can't read PCI mem: %p\n", a); DBG("ReadReg 0x%p 0x%x\n", a, (d)); return d; } /** * @file * * Mellanox ConnectX3 Infiniband HCA * */ /*************************************************************************** * * Queue number allocation * *************************************************************************** */ /** * Allocate offsets within usage bitmask * * @v bits Usage bitmask * @v bits_len Length of usage bitmask * @v num_bits Number of contiguous bits to allocate within bitmask * @ret bit First free bit within bitmask, or negative error */ static int hermon_bitmask_alloc ( hermon_bitmask_t *bits, unsigned int bits_len, unsigned int num_bits ) { unsigned int bit = 0; hermon_bitmask_t mask = 1; unsigned int found = 0; /* Search bits for num_bits contiguous free bits */ while ( bit < bits_len ) { if ( ( mask & *bits ) == 0 ) { if ( ++found == num_bits ) goto found; } else { found = 0; } bit++; mask = ( mask << 1 ) | ( mask >> ( 8 * sizeof ( mask ) - 1 ) ); if ( mask == 1 ) bits++; } return -ENFILE; found: /* Mark bits as in-use */ do { *bits |= mask; if ( mask == 1 ) bits--; mask = ( mask >> 1 ) | ( mask << ( 8 * sizeof ( mask ) - 1 ) ); } while ( --found ); return ( bit - num_bits + 1 ); } /** * Free offsets within usage bitmask * * @v bits Usage bitmask * @v bit Starting bit within bitmask * @v num_bits Number of contiguous bits to free within bitmask */ static void hermon_bitmask_free ( hermon_bitmask_t *bits, int bit, unsigned int num_bits ) { hermon_bitmask_t mask; for ( ; num_bits ; bit++, num_bits-- ) { mask = ( 1 << ( bit % ( 8 * sizeof ( mask ) ) ) ); bits[ ( bit / ( 8 * sizeof ( mask ) ) ) ] &= ~mask; } } /*************************************************************************** * * HCA commands * *************************************************************************** */ /** * Wait for ConnectX3 command completion * * @v hermon ConnectX3 device * @v hcr HCA command registers * @ret rc Return status code */ static int hermon_cmd_wait ( struct hermon *hermon, struct hermonprm_hca_command_register *hcr ) { unsigned int wait; for ( wait = HERMON_HCR_MAX_WAIT_MS ; wait ; wait-- ) { hcr->u.dwords[6] = READ_REG (hermon, hermon->config + HERMON_HCR_REG ( 6 ) ); if ( ( MLX_GET ( hcr, go ) == 0 ) && ( MLX_GET ( hcr, t ) == hermon->toggle ) ) return 0; mdelay ( 1 ); } return -EBUSY; } /** * Return physical function for specific commands * * @v hermon ConnectX3 device * @v opcode HCA command opcode */ static u8 hermon_cmd_get_function ( struct hermon *hermon, int opcode ) { switch ( opcode ) { case HERMON_HCR_SW2HW_EQ: case HERMON_HCR_SW2HW_CQ: case HERMON_HCR_RST2INIT_QP: case HERMON_HCR_INIT2RTR_QP: case HERMON_HCR_RTR2RTS_QP: case HERMON_HCR_SW2HW_MPT: case HERMON_HCR_2RST_QP: case HERMON_HCR_HW2SW_CQ: case HERMON_HCR_HW2SW_EQ: return hermon->physical_function; break; default: return 0; } return 0; } /** * Issue HCA command * * @v hermon ConnectX3 device * @v command Command opcode, flags and input/output lengths * @v op_mod Opcode modifier (0 if no modifier applicable) * @v in Input parameters * @v in_mod Input modifier (0 if no modifier applicable) * @v out Output parameters * @ret rc Return status code */ static int hermon_cmd ( struct hermon *hermon, unsigned long command, unsigned int op_mod, const void *in, unsigned int in_mod, void *out ) { struct hermonprm_hca_command_register hcr; unsigned int opcode = HERMON_HCR_OPCODE ( command ); size_t in_len = HERMON_HCR_IN_LEN ( command ); size_t out_len = HERMON_HCR_OUT_LEN ( command ); void *in_buffer; void *out_buffer; u8 physical_function; unsigned int status; unsigned int i; int rc; assert ( in_len <= HERMON_MBOX_SIZE ); assert ( out_len <= HERMON_MBOX_SIZE ); DBGC2 ( hermon, "ConnectX3 %p command %02x in %x%s out %x%s\n", hermon, opcode, in_len, ( ( command & HERMON_HCR_IN_MBOX ) ? L"(mbox)" : L"" ), out_len, ( ( command & HERMON_HCR_OUT_MBOX ) ? L"(mbox)" : L"" ) ); /* Check that HCR is free */ if ( ( rc = hermon_cmd_wait ( hermon, &hcr ) ) != 0 ) { DBGC ( hermon, "ConnectX3 %p command interface locked\n", hermon ); return rc; } /* Flip HCR toggle */ hermon->toggle = ( 1 - hermon->toggle ); /* Get physical function */ physical_function = hermon_cmd_get_function ( hermon, opcode ); /* Prepare HCR */ memset ( &hcr, 0, sizeof ( hcr ) ); in_buffer = &hcr.u.dwords[0]; if ( in_len && ( command & HERMON_HCR_IN_MBOX ) ) { memset ( hermon->mailbox_in, 0, HERMON_MBOX_SIZE ); in_buffer = hermon->mailbox_in; MLX_FILL_H ( &hcr, 0, in_param_h, virt_to_bus ( in_buffer ) ); MLX_FILL_1 ( &hcr, 1, in_param_l, virt_to_bus ( in_buffer ) | physical_function ); } else MLX_FILL_1 ( &hcr, 1, in_param_l, physical_function ); memcpy ( in_buffer, in, in_len ); MLX_FILL_1 ( &hcr, 2, input_modifier, in_mod ); out_buffer = &hcr.u.dwords[3]; if ( out_len && ( command & HERMON_HCR_OUT_MBOX ) ) { out_buffer = hermon->mailbox_out; MLX_FILL_H ( &hcr, 3, out_param_h, virt_to_bus ( out_buffer ) ); MLX_FILL_1 ( &hcr, 4, out_param_l, virt_to_bus ( out_buffer ) ); } MLX_FILL_4 ( &hcr, 6, opcode, opcode, opcode_modifier, op_mod, go, 1, t, hermon->toggle ); DBGC ( hermon, "ConnectX3 %p issuing command %04x\n", hermon, opcode ); DBGC2_HDA ( hermon, virt_to_phys ( hermon->config + HERMON_HCR_BASE ), &hcr, sizeof ( hcr ) ); if ( in_len && ( command & HERMON_HCR_IN_MBOX ) ) { DBGC2 ( hermon, "Input mailbox:\n" ); DBGC2_HDA ( hermon, virt_to_phys ( in_buffer ), in_buffer, ( ( in_len < 512 ) ? in_len : 512 ) ); } /* Issue command */ for ( i = 0 ; i < ( sizeof ( hcr ) / sizeof ( hcr.u.dwords[0] ) ) ; i++ ) { WRITE_REG (hermon, hcr.u.dwords[i], hermon->config + HERMON_HCR_REG ( i ) ); barrier(); } /* Wait for command completion */ if ( ( rc = hermon_cmd_wait ( hermon, &hcr ) ) != 0 ) { ERROR ("ConnectX3 %p timed out waiting for command:\n", hermon ); DBGC_HDA ( hermon, virt_to_phys ( hermon->config + HERMON_HCR_BASE ), &hcr, sizeof ( hcr ) ); return rc; } /* Check command status */ status = MLX_GET ( &hcr, status ); if ( status != 0 ) { ERROR ( "ConnectX3 %p command failed with status %02x:\n", hermon, status ); DBGC_HDA ( hermon, virt_to_phys ( hermon->config + HERMON_HCR_BASE ), &hcr, sizeof ( hcr ) ); return -EIO; } /* Read output parameters, if any */ hcr.u.dwords[3] = READ_REG (hermon, hermon->config + HERMON_HCR_REG ( 3 ) ); hcr.u.dwords[4] = READ_REG (hermon, hermon->config + HERMON_HCR_REG ( 4 ) ); memcpy ( out, out_buffer, out_len ); if ( out_len ) { DBGC2 ( hermon, "Output%s:\n", ( command & HERMON_HCR_OUT_MBOX ) ? L" mailbox" : L"" ); DBGC2_HDA ( hermon, virt_to_phys ( out_buffer ), out_buffer, ( ( out_len < 512 ) ? out_len : 512 ) ); } return 0; } static inline int hermon_cmd_query_dev_cap ( struct hermon *hermon, struct hermonprm_query_dev_cap *dev_cap ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_QUERY_DEV_CAP, 1, sizeof ( *dev_cap ) ), 0, NULL, 0, dev_cap ); } static inline int hermon_cmd_query_fw ( struct hermon *hermon, struct hermonprm_query_fw *fw ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_QUERY_FW, 1, sizeof ( *fw ) ), 0, NULL, 0, fw ); } static inline int hermon_cmd_init_hca ( struct hermon *hermon, const struct hermonprm_init_hca *init_hca ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_INIT_HCA, 1, sizeof ( *init_hca ) ), 0, init_hca, 0, NULL ); } static inline int hermon_cmd_close_hca ( struct hermon *hermon ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_CLOSE_HCA ), 0, NULL, 0, NULL ); } static inline int hermon_cmd_init_port ( struct hermon *hermon, unsigned int port ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_INIT_PORT ), 0, NULL, port, NULL ); } static inline int hermon_cmd_close_port ( struct hermon *hermon, unsigned int port ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_CLOSE_PORT ), 0, NULL, port, NULL ); } static inline int hermon_cmd_set_port ( struct hermon *hermon, int is_ethernet, unsigned int port_selector, const union hermonprm_set_port *set_port ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_SET_PORT, 1, sizeof ( *set_port ) ), is_ethernet, set_port, port_selector, NULL ); } static inline int hermon_cmd_sw2hw_mpt ( struct hermon *hermon, unsigned int index, const struct hermonprm_mpt *mpt ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_SW2HW_MPT, 1, sizeof ( *mpt ) ), 0, mpt, index, NULL ); } static inline int hermon_cmd_write_mtt ( struct hermon *hermon, const struct hermonprm_write_mtt *write_mtt ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_WRITE_MTT, 1, sizeof ( *write_mtt ) ), 0, write_mtt, 1, NULL ); } static inline int hermon_cmd_map_eq ( struct hermon *hermon, unsigned long index_map, const struct hermonprm_event_mask *mask ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_MAP_EQ, 0, sizeof ( *mask ) ), 0, mask, index_map, NULL ); } static inline int hermon_cmd_sw2hw_eq ( struct hermon *hermon, unsigned int index, const struct hermonprm_eqc *eqctx ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_SW2HW_EQ, 1, sizeof ( *eqctx ) ), 0, eqctx, index, NULL ); } static inline int hermon_cmd_hw2sw_eq ( struct hermon *hermon, unsigned int index, struct hermonprm_eqc *eqctx ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_HW2SW_EQ, 1, sizeof ( *eqctx ) ), 1, NULL, index, eqctx ); } static inline int hermon_cmd_query_eq ( struct hermon *hermon, unsigned int index, struct hermonprm_eqc *eqctx ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_QUERY_EQ, 1, sizeof ( *eqctx ) ), 0, NULL, index, eqctx ); } static inline int hermon_cmd_sw2hw_cq ( struct hermon *hermon, unsigned long cqn, const struct hermonprm_completion_queue_context *cqctx ){ return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_SW2HW_CQ, 1, sizeof ( *cqctx ) ), 0, cqctx, cqn, NULL ); } static inline int hermon_cmd_hw2sw_cq ( struct hermon *hermon, unsigned long cqn, struct hermonprm_completion_queue_context *cqctx ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_HW2SW_CQ, 1, sizeof ( *cqctx ) ), 0, NULL, cqn, cqctx ); } static inline int hermon_cmd_query_cq ( struct hermon *hermon, unsigned long cqn, struct hermonprm_completion_queue_context *cqctx ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_QUERY_CQ, 1, sizeof ( *cqctx ) ), 0, NULL, cqn, cqctx ); } static inline int hermon_cmd_rst2init_qp ( struct hermon *hermon, unsigned long qpn, const struct hermonprm_qp_ee_state_transitions *ctx ){ return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_RST2INIT_QP, 1, sizeof ( *ctx ) ), 0, ctx, qpn, NULL ); } static inline int hermon_cmd_init2rtr_qp ( struct hermon *hermon, unsigned long qpn, const struct hermonprm_qp_ee_state_transitions *ctx ){ return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_INIT2RTR_QP, 1, sizeof ( *ctx ) ), 0, ctx, qpn, NULL ); } static inline int hermon_cmd_rtr2rts_qp ( struct hermon *hermon, unsigned long qpn, const struct hermonprm_qp_ee_state_transitions *ctx ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_RTR2RTS_QP, 1, sizeof ( *ctx ) ), 0, ctx, qpn, NULL ); } static inline int hermon_cmd_rts2rts_qp ( struct hermon *hermon, unsigned long qpn, const struct hermonprm_qp_ee_state_transitions *ctx ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_RTS2RTS_QP, 1, sizeof ( *ctx ) ), 0, ctx, qpn, NULL ); } static inline int hermon_cmd_2rst_qp ( struct hermon *hermon, unsigned long qpn ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_2RST_QP ), 0x03, NULL, qpn, NULL ); } static inline int hermon_cmd_query_qp ( struct hermon *hermon, unsigned long qpn, struct hermonprm_qp_ee_state_transitions *ctx ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_QUERY_QP, 1, sizeof ( *ctx ) ), 0, NULL, qpn, ctx ); } static inline int hermon_cmd_conf_special_qp ( struct hermon *hermon, unsigned int internal_qps __unused, unsigned long base_qpn ) { return hermon_cmd ( hermon, 0x0023, 0x01, NULL, base_qpn, NULL ); } static inline int hermon_cmd_mad_ifc ( struct hermon *hermon, unsigned int port, union hermonprm_mad *mad ) { return hermon_cmd ( hermon, HERMON_HCR_INOUT_CMD ( HERMON_HCR_MAD_IFC, 1, sizeof ( *mad ), 1, sizeof ( *mad ) ), 0x03, mad, port, mad ); } static inline int hermon_cmd_read_mcg ( struct hermon *hermon, unsigned int index, struct hermonprm_mcg_entry *mcg ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_READ_MCG, 1, sizeof ( *mcg ) ), 0, NULL, index, mcg ); } static inline int hermon_cmd_write_mcg ( struct hermon *hermon, unsigned int index, const struct hermonprm_mcg_entry *mcg ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_WRITE_MCG, 1, sizeof ( *mcg ) ), 0, mcg, index, NULL ); } static inline int hermon_cmd_mgid_hash ( struct hermon *hermon, const union ib_gid *gid, struct hermonprm_mgm_hash *hash, u8 protocol ) { return hermon_cmd ( hermon, HERMON_HCR_INOUT_CMD ( HERMON_HCR_MGID_HASH, 1, sizeof ( *gid ), 0, sizeof ( *hash ) ), protocol, gid, 0, hash ); } static inline int hermon_cmd_mod_stat_cfg ( struct hermon *hermon, unsigned int mode, unsigned int input_mod, struct hermonprm_scalar_parameter *portion ) { return hermon_cmd ( hermon, HERMON_HCR_INOUT_CMD ( HERMON_HCR_MOD_STAT_CFG, 0, sizeof ( *portion ), 0, sizeof ( *portion ) ), mode, portion, input_mod, portion ); } static inline int hermon_cmd_query_port ( struct hermon *hermon, unsigned int port, struct hermonprm_query_port_cap *query_port ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_QUERY_PORT, 1, sizeof ( *query_port ) ), 0, NULL, port, query_port ); } static inline int hermon_cmd_sense_port ( struct hermon *hermon, unsigned int port, struct hermonprm_sense_port *port_type ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_HCR_SENSE_PORT, 0, sizeof ( *port_type ) ), 0, NULL, port, port_type ); } static inline int hermon_cmd_run_fw ( struct hermon *hermon ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_RUN_FW ), 0, NULL, 0, NULL ); } static inline int hermon_cmd_unmap_icm ( struct hermon *hermon, unsigned int page_count, const struct hermonprm_scalar_parameter *offset ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_UNMAP_ICM, 0, sizeof ( *offset ) ), 0, offset, page_count, NULL ); } static inline int hermon_cmd_map_icm ( struct hermon *hermon, const struct hermonprm_virtual_physical_mapping *map ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_MAP_ICM, 1, sizeof ( *map ) ), 0, map, 1, NULL ); } static inline int hermon_cmd_unmap_icm_aux ( struct hermon *hermon ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_UNMAP_ICM_AUX ), 0, NULL, 0, NULL ); } static inline int hermon_cmd_map_icm_aux ( struct hermon *hermon, const struct hermonprm_virtual_physical_mapping *map ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_MAP_ICM_AUX, 1, sizeof ( *map ) ), 0, map, 1, NULL ); } static inline int hermon_cmd_set_icm_size ( struct hermon *hermon, const struct hermonprm_scalar_parameter *icm_size, struct hermonprm_scalar_parameter *icm_aux_size ) { return hermon_cmd ( hermon, HERMON_HCR_INOUT_CMD ( HERMON_HCR_SET_ICM_SIZE, 0, sizeof ( *icm_size ), 0, sizeof (*icm_aux_size) ), 0, icm_size, 0, icm_aux_size ); } static inline int hermon_cmd_unmap_fa ( struct hermon *hermon ) { return hermon_cmd ( hermon, HERMON_HCR_VOID_CMD ( HERMON_HCR_UNMAP_FA ), 0, NULL, 0, NULL ); } static inline int hermon_cmd_map_fa ( struct hermon *hermon, const struct hermonprm_virtual_physical_mapping *map ) { return hermon_cmd ( hermon, HERMON_HCR_IN_CMD ( HERMON_HCR_MAP_FA, 1, sizeof ( *map ) ), 0, map, 1, NULL ); } static inline int hermon_cmd_get_op_req ( struct hermon *hermon, unsigned int request_type, unsigned int report_status, struct hermonprm_get_op_req *get_op_req ) { return hermon_cmd ( hermon, HERMON_HCR_OUT_CMD ( HERMON_GET_OP_REQ, 1, sizeof ( *get_op_req ) ), request_type, NULL, report_status, get_op_req ); } static inline int hermon_cmd_register_access ( struct hermon *hermon, struct hermonprm_register_access *register_access ) { return hermon_cmd ( hermon, HERMON_HCR_INOUT_CMD ( HERMON_HCR_REGISTER_ACCESS, 1, sizeof ( *register_access ), 1, sizeof ( *register_access ) ), 0, register_access, 0, register_access ); } /*************************************************************************** * * Memory translation table operations * *************************************************************************** */ /** * Allocate MTT entries * * @v hermon ConnectX3 device * @v memory Memory to map into MTT * @v len Length of memory to map * @v mtt MTT descriptor to fill in * @ret rc Return status code */ static int hermon_alloc_mtt ( struct hermon *hermon, void *memory, size_t len, struct hermon_mtt *mtt ) { struct hermonprm_write_mtt write_mtt; physaddr_t start; physaddr_t addr; unsigned int page_offset; unsigned int num_pages; int mtt_offset; unsigned int mtt_base_addr; unsigned int i; int rc; /* Find available MTT entries */ start = virt_to_phys ( memory ); page_offset = ( start & ( HERMON_PAGE_SIZE - 1 ) ); start -= page_offset; len += page_offset; DBGC ( hermon, "hermon_alloc_mtt : %lx->%lx\n",virt_to_phys ( memory ), start); num_pages = ( ( len + HERMON_PAGE_SIZE - 1 ) / HERMON_PAGE_SIZE ); mtt_offset = hermon_bitmask_alloc ( hermon->mtt_inuse, HERMON_MAX_MTTS, num_pages ); if ( mtt_offset < 0 ) { ERROR ( "ConnectX3 %p could not allocate %d MTT entries\n", hermon, num_pages ); rc = mtt_offset; goto err_mtt_offset; } mtt_base_addr = ( ( hermon->cap.reserved_mtts + mtt_offset ) * hermon->cap.mtt_entry_size ); addr = start; /* Fill in MTT structure */ mtt->mtt_offset = mtt_offset; mtt->num_pages = num_pages; mtt->mtt_base_addr = mtt_base_addr; mtt->page_offset = page_offset; /* Construct and issue WRITE_MTT commands */ for ( i = 0 ; i < num_pages ; i++ ) { memset ( &write_mtt, 0, sizeof ( write_mtt ) ); MLX_FILL_1 ( &write_mtt.mtt_base_addr, 1, value, mtt_base_addr ); MLX_FILL_H ( &write_mtt.mtt, 0, ptag_h, addr ); MLX_FILL_2 ( &write_mtt.mtt, 1, p, 1, ptag_l, ( addr >> 3 ) ); if ( ( rc = hermon_cmd_write_mtt ( hermon, &write_mtt ) ) != 0 ) { ERROR ("ConnectX3 %p could not write MTT at %x\n", hermon, mtt_base_addr ); goto err_write_mtt; } addr += HERMON_PAGE_SIZE; mtt_base_addr += hermon->cap.mtt_entry_size; } DBGC ( hermon, "ConnectX3 %p MTT entries [%x,%x] for " "[%08lx,%08lx,%08lx,%08lx)\n", hermon, mtt->mtt_offset, ( mtt->mtt_offset + mtt->num_pages - 1 ), start, ( start + page_offset ), ( start + len ), addr ); return 0; err_write_mtt: hermon_bitmask_free ( hermon->mtt_inuse, mtt_offset, num_pages ); err_mtt_offset: return rc; } /** * Free MTT entries * * @v hermon ConnectX3 device * @v mtt MTT descriptor */ static void hermon_free_mtt ( struct hermon *hermon, struct hermon_mtt *mtt ) { DBGC ( hermon, "ConnectX3 %p MTT entries [%x,%x] freed\n", hermon, mtt->mtt_offset, ( mtt->mtt_offset + mtt->num_pages - 1 ) ); hermon_bitmask_free ( hermon->mtt_inuse, mtt->mtt_offset, mtt->num_pages ); } /*************************************************************************** * * Static configuration operations * *************************************************************************** */ /** * Calculate offset within static configuration * * @v field Field * @ret offset Offset */ #define HERMON_MOD_STAT_CFG_OFFSET( field ) \ ( ( MLX_BIT_OFFSET ( struct hermonprm_mod_stat_cfg_st, field ) / 8 ) \ & ~( sizeof ( struct hermonprm_scalar_parameter ) - 1 ) ) /** * Query or modify static configuration * * @v hermon ConnectX3 device * @v port Port * @v mode Command mode * @v offset Offset within static configuration * @v stat_cfg Static configuration * @ret rc Return status code */ static int hermon_mod_stat_cfg ( struct hermon *hermon, unsigned int mport, unsigned int mode, unsigned int offset, unsigned int physical_function, unsigned int setup_mode, struct hermonprm_mod_stat_cfg *stat_cfg ) { struct hermonprm_scalar_parameter *portion = ( ( void * ) &stat_cfg->u.bytes[offset] ); struct hermonprm_mod_stat_cfg_input_mod mod; int rc; /* Construct input modifier */ memset ( &mod, 0, sizeof ( mod ) ); MLX_FILL_4 ( &mod, 0, portnum, mport, offset, offset, physical_function, physical_function, setup_mode, setup_mode ); /* Sanity check */ assert ( ( offset % sizeof ( *portion ) ) == 0 ); /* Issue command */ if ( ( rc = hermon_cmd_mod_stat_cfg ( hermon, mode, be32_to_cpu ( mod.u.dwords[0] ), portion ) ) != 0 ) return rc; return 0; } /*************************************************************************** * * MAD operations * *************************************************************************** */ /** * Issue management datagram * * @v ibdev Infiniband device * @v mad Management datagram * @ret rc Return status code */ static int hermon_mad ( struct ib_device *ibdev, union ib_mad *mad ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); union hermonprm_mad mad_ifc; int rc; assert ( sizeof ( *mad ) == sizeof ( mad_ifc.mad ) ); /* Copy in request packet */ memcpy ( &mad_ifc.mad, mad, sizeof ( mad_ifc.mad ) ); /* Issue MAD */ if ( ( rc = hermon_cmd_mad_ifc ( hermon, ibdev->port, &mad_ifc ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not issue MAD IFC: " "%s\n", hermon, ibdev->port, strerror ( rc ) ); return rc; } /* Copy out reply packet */ memcpy ( mad, &mad_ifc.mad, sizeof ( *mad ) ); if ( mad->hdr.status != 0 ) { DBGC ( hermon, "ConnectX3 %p port %d MAD IFC status %04x\n", hermon, ibdev->port, ntohs ( mad->hdr.status ) ); return -EIO; } return 0; } /*************************************************************************** * * Completion queue operations * *************************************************************************** */ /** * Dump completion queue context (for debugging only) * * @v hermon ConnectX3 device * @v cq Completion queue * @ret rc Return status code */ static __attribute__ (( unused )) int hermon_dump_cqctx ( struct hermon *hermon, struct ib_completion_queue *cq ) { struct hermonprm_completion_queue_context cqctx; int rc; memset ( &cqctx, 0, sizeof ( cqctx ) ); if ( ( rc = hermon_cmd_query_cq ( hermon, cq->cqn, &cqctx ) ) != 0 ) { ERROR ( "ConnectX3 %p CQN %lx QUERY_CQ failed: %s\n", hermon, cq->cqn, strerror ( rc ) ); return rc; } DBGC ( hermon, "ConnectX3 %p CQN %lx context:\n", hermon, cq->cqn ); DBGC_HDA ( hermon, 0, &cqctx, sizeof ( cqctx ) ); return 0; } /** * Create completion queue * * @v ibdev Infiniband device * @v cq Completion queue * @ret rc Return status code */ static int hermon_create_cq ( struct ib_device *ibdev, struct ib_completion_queue *cq ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_completion_queue *hermon_cq; struct hermonprm_completion_queue_context cqctx; int cqn_offset; unsigned int i; int rc; /* Find a free completion queue number */ cqn_offset = hermon_bitmask_alloc ( hermon->cq_inuse, HERMON_MAX_CQS, 1 ); if ( cqn_offset < 0 ) { DBGC ( hermon, "ConnectX3 %p out of completion queues\n", hermon ); rc = cqn_offset; goto err_cqn_offset; } cq->cqn = ( hermon->cap.reserved_cqs + cqn_offset ); /* Allocate control structures */ hermon_cq = zalloc ( sizeof ( *hermon_cq ) ); if ( ! hermon_cq ) { rc = -ENOMEM; goto err_hermon_cq; } /* Allocate doorbell */ hermon_cq->doorbell = malloc_dma ( sizeof ( hermon_cq->doorbell[0] ), sizeof ( hermon_cq->doorbell[0] ) ); if ( ! hermon_cq->doorbell ) { rc = -ENOMEM; goto err_doorbell; } memset ( hermon_cq->doorbell, 0, sizeof ( hermon_cq->doorbell[0] ) ); /* Allocate completion queue itself */ hermon_cq->cqe_size = ( cq->num_cqes * sizeof ( hermon_cq->cqe[0] ) ); hermon_cq->cqe = malloc_dma ( hermon_cq->cqe_size, sizeof ( hermon_cq->cqe[0] ) ); if ( ! hermon_cq->cqe ) { rc = -ENOMEM; goto err_cqe; } memset ( hermon_cq->cqe, 0, hermon_cq->cqe_size ); for ( i = 0 ; i < cq->num_cqes ; i++ ) { MLX_FILL_1 ( &hermon_cq->cqe[i].normal, 7, owner, 1 ); } barrier(); /* Allocate MTT entries */ if ( ( rc = hermon_alloc_mtt ( hermon, hermon_cq->cqe, hermon_cq->cqe_size, &hermon_cq->mtt ) ) != 0 ) goto err_alloc_mtt; /* Hand queue over to hardware */ memset ( &cqctx, 0, sizeof ( cqctx ) ); MLX_FILL_1 ( &cqctx, 0, st, 0xa /* "Event fired" */ ); MLX_FILL_1 ( &cqctx, 2, page_offset, ( hermon_cq->mtt.page_offset >> 5 ) ); MLX_FILL_2 ( &cqctx, 3, usr_page, HERMON_UAR_NON_EQ_PAGE, log_cq_size, fls ( cq->num_cqes - 1 ) ); MLX_FILL_1 ( &cqctx, 5, c_eqn, hermon->eq.eqn ); MLX_FILL_H ( &cqctx, 6, mtt_base_addr_h, hermon_cq->mtt.mtt_base_addr ); MLX_FILL_1 ( &cqctx, 7, mtt_base_addr_l, ( hermon_cq->mtt.mtt_base_addr >> 3 ) ); MLX_FILL_H ( &cqctx, 14, db_record_addr_h, virt_to_phys ( hermon_cq->doorbell ) ); MLX_FILL_1 ( &cqctx, 15, db_record_addr_l, ( virt_to_phys ( hermon_cq->doorbell ) >> 3 ) ); if ( ( rc = hermon_cmd_sw2hw_cq ( hermon, cq->cqn, &cqctx ) ) != 0 ) { ERROR ( "ConnectX3 %p CQN %lx SW2HW_CQ failed: %s\n", hermon, cq->cqn, strerror ( rc ) ); goto err_sw2hw_cq; } DBGC ( hermon, "ConnectX3 %p CQN %lx ring [%08lx,%08lx), doorbell " "%08lx\n", hermon, cq->cqn, virt_to_phys ( hermon_cq->cqe ), ( virt_to_phys ( hermon_cq->cqe ) + hermon_cq->cqe_size ), virt_to_phys ( hermon_cq->doorbell )); ib_cq_set_drvdata ( cq, hermon_cq ); return 0; err_sw2hw_cq: hermon_free_mtt ( hermon, &hermon_cq->mtt ); err_alloc_mtt: free_dma ( hermon_cq->cqe, hermon_cq->cqe_size ); err_cqe: free_dma ( hermon_cq->doorbell, sizeof ( hermon_cq->doorbell[0] ) ); err_doorbell: free ( hermon_cq ); err_hermon_cq: hermon_bitmask_free ( hermon->cq_inuse, cqn_offset, 1 ); err_cqn_offset: return rc; } /** * Destroy completion queue * * @v ibdev Infiniband device * @v cq Completion queue */ static void hermon_destroy_cq ( struct ib_device *ibdev, struct ib_completion_queue *cq ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_completion_queue *hermon_cq = ib_cq_get_drvdata ( cq ); struct hermonprm_completion_queue_context cqctx; int cqn_offset; int rc; /* Take ownership back from hardware */ if ( ( rc = hermon_cmd_hw2sw_cq ( hermon, cq->cqn, &cqctx ) ) != 0 ) { ERROR ( "ConnectX3 %p CQN %lx FATAL HW2SW_CQ failed: " "%s\n", hermon, cq->cqn, strerror ( rc ) ); /* Leak memory and return; at least we avoid corruption */ return; } /* Free MTT entries */ hermon_free_mtt ( hermon, &hermon_cq->mtt ); /* Free memory */ free_dma ( hermon_cq->cqe, hermon_cq->cqe_size ); free_dma ( hermon_cq->doorbell, sizeof ( hermon_cq->doorbell[0] ) ); free ( hermon_cq ); /* Mark queue number as free */ cqn_offset = ( cq->cqn - hermon->cap.reserved_cqs ); hermon_bitmask_free ( hermon->cq_inuse, cqn_offset, 1 ); ib_cq_set_drvdata ( cq, NULL ); } /*************************************************************************** * * Queue pair operations * *************************************************************************** */ /** * Assign queue pair number * * @v ibdev Infiniband device * @v qp Queue pair * @ret rc Return status code */ static int hermon_alloc_qpn ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); unsigned int port_offset; int qpn_offset; /* Calculate queue pair number */ port_offset = ( ibdev->port - HERMON_PORT_BASE ); switch ( qp->type ) { case IB_QPT_SMI: qp->qpn = ( hermon->special_qpn_base + port_offset ); return 0; case IB_QPT_GSI: qp->qpn = ( hermon->special_qpn_base + 2 + port_offset ); return 0; case IB_QPT_UD: case IB_QPT_RC: case IB_QPT_ETH: /* Find a free queue pair number */ qpn_offset = hermon_bitmask_alloc ( hermon->qp_inuse, HERMON_MAX_QPS, 1 ); if ( qpn_offset < 0 ) { DBGC ( hermon, "ConnectX3 %p out of queue pairs\n", hermon ); return qpn_offset; } qp->qpn = ( ( random() & HERMON_QPN_RANDOM_MASK ) | ( hermon->qpn_base + qpn_offset ) ); return 0; default: ERROR ( "ConnectX3 %p unsupported QP type %d\n", hermon, qp->type ); return -ENOTSUP; } } /** * Free queue pair number * * @v ibdev Infiniband device * @v qp Queue pair */ static void hermon_free_qpn ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); int qpn_offset; qpn_offset = ( ( qp->qpn & ~HERMON_QPN_RANDOM_MASK ) - hermon->qpn_base ); if ( qpn_offset >= 0 ) hermon_bitmask_free ( hermon->qp_inuse, qpn_offset, 1 ); } /** * Calculate transmission rate * * @v av Address vector * @ret hermon_rate ConnectX3 rate */ static unsigned int hermon_rate ( struct ib_address_vector *av ) { return ( ( ( av->rate >= IB_RATE_2_5 ) && ( av->rate <= IB_RATE_120 ) ) ? ( av->rate + 5 ) : 0 ); } /** * Calculate schedule queue * * @v ibdev Infiniband device * @v qp Queue pair * @ret sched_queue Schedule queue */ static unsigned int hermon_sched_queue ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { return ( ( ( qp->type == IB_QPT_SMI ) ? HERMON_SCHED_QP0 : HERMON_SCHED_DEFAULT ) | ( ( ibdev->port - 1 ) << 6 ) ); } /** Queue pair transport service type map */ static uint8_t hermon_qp_st[] = { [IB_QPT_SMI] = HERMON_ST_MLX, [IB_QPT_GSI] = HERMON_ST_MLX, [IB_QPT_UD] = HERMON_ST_UD, [IB_QPT_RC] = HERMON_ST_RC, [IB_QPT_ETH] = HERMON_ST_MLX, }; /** * Dump queue pair context (for debugging only) * * @v hermon ConnectX3 device * @v qp Queue pair * @ret rc Return status code */ static __attribute__ (( unused )) int hermon_dump_qpctx ( struct hermon *hermon, struct ib_queue_pair *qp ) { struct hermonprm_qp_ee_state_transitions qpctx; int rc; memset ( &qpctx, 0, sizeof ( qpctx ) ); if ( ( rc = hermon_cmd_query_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx QUERY_QP failed: %s\n", hermon, qp->qpn, strerror ( rc ) ); return rc; } DBGC ( hermon, "ConnectX3 %p QPN %lx context:\n", hermon, qp->qpn ); DBGC_HDA ( hermon, 0, &qpctx.u.dwords[2], ( sizeof ( qpctx ) - 8 ) ); return 0; } /** * Create queue pair * * @v ibdev Infiniband device * @v qp Queue pair * @ret rc Return status code */ static int hermon_create_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_queue_pair *hermon_qp; struct hermonprm_qp_ee_state_transitions qpctx; int rc; /* Calculate queue pair number */ if ( ( rc = hermon_alloc_qpn ( ibdev, qp ) ) != 0 ) goto err_alloc_qpn; /* Allocate control structures */ hermon_qp = zalloc ( sizeof ( *hermon_qp ) ); if ( ! hermon_qp ) { rc = -ENOMEM; goto err_hermon_qp; } /* Allocate doorbells */ hermon_qp->recv.doorbell = malloc_dma ( sizeof ( hermon_qp->recv.doorbell[0] ), sizeof ( hermon_qp->recv.doorbell[0] ) ); if ( ! hermon_qp->recv.doorbell ) { rc = -ENOMEM; goto err_recv_doorbell; } memset ( hermon_qp->recv.doorbell, 0, sizeof ( hermon_qp->recv.doorbell[0] ) ); hermon_qp->send.doorbell = ( hermon->uar + HERMON_UAR_NON_EQ_PAGE * HERMON_PAGE_SIZE + HERMON_DB_POST_SND_OFFSET ); /* Allocate work queue buffer */ hermon_qp->send.num_wqes = ( qp->send.num_wqes /* headroom */ + 1 + ( 2048 / sizeof ( hermon_qp->send.wqe[0] ) ) ); hermon_qp->send.num_wqes = ( 1 << fls ( hermon_qp->send.num_wqes - 1 ) ); /* round up */ hermon_qp->send.wqe_size = ( hermon_qp->send.num_wqes * sizeof ( hermon_qp->send.wqe[0] ) ); hermon_qp->recv.wqe_size = ( qp->recv.num_wqes * sizeof ( hermon_qp->recv.wqe[0] ) ); hermon_qp->wqe_size = ( hermon_qp->send.wqe_size + hermon_qp->recv.wqe_size ); hermon_qp->wqe = malloc_dma ( hermon_qp->wqe_size, sizeof ( hermon_qp->send.wqe[0] ) ); if ( ! hermon_qp->wqe ) { rc = -ENOMEM; goto err_alloc_wqe; } hermon_qp->send.wqe = hermon_qp->wqe; memset ( hermon_qp->send.wqe, 0xff, hermon_qp->send.wqe_size ); hermon_qp->recv.wqe = ( hermon_qp->wqe + hermon_qp->send.wqe_size ); memset ( hermon_qp->recv.wqe, 0, hermon_qp->recv.wqe_size ); /* Allocate MTT entries */ if ( ( rc = hermon_alloc_mtt ( hermon, hermon_qp->wqe, hermon_qp->wqe_size, &hermon_qp->mtt ) ) != 0 ) { goto err_alloc_mtt; } /* Transition queue to INIT state */ memset ( &qpctx, 0, sizeof ( qpctx ) ); MLX_FILL_2 ( &qpctx, 2, qpc_eec_data.pm_state, HERMON_PM_STATE_MIGRATED, qpc_eec_data.st, hermon_qp_st[qp->type] ); MLX_FILL_1 ( &qpctx, 3, qpc_eec_data.pd, HERMON_GLOBAL_PD ); MLX_FILL_4 ( &qpctx, 4, qpc_eec_data.log_rq_size, fls ( qp->recv.num_wqes - 1 ), qpc_eec_data.log_rq_stride, ( fls ( sizeof ( hermon_qp->recv.wqe[0] ) - 1 ) - 4 ), qpc_eec_data.log_sq_size, fls ( hermon_qp->send.num_wqes - 1 ), qpc_eec_data.log_sq_stride, ( fls ( sizeof ( hermon_qp->send.wqe[0] ) - 1 ) - 4 ) ); MLX_FILL_1 ( &qpctx, 5, qpc_eec_data.usr_page, HERMON_UAR_NON_EQ_PAGE ); MLX_FILL_1 ( &qpctx, 33, qpc_eec_data.cqn_snd, qp->send.cq->cqn ); MLX_FILL_4 ( &qpctx, 38, qpc_eec_data.rre, 1, qpc_eec_data.rwe, 1, qpc_eec_data.rae, 1, qpc_eec_data.page_offset, ( hermon_qp->mtt.page_offset >> 6 ) ); MLX_FILL_1 ( &qpctx, 41, qpc_eec_data.cqn_rcv, qp->recv.cq->cqn ); MLX_FILL_H ( &qpctx, 42, qpc_eec_data.db_record_addr_h, virt_to_phys ( hermon_qp->recv.doorbell ) ); MLX_FILL_1 ( &qpctx, 43, qpc_eec_data.db_record_addr_l, ( virt_to_phys ( hermon_qp->recv.doorbell ) >> 2 ) ); MLX_FILL_H ( &qpctx, 52, qpc_eec_data.mtt_base_addr_h, hermon_qp->mtt.mtt_base_addr ); MLX_FILL_1 ( &qpctx, 53, qpc_eec_data.mtt_base_addr_l, ( hermon_qp->mtt.mtt_base_addr >> 3 ) ); if ( ( rc = hermon_cmd_rst2init_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx RST2INIT_QP failed: %s\n", hermon, qp->qpn, strerror ( rc ) ); goto err_rst2init_qp; } hermon_qp->state = HERMON_QP_ST_INIT; DBGC ( hermon, "ConnectX3 %p QPN 0x%lx send ring [%08lx,%08lx), doorbell " "%08lx\n", hermon, qp->qpn, virt_to_phys ( hermon_qp->send.wqe ), ( virt_to_phys ( hermon_qp->send.wqe ) + hermon_qp->send.wqe_size ), virt_to_phys ( hermon_qp->send.doorbell ) ); DBGC ( hermon, "ConnectX3 %p QPN 0x%lx receive ring [%08lx,%08lx), " "doorbell %08lx\n", hermon, qp->qpn, virt_to_phys ( hermon_qp->recv.wqe ), ( virt_to_phys ( hermon_qp->recv.wqe ) + hermon_qp->recv.wqe_size ), virt_to_phys ( hermon_qp->recv.doorbell ) ); DBGC ( hermon, "ConnectX3 %p QPN 0x%lx send CQN %lx receive CQN %lx\n", hermon, qp->qpn, qp->send.cq->cqn, qp->recv.cq->cqn ); ib_qp_set_drvdata ( qp, hermon_qp ); return 0; hermon_cmd_2rst_qp ( hermon, qp->qpn ); err_rst2init_qp: hermon_free_mtt ( hermon, &hermon_qp->mtt ); err_alloc_mtt: free_dma ( hermon_qp->wqe, hermon_qp->wqe_size ); err_alloc_wqe: free_dma ( hermon_qp->recv.doorbell, sizeof ( hermon_qp->recv.doorbell[0] ) ); err_recv_doorbell: free ( hermon_qp ); err_hermon_qp: hermon_free_qpn ( ibdev, qp ); err_alloc_qpn: return rc; } /** * Modify queue pair * * @v ibdev Infiniband device * @v qp Queue pair * @ret rc Return status code */ static int hermon_modify_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_queue_pair *hermon_qp = ib_qp_get_drvdata ( qp ); struct hermonprm_qp_ee_state_transitions qpctx; int rc; /* Transition queue to RTR state, if applicable */ if ( hermon_qp->state < HERMON_QP_ST_RTR ) { memset ( &qpctx, 0, sizeof ( qpctx ) ); MLX_FILL_2 ( &qpctx, 4, qpc_eec_data.mtu, ( ( qp->type == IB_QPT_ETH ) ? HERMON_MTU_ETH : HERMON_MTU_2048 ), qpc_eec_data.msg_max, 31 ); MLX_FILL_1 ( &qpctx, 7, qpc_eec_data.remote_qpn_een, qp->av.qpn ); MLX_FILL_1 ( &qpctx, 9, qpc_eec_data.primary_address_path.rlid, qp->av.lid ); MLX_FILL_1 ( &qpctx, 10, qpc_eec_data.primary_address_path.max_stat_rate, hermon_rate ( &qp->av ) ); memcpy ( &qpctx.u.dwords[12], &qp->av.gid, sizeof ( qp->av.gid ) ); MLX_FILL_1 ( &qpctx, 16, qpc_eec_data.primary_address_path.sched_queue, hermon_sched_queue ( ibdev, qp ) ); MLX_FILL_1 ( &qpctx, 38, qpc_eec_data.physical_function, hermon->physical_function ); MLX_FILL_1 ( &qpctx, 39, qpc_eec_data.next_rcv_psn, qp->recv.psn ); if ( ( rc = hermon_cmd_init2rtr_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx INIT2RTR_QP failed:" " %s\n", hermon, qp->qpn, strerror ( rc ) ); return rc; } hermon_qp->state = HERMON_QP_ST_RTR; } /* Transition queue to RTS state */ if ( hermon_qp->state < HERMON_QP_ST_RTS ) { memset ( &qpctx, 0, sizeof ( qpctx ) ); MLX_FILL_1 ( &qpctx, 10, qpc_eec_data.primary_address_path.ack_timeout, 14 /* 4.096us * 2^(14) = 67ms */ ); MLX_FILL_2 ( &qpctx, 30, qpc_eec_data.retry_count, HERMON_RETRY_MAX, qpc_eec_data.rnr_retry, HERMON_RETRY_MAX ); MLX_FILL_1 ( &qpctx, 32, qpc_eec_data.next_send_psn, qp->send.psn ); MLX_FILL_1 ( &qpctx, 38, qpc_eec_data.physical_function, hermon->physical_function ); if ( ( rc = hermon_cmd_rtr2rts_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx RTR2RTS_QP failed: " "%s\n", hermon, qp->qpn, strerror ( rc ) ); return rc; } hermon_qp->state = HERMON_QP_ST_RTS; } /* Update parameters in RTS state */ memset ( &qpctx, 0, sizeof ( qpctx ) ); MLX_FILL_1 ( &qpctx, 0, opt_param_mask, HERMON_QP_OPT_PARAM_QKEY ); MLX_FILL_1 ( &qpctx, 38, qpc_eec_data.physical_function, hermon->physical_function ); MLX_FILL_1 ( &qpctx, 44, qpc_eec_data.q_key, qp->qkey ); if ( ( rc = hermon_cmd_rts2rts_qp ( hermon, qp->qpn, &qpctx ) ) != 0 ){ ERROR ( "ConnectX3 %p QPN %lx RTS2RTS_QP failed: %s\n", hermon, qp->qpn, strerror ( rc ) ); return rc; } return 0; } /** * Destroy queue pair * * @v ibdev Infiniband device * @v qp Queue pair */ static void hermon_destroy_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_queue_pair *hermon_qp = ib_qp_get_drvdata ( qp ); int rc; /* Take ownership back from hardware */ if ( ( rc = hermon_cmd_2rst_qp ( hermon, qp->qpn ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx FATAL 2RST_QP failed: %s\n", hermon, qp->qpn, strerror ( rc ) ); /* Leak memory and return; at least we avoid corruption */ return; } /* Free MTT entries */ hermon_free_mtt ( hermon, &hermon_qp->mtt ); /* Free memory */ free_dma ( hermon_qp->wqe, hermon_qp->wqe_size ); free_dma ( hermon_qp->recv.doorbell, sizeof ( hermon_qp->recv.doorbell[0] ) ); free ( hermon_qp ); /* Mark queue number as free */ hermon_free_qpn ( ibdev, qp ); ib_qp_set_drvdata ( qp, NULL ); } /*************************************************************************** * * Work request operations * *************************************************************************** */ /** * Construct UD send work queue entry * * @v ibdev Infiniband device * @v qp Queue pair * @v av Address vector * @v iobuf I/O buffer * @v wqe Send work queue entry * @ret opcode Control opcode */ static __attribute__ (( unused )) unsigned int hermon_fill_nop_send_wqe ( struct ib_device *ibdev __unused, struct ib_queue_pair *qp __unused, struct ib_address_vector *av __unused, struct io_buffer *iobuf __unused, union hermon_send_wqe *wqe ) { MLX_FILL_1 ( &wqe->ctrl, 1, ds, ( sizeof ( wqe->ctrl ) / 16 ) ); MLX_FILL_1 ( &wqe->ctrl, 2, c, 0x03 /* generate completion */ ); return HERMON_OPCODE_NOP; } /** * Construct UD send work queue entry * * @v ibdev Infiniband device * @v qp Queue pair * @v av Address vector * @v iobuf I/O buffer * @v wqe Send work queue entry * @ret opcode Control opcode */ static unsigned int hermon_fill_ud_send_wqe ( struct ib_device *ibdev, struct ib_queue_pair *qp __unused, struct ib_address_vector *av, struct io_buffer *iobuf, union hermon_send_wqe *wqe ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); MLX_FILL_1 ( &wqe->ud.ctrl, 1, ds, ( ( offsetof ( typeof ( wqe->ud ), data[1] ) / 16 ) ) ); MLX_FILL_1 ( &wqe->ud.ctrl, 2, c, 0x03 /* generate completion */ ); MLX_FILL_2 ( &wqe->ud.ud, 0, ud_address_vector.pd, HERMON_GLOBAL_PD, ud_address_vector.port_number, ibdev->port ); MLX_FILL_2 ( &wqe->ud.ud, 1, ud_address_vector.rlid, av->lid, ud_address_vector.g, av->gid_present ); MLX_FILL_1 ( &wqe->ud.ud, 2, ud_address_vector.max_stat_rate, hermon_rate ( av ) ); MLX_FILL_1 ( &wqe->ud.ud, 3, ud_address_vector.sl, av->sl ); memcpy ( &wqe->ud.ud.u.dwords[4], &av->gid, sizeof ( av->gid ) ); MLX_FILL_1 ( &wqe->ud.ud, 8, destination_qp, av->qpn ); MLX_FILL_1 ( &wqe->ud.ud, 9, q_key, av->qkey ); MLX_FILL_1 ( &wqe->ud.data[0], 0, byte_count, iob_len ( iobuf ) ); MLX_FILL_1 ( &wqe->ud.data[0], 1, l_key, hermon->lkey ); MLX_FILL_H ( &wqe->ud.data[0], 2, local_address_h, virt_to_bus (iobuf->data ) ); MLX_FILL_1 ( &wqe->ud.data[0], 3, local_address_l, virt_to_bus (iobuf->data ) ); return HERMON_OPCODE_SEND; } /** * Construct RC send work queue entry * * @v ibdev Infiniband device * @v qp Queue pair * @v av Address vector * @v iobuf I/O buffer * @v wqe Send work queue entry * @ret opcode Control opcode */ static unsigned int hermon_fill_rc_send_wqe ( struct ib_device *ibdev, struct ib_queue_pair *qp __unused, struct ib_address_vector *av __unused, struct io_buffer *iobuf, union hermon_send_wqe *wqe ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); MLX_FILL_1 ( &wqe->rc.ctrl, 1, ds, ( ( offsetof ( typeof ( wqe->rc ), data[1] ) / 16 ) ) ); MLX_FILL_1 ( &wqe->rc.ctrl, 2, c, 0x03 /* generate completion */ ); MLX_FILL_1 ( &wqe->rc.data[0], 0, byte_count, iob_len ( iobuf ) ); MLX_FILL_1 ( &wqe->rc.data[0], 1, l_key, hermon->lkey ); MLX_FILL_H ( &wqe->rc.data[0], 2, local_address_h, virt_to_bus ( iobuf->data ) ); MLX_FILL_1 ( &wqe->rc.data[0], 3, local_address_l, virt_to_bus ( iobuf->data ) ); return HERMON_OPCODE_SEND; } /** * Construct Ethernet send work queue entry * * @v ibdev Infiniband device * @v qp Queue pair * @v av Address vector * @v iobuf I/O buffer * @v wqe Send work queue entry * @ret opcode Control opcode */ static unsigned int hermon_fill_eth_send_wqe ( struct ib_device *ibdev, struct ib_queue_pair *qp __unused, struct ib_address_vector *av __unused, struct io_buffer *iobuf, union hermon_send_wqe *wqe ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); /* Fill work queue entry */ MLX_FILL_1 ( &wqe->eth.ctrl, 1, ds, ( ( offsetof ( typeof ( wqe->mlx ), data[1] ) / 16 ) ) ); MLX_FILL_2 ( &wqe->eth.ctrl, 2, c, 0x03 /* generate completion */, s, 1 /* inhibit ICRC */ ); MLX_FILL_1 ( &wqe->eth.data[0], 0, byte_count, iob_len ( iobuf ) ); MLX_FILL_1 ( &wqe->eth.data[0], 1, l_key, hermon->lkey ); MLX_FILL_H ( &wqe->eth.data[0], 2, local_address_h, virt_to_bus (iobuf->data ) ); MLX_FILL_1 ( &wqe->eth.data[0], 3, local_address_l, virt_to_bus (iobuf->data ) ); return HERMON_OPCODE_SEND; } /** Work queue entry constructors */ static unsigned int ( * hermon_fill_send_wqe[] ) ( struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *av, struct io_buffer *iobuf, union hermon_send_wqe *wqe ) = { // [IB_QPT_SMI] = hermon_fill_mlx_send_wqe, // [IB_QPT_GSI] = hermon_fill_mlx_send_wqe, [IB_QPT_UD] = hermon_fill_ud_send_wqe, [IB_QPT_RC] = hermon_fill_rc_send_wqe, [IB_QPT_ETH] = hermon_fill_eth_send_wqe, }; /** * Post send work queue entry * * @v ibdev Infiniband device * @v qp Queue pair * @v av Address vector * @v iobuf I/O buffer * @ret rc Return status code */ static int hermon_post_send ( struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_address_vector *av, struct io_buffer *iobuf ) { struct hermon *hermon __unused = ib_get_drvdata ( ibdev ); struct hermon_queue_pair *hermon_qp = ib_qp_get_drvdata ( qp ); struct ib_work_queue *wq = &qp->send; struct hermon_send_work_queue *hermon_send_wq = &hermon_qp->send; union hermon_send_wqe *wqe; union hermonprm_doorbell_register db_reg; unsigned long wqe_idx_mask; unsigned long wqe_idx; unsigned int owner; unsigned int opcode; /* Allocate work queue entry */ wqe_idx = ( wq->next_idx & ( hermon_send_wq->num_wqes - 1 ) ); owner = ( ( wq->next_idx & hermon_send_wq->num_wqes ) ? 1 : 0 ); wqe_idx_mask = ( wq->num_wqes - 1 ); if ( wq->iobufs[ wqe_idx & wqe_idx_mask ] ) { DBGC ( hermon, "ConnectX3 %p QPN %lx send queue full", hermon, qp->qpn ); return -ENOBUFS; } wq->iobufs[ wqe_idx & wqe_idx_mask ] = iobuf; wqe = &hermon_send_wq->wqe[wqe_idx]; /* Construct work queue entry */ memset ( ( ( ( void * ) wqe ) + 4 /* avoid ctrl.owner */ ), 0, ( sizeof ( *wqe ) - 4 ) ); assert ( qp->type < ( sizeof ( hermon_fill_send_wqe ) / sizeof ( hermon_fill_send_wqe[0] ) ) ); assert ( hermon_fill_send_wqe[qp->type] != NULL ); opcode = hermon_fill_send_wqe[qp->type] ( ibdev, qp, av, iobuf, wqe ); barrier(); MLX_FILL_2 ( &wqe->ctrl, 0, opcode, opcode, owner, owner ); DBGCP ( hermon, "ConnectX3 %p QPN %lx posting send WQE %lx[v = %p p = %lx]:\n", hermon, qp->qpn, wqe_idx, wqe, virt_to_phys( wqe )); DBGCP_HDA ( hermon, virt_to_phys ( wqe ), wqe, sizeof ( *wqe ) ); /* Ring doorbell register */ MLX_FILL_1 ( &db_reg.send, 0, qn, qp->qpn ); barrier(); WRITE_REG (hermon, db_reg.dword[0], hermon_send_wq->doorbell ); /* Update work queue's index */ wq->next_idx++; return 0; } /** * Post receive work queue entry * * @v ibdev Infiniband device * @v qp Queue pair * @v iobuf I/O buffer * @ret rc Return status code */ static int hermon_post_recv ( struct ib_device *ibdev, struct ib_queue_pair *qp, struct io_buffer *iobuf ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_queue_pair *hermon_qp = ib_qp_get_drvdata ( qp ); struct ib_work_queue *wq = &qp->recv; struct hermon_recv_work_queue *hermon_recv_wq = &hermon_qp->recv; struct hermonprm_recv_wqe *wqe; unsigned int wqe_idx_mask; /* Allocate work queue entry */ wqe_idx_mask = ( wq->num_wqes - 1 ); if ( wq->iobufs[wq->next_idx & wqe_idx_mask] ) { DBGC ( hermon, "ConnectX3 %p QPN %lx receive queue full", hermon, qp->qpn ); return -ENOBUFS; } wq->iobufs[wq->next_idx & wqe_idx_mask] = iobuf; wqe = &hermon_recv_wq->wqe[wq->next_idx & wqe_idx_mask].recv; /* Construct work queue entry */ MLX_FILL_1 ( &wqe->data[0], 0, byte_count, iob_tailroom ( iobuf ) ); MLX_FILL_1 ( &wqe->data[0], 1, l_key, hermon->lkey ); MLX_FILL_H ( &wqe->data[0], 2, local_address_h, virt_to_bus ( iobuf->data ) ); MLX_FILL_1 ( &wqe->data[0], 3, local_address_l, virt_to_bus ( iobuf->data ) ); /* Update work queue's index */ wq->next_idx++; /* Update doorbell record */ barrier(); MLX_FILL_1 ( hermon_recv_wq->doorbell, 0, receive_wqe_counter, ( wq->next_idx & 0xffff ) ); return 0; } /** * Handle completion * * @v ibdev Infiniband device * @v cq Completion queue * @v cqe Hardware completion queue entry * @ret rc Return status code */ static int hermon_complete ( struct ib_device *ibdev, struct ib_completion_queue *cq, union hermonprm_completion_entry *cqe ) { struct hermon *hermon __unused = ib_get_drvdata ( ibdev ); struct ib_work_queue *wq; struct ib_queue_pair *qp; struct io_buffer *iobuf; struct ib_address_vector recv_av; struct ib_global_route_header *grh; struct ib_address_vector *av; unsigned int opcode; unsigned long qpn; int is_send; unsigned long wqe_idx; unsigned long wqe_idx_mask; size_t len; int rc = 0; /* check if hermon is still operational */ if (unlikely(!hermon->open_count)) { DBGC( hermon, "ConnectX3 %p hermon NIC is closed. Cowardly refuse to execute hermon_complete\n", hermon); return -EINVAL; } poll_verbosity = 1; /* Parse completion */ qpn = MLX_GET ( &cqe->normal, qpn ); is_send = MLX_GET ( &cqe->normal, s_r ); opcode = MLX_GET ( &cqe->normal, opcode ); if ( opcode >= HERMON_OPCODE_RECV_ERROR ) { /* "s" field is not valid for error opcodes */ is_send = ( opcode == HERMON_OPCODE_SEND_ERROR ); DBGC ( hermon, "ConnectX3 %p CQN %lx syndrome %x vendor %x\n", hermon, cq->cqn, MLX_GET ( &cqe->error, syndrome ), MLX_GET ( &cqe->error, vendor_error_syndrome ) ); rc = -EIO; /* Don't return immediately; propagate error to completer */ } /* Identify work queue */ wq = ib_find_wq ( cq, qpn, is_send ); if ( ! wq ) { DBGC ( hermon, "ConnectX3 %p CQN %lx unknown %s QPN %lx\n", hermon, cq->cqn, ( is_send ? L"send" : L"recv" ), qpn ); return -EIO; } qp = wq->qp; /* Identify work queue entry */ wqe_idx = MLX_GET ( &cqe->normal, wqe_counter ); wqe_idx_mask = ( wq->num_wqes - 1 ); DBGCP ( hermon, "ConnectX3 %p CQN %lx QPN %lx %s WQE %lx completed:\n", hermon, cq->cqn, qp->qpn, ( is_send ? L"send" : L"recv" ), wqe_idx ); DBGCP_HDA ( hermon, virt_to_phys ( cqe ), cqe, sizeof ( *cqe ) ); /* Identify I/O buffer */ iobuf = wq->iobufs[ wqe_idx & wqe_idx_mask ]; if ( ! iobuf ) { DBGC ( hermon, "ConnectX3 %p CQN %lx QPN %lx empty %s WQE " "%lx\n", hermon, cq->cqn, qp->qpn, ( is_send ? L"send" : L"recv" ), wqe_idx ); return -EIO; } wq->iobufs[ wqe_idx & wqe_idx_mask ] = NULL; if ( is_send ) { /* Hand off to completion handler */ ib_complete_send ( ibdev, qp, iobuf, rc ); TAG(); } else { /* Set received length */ len = MLX_GET ( &cqe->normal, byte_cnt ); assert ( len <= iob_tailroom ( iobuf ) ); iob_put ( iobuf, len ); memset ( &recv_av, 0, sizeof ( recv_av ) ); switch ( qp->type ) { case IB_QPT_SMI: case IB_QPT_GSI: case IB_QPT_UD: assert ( iob_len ( iobuf ) >= sizeof ( *grh ) ); grh = iobuf->data; iob_pull ( iobuf, sizeof ( *grh ) ); /* Construct address vector */ av = &recv_av; av->qpn = MLX_GET ( &cqe->normal, srq_rqpn ); av->lid = MLX_GET ( &cqe->normal, slid_smac47_32 ); av->sl = MLX_GET ( &cqe->normal, sl ); av->gid_present = MLX_GET ( &cqe->normal, g ); memcpy ( &av->gid, &grh->sgid, sizeof ( av->gid ) ); break; case IB_QPT_RC: av = &qp->av; break; case IB_QPT_ETH: /* Construct address vector */ av = &recv_av; av->vlan_present = MLX_GET ( &cqe->normal, vlan ); av->vlan = MLX_GET ( &cqe->normal, vid ); break; default: assert ( 0 ); return -EINVAL; } /* Hand off to completion handler */ ib_complete_recv ( ibdev, qp, av, iobuf, rc ); } TAG("Out"); return rc; } /** * Poll completion queue * * @v ibdev Infiniband device * @v cq Completion queue */ static void hermon_poll_cq ( struct ib_device *ibdev, struct ib_completion_queue *cq ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_completion_queue *hermon_cq = ib_cq_get_drvdata ( cq ); union hermonprm_completion_entry *cqe; unsigned int cqe_idx_mask; int rc; if (unlikely(!hermon->open_count)) { DBGC( hermon, "ConnectX3 %p hermon NIC is closed. Cowardly refuse to execute hermon_poll_cq\n", hermon); return; } /* validate cq data */ assert( cq->num_cqes <= HERMON_ETH_NUM_CQES); while ( 1 ) { if (unlikely(!hermon->open_count)) { DBGC( hermon, "ConnectX3 %p hermon NIC is closed. Cowardly refuse to continue hermon_poll_cq\n", hermon); return; } /* validate next idx */ assert( cq->next_idx <= 0xFFFFFFUL); /* Look for completion entry */ cqe_idx_mask = ( cq->num_cqes - 1 ); cqe = &hermon_cq->cqe[cq->next_idx & cqe_idx_mask]; if ( MLX_GET ( &cqe->normal, owner ) ^ ( ( cq->next_idx & cq->num_cqes ) ? 1 : 0 ) ) { /* Entry still owned by hardware; end of poll */ break; } /* Handle completion */ if ( ( rc = hermon_complete ( ibdev, cq, cqe ) ) != 0 ) { ERROR ( "ConnectX3 %p CQN %lx failed to complete:" " %s\n", hermon, cq->cqn, strerror ( rc ) ); DBGC_HDA ( hermon, virt_to_phys ( cqe ), cqe, sizeof ( *cqe ) ); } if (unlikely(!hermon->open_count)) { DBGC( hermon, "ConnectX3 %p hermon NIC is closed. Cowardly refuse to continue hermon_poll_cq\n", hermon); return; } /* Update completion queue's index */ cq->next_idx++; /* Update doorbell record */ MLX_FILL_1 ( hermon_cq->doorbell, 0, update_ci, ( cq->next_idx & 0x00ffffffUL ) ); } } /*************************************************************************** * * Multicast group operations * *************************************************************************** */ /** * Attach to multicast group entry * * @v ibdev Infiniband device * @v gid Multicast GID * @v qp MCG entry index * @v prev_index MCG entry previous entry * @v mcg MCG entry * @ret rc Return status code */ static int hermon_find_entry ( struct ib_device *ibdev, union ib_gid *gid, int *index, int *prev_index, struct hermonprm_mcg_entry *mcg ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermonprm_mgm_hash hash; u8 *mcg_gid_p; int rc = 0; /* Generate hash table index */ if ( ( rc = hermon_cmd_mgid_hash ( hermon, gid, &hash, ibdev->protocol ) ) != 0 ) { ERROR ( "ConnectX3 %p could not hash GID: %s\n", hermon, strerror ( rc ) ); return rc; } *index = MLX_GET ( &hash, hash ); *prev_index = -1; /* Check for existing hash table entry */ do { if ( ( rc = hermon_cmd_read_mcg ( hermon, *index, mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not read MCG %x: " "%s\n", hermon, *index, strerror ( rc ) ); return rc; } if ( MLX_GET ( mcg, hdr.members_count ) == 0 ) { if ( *index != (int) MLX_GET ( &hash, hash ) ) { DBGC ( hermon, "ConnectX3 %p Found zero MGID" " in AMGM\n", hermon ); return -EBUSY; } /* Add new entry */ return 0; } mcg_gid_p = (u8 *)mcg; mcg_gid_p += 16; if ( !memcmp ( mcg_gid_p, gid, sizeof ( *gid ) ) && ( MLX_GET ( mcg, hdr.protocol ) == ibdev->protocol ) ) { DBGC ( hermon, "ConnectX3 %p Found MCG entry with the" " same GID\n", hermon ); return 0; } *prev_index = *index; *index = MLX_GET ( mcg, hdr.next_mcg ); } while ( *index ); /* Entry was not found */ *index = -1; return 0; } /** * Attach to multicast group * * @v ibdev Infiniband device * @v qp Queue pair * @v gid Multicast GID * @ret rc Return status code */ static int hermon_mcast_attach ( struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermonprm_mcg_entry mcg; int index = 0; int prev_index = 0; unsigned int members_count; u8 link = 0; unsigned int i; int rc; if ( ( rc = hermon_find_entry ( ibdev, gid, &index, &prev_index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p failed to search MCG entry %s\n", hermon, strerror ( rc ) ); return rc; } if ( index == -1 ) { link = 1; index = hermon->mcg_aux_index ++; DBGC ( hermon, "ConnectX3 %p add new entry with index 0x%x\n", hermon, index ); memset ( &mcg, 0, sizeof ( mcg ) ); memcpy ( &mcg.u.dwords[4], gid, sizeof ( *gid ) ); } members_count = MLX_GET ( &mcg, hdr.members_count ); if ( members_count >= HERMON_MAX_MGM_MEMBERS ) { DBGC ( hermon, "ConnectX3 %p MGM is full\n", hermon ); return -ENOMEM; } for ( i = 0; i < members_count; ++i ) { if ( MLX_GET ( &mcg, qp[i] ) == qp->qpn ) { DBGC ( hermon, "ConnectX3 %p QP 0x%lx already member" " in MGM\n", hermon, qp->qpn ); return 0; } } /* Update hash table entry */ MLX_FILL_2 ( &mcg, 1, hdr.members_count, ++members_count, hdr.protocol, ibdev->protocol ); MLX_FILL_1 ( &mcg, ( 8 + (int)members_count - 1 ), qp[members_count - 1].qpn, qp->qpn ); memcpy ( &mcg.u.dwords[4], gid, sizeof ( *gid ) ); if ( ( rc = hermon_cmd_write_mcg ( hermon, index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not write MCG %x: %s\n", hermon, index, strerror ( rc ) ); return rc; } if ( !link ) return 0; /* Repair link list */ if ( ( rc = hermon_cmd_read_mcg ( hermon, prev_index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not read MCG %x: %s\n", hermon, prev_index, strerror ( rc ) ); return rc; } MLX_FILL_1 ( &mcg, 0, hdr.next_mcg, index ); if ( ( rc = hermon_cmd_write_mcg ( hermon, prev_index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not write MCG %x: %s\n", hermon, prev_index, strerror ( rc ) ); return rc; } return 0; } /** * Detach from multicast group * * @v ibdev Infiniband device * @v qp Queue pair * @v gid Multicast GID * @ret rc Return status code */ static void hermon_mcast_detach ( struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermonprm_mcg_entry mcg; int index = 0; int prev_index = 0; int next_index = 0; unsigned int members_count; int i; int rc; int qp_index; if ( ( rc = hermon_find_entry ( ibdev, gid, &index, &prev_index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p failed to search MCG entry %s\n", hermon, strerror ( rc ) ); return; } if (index == -1) { ERROR ( "ConnectX3 %p GID not found in MCG table\n", hermon ); return; } members_count = MLX_GET ( &mcg, hdr.members_count ); for ( qp_index = -1, i = 0; i < (int)members_count; ++i ) if ( MLX_GET ( &mcg, qp[i] ) == qp->qpn ) qp_index = i; if ( qp_index == -1 ) { ERROR ( "ConnectX3 %p QP not found in MCG entry\n", hermon ); return; } MLX_FILL_2 ( &mcg, 1, hdr.members_count, --members_count, hdr.protocol, ibdev->protocol ); MLX_FILL_1 ( &mcg, ( 8 + qp_index ), qp[qp_index].qpn, MLX_GET ( &mcg, qp[i -1].qpn ) ); MLX_FILL_1 ( &mcg, ( 8 + i - 1 ), qp[i - 1].qpn, 0 ); if ( members_count ) { if ( ( rc = hermon_cmd_write_mcg ( hermon, index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not write MCG %x: %s\n", hermon, index, strerror ( rc ) ); return; } return; } if ( prev_index == -1 ) { next_index = MLX_GET ( &mcg, hdr.next_mcg ); if ( next_index ) { if ( ( rc = hermon_cmd_read_mcg ( hermon, next_index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not read MCG " "%x: %s\n", hermon, next_index, strerror ( rc ) ); return; } } else memset ( &mcg.u.dwords[4], 0, sizeof ( union ib_gid ) ); if ( ( rc = hermon_cmd_write_mcg ( hermon, index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not write MCG %x:" " %s\n", hermon, index, strerror ( rc ) ); return; } } else { /* Remove entry from AMGM */ next_index = MLX_GET ( &mcg, hdr.next_mcg ); if ( ( rc = hermon_cmd_read_mcg ( hermon, prev_index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not read MCG %x:" " %s\n", hermon, prev_index, strerror ( rc ) ); return; } MLX_FILL_1 ( &mcg, 0, hdr.next_mcg, next_index ); if ( ( rc = hermon_cmd_write_mcg ( hermon, index, &mcg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not write MCG %x: %s\n", hermon, index, strerror ( rc ) ); return; } } return; } /*************************************************************************** * * Event queues * *************************************************************************** */ /** * Create event queue * * @v hermon ConnectX3 device * @ret rc Return status code */ static int hermon_create_eq ( struct hermon *hermon ) { struct hermon_event_queue *hermon_eq = &hermon->eq; struct hermonprm_eqc eqctx; struct hermonprm_event_mask mask; unsigned int i; int rc; /* Select event queue number */ hermon_eq->eqn = ( 4 * hermon->cap.reserved_uars ); if ( hermon_eq->eqn < hermon->cap.reserved_eqs ) hermon_eq->eqn = hermon->cap.reserved_eqs; /* Calculate doorbell address */ hermon_eq->doorbell = ( hermon->uar + HERMON_DB_EQ_OFFSET ( hermon_eq->eqn ) ); /* Allocate event queue itself */ hermon_eq->eqe_size = ( HERMON_NUM_EQES * sizeof ( hermon_eq->eqe[0] ) ); hermon_eq->eqe = malloc_dma ( hermon_eq->eqe_size, sizeof ( hermon_eq->eqe[0] ) ); if ( ! hermon_eq->eqe ) { rc = -ENOMEM; goto err_eqe; } memset ( hermon_eq->eqe, 0, hermon_eq->eqe_size ); for ( i = 0 ; i < HERMON_NUM_EQES ; i++ ) { MLX_FILL_1 ( &hermon_eq->eqe[i].generic, 7, owner, 1 ); } barrier(); /* Allocate MTT entries */ if ( ( rc = hermon_alloc_mtt ( hermon, hermon_eq->eqe, hermon_eq->eqe_size, &hermon_eq->mtt ) ) != 0 ) goto err_alloc_mtt; /* Hand queue over to hardware */ memset ( &eqctx, 0, sizeof ( eqctx ) ); MLX_FILL_2 ( &eqctx, 0, st, 0xa /* "Fired" */, oi, 1 ); MLX_FILL_1 ( &eqctx, 2, page_offset, ( hermon_eq->mtt.page_offset >> 5 ) ); MLX_FILL_1 ( &eqctx, 3, log_eq_size, fls ( HERMON_NUM_EQES - 1 ) ); MLX_FILL_H ( &eqctx, 6, mtt_base_addr_h, hermon_eq->mtt.mtt_base_addr ); MLX_FILL_1 ( &eqctx, 7, mtt_base_addr_l, ( hermon_eq->mtt.mtt_base_addr >> 3 ) ); if ( ( rc = hermon_cmd_sw2hw_eq ( hermon, hermon_eq->eqn, &eqctx ) ) != 0 ) { ERROR ( "ConnectX3 %p EQN %lx SW2HW_EQ failed: %s\n", hermon, hermon_eq->eqn, strerror ( rc ) ); goto err_sw2hw_eq; } /* Map all events to this event queue */ memset ( &mask, 0xff, sizeof ( mask ) ); if ( ( rc = hermon_cmd_map_eq ( hermon, ( HERMON_MAP_EQ | hermon_eq->eqn ), &mask ) ) != 0 ) { ERROR ( "ConnectX3 %p EQN %lx MAP_EQ failed: %s\n", hermon, hermon_eq->eqn, strerror ( rc ) ); goto err_map_eq; } DBGC ( hermon, "ConnectX3 %p EQN %lx ring [%08lx,%08lx), doorbell " "%08lx\n", hermon, hermon_eq->eqn, virt_to_phys ( hermon_eq->eqe ), ( virt_to_phys ( hermon_eq->eqe ) + hermon_eq->eqe_size ), virt_to_phys ( hermon_eq->doorbell ) ); return 0; err_map_eq: hermon_cmd_hw2sw_eq ( hermon, hermon_eq->eqn, &eqctx ); err_sw2hw_eq: hermon_free_mtt ( hermon, &hermon_eq->mtt ); err_alloc_mtt: free_dma ( hermon_eq->eqe, hermon_eq->eqe_size ); err_eqe: memset ( hermon_eq, 0, sizeof ( *hermon_eq ) ); return rc; } /** * Destroy event queue * * @v hermon ConnectX3 device */ static void hermon_destroy_eq ( struct hermon *hermon ) { struct hermon_event_queue *hermon_eq = &hermon->eq; struct hermonprm_eqc eqctx; struct hermonprm_event_mask mask; int rc; /* Unmap events from event queue */ memset ( &mask, 0xff, sizeof ( mask ) ); if ( ( rc = hermon_cmd_map_eq ( hermon, ( HERMON_UNMAP_EQ | hermon_eq->eqn ), &mask ) ) != 0 ) { ERROR ( "ConnectX3 %p EQN %lx FATAL MAP_EQ failed to " "unmap: %s\n", hermon, hermon_eq->eqn, strerror ( rc ) ); /* Continue; HCA may die but system should survive */ } /* Take ownership back from hardware */ if ( ( rc = hermon_cmd_hw2sw_eq ( hermon, hermon_eq->eqn, &eqctx ) ) != 0 ) { ERROR ( "ConnectX3 %p EQN %lx FATAL HW2SW_EQ failed: %s\n", hermon, hermon_eq->eqn, strerror ( rc ) ); /* Leak memory and return; at least we avoid corruption */ return; } /* Free MTT entries */ hermon_free_mtt ( hermon, &hermon_eq->mtt ); /* Free memory */ free_dma ( hermon_eq->eqe, hermon_eq->eqe_size ); memset ( hermon_eq, 0, sizeof ( *hermon_eq ) ); } /** * Handle port state event * * @v hermon ConnectX3 device * @v eqe Port state change event queue entry */ static void hermon_event_port_state_change ( struct hermon *hermon, union hermonprm_event_entry *eqe){ unsigned int port; int link_up; /* Get port and link status */ port = ( MLX_GET ( &eqe->port_state_change, data.p ) - 1 ); link_up = ( MLX_GET ( &eqe->generic, event_sub_type ) & 0x04 ); DBGC ( hermon, "ConnectX3 %p port %d link %s\n", hermon, ( port + 1 ), ( link_up ? L"up" : L"down" ) ); /* Sanity check */ if ( port >= hermon->num_ports ) { ERROR ( "ConnectX3 %p port %d does not exist!\n", hermon, ( port + 1 ) ); return; } /* Notify device of port state change */ hermon->port[port].type->state_change ( hermon, &hermon->port[port], link_up ); } /** * Operation required action * * @v ibdev Infiniband device * @ret rc Return status code */ static int hermon_opreq_action ( struct hermon *hermon ) { struct ib_device *ibdev; unsigned int port; struct hermonprm_mcg_entry mcg; struct hermonprm_eth_mgi mgi; struct hermonprm_get_op_req get_op_req; struct ib_multicast_gid *mgid; struct ib_queue_pair qp; int rc; if ( ( rc = hermon_cmd_get_op_req ( hermon, 0, 0, &get_op_req ) ) != 0 ) { ERROR ( "ConnectX3 %p could not get op request %s\n", hermon, strerror ( rc ) ); return rc; } memcpy ( &mcg, &get_op_req.u.dwords[8], sizeof ( struct hermonprm_mcg_entry ) ); qp.qpn = MLX_GET ( &mcg, qp[0].qpn ); memcpy ( &mgi, &get_op_req.u.dwords[12], sizeof ( struct hermonprm_eth_mgi ) ); port = MLX_GET ( &mgi, portnum ); ibdev = hermon->port[port - 1].ibdev; if ( ibdev->protocol == HERMON_PROT_ETH ) { MLX_SET ( &mgi, vep_num, ibdev->vep_number ); } switch ( MLX_GET ( &get_op_req , request_type ) ) { case HERMON_OPREQ_ADD_TO_MCG: if ( MLX_GET ( &get_op_req, mcg.hdr.member_remove ) ) { hermon_mcast_detach ( ibdev, &qp, ( union ib_gid * ) &mgi ); } else { if ( ( rc = hermon_mcast_attach ( ibdev, &qp, ( union ib_gid * ) &mgi ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx could not " " attach: %s\n", hermon, qp.qpn, strerror ( rc ) ); return rc; } /* Add to software multicast GID list */ mgid = zalloc ( sizeof ( *mgid ) ); if ( ! mgid ) { return -ENOMEM; } memcpy ( &mgid->gid, &mgi, sizeof ( mgid->gid ) ); mgid->protocol = ibdev->protocol; mgid->qpn = qp.qpn; list_add ( &mgid->list, &hermon->ncsi_mgids ); } break; default: ERROR ( "ConnectX3 %p Unrecognized NCSI event\n", hermon ); break; } if ( ( rc = hermon_cmd_get_op_req ( hermon, 1, 0, &get_op_req ) ) != 0 ) { ERROR ( "ConnectX3 %p could not get op request %s\n", hermon, strerror ( rc ) ); return rc; } return 0; } /** * Poll event queue * * @v ibdev Infiniband device */ static void hermon_poll_eq ( struct ib_device *ibdev ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); struct hermon_event_queue *hermon_eq = &hermon->eq; union hermonprm_event_entry *eqe; union hermonprm_doorbell_register db_reg; unsigned int eqe_idx_mask; unsigned int event_type; /* No event is generated upon reaching INIT, so we must poll * separately for link state changes while we remain DOWN. */ if ( ib_is_open ( ibdev ) && ( ibdev->port_state == IB_PORT_STATE_DOWN ) ) { ib_smc_update ( ibdev, hermon_mad ); } /* Poll event queue */ while ( 1 ) { /* Look for event entry */ eqe_idx_mask = ( HERMON_NUM_EQES - 1 ); eqe = &hermon_eq->eqe[hermon_eq->next_idx & eqe_idx_mask]; if ( MLX_GET ( &eqe->generic, owner ) ^ ( ( hermon_eq->next_idx & HERMON_NUM_EQES ) ? 1 : 0 ) ) { /* Entry still owned by hardware; end of poll */ break; } DBGCP ( hermon, "ConnectX3 %p EQN %lx event:\n", hermon, hermon_eq->eqn ); DBGCP_HDA ( hermon, virt_to_phys ( eqe ), eqe, sizeof ( *eqe ) ); poll_verbosity = 1; /* Handle event */ event_type = MLX_GET ( &eqe->generic, event_type ); switch ( event_type ) { case HERMON_EV_PORT_STATE_CHANGE: hermon_event_port_state_change ( hermon, eqe ); break; case HERMON_EV_PORT_MGMNT_CHANGE: ib_smc_update ( ibdev, hermon_mad ); break; case HERMON_EV_TYPE_OP_REQUIRED: hermon_opreq_action ( hermon ); break; default: DBGC ( hermon, "ConnectX3 %p EQN %lx unrecognised event " "type %x:\n", hermon, hermon_eq->eqn, event_type ); DBGC_HDA ( hermon, virt_to_phys ( eqe ), eqe, sizeof ( *eqe ) ); break; } /* Update event queue's index */ hermon_eq->next_idx++; /* Ring doorbell */ MLX_FILL_1 ( &db_reg.event, 0, ci, ( hermon_eq->next_idx & 0x00ffffffUL ) ); WRITE_REG (hermon, db_reg.dword[0], hermon_eq->doorbell ); } } /*************************************************************************** * * Firmware control * *************************************************************************** */ /** * Map virtual to physical address for firmware usage * * @v hermon ConnectX3 device * @v map Mapping function * @v va Virtual address * @v pa Physical address * @v len Length of region * @ret rc Return status code */ static int hermon_map_vpm ( struct hermon *hermon, int ( *map ) ( struct hermon *hermon, const struct hermonprm_virtual_physical_mapping* ), uint64_t va, physaddr_t pa, size_t len ) { struct hermonprm_virtual_physical_mapping mapping; physaddr_t start; physaddr_t low; physaddr_t high; physaddr_t end; size_t size; int rc; /* Sanity checks */ assert ( ( va & ( HERMON_PAGE_SIZE - 1 ) ) == 0 ); assert ( ( pa & ( HERMON_PAGE_SIZE - 1 ) ) == 0 ); assert ( ( len & ( HERMON_PAGE_SIZE - 1 ) ) == 0 ); /* Calculate starting points */ start = pa; end = ( start + len ); size = ( 1UL << ( fls ( start ^ end ) - 1 ) ); low = high = ( end & ~( size - 1 ) ); assert ( start < low ); assert ( high <= end ); /* Map blocks in descending order of size */ while ( size >= HERMON_PAGE_SIZE ) { /* Find the next candidate block */ if ( ( low - size ) >= start ) { low -= size; pa = low; } else if ( ( high + size ) <= end ) { pa = high; high += size; } else { size >>= 1; continue; } assert ( ( va & ( size - 1 ) ) == 0 ); assert ( ( pa & ( size - 1 ) ) == 0 ); /* Map this block */ memset ( &mapping, 0, sizeof ( mapping ) ); MLX_FILL_1 ( &mapping, 0, va_h, ( va >> 32 ) ); MLX_FILL_1 ( &mapping, 1, va_l, ( va >> 12 ) ); MLX_FILL_H ( &mapping, 2, pa_h, pa ); MLX_FILL_2 ( &mapping, 3, log2size, ( ( fls ( size ) - 1 ) - 12 ), pa_l, ( pa >> 12 ) ); if ( ( rc = map ( hermon, &mapping ) ) != 0 ) { ERROR ( "ConnectX3 %p could not map %08llx+%x to " "%08lx: %s\n", hermon, va, size, pa, strerror ( rc ) ); return rc; } va += size; } assert ( low == start ); assert ( high == end ); return 0; } /** * Start firmware running * * @v hermon ConnectX3 device * @ret rc Return status code */ static int hermon_start_firmware ( struct hermon *hermon ) { struct hermonprm_query_fw fw; unsigned int fw_pages; size_t fw_len; physaddr_t fw_base; int rc; /* Get firmware parameters */ if ( ( rc = hermon_cmd_query_fw ( hermon, &fw ) ) != 0 ) { ERROR ( "ConnectX3 %p could not query firmware: %s\n", hermon, strerror ( rc ) ); goto err_query_fw; } DBGC ( hermon, "ConnectX3 %p firmware version %d.%d.%d\n", hermon, MLX_GET ( &fw, fw_rev_major ), MLX_GET ( &fw, fw_rev_minor ), MLX_GET ( &fw, fw_rev_subminor ) ); fw_pages = MLX_GET ( &fw, fw_pages ); DBGC ( hermon, "ConnectX3 %p requires %d pages (%d kB) for firmware\n", hermon, fw_pages, ( fw_pages * 4 ) ); /* Allocate firmware pages and map firmware area */ fw_len = ( fw_pages * HERMON_PAGE_SIZE ); if ( ! hermon->firmware_area ) { hermon->firmware_len = fw_len; hermon->firmware_area = (userptr_t)umalloc ( hermon->firmware_len ); if ( ! hermon->firmware_area ) { rc = -ENOMEM; goto err_alloc_fa; } } else { assert ( hermon->firmware_len == fw_len ); } fw_base = user_to_phys ( hermon->firmware_area, 0 ); DBGC ( hermon, "ConnectX3 %p firmware area at physical [%08lx,%08lx)\n", hermon, fw_base, ( fw_base + fw_len ) ); if ( ( rc = hermon_map_vpm ( hermon, hermon_cmd_map_fa, 0, fw_base, fw_len ) ) != 0 ) { ERROR ( "ConnectX3 %p could not map firmware: %s\n", hermon, strerror ( rc ) ); goto err_map_fa; } /* Start firmware */ if ( ( rc = hermon_cmd_run_fw ( hermon ) ) != 0 ) { ERROR ( "ConnectX3 %p could not run firmware: %s\n", hermon, strerror ( rc ) ); goto err_run_fw; } DBGC ( hermon, "ConnectX3 %p firmware started\n", hermon ); return 0; err_run_fw: err_map_fa: hermon_cmd_unmap_fa ( hermon ); err_alloc_fa: err_query_fw: return rc; } /** * Stop firmware running * * @v hermon ConnectX3 device */ static void hermon_stop_firmware ( struct hermon *hermon ) { int rc; if ( ( rc = hermon_cmd_unmap_fa ( hermon ) ) != 0 ) { ERROR ( "ConnectX3 %p FATAL could not stop firmware: %s\n", hermon, strerror ( rc ) ); /* Leak memory and return; at least we avoid corruption */ hermon->firmware_area = UNULL; return; } } /*************************************************************************** * * Infinihost Context Memory management * *************************************************************************** */ /** * Get device limits * * @v hermon ConnectX3 device * @ret rc Return status code */ static int hermon_get_cap ( struct hermon *hermon ) { struct hermonprm_query_dev_cap dev_cap; int rc; if ( ( rc = hermon_cmd_query_dev_cap ( hermon, &dev_cap ) ) != 0 ) { DBGC ( hermon, "ConnectX3 %p could not get device limits: %s\n", hermon, strerror ( rc ) ); return rc; } hermon->cap.cmpt_entry_size = MLX_GET ( &dev_cap, c_mpt_entry_sz ); hermon->cap.reserved_qps = ( 1 << MLX_GET ( &dev_cap, log2_rsvd_qps ) ); hermon->cap.qpc_entry_size = MLX_GET ( &dev_cap, qpc_entry_sz ); hermon->cap.altc_entry_size = MLX_GET ( &dev_cap, altc_entry_sz ); hermon->cap.auxc_entry_size = MLX_GET ( &dev_cap, aux_entry_sz ); hermon->cap.reserved_srqs = ( 1 << MLX_GET ( &dev_cap, log2_rsvd_srqs ) ); hermon->cap.srqc_entry_size = MLX_GET ( &dev_cap, srq_entry_sz ); hermon->cap.reserved_cqs = ( 1 << MLX_GET ( &dev_cap, log2_rsvd_cqs ) ); hermon->cap.cqc_entry_size = MLX_GET ( &dev_cap, cqc_entry_sz ); hermon->cap.reserved_eqs = MLX_GET ( &dev_cap, num_rsvd_eqs ); if ( hermon->cap.reserved_eqs == 0 ) { /* Backward compatibility */ hermon->cap.reserved_eqs = ( 1 << MLX_GET ( &dev_cap, log2_rsvd_eqs ) ); } hermon->cap.eqc_entry_size = MLX_GET ( &dev_cap, eqc_entry_sz ); hermon->cap.reserved_mtts = ( 1 << MLX_GET ( &dev_cap, log2_rsvd_mtts ) ); hermon->cap.mtt_entry_size = MLX_GET ( &dev_cap, mtt_entry_sz ); hermon->cap.reserved_mrws = ( 1 << MLX_GET ( &dev_cap, log2_rsvd_mrws ) ); hermon->cap.dmpt_entry_size = MLX_GET ( &dev_cap, d_mpt_entry_sz ); hermon->cap.reserved_uars = MLX_GET ( &dev_cap, num_rsvd_uars ); hermon->cap.dpdp = MLX_GET ( &dev_cap, dpdp ); hermon->cap.vep_uc_steering = MLX_GET ( &dev_cap, vep_uc_steering ); hermon->cap.vep_mc_steering = MLX_GET ( &dev_cap, vep_mc_steering ); hermon->cap.nv_mem_Access_supported = MLX_GET( &dev_cap, flash_nv_config); hermon->cap.ncsi_lag_mode = MLX_GET( &dev_cap, ncsi_lag_mode); return 0; } /** * Align ICM table * * @v icm_offset Current ICM offset * @v len ICM table length * @ret icm_offset ICM offset */ static uint64_t icm_align ( uint64_t icm_offset, size_t len ) { /* Round up to a multiple of the table size */ assert ( len == ( 1UL << ( fls ( len ) - 1 ) ) ); return ( ( icm_offset + len - 1 ) & ~( ( ( uint64_t ) len ) - 1 ) ); } /** * Map ICM (allocating if necessary) * * @v hermon ConnectX3 device * @v init_hca INIT_HCA structure to fill in * @ret rc Return status code */ static int hermon_map_icm ( struct hermon *hermon, struct hermonprm_init_hca *init_hca ) { struct hermonprm_scalar_parameter icm_size; struct hermonprm_scalar_parameter icm_aux_size; uint64_t icm_offset = 0; unsigned int log_num_qps, log_num_srqs, log_num_cqs, log_num_eqs; unsigned int log_num_mtts, log_num_mpts, log_num_mcs; size_t cmpt_max_len; size_t icm_len, icm_aux_len; size_t len; physaddr_t icm_phys; int i; int rc; /* * Start by carving up the ICM virtual address space * */ /* Calculate number of each object type within ICM */ log_num_qps = fls ( hermon->cap.reserved_qps + HERMON_RSVD_SPECIAL_QPS + HERMON_MAX_QPS - 1 ); log_num_srqs = fls ( hermon->cap.reserved_srqs - 1 ); log_num_cqs = fls ( hermon->cap.reserved_cqs + HERMON_MAX_CQS - 1 ); log_num_eqs = fls ( hermon->cap.reserved_eqs + HERMON_MAX_EQS - 1 ); log_num_mtts = fls ( hermon->cap.reserved_mtts + HERMON_MAX_MTTS - 1 ); log_num_mpts = fls ( hermon->cap.reserved_mrws + 1 - 1 ); log_num_mcs = HERMON_LOG_MULTICAST_HASH_SIZE; /* ICM starts with the cMPT tables, which are sparse */ cmpt_max_len = ( HERMON_CMPT_MAX_ENTRIES * ( ( uint64_t ) hermon->cap.cmpt_entry_size ) ); len = ( ( ( ( 1 << log_num_qps ) * hermon->cap.cmpt_entry_size ) + HERMON_PAGE_SIZE - 1 ) & ~( HERMON_PAGE_SIZE - 1 ) ); hermon->icm_map[HERMON_ICM_QP_CMPT].offset = icm_offset; hermon->icm_map[HERMON_ICM_QP_CMPT].len = len; icm_offset += cmpt_max_len; len = ( ( ( ( 1 << log_num_srqs ) * hermon->cap.cmpt_entry_size ) + HERMON_PAGE_SIZE - 1 ) & ~( HERMON_PAGE_SIZE - 1 ) ); hermon->icm_map[HERMON_ICM_SRQ_CMPT].offset = icm_offset; hermon->icm_map[HERMON_ICM_SRQ_CMPT].len = len; icm_offset += cmpt_max_len; len = ( ( ( ( 1 << log_num_cqs ) * hermon->cap.cmpt_entry_size ) + HERMON_PAGE_SIZE - 1 ) & ~( HERMON_PAGE_SIZE - 1 ) ); hermon->icm_map[HERMON_ICM_CQ_CMPT].offset = icm_offset; hermon->icm_map[HERMON_ICM_CQ_CMPT].len = len; icm_offset += cmpt_max_len; len = ( ( ( ( 1 << log_num_eqs ) * hermon->cap.cmpt_entry_size ) + HERMON_PAGE_SIZE - 1 ) & ~( HERMON_PAGE_SIZE - 1 ) ); hermon->icm_map[HERMON_ICM_EQ_CMPT].offset = icm_offset; hermon->icm_map[HERMON_ICM_EQ_CMPT].len = len; icm_offset += cmpt_max_len; hermon->icm_map[HERMON_ICM_OTHER].offset = icm_offset; /* Queue pair contexts */ len = ( ( 1 << log_num_qps ) * hermon->cap.qpc_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 12, qpc_eec_cqc_eqc_rdb_parameters.qpc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_2 ( init_hca, 13, qpc_eec_cqc_eqc_rdb_parameters.qpc_base_addr_l, ( icm_offset >> 5 ), qpc_eec_cqc_eqc_rdb_parameters.log_num_of_qp, log_num_qps ); DBGC ( hermon, "ConnectX3 %p ICM QPC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_qps ), hermon->cap.qpc_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Extended alternate path contexts */ len = ( ( 1 << log_num_qps ) * hermon->cap.altc_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 24, qpc_eec_cqc_eqc_rdb_parameters.altc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_1 ( init_hca, 25, qpc_eec_cqc_eqc_rdb_parameters.altc_base_addr_l, icm_offset ); DBGC ( hermon, "ConnectX3 %p ICM ALTC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_qps ), hermon->cap.altc_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Extended auxiliary contexts */ len = ( ( 1 << log_num_qps ) * hermon->cap.auxc_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 28, qpc_eec_cqc_eqc_rdb_parameters.auxc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_1 ( init_hca, 29, qpc_eec_cqc_eqc_rdb_parameters.auxc_base_addr_l, icm_offset ); DBGC ( hermon, "ConnectX3 %p ICM AUXC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_qps ), hermon->cap.auxc_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Shared receive queue contexts */ len = ( ( 1 << log_num_srqs ) * hermon->cap.srqc_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 18, qpc_eec_cqc_eqc_rdb_parameters.srqc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_2 ( init_hca, 19, qpc_eec_cqc_eqc_rdb_parameters.srqc_base_addr_l, ( icm_offset >> 5 ), qpc_eec_cqc_eqc_rdb_parameters.log_num_of_srq, log_num_srqs ); DBGC ( hermon, "ConnectX3 %p ICM SRQC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_srqs ), hermon->cap.srqc_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Completion queue contexts */ len = ( ( 1 << log_num_cqs ) * hermon->cap.cqc_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 20, qpc_eec_cqc_eqc_rdb_parameters.cqc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_2 ( init_hca, 21, qpc_eec_cqc_eqc_rdb_parameters.cqc_base_addr_l, ( icm_offset >> 5 ), qpc_eec_cqc_eqc_rdb_parameters.log_num_of_cq, log_num_cqs ); DBGC ( hermon, "ConnectX3 %p ICM CQC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_cqs ), hermon->cap.cqc_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Event queue contexts */ len = ( ( 1 << log_num_eqs ) * hermon->cap.eqc_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 32, qpc_eec_cqc_eqc_rdb_parameters.eqc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_2 ( init_hca, 33, qpc_eec_cqc_eqc_rdb_parameters.eqc_base_addr_l, ( icm_offset >> 5 ), qpc_eec_cqc_eqc_rdb_parameters.log_num_of_eq, log_num_eqs ); DBGC ( hermon, "ConnectX3 %p ICM EQC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_eqs ), hermon->cap.eqc_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Memory translation table */ len = ( ( 1 << log_num_mtts ) * hermon->cap.mtt_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 64, tpt_parameters.mtt_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_1 ( init_hca, 65, tpt_parameters.mtt_base_addr_l, icm_offset ); DBGC ( hermon, "ConnectX3 %p ICM MTT is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_mtts ), hermon->cap.mtt_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Memory protection table */ len = ( ( 1 << log_num_mpts ) * hermon->cap.dmpt_entry_size ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 60, tpt_parameters.dmpt_base_adr_h, ( icm_offset >> 32 ) ); MLX_FILL_1 ( init_hca, 61, tpt_parameters.dmpt_base_adr_l, icm_offset ); MLX_FILL_1 ( init_hca, 62, tpt_parameters.log_dmpt_sz, log_num_mpts ); DBGC ( hermon, "ConnectX3 %p ICM DMPT is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_mpts ), hermon->cap.dmpt_entry_size, icm_offset, ( icm_offset + len ) ); icm_offset += len; /* Multicast table */ len = ( ( 1 << log_num_mcs ) * sizeof ( struct hermonprm_mcg_entry ) ); icm_offset = icm_align ( icm_offset, len ); MLX_FILL_1 ( init_hca, 48, multicast_parameters.mc_base_addr_h, ( icm_offset >> 32 ) ); MLX_FILL_1 ( init_hca, 49, multicast_parameters.mc_base_addr_l, icm_offset ); MLX_FILL_1 ( init_hca, 52, multicast_parameters.log_mc_table_entry_sz, fls ( sizeof ( struct hermonprm_mcg_entry ) - 1 ) ); MLX_FILL_1 ( init_hca, 53, multicast_parameters.log_mc_table_hash_sz, log_num_mcs - 1 ); MLX_FILL_2 ( init_hca, 54, multicast_parameters.log_mc_table_sz, log_num_mcs, multicast_parameters.uc_group_steering, ( hermon->cap.vep_uc_steering ? 1 : 0 ) ); DBGC ( hermon, "ConnectX3 %p ICM MC is %d x %x at [%08llx,%08llx)\n", hermon, ( 1 << log_num_mcs ), sizeof ( struct hermonprm_mcg_entry ), icm_offset, ( icm_offset + len ) ); icm_offset += len; hermon->icm_map[HERMON_ICM_OTHER].len = ( icm_offset - hermon->icm_map[HERMON_ICM_OTHER].offset ); /* * Allocate and map physical memory for (portions of) ICM * * Map is: * ICM AUX area (aligned to its own size) * cMPT areas * Other areas */ /* Calculate physical memory required for ICM */ icm_len = 0; for ( i = 0 ; i < HERMON_ICM_NUM_REGIONS ; i++ ) { icm_len += hermon->icm_map[i].len; } /* Get ICM auxiliary area size */ memset ( &icm_size, 0, sizeof ( icm_size ) ); MLX_FILL_1 ( &icm_size, 0, value_hi, ( icm_offset >> 32 ) ); MLX_FILL_1 ( &icm_size, 1, value, icm_offset ); if ( ( rc = hermon_cmd_set_icm_size ( hermon, &icm_size, &icm_aux_size ) ) != 0 ) { ERROR ( "ConnectX3 %p could not set ICM size: %s\n", hermon, strerror ( rc ) ); goto err_set_icm_size; } icm_aux_len = ( MLX_GET ( &icm_aux_size, value ) * HERMON_PAGE_SIZE ); /* Allocate ICM data and auxiliary area */ DBGC ( hermon, "ConnectX3 %p requires %zd kB ICM and %zd kB AUX ICM\n", hermon, ( icm_len / 1024 ), ( icm_aux_len / 1024 ) ); if ( ! hermon->icm ) { hermon->icm_len = icm_len; hermon->icm_aux_len = icm_aux_len; hermon->icm = (userptr_t)umalloc ( hermon->icm_aux_len + hermon->icm_len ); if ( ! hermon->icm ) { rc = -ENOMEM; goto err_alloc; } } else { assert ( hermon->icm_len == icm_len ); assert ( hermon->icm_aux_len == icm_aux_len ); } icm_phys = user_to_phys ( hermon->icm, 0 ); /* Map ICM auxiliary area */ DBGC ( hermon, "ConnectX3 %p mapping ICM AUX => %08lx\n", hermon, icm_phys ); if ( ( rc = hermon_map_vpm ( hermon, hermon_cmd_map_icm_aux, 0, icm_phys, icm_aux_len ) ) != 0 ) { ERROR ( "ConnectX3 %p could not map AUX ICM: %s\n", hermon, strerror ( rc ) ); goto err_map_icm_aux; } icm_phys += icm_aux_len; /* MAP ICM area */ for ( i = 0 ; i < HERMON_ICM_NUM_REGIONS ; i++ ) { DBGC ( hermon, "ConnectX3 %p mapping ICM %llx+%x => %08lx\n", hermon, hermon->icm_map[i].offset, hermon->icm_map[i].len, icm_phys ); if ( ( rc = hermon_map_vpm ( hermon, hermon_cmd_map_icm, hermon->icm_map[i].offset, icm_phys, hermon->icm_map[i].len ) ) != 0 ){ ERROR ( "ConnectX3 %p could not map ICM: %s\n", hermon, strerror ( rc ) ); goto err_map_icm; } icm_phys += hermon->icm_map[i].len; } return 0; err_map_icm: assert ( i == 0 ); /* We don't handle partial failure at present */ err_map_icm_aux: hermon_cmd_unmap_icm_aux ( hermon ); err_alloc: err_set_icm_size: return rc; } /** * Unmap ICM * * @v hermon ConnectX3 device */ static void hermon_unmap_icm ( struct hermon *hermon ) { struct hermonprm_scalar_parameter unmap_icm; int i; for ( i = ( HERMON_ICM_NUM_REGIONS - 1 ) ; i >= 0 ; i-- ) { memset ( &unmap_icm, 0, sizeof ( unmap_icm ) ); MLX_FILL_1 ( &unmap_icm, 0, value_hi, ( hermon->icm_map[i].offset >> 32 ) ); MLX_FILL_1 ( &unmap_icm, 1, value, hermon->icm_map[i].offset ); hermon_cmd_unmap_icm ( hermon, ( 1 << fls ( ( hermon->icm_map[i].len / HERMON_PAGE_SIZE ) - 1)), &unmap_icm ); } hermon_cmd_unmap_icm_aux ( hermon ); } /*************************************************************************** * * Initialisation and teardown * *************************************************************************** */ /** * Reset device * * @v hermon ConnectX3 device */ static void hermon_reset ( struct hermon *hermon, unsigned int reset_type ) { EFI_PCI_IO_PROTOCOL *pci = hermon->pci; struct pci_config_backup backup; static const uint8_t backup_exclude[] = PCI_CONFIG_BACKUP_EXCLUDE ( 0x58, 0x5c ); mdelay ( HERMON_RESET_WAIT_TIME_MS ); /* Perform device reset and preserve PCI configuration */ memset(&backup, 0, sizeof(struct pci_config_backup)); pci_backup ( pci, &backup, backup_exclude ); WRITE_REG (hermon, reset_type, ( hermon->config + HERMON_RESET_OFFSET ) ); mdelay ( HERMON_RESET_WAIT_TIME_MS ); pci_restore ( pci, &backup, backup_exclude ); /* Reset command interface toggle */ hermon->toggle = 0; } /** * Set up memory protection table * * @v hermon ConnectX3 device * @ret rc Return status code */ static int hermon_setup_mpt ( struct hermon *hermon ) { struct hermonprm_mpt mpt; uint32_t key; int rc; /* Derive key */ key = ( hermon->cap.reserved_mrws | HERMON_MKEY_PREFIX ); hermon->lkey = ( ( key << 8 ) | ( key >> 24 ) ); /* Initialise memory protection table */ memset ( &mpt, 0, sizeof ( mpt ) ); MLX_FILL_7 ( &mpt, 0, atomic, 1, rw, 1, rr, 1, lw, 1, lr, 1, pa, 1, r_w, 1 ); MLX_FILL_1 ( &mpt, 2, mem_key, key ); MLX_FILL_1 ( &mpt, 3, pd, HERMON_GLOBAL_PD ); MLX_FILL_1 ( &mpt, 10, len64, 1 ); if ( ( rc = hermon_cmd_sw2hw_mpt ( hermon, hermon->cap.reserved_mrws, &mpt ) ) != 0 ) { ERROR ( "ConnectX3 %p could not set up MPT: %s\n", hermon, strerror ( rc ) ); return rc; } return 0; } /** * Configure special queue pairs * * @v hermon ConnectX3 device * @ret rc Return status code */ static int hermon_configure_special_qps ( struct hermon *hermon ) { int rc; /* Special QP block must be aligned on its own size */ hermon->special_qpn_base = ( ( hermon->cap.reserved_qps + HERMON_NUM_SPECIAL_QPS - 1 ) & ~( HERMON_NUM_SPECIAL_QPS - 1 ) ); hermon->qpn_base = ( hermon->special_qpn_base + HERMON_NUM_SPECIAL_QPS ); DBGC ( hermon, "ConnectX3 %p special QPs at [%lx,%lx]\n", hermon, hermon->special_qpn_base, ( hermon->qpn_base - 1 ) ); /* Issue command to configure special QPs */ if ( ( rc = hermon_cmd_conf_special_qp ( hermon, 0x00, hermon->special_qpn_base ) ) != 0 ) { ERROR ( "ConnectX3 %p could not configure special QPs: " "%s\n", hermon, strerror ( rc ) ); return rc; } return 0; } /** * Start ConnectX3 device * * @v hermon ConnectX3 device * @v running Firmware is already running * @ret rc Return status code */ static int hermon_start ( struct hermon *hermon, int running ) { struct hermonprm_init_hca init_hca; unsigned int i; int rc; /* Start firmware if not already running */ if ( ! running ) { hermon_reset ( hermon, HERMON_RESET_START ); if ( ( rc = hermon_start_firmware ( hermon ) ) != 0 ) goto err_start_firmware; } /* Allocate and map ICM */ memset ( &init_hca, 0, sizeof ( init_hca ) ); if ( ( rc = hermon_map_icm ( hermon, &init_hca ) ) != 0 ) goto err_map_icm; /* Initialise HCA */ MLX_FILL_1 ( &init_hca, 0, version, 0x02 /* "Must be 0x02" */ ); MLX_FILL_1 ( &init_hca, 5, udp, 1 ); MLX_FILL_1 ( &init_hca, 74, uar_parameters.log_max_uars, 8 ); if ( ( rc = hermon_cmd_init_hca ( hermon, &init_hca ) ) != 0 ) { ERROR ( "ConnectX3 %p could not initialise HCA: %s\n", hermon, strerror ( rc ) ); goto err_init_hca; } /* Set up memory protection */ if ( ( rc = hermon_setup_mpt ( hermon ) ) != 0 ) goto err_setup_mpt; for ( i = 0 ; i < hermon->num_ports ; i++ ) hermon->port[i].ibdev->rdma_key = hermon->lkey; /* Set up event queue */ if ( ( rc = hermon_create_eq ( hermon ) ) != 0 ) goto err_create_eq; /* Configure special QPs */ if ( ( rc = hermon_configure_special_qps ( hermon ) ) != 0 ) goto err_conf_special_qps; hermon->mcg_aux_index = ( MC_TABLE_SIZE / 2 ); INIT_LIST_HEAD ( &hermon->ncsi_mgids ); return 0; err_conf_special_qps: hermon_destroy_eq ( hermon ); err_create_eq: err_setup_mpt: hermon_cmd_close_hca ( hermon ); err_init_hca: hermon_unmap_icm ( hermon ); err_map_icm: hermon_stop_firmware ( hermon ); err_start_firmware: return rc; } /** * Stop ConnectX3 device * * @v hermon ConnectX3 device */ static void hermon_stop ( struct hermon *hermon ) { hermon_destroy_eq ( hermon ); hermon_cmd_close_hca ( hermon ); hermon_unmap_icm ( hermon ); hermon_stop_firmware ( hermon ); //hermon_reset ( hermon, be32_to_cpu ( HERMON_RESET_END ) ); /* Reset command interface toggle */ hermon->toggle = 0; } /** * Open ConnectX3 device * * @v hermon ConnectX3 device * @ret rc Return status code */ static int hermon_open ( struct hermon *hermon ) { int rc; /* Start device if applicable */ if ( hermon->open_count == 0 ) { if ( ( rc = hermon_start ( hermon, 0 ) ) != 0 ) return rc; } /* Increment open counter */ hermon->open_count++; return 0; } /** * Close ConnectX3 device * * @v hermon ConnectX3 device */ static void hermon_close ( struct hermon *hermon ) { /* Decrement open counter */ assert ( hermon->open_count != 0 ); hermon->open_count--; /* Stop device if applicable */ if ( hermon->open_count == 0 ) hermon_stop ( hermon ); } /*************************************************************************** * * Infiniband link-layer operations * *************************************************************************** */ /** * Initialise Infiniband link * * @v ibdev Infiniband device * @ret rc Return status code */ static int hermon_ib_open ( struct ib_device *ibdev ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); union hermonprm_set_port set_port; int rc; /* Open hardware */ if ( ( rc = hermon_open ( hermon ) ) != 0 ) goto err_open; /* Set port parameters */ memset ( &set_port, 0, sizeof ( set_port ) ); MLX_FILL_8 ( &set_port.ib, 0, mmc, 1, mvc, 1, mp, 1, mg, 1, mtu_cap, IB_MTU_2048, vl_cap, IB_VL_0, rcm, 1, lss, 1 ); MLX_FILL_2 ( &set_port.ib, 10, max_pkey, 1, max_gid, 1 ); MLX_FILL_1 ( &set_port.ib, 28, link_speed_supported, 1 ); if ( ( rc = hermon_cmd_set_port ( hermon, 0, ibdev->port, &set_port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not set port: %s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_set_port; } /* Initialise port */ if ( ( rc = hermon_cmd_init_port ( hermon, ibdev->port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not initialise port: " "%s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_init_port; } /* Update MAD parameters */ ib_smc_update ( ibdev, hermon_mad ); return 0; err_init_port: err_set_port: hermon_close ( hermon ); err_open: return rc; } /** * Close Infiniband link * * @v ibdev Infiniband device */ static void hermon_ib_close ( struct ib_device *ibdev ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); int rc; /* Close port */ if ( ( rc = hermon_cmd_close_port ( hermon, ibdev->port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not close port: %s\n", hermon, ibdev->port, strerror ( rc ) ); /* Nothing we can do about this */ } /* Close hardware */ hermon_close ( hermon ); } /** * Inform embedded subnet management agent of a received MAD * * @v ibdev Infiniband device * @v mad MAD * @ret rc Return status code */ static int hermon_inform_sma ( struct ib_device *ibdev, union ib_mad *mad ) { int rc; /* Send the MAD to the embedded SMA */ if ( ( rc = hermon_mad ( ibdev, mad ) ) != 0 ) return rc; /* Update parameters held in software */ ib_smc_update ( ibdev, hermon_mad ); return 0; } /** * Get number of physical ports * * @v ibdev Infiniband device * @ret num Return status code */ int hermon_num_phy_ports ( struct ib_device *ibdev ) { struct hermon *hermon = ib_get_drvdata ( ibdev ); return hermon->num_ports; } /** ConnectX3 Infiniband operations */ static struct ib_device_operations hermon_ib_operations = { .create_cq = hermon_create_cq, .destroy_cq = hermon_destroy_cq, .create_qp = hermon_create_qp, .modify_qp = hermon_modify_qp, .destroy_qp = hermon_destroy_qp, .post_send = hermon_post_send, .post_recv = hermon_post_recv, .poll_cq = hermon_poll_cq, .poll_eq = hermon_poll_eq, .open = hermon_ib_open, .close = hermon_ib_close, .mcast_attach = hermon_mcast_attach, .mcast_detach = hermon_mcast_detach, .set_port_info = hermon_inform_sma, .set_pkey_table = hermon_inform_sma, .num_phy_ports = hermon_num_phy_ports, }; /*************************************************************************** * * Ethernet operation * *************************************************************************** */ int hermon_eth_add_steer ( struct ib_device *ibdev, struct ib_queue_pair *eth_qp ) { struct hermonprm_eth_mgi mgi; int rc; /* Join broadcast mutlicast group */ memset ( &mgi, 0, sizeof ( mgi ) ); MLX_FILL_3 ( &mgi, 1, vep_num, ibdev->vep_number, portnum, ibdev->port, unicast, MLX4_MC_STEER ); MLX_FILL_1 ( &mgi, 2, mac_h, 0xffff ); MLX_FILL_1 ( &mgi, 3, mac_l, 0xffffffffUL ); if ( ( rc = ib_mcast_attach ( ibdev, eth_qp, ( union ib_gid * ) &mgi ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx could not attach to " "multicast group: %s\n", ib_get_drvdata ( ibdev ), eth_qp->qpn, strerror ( rc ) ); return rc; } /* Add MAC to unicast group */ memset ( &mgi, 0, sizeof ( mgi ) ); MLX_FILL_3 ( &mgi, 1, vep_num, ibdev->vep_number, portnum, ibdev->port, unicast, MLX4_UC_STEER ); MLX_FILL_1 ( &mgi, 2, mac_h, ibdev->eth_mac_h ); MLX_FILL_1 ( &mgi, 3, mac_l, ibdev->eth_mac_l ); if ( ( rc = ib_mcast_attach ( ibdev, eth_qp, ( union ib_gid * ) &mgi ) ) != 0 ) { ERROR ( "ConnectX3 %p QPN %lx could not attach to " "multicast group: %s\n", ib_get_drvdata ( ibdev ), eth_qp->qpn, strerror ( rc ) ); return rc; } return 0; } void hermon_eth_release_steer ( struct ib_device *ibdev, struct ib_queue_pair *eth_qp ) { union ib_gid gid; struct ib_multicast_gid *mgid; struct ib_multicast_gid *tmp; list_for_each_entry_safe ( mgid, tmp, &eth_qp->mgids, list ) { memcpy ( &gid, &mgid->gid, sizeof ( union ib_gid ) ); hermon_mcast_detach ( ibdev, eth_qp, &gid ); list_del(&mgid->list); } } /* Detach multicast groups used by NCSI */ void hermon_eth_ncsi_release_steer ( struct hermon *hermon ) { struct ib_queue_pair *tmp_qp; struct ib_device *tmp_ibdev; struct ib_multicast_gid *mgid; struct ib_multicast_gid *tmp; union ib_gid gid; tmp_ibdev = zalloc ( sizeof ( *tmp_ibdev ) ); if ( ! tmp_ibdev ) { return; } tmp_qp = zalloc ( sizeof ( *tmp_qp ) ); if ( ! tmp_qp ) { return; } tmp_ibdev->protocol = HERMON_PROT_ETH; ib_set_drvdata ( tmp_ibdev, hermon ); list_for_each_entry_safe ( mgid, tmp, &hermon->ncsi_mgids, list ) { memcpy ( &gid, &mgid->gid, sizeof ( union ib_gid ) ); tmp_qp->qpn = mgid->qpn; hermon_mcast_detach ( tmp_ibdev, tmp_qp, &gid ); } free ( tmp_qp ); free ( tmp_ibdev); } /** * Transmit packet via ConnectX3 Ethernet device * * @v netdev Network device * @v iobuf I/O buffer * @ret rc Return status code */ static int hermon_eth_transmit ( struct hermon_port *port, struct io_buffer *iobuf ) { struct ib_device *ibdev = port->ibdev; int rc; /* Transmit packet */ if ( ( rc = ib_post_send ( ibdev, port->eth_qp, NULL, iobuf ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not transmit: %s\n", ib_get_drvdata ( ibdev ), ibdev->port, strerror ( rc ) ); return rc; } return 0; } /** * Handle ConnectX3 Ethernet device send completion * * @v ibdev Infiniband device * @v qp Queue pair * @v iobuf I/O buffer * @v rc Completion status code */ static void hermon_eth_complete_send ( struct ib_device *ibdev __unused, struct ib_queue_pair *qp, struct io_buffer *iobuf, int rc ) { TAG(); free_iob(iobuf); } /** * Handle ConnectX3 Ethernet device receive completion * * @v ibdev Infiniband device * @v qp Queue pair * @v av Address vector, or NULL * @v iobuf I/O buffer * @v rc Completion status code */ static void hermon_eth_complete_recv ( struct ib_device *ibdev __unused, struct ib_queue_pair *qp, struct ib_address_vector *av, struct io_buffer *iobuf, int rc ) { //struct net_device *netdev = ib_qp_get_ownerdata ( qp ); //struct hermon *hermon = ib_get_drvdata ( ibdev ); /* Hand off to network layer */ TAG("len = %x[%d]", iob_len(iobuf), rc); if (rc == 0) Mellanox_Callback_GetReceiveData(ib_qp_get_ownerdata ( qp ), iobuf->data, iob_len(iobuf)); free_iob(iobuf); TAG("Out of NetReceive"); } /** ConnectX3 Ethernet device completion operations */ static struct ib_completion_queue_operations hermon_eth_cq_op = { .complete_send = hermon_eth_complete_send, .complete_recv = hermon_eth_complete_recv, }; /** * Poll ConnectX3 Ethernet device * * @v netdev Network device */ static int hermon_eth_poll ( struct hermon_port *port ) { struct ib_device *ibdev = port->ibdev; struct hermon *hermon = ib_get_drvdata ( ibdev ); /* NetLoop will call eth_halt before its been opened */ if (!hermon->open_count) { DBGC( hermon, "ConnectX3 %p hermon NIC is closed. Cowardly refuse to execute \n", hermon, hermon_eth_poll); return 0; } ib_poll_eq ( ibdev ); if (poll_verbosity) TAG("Out"); poll_verbosity = 0; /* No one cares what's returned... */ return 1; } /** * Open ConnectX3 Ethernet device * * @v netdev Network device * @ret rc Return status code */ static int hermon_eth_open ( struct hermon_port *port, void *priv_data) { struct ib_device *ibdev = port->ibdev; struct hermon *hermon = ib_get_drvdata ( ibdev ); union hermonprm_set_port set_port; int rc; TAG(); /* Open hardware */ if ( ( rc = hermon_open ( hermon ) ) != 0 ) goto err_open; /* Allocate completion queue */ port->eth_cq = ib_create_cq ( ibdev, HERMON_ETH_NUM_CQES, &hermon_eth_cq_op ); if ( ! port->eth_cq ) { ERROR ( "ConnectX3 %p port %d could not create completion " "queue\n", hermon, ibdev->port ); rc = -ENOMEM; goto err_create_cq; } TAG(); /* Allocate queue pair */ port->eth_qp = ib_create_qp ( ibdev, IB_QPT_ETH, HERMON_ETH_NUM_SEND_WQES, port->eth_cq, HERMON_ETH_NUM_RECV_WQES, port->eth_cq ); if ( ! port->eth_qp ) { ERROR ( "ConnectX3 %p port %d could not create queue " "pair\n", hermon, ibdev->port ); rc = -ENOMEM; goto err_create_qp; } TAG(); ib_qp_set_ownerdata ( port->eth_qp, priv_data ); /* Activate queue pair */ if ( ( rc = ib_modify_qp ( ibdev, port->eth_qp ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not modify queue " "pair: %s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_modify_qp; } TAG(); /* Add steering */ if ( ( rc = hermon_eth_add_steer ( ibdev, port->eth_qp ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d failed to add steering:" " %s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_add_steer; } /* Fill receive rings */ ib_refill_recv ( ibdev, port->eth_qp ); /* Set port general parameters */ memset ( &set_port, 0, sizeof ( set_port ) ); MLX_FILL_3 ( &set_port.general, 0, v_mtu, 1, v_pprx, 1, v_pptx, 1 ); MLX_FILL_1 ( &set_port.general, 1, mtu, ( ETH_FRAME_LEN + 40 /* Used by card */ ) ); MLX_FILL_1 ( &set_port.general, 2, pptx, port->port_nv_conf.flow_control.pptx ); MLX_FILL_1 ( &set_port.general, 3, pprx, port->port_nv_conf.flow_control.pprx ); if ( ( rc = hermon_cmd_set_port ( hermon, 1, ( HERMON_SET_PORT_GENERAL_PARAM | ibdev->port ), &set_port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not set port general " "parameters: %s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_set_port_general_params; } TAG(); /* Set port mac table */ memset ( &set_port, 0, sizeof ( set_port ) ); MLX_FILL_3 ( set_port.mac_table, 0, mac_vep, ibdev->vep_number, v, 1, mac_h, ibdev->eth_mac_h ); MLX_FILL_1 ( set_port.mac_table, 1, mac_l, ibdev->eth_mac_l ); if ( ( rc = hermon_cmd_set_port ( hermon, 1, ( HERMON_SET_PORT_MAC_TABLE | ibdev->port ), &set_port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not set port mac " "table: %s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_set_port_mac_table; } TAG(); /* Initialise port */ if ( ( rc = hermon_cmd_init_port ( hermon, ibdev->port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not initialise port: " "%s\n", hermon, ibdev->port, strerror ( rc ) ); goto err_init_port; } if (hermon->cap.ncsi_lag_mode) { sleep(65); } return 0; err_init_port: err_set_port_general_params: err_set_port_mac_table: err_add_steer: hermon_eth_release_steer ( ibdev, port->eth_qp ); err_modify_qp: ib_destroy_qp ( ibdev, port->eth_qp ); err_create_qp: ib_destroy_cq ( ibdev, port->eth_cq ); err_create_cq: hermon_close ( hermon ); err_open: TAG("rc %d\n", rc); return rc; } /** * Close ConnectX3 Ethernet device * * @v netdev Network device */ static void hermon_eth_close ( struct hermon_port *port ) { struct ib_device *ibdev = port->ibdev; struct hermon *hermon = ib_get_drvdata ( ibdev ); int rc; TAG(); /* NetLoop will call eth_halt before its been opened */ if (!hermon->open_count) { return; } /* NULL pointers here can crash U-Boot */ assert( port->eth_qp ); assert( port->eth_cq ); /* Close port */ if ( ( rc = hermon_cmd_close_port ( hermon, ibdev->port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not close port: %s\n", hermon, ibdev->port, strerror ( rc ) ); /* Nothing we can do about this */ } /* Release steering */ hermon_eth_release_steer ( ibdev, port->eth_qp ); /* Tear down the queues */ ib_destroy_qp ( ibdev, port->eth_qp ); ib_destroy_cq ( ibdev, port->eth_cq ); port->eth_qp = NULL; port->eth_cq = NULL; /* Close hardware */ hermon_close ( hermon ); } #ifndef CONNECTX_IB_ONLY /** * Register ConnectX3 Ethernet device * * @v hermon ConnectX3 device * @v port ConnectX3 port * @ret rc Return status code */ static int hermon_register_netdev ( struct hermon *hermon, struct hermon_port *port ) { struct ib_device *ibdev = port->ibdev; struct hermonprm_query_port_cap query_port; int rc; /* Set protocol */ ibdev->protocol = HERMON_PROT_ETH; /* Retrieve MAC address */ if ( ( rc = hermon_cmd_query_port ( hermon, ibdev->port, &query_port ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not query port: %s\n", hermon, ibdev->port, strerror ( rc ) ); return rc; } ibdev->eth_mac_l = MLX_GET ( &query_port, mac_31_0 ); ibdev->eth_mac_h = MLX_GET ( &query_port, mac_47_32 ); return 0; } /** * Handle ConnectX3 Ethernet device port state change * * @v hermon ConnectX3 device * @v port ConnectX3 port * @v link_up Link is up */ static void hermon_state_change_netdev ( struct hermon *hermon __unused, struct hermon_port *port, int link_up ) { } /** * Unregister ConnectX3 Ethernet device * * @v hermon ConnectX3 device * @v port ConnectX3 port */ static void hermon_unregister_netdev ( struct hermon *hermon __unused, struct hermon_port *port ) { } /** ConnectX3 Ethernet port type */ static struct hermon_port_type hermon_port_type_eth = { .register_dev = hermon_register_netdev, .state_change = hermon_state_change_netdev, .unregister_dev = hermon_unregister_netdev, }; #endif /*************************************************************************** * * Port type detection * *************************************************************************** */ /** * Name port type * * @v port_type Port type * @v port_type_name Port type name */ static inline const char * hermon_name_port_type ( unsigned int port_type ) { switch ( port_type ) { case HERMON_PORT_TYPE_UNKNOWN: return "unknown"; case HERMON_PORT_TYPE_IB: return "Infiniband"; case HERMON_PORT_TYPE_ETH: return "Ethernet"; default: return "INVALID"; } } /** * Set port type * * @v hermon ConnectX3 device * @v port ConnectX3 port * @ret rc Return status code */ static int hermon_set_port_type ( struct hermon *hermon __unused, struct hermon_port *port ) { port->type = &hermon_port_type_eth; return 0; } /** * Get Virtual Ethernet Port number * * @v hermon ConnectX3 device * @ret rc Return status code */ int vep_get_function ( struct hermon *hermon, u8 vep_index, int port, u8 *vep_function ) { struct hermonprm_mod_stat_cfg stat_cfg; int rc = 0; /* Query static configuration */ if ( ( rc = hermon_mod_stat_cfg ( hermon, port, HERMON_MOD_STAT_CFG_QUERY, HERMON_MOD_STAT_CFG_OFFSET ( pf_net_boot_m ), vep_index, HERMON_SETUP_MODE_VEP, &stat_cfg ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not query " "configuration: %s\n", hermon, port, strerror ( rc ) ); return rc; } *vep_function = MLX_GET ( &stat_cfg, funix ); return 0; } /** * Check CLP boot enable * * @v hermon ConnectX3 device * @ret rc Return status code */ int hermon_check_clp_boot_enable ( struct hermon *hermon, u8 vep_index, int port, u8 *boot_enable ) { u8 vep_function; struct hermonprm_mod_stat_cfg stat_cfg; int rc = 0; *boot_enable = 0; if ( ( rc = vep_get_function ( hermon, vep_index, port, &vep_function ) ) != 0 ) { ERROR ( "ConnectX3 %p could not get vep function %s\n", hermon, strerror ( rc ) ); return rc; } if ( vep_function != hermon->physical_function ) return 0; /* Query static configuration */ if ( ( rc = hermon_mod_stat_cfg ( hermon, port, HERMON_MOD_STAT_CFG_QUERY, HERMON_MOD_STAT_CFG_OFFSET ( pf_net_boot_m ), vep_index, HERMON_SETUP_MODE_VEP, &stat_cfg ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not query " "configuration: %s\n", hermon, port, strerror ( rc ) ); return rc; } if ( MLX_GET ( &stat_cfg, pf_net_boot ) == 0 ) { DBGC ( hermon, "ConnectX3 %p port:%d disabled" " booting by CLP\n",hermon, port ); } else { DBGC ( hermon, "ConnectX3 %p port:%d enabled" " booting by CLP\n",hermon, port ); *boot_enable = 1; } return 0; } /** * Get number of supported physical functions * * @v hermon ConnectX3 device * @ret rc Return status code */ int hermon_get_num_supported_veps ( struct hermon *hermon, u8 supported_veps[] ) { unsigned int port; struct hermonprm_mod_stat_cfg stat_cfg; int rc = 0; for ( port = 1 ; port <= hermon->num_ports ; port++ ) { /* Query static configuration */ if ( ( rc = hermon_mod_stat_cfg ( hermon, port, HERMON_MOD_STAT_CFG_QUERY, HERMON_MOD_STAT_CFG_OFFSET ( num_veps ), 0, HERMON_SETUP_MODE_PORT_SETUP, &stat_cfg ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not query " "configuration: %s\n", hermon, port, strerror ( rc ) ); return rc; } supported_veps[port - 1] = MLX_GET ( &stat_cfg, num_veps ); DBGC ( hermon, "ConnectX3 %p port %d number supported VEPs %d\n", hermon, port, hermon->num_veps[port - 1] ); } return 0; } /** * Get supported number of ports * * @v hermon ConnectX3 device * @ret rc Return status code */ int hermon_get_num_ports ( struct hermon *hermon ) { struct hermonprm_mod_stat_cfg stat_cfg; int rc = 0; /* Query static configuration */ if ( ( rc = hermon_mod_stat_cfg ( hermon, 0, HERMON_MOD_STAT_CFG_QUERY, HERMON_MOD_STAT_CFG_OFFSET ( num_port ), hermon->physical_function, HERMON_SETUP_MODE_LANE_SETUP, &stat_cfg ) ) != 0 ) { ERROR ( "ConnectX3 %p could not query " "configuration: %s\n", hermon, strerror ( rc ) ); return rc; } hermon->num_ports = MLX_GET ( &stat_cfg, num_port ); /* Sanity check */ if ( hermon->num_ports > HERMON_MAX_PORTS ) { DBGC ( hermon, "ConnectX3 %p has %d ports (only %d supported)\n", hermon, hermon->num_ports, HERMON_MAX_PORTS ); hermon->num_ports = HERMON_MAX_PORTS; } DBGC ( hermon, "ConnectX3 %p supported number of ports %d\n", hermon, hermon->num_ports ); return 0; } /** * Set port masking * * @v hermon ConnectX3 device * @ret rc Return status code */ int set_port_masking ( struct hermon *hermon ) { int rc = 0; u8 vep = 0; unsigned int i; u8 boot_enable = 0; u8 supported_veps[HERMON_MAX_PORTS]; /* Get number of supported ports */ if ( ( rc = hermon_get_num_ports ( hermon ) ) != 0 ) return rc; /* Get number of physical functions */ if ( ( rc = hermon_get_num_supported_veps ( hermon, supported_veps ) ) != 0 ) return rc; /* Check CLP configuration */ hermon->port_mask = 0; for ( i = 0; i < hermon->num_ports ; i++ ) { hermon->num_veps[i] = 0; for ( vep = 0; vep < supported_veps[i]; vep ++ ) { if ( ( rc = hermon_check_clp_boot_enable ( hermon, vep, i + 1, &boot_enable ) ) != 0 ) return rc; if ( boot_enable ) { hermon->port_mask |= (i + 1); hermon->vep_table[i][hermon->num_veps[i]] = vep; hermon->num_veps[i] ++; } } } if ( ! hermon->port_mask ) { /* No port was enabled */ DBGC ( hermon, "ConnectX3 %p No port was enabled for " "booting\n", hermon ); return -ENETUNREACH; } return 0; } /*************************************************************************** * * PCI interface * *************************************************************************** */ /** * Allocate ConnectX3 device * * @v pci PCI device * @v id PCI ID * @ret rc Return status code */ static struct hermon * hermon_alloc ( void ) { struct hermon *hermon; /* Allocate ConnectX3 device */ hermon = zalloc ( sizeof ( *hermon ) ); if ( ! hermon ) goto err_hermon; /* Allocate space for mailboxes */ hermon->mailbox_in = malloc_dma ( HERMON_MBOX_SIZE, HERMON_MBOX_ALIGN ); if ( ! hermon->mailbox_in ) goto err_mailbox_in; hermon->mailbox_out = malloc_dma ( HERMON_MBOX_SIZE, HERMON_MBOX_ALIGN ); if ( ! hermon->mailbox_out ) goto err_mailbox_out; return hermon; free_dma ( hermon->mailbox_out, HERMON_MBOX_SIZE ); err_mailbox_out: free_dma ( hermon->mailbox_in, HERMON_MBOX_SIZE ); err_mailbox_in: free ( hermon ); err_hermon: return NULL; } /** * Free ConnectX3 device * * @v hermon ConnectX3 device */ void hermon_free ( void *hermon ) { if (!hermon) return; ufree ( ((struct hermon *)hermon)->icm ); ufree ( ((struct hermon *)hermon)->firmware_area ); free_dma (((struct hermon *) hermon)->mailbox_out, HERMON_MBOX_SIZE ); free_dma ( ((struct hermon *)hermon)->mailbox_in, HERMON_MBOX_SIZE ); free ( hermon ); } /** * Initialise ConnectX3 PCI parameters * * @v hermon ConnectX3 device */ static void hermon_pci_init ( struct hermon *hermon ) { EFI_PCI_IO_PROTOCOL *pci = hermon->pci; EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *MmioDesc; EFI_STATUS Status; /* Get PCI BARs */ Status = pci->GetBarAttributes ( pci, HERMON_PCI_CONFIG_BAR, NULL, (VOID**) &MmioDesc ); if (EFI_ERROR (Status) || MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM) { ERROR("Mellanox: No mmio bar\n"); assert(0); } hermon->config = (void *)MmioDesc->AddrRangeMin; DBGC2 ( hermon, "BAR0 = %p\n",hermon->config); Status = pci->GetBarAttributes ( pci, HERMON_PCI_UAR_BAR, NULL, (VOID**) &MmioDesc ); if (EFI_ERROR (Status) || MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM) { ERROR("Mellanox: No mmio bar\n"); assert(0); } hermon->uar = (void *)MmioDesc->AddrRangeMin; DBGC2 ( hermon, "BAR1 = %p\n",hermon->uar); hermon->physical_function = 0; } /** * Probe PCI device * * @v pci PCI device * @v id PCI ID * @ret Return hermon pointer. Null if error */ void *hermon_probe (EFI_PCI_IO_PROTOCOL *pci, UINT32 *dev_cnt) { struct hermon *hermon; struct ib_device *ibdev; struct hermon_port *port; //struct hermon_tlv_header tlv; unsigned int vep; unsigned int i; int rc; *dev_cnt = 0; /* Allocate ConnectX3 device */ hermon = hermon_alloc(); if ( ! hermon ) goto err_alloc; hermon->pci = pci; /* Initialise PCI parameters */ hermon_pci_init ( hermon ); /* Reset device */ hermon_reset ( hermon, HERMON_RESET_START ); TAG(); /* Set port mask */ if ( ( rc = set_port_masking ( hermon ) ) != 0 ) { goto err_alloc; } TAG(); /* Allocate Infiniband devices */ for ( i = 0 ; i < hermon->num_ports ; i++ ) { for ( vep = 0; vep < hermon->num_veps[i]; vep++ ) { if ( ! ( hermon->port_mask & ( i + HERMON_PORT_BASE ) ) ) continue; ibdev = alloc_ibdev ( 0 ); if ( ! ibdev ) goto err_alloc_ibdev; hermon->port[i].ibdev = ibdev; ibdev->op = &hermon_ib_operations; ibdev->port = ( HERMON_PORT_BASE + i ); ib_set_drvdata ( ibdev, hermon ); ibdev->vep_number = hermon->vep_table[i][vep]; } } TAG(); /* Start firmware */ if ( ( rc = hermon_start_firmware ( hermon ) ) != 0 ) goto err_start_firmware; TAG(); /* Get device limits */ if ( ( rc = hermon_get_cap ( hermon ) ) != 0 ) goto err_get_cap; TAG(); /* Start device */ if ( ( rc = hermon_start ( hermon, 1 ) ) != 0 ) goto err_start; TAG(); /* Determine port types */ for ( i = 0 ; i < hermon->num_ports ; i++ ) { if ( ! ( hermon->port_mask & ( i + HERMON_PORT_BASE ) ) ) continue; port = &hermon->port[i]; if ( ( rc = hermon_set_port_type ( hermon, port ) ) != 0 ) goto err_set_port_type; } TAG(); /* Register devices */ for ( i = 0 ; i < hermon->num_ports ; i++ ) { if ( ! ( hermon->port_mask & ( i + HERMON_PORT_BASE ) ) ) continue; port = &hermon->port[i]; if ( ( rc = port->type->register_dev ( hermon, port ) ) != 0 ) goto err_register; *dev_cnt = *dev_cnt + 1; } /* Leave device quiescent until opened */ if ( hermon->open_count == 0 ) hermon_stop ( hermon ); TAG(); return hermon; err_register: i = hermon->num_ports; for ( i-- ; ( signed int ) i >= 0 ; i-- ) { if ( ! ( hermon->port_mask & ( i + HERMON_PORT_BASE ) ) ) continue; port = &hermon->port[i]; port->type->unregister_dev ( hermon, port ); } err_set_port_type: hermon_stop ( hermon ); err_start: i = hermon->num_ports; err_alloc_ibdev: i = hermon->num_ports; for ( i-- ; ( signed int ) i >= 0 ; i-- ) { if ( ! ( hermon->port_mask & ( i + HERMON_PORT_BASE ) ) ) continue; ibdev_put ( hermon->port[i].ibdev ); } err_get_cap: hermon_stop_firmware ( hermon ); err_start_firmware: hermon_free ( hermon ); err_alloc: TAG("Error"); return NULL; } int hermon_set_mac( void *hermon, unsigned int mport, const uint8_t *mac ) { struct hermonprm_mod_stat_cfg stat_cfg; union { uint8_t bytes[8]; uint32_t dwords[2]; } buf; int rc = 0; /* Prepare MAC address */ memset ( &buf, 0, sizeof ( buf ) ); memcpy ( &buf.bytes[ sizeof ( buf.bytes ) - ETH_ALEN ], mac, ETH_ALEN ); /* Modify static configuration */ memset ( &stat_cfg, 0, sizeof ( stat_cfg ) ); MLX_FILL_2 ( &stat_cfg, 36, mac_m, 1, mac_high, ntohl ( buf.dwords[0] ) ); MLX_FILL_1 ( &stat_cfg, 37, mac_low, ntohl ( buf.dwords[1] ) ); if ( ( rc = hermon_mod_stat_cfg ( (struct hermon *)hermon, mport, HERMON_MOD_STAT_CFG_SET, HERMON_MOD_STAT_CFG_OFFSET ( mac_m ), 0, HERMON_SETUP_MODE_LANE_SETUP, &stat_cfg ) ) != 0 ) { ERROR ( "ConnectX3 %p port %d could not modify " "configuration: %s\n", hermon, mport, strerror ( rc ) ); } else { DBGC ( hermon, "ConnectX3 %p port %d updated MAC address to %pM\n", hermon, mport, mac ); /* modify our copy of mac address */ ((struct hermon *)hermon)->port[mport-1].ibdev->eth_mac_l = ntohl(buf.dwords[1]); ((struct hermon *)hermon)->port[mport-1].ibdev->eth_mac_h = ntohl(buf.dwords[0]); } TAG(); return rc; } int hermon_get_mac_info(void *hermon, unsigned int mport, uint8_t *mac) { struct hermon_port *port = &(((struct hermon *)hermon)->port[mport]); union { uint8_t bytes[8]; uint32_t dwords[2]; } buf; uint32_t tmp; tmp = htonl(port->ibdev->eth_mac_l); memcpy ( &buf.dwords[1], &tmp, sizeof(buf.dwords[1]) ); tmp = htonl(port->ibdev->eth_mac_h); memcpy ( &buf.dwords[0], &tmp, sizeof(buf.dwords[0]) ); memcpy((void *)mac, &buf.bytes[ sizeof ( buf.bytes ) - ETH_ALEN ], ETH_ALEN); return 0; } int hermon_transmit(void *hermon, unsigned int mport, void *packet, unsigned int length ) { struct hermon_port *port = &(((struct hermon *)hermon)->port[mport]); struct io_buffer *iobuf = alloc_iob(packet, length); iob_put ( iobuf, length ); return hermon_eth_transmit(port, iobuf); } int hermon_poll(void *hermon, unsigned int mport) { return hermon_eth_poll(&(((struct hermon *)hermon)->port[mport])); } int hermon_close_port(void *hermon, unsigned int mport) { struct hermon_port *port = &(((struct hermon *)hermon)->port[mport]); hermon_eth_close(port); return 0; } int hermon_open_port(void *hermon, unsigned int mport, void *priv_data) { struct hermon_port *port = &(((struct hermon *)hermon)->port[mport]); hermon_eth_open(port, priv_data); return 0; }
28.943943
111
0.630079
7820600c6e2821a67d853465aa354d6a4a8c3047
336
h
C
Q-municate/Scenes/NewsFeed/AllPosts/AllPostViewController.h
GoodyIT/social-app-iOS
1484feea3e2ebabe88feefe418d8ef49ea9dce76
[ "Apache-2.0" ]
2
2017-11-05T01:28:54.000Z
2019-10-17T09:56:46.000Z
Q-municate/Scenes/NewsFeed/AllPosts/AllPostViewController.h
GoodyIT/social-app-iOS
1484feea3e2ebabe88feefe418d8ef49ea9dce76
[ "Apache-2.0" ]
null
null
null
Q-municate/Scenes/NewsFeed/AllPosts/AllPostViewController.h
GoodyIT/social-app-iOS
1484feea3e2ebabe88feefe418d8ef49ea9dce76
[ "Apache-2.0" ]
1
2019-08-05T19:45:06.000Z
2019-08-05T19:45:06.000Z
// // AllPostViewController.h // reach-ios // // Created by Admin on 2016-12-06. // Copyright © 2016 Quickblox. All rights reserved. // #import <UIKit/UIKit.h> @interface AllPostViewController : UITableViewController @property (retain, nonatomic) NSMutableArray *postsArray; @property (retain, nonatomic) NSString* hashtag; @end
21
57
0.741071
152c8576a99bfba951ba688df3971befe4d33f59
1,515
c
C
c_src/icu4e.c
beerriot/icu4e
5d52ca8f886b25db7597ea5c1c0210c747c52627
[ "Apache-2.0" ]
2
2015-07-03T08:06:20.000Z
2017-01-16T18:59:44.000Z
c_src/icu4e.c
beerriot/icu4e
5d52ca8f886b25db7597ea5c1c0210c747c52627
[ "Apache-2.0" ]
null
null
null
c_src/icu4e.c
beerriot/icu4e
5d52ca8f886b25db7597ea5c1c0210c747c52627
[ "Apache-2.0" ]
null
null
null
/* ------------------------------------------------------------------- * * icu4e: Erlang NIF wrappers for ICU * * Copyright (c) 2010 Basho Technologies, Inc. All Rights Reserved. * * This file is provided 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. * * ------------------------------------------------------------------- */ /* * General utility functions */ #include "icu4e.h" /* * Reverse an Erlang list. */ ERL_NIF_TERM reverse_list(ErlNifEnv *env, ERL_NIF_TERM l) { ERL_NIF_TERM r = enif_make_list(env, 0); ERL_NIF_TERM h; while(enif_get_list_cell(env, l, &h, &l)) r = enif_make_list_cell(env, h, r); return r; } /* * Wrap up the common error-tuple creation. Creates an error tuple * of the form {error, msg::string()}. */ ERL_NIF_TERM error_tuple(ErlNifEnv* env, const char* msg) { return enif_make_tuple2(env, enif_make_atom(env, "error"), enif_make_string(env, msg, ERL_NIF_LATIN1)); }
29.705882
72
0.609901
ff1a4e1915681ba0796255e4a3a4bcb3d8a58fbc
500
c
C
sjtwo-c/projects/x86_sandbox/test/test_math.c
seanlinc/Playmate
077877d172dd6b7beab910c52ec95ee300bc6480
[ "Apache-2.0" ]
2
2020-04-04T21:09:56.000Z
2020-04-08T17:00:58.000Z
sjtwo-c/projects/x86_sandbox/test/test_math.c
seanlinc/Playmate
077877d172dd6b7beab910c52ec95ee300bc6480
[ "Apache-2.0" ]
13
2020-04-11T21:50:57.000Z
2020-04-19T03:19:48.000Z
sjtwo-c/projects/x86_sandbox/test/test_math.c
seanlinc/Playmate
077877d172dd6b7beab910c52ec95ee300bc6480
[ "Apache-2.0" ]
null
null
null
#include "Mockdummy_module.h" #include "unity.h" #include "math.c" void setUp(void) {} void tearDown(void) {} void test_add(void) { TEST_ASSERT_EQUAL(3, math__add(2, 1)); TEST_ASSERT_EQUAL(3, math__vars.last_result); TEST_ASSERT_EQUAL(3, math__private_get_last_result()); } void test_dummy_module(void) { dummy_module__get_zero_ExpectAndReturn(0); TEST_ASSERT_EQUAL(0, math__return_zero()); dummy_module__get_zero_ExpectAndReturn(1); TEST_ASSERT_EQUAL(1, math__return_zero()); }
20.833333
56
0.764
7f7ac1283309fb8a8297c4bd8ca9f44414ac34e9
2,006
h
C
src/asn1/c/ber_tlv_tag.h
player999/cryptonite
d6ad2a0c79d9914bf1ac535f47425eaad56f5be2
[ "BSD-2-Clause" ]
33
2019-05-04T19:22:25.000Z
2022-02-21T14:01:29.000Z
src/asn1/c/ber_tlv_tag.h
player999/cryptonite
d6ad2a0c79d9914bf1ac535f47425eaad56f5be2
[ "BSD-2-Clause" ]
10
2019-05-14T08:33:28.000Z
2022-01-23T16:31:54.000Z
src/asn1/c/ber_tlv_tag.h
player999/cryptonite
d6ad2a0c79d9914bf1ac535f47425eaad56f5be2
[ "BSD-2-Clause" ]
17
2019-05-04T20:11:36.000Z
2022-01-23T14:59:56.000Z
/* * Copyright (c) 2016 PrivatBank IT <acsk@privatbank.ua>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _BER_TLV_TAG_H_ #define _BER_TLV_TAG_H_ #ifdef __cplusplus extern "C" { #endif enum asn_tag_class { ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ }; typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ /* * Tag class is encoded together with tag value for optimization purposes. */ #define BER_TAG_CLASS(tag) ((tag) & 0x3) #define BER_TAG_VALUE(tag) ((tag) >> 2) #define BER_TLV_CONSTRUCTED(tagptr) (((*(const uint8_t *)tagptr)&0x20)?1:0) #define BER_TAGS_EQUAL(tag1, tag2) ((tag1) == (tag2)) /* * Several functions for printing the TAG in the canonical form * (i.e. "[PRIVATE 0]"). * Return values correspond to their libc counterparts (if any). */ CRYPTONITE_EXPORT ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); CRYPTONITE_EXPORT ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); CRYPTONITE_EXPORT char *ber_tlv_tag_string(ber_tlv_tag_t tag); /* * This function tries to fetch the tag from the input stream. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering tag. * >0: Number of bytes used from bufptr. tag_r will contain the tag. */ CRYPTONITE_EXPORT ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); /* * This function serializes the tag (T from TLV) in BER format. * It always returns number of bytes necessary to represent the tag, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ CRYPTONITE_EXPORT size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); #ifdef __cplusplus } #endif #endif
32.885246
95
0.704387
9649cfacd6a76c5b517f144c6265b138c143effa
9,621
c
C
EE209 Project/main.c
jkim838/EE209P
13ca3f370e80026d518e25ef2e15e6635b9d7d42
[ "MIT" ]
null
null
null
EE209 Project/main.c
jkim838/EE209P
13ca3f370e80026d518e25ef2e15e6635b9d7d42
[ "MIT" ]
null
null
null
EE209 Project/main.c
jkim838/EE209P
13ca3f370e80026d518e25ef2e15e6635b9d7d42
[ "MIT" ]
null
null
null
/* * EE209 Project.c * * Created: 9/5/2017 11:03:58 AM * Author : Group 20 * Revision 8 * */ /*** Header files ***/ #include <avr/io.h> #include <avr/interrupt.h> #include <stdint.h> #include <stdio.h> /*** Custom header files ***/ #include "usart_prototypes_20.h" #include "adc_prototypes_20.h" #include "timer_prototypes_20.h" //#include "interrupt_prototypes_20.h" /*** Custom macro definitions ***/ #define F_CPU 16000000UL // Define CPU Operational Clock /*** USART ***/ #define BAUD_RATE 9600 // Define Baud Rate #define UBRR_VALUE F_CPU / 16 / BAUD_RATE -1 // Define UBRR value #define ASCII_CONVERT 48 // Convert to ASCII Characters #define CS_R2_RES 33.0 #define CS_R1_RES 5.6 #define CS_SHUNT_RES 0.5 #define VS_RA_RES 82.0 #define VS_RB_RES 10.0 #define ROOT2 1.414213562 /*** include delay headers ***/ #include <util/delay.h> /*** ISR definitions ***/ volatile uint8_t tot_overflow; //global variable to count the number of overflows volatile uint8_t isr_voltage_count = 0; volatile uint8_t isr_current_count = 0; volatile uint16_t maximum_voltage =0; volatile uint16_t maximum_current =0; volatile uint16_t samples_counter = 0; ISR(TIMER0_OVF_vect){ // tot_overflow++; // increment overflow count one when overflow occurs. // TIFR0 |= (1 << TOV0); } ISR(USART_RX_vect){ } // keep a track of how many values were added to the array // when it reaches xx values only then we calculate using values of array ISR(ADC_vect){ samples_counter++; if (ADC_toggle == 0){ if(isr_voltage_count < 24){ current_package[isr_current_count] = ADC; } if(ADC>maximum_current){ maximum_current = ADC; } ADC_toggle = 1; isr_current_count++; ADMUX &= 0xf0; //reset to channel 0 ADMUX |= 0x05; //select channel 5 } else if(ADC_toggle == 1){ if(isr_voltage_count < 24){ voltage_package[isr_voltage_count] = ADC; } if(ADC>maximum_voltage){ maximum_voltage = ADC; } ADC_toggle = 0; isr_voltage_count++; ADMUX &= 0xf0; //select channel 0 } ADCSRA |= (1 << ADSC); // Start new conversion } ISR(INT0_vect){ // do something... } ISR(INT1_vect){ // do something... } // volatile double current_package[24]; volatile double power_average; volatile double power_average_array[50]; void take_voltage_sample(){ uint8_t i; for(i = 0; i < 24; i++){ voltage[i] = (adc_Vin_magnitude(Vin_voltage[i])) * ((VS_RA_RES + VS_RB_RES) / VS_RB_RES); } } void take_current_sample(){ uint8_t i; for(i = 0; i < 24; i++){ current[i] = ((adc_Vin_magnitude(Vin_current[i])) / (CS_R2_RES / CS_R1_RES)) / CS_SHUNT_RES * 1000; } } int main(void){ /*** Run once code ***/ /*** Pin I/O set-up ***/ // Initially set all pins as output. Change to input mode when necessary. DDRB = 0xff; DDRC = 0xff; //|= (1 << PC5); DDRD = 0xff; DDRC&=~ (1 << PC0); DDRC&=~ (1 << PC5); sei(); /* ADC_toggle = 0; //initialise this so that we're reading voltage input first. ADC_voltage = 0; ADC_current = 0; */ /*** Module Configuration ***/ //timer_init(); adc_init(); usart_init(UBRR_VALUE); timer_init(); /*** Initialize shared variables ***/ ADC_toggle = 0; /*** For ADC ***/ // uint8_t voltage_package_counter = 0; // uint8_t current_package_counter = 0; uint8_t cycles_count = 0; //counter for power averaging // double maximum_voltage = 0.0; //moved to isr // double maximum_current = 0.0; ADCSRA |= (1 << ADSC); // Start new conversion // transmit group number usart_setGroup(); while (1) { // Run multiple code... // This code is using interrupt method to produce delay of 1 second... // if(tot_overflow >= 244){ // check if number of overflow is 2 // if(TCNT0 >= 0x23){ // check if timer count reached 112 // PORTC ^= (1 << PC1); // toggles LED // TCNT0 = 0; // reset counter // tot_overflow = 0; // reset overflow counter // } // } // PuTTy Debug Variable... uint8_t target[3]; /*** ADC Lab Conversion Test ***/ //adc_read(); // after 24 samples of voltage and current were taken... if(isr_voltage_count >= 24 && isr_current_count >= 24){ cli(); isr_current_count = 0; isr_voltage_count = 0; adc_calculate(); take_voltage_sample(); take_current_sample(); power_average_array[cycles_count] = calculate_average(voltage, current); // usart_prepare_data(power_average_array[cycles_count], 1); cycles_count++; if(cycles_count >= 50){ cycles_count = 0; uint8_t x =0; for (x=0; x<50;x++){ power_average+= power_average_array[x]; } power_average = power_average/50; //usart_prepare_data(power_average, 1); } if(samples_counter >= 1200){ samples_counter= 0; double max_I; double max_V; max_I = adc_calculate_max(maximum_current); max_V = adc_calculate_max(maximum_voltage); max_V = (adc_Vin_magnitude(max_V)) * ((VS_RA_RES + VS_RB_RES) / VS_RB_RES); max_I = ((adc_Vin_magnitude(max_I)) /(CS_R2_RES / CS_R1_RES)) / CS_SHUNT_RES * 1000 ; //(CS_R2_RES / CS_R1_RES) double avgP = (max_V/ROOT2) * (max_I/ROOT2); usart_decompose(target, max_V, 0); uint8_t i; for (i = 3; i > 0; i--){ usart_transmit(target[i-1] + ASCII_CONVERT); } usart_transmit('V'); usart_transmit(' '); usart_decompose(target, max_I, 2); uint8_t j; for (j = 3; j > 0; j--){ usart_transmit(target[j-1] + ASCII_CONVERT); } usart_transmit('m'); usart_transmit('A'); usart_transmit(' '); usart_decompose(target, avgP, 1); uint8_t k; for (k = 3; k > 0; k--){ usart_transmit(target[k-1] + ASCII_CONVERT); } usart_transmit('W'); usart_transmit(' '); // usart_prepare_data(max_I, 2); // usart_prepare_data((max_V / ROOT2), 0); // transmit group number usart_setGroup(); maximum_voltage = 0; maximum_current = 0; max_I = 0.0; max_V = 0.0; } sei(); } // adc_calculate(); // // if(voltage_package_counter < 24 || current_package_counter < 24){ // if(ADC_toggle == 0){ // // calculate load voltage value // take_voltage_sample(); // // if(voltage > maximum_voltage){ // // maximum_voltage = voltage; // // } // // for power average // voltage_package[voltage_package_counter] = voltage; // voltage_package_counter++; // } // else if(ADC_toggle == 1){ // // calculate load current value // current = ((adc_Vin_magnitude(Vin_current)) / (CS_R2_RES / CS_R1_RES)) / CS_SHUNT_RES * 1000; // // if(current > maximum_current){ // // maximum_current = current; // // } // // for power average // current_package[current_package_counter] = current; // current_package_counter++; // } // samples_counter++; // // usart_prepare_data((double)samples_counter/10, 2); // } // else{ // // calculate average power from arrays of voltages and currents // power_average= calculate_average(voltage_package, current_package); // power_average_array[k] = power_average; // k++; // /*** Transmit array contents to PuTTy ***/ // /* // uint8_t i; // uint8_t j; // for (i = 0; i < 24; i++){ // usart_transmit('V'); // usart_transmit(i + ASCII_CONVERT); // usart_transmit(':'); // usart_decompose(target, voltage_package[i]); // // for(j = 0; j < 3; j++){ // usart_transmit(target[j] + ASCII_CONVERT); // } // usart_transmit(' '); // usart_transmit('I'); // usart_transmit(i + ASCII_CONVERT); // usart_transmit(':'); // usart_decompose(target, current_package[i]); // for(j = 0; j < 3; j++){ // usart_transmit(current_package[i] + ASCII_CONVERT); // } // usart_transmit(' '); // } // */ // // // reset iteration count // voltage_package_counter = 0; // current_package_counter = 0; // // encode voltage value and transmit // // /*** Sending Vin_voltage to PuTTy ***/ // /* // usart_decompose(target, voltage); // uint8_t i; // for (i = 3; i > 0; i--){ // usart_transmit(target[i-1] + ASCII_CONVERT); // } // usart_transmit(' '); // */ // // //After we calculate the average power for 10 cycles, find the average of those values // // then encode and transmit the power value // if(k==5){ // uint8_t x; // k=0; // for (x=0; x<5;x++){ // power_average+= power_average_array[x]; // } // power_average = power_average/5; // usart_prepare_data(power_average, 1); // } // /*** Sending Vin_current to PuTTy ***/ // /* // // usart_decompose(target, Vin_current); // // uint8_t i; // // for (i = 3; i > 0; i--){ // // usart_transmit(target[i-1] + ASCII_CONVERT); // // } // // usart_transmit(' '); // */ // // encode power value and transmit // if (samples_counter >= 1200){//25 cycles of V and I // samples_counter= 0; // // // usart_prepare_data(maximum_current, 2); // usart_prepare_data((maximum_voltage / ROOT2), 0); // // maximum_voltage = 0; // maximum_current = 0; // } // // } // usart_setGroup(); } cli(); return 0; }
26.073171
116
0.588192
aadd005d89ccfd02f643c91022165af4af6374bd
5,427
h
C
flood_pcre.h
apache/flood
e70a7f52cae8c55d308a478ec32efccc6294ccce
[ "Apache-2.0" ]
5
2015-04-04T08:49:50.000Z
2021-03-15T15:06:34.000Z
flood_pcre.h
apache/flood
e70a7f52cae8c55d308a478ec32efccc6294ccce
[ "Apache-2.0" ]
null
null
null
flood_pcre.h
apache/flood
e70a7f52cae8c55d308a478ec32efccc6294ccce
[ "Apache-2.0" ]
6
2015-10-20T15:35:46.000Z
2020-06-12T01:39:55.000Z
/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Derived from PCRE's pcreposix.h. Copyright (c) 1997-2004 University of Cambridge ----------------------------------------------------------------------------- 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 University of Cambridge 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. ----------------------------------------------------------------------------- */ /** * @file flood_regex.h * @brief Apache Regex defines */ #ifndef FLOOD_REGEX_H #define FLOOD_REGEX_H #include "apr.h" /* Allow for C++ users */ #ifdef __cplusplus extern "C" { #endif /* Options for flood_regexec: */ #define FLOOD_REG_ICASE 0x01 /** use a case-insensitive match */ #define FLOOD_REG_NEWLINE 0x02 /** don't match newlines against '.' etc */ #define FLOOD_REG_NOTBOL 0x04 /** ^ will not match against start-of-string */ #define FLOOD_REG_NOTEOL 0x08 /** $ will not match against end-of-string */ #define FLOOD_REG_EXTENDED (0) /** unused */ #define FLOOD_REG_NOSUB (0) /** unused */ /* Error values: */ enum { FLOOD_REG_ASSERT = 1, /** internal error ? */ FLOOD_REG_ESPACE, /** failed to get memory */ FLOOD_REG_INVARG, /** invalid argument */ FLOOD_REG_NOMATCH /** match failed */ }; /* The structure representing a compiled regular expression. */ typedef struct { void *re_pcre; apr_size_t re_nsub; apr_size_t re_erroffset; } flood_regex_t; /* The structure in which a captured offset is returned. */ typedef struct { int rm_so; int rm_eo; } flood_regmatch_t; /* The functions */ /** * Compile a regular expression. * @param preg Returned compiled regex * @param regex The regular expression string * @param cflags Must be zero (currently). * @return Zero on success or non-zero on error */ int flood_regcomp(flood_regex_t *preg, const char *regex, int cflags); /** * Match a NUL-terminated string against a pre-compiled regex. * @param preg The pre-compiled regex * @param string The string to match * @param nmatch Provide information regarding the location of any matches * @param pmatch Provide information regarding the location of any matches * @param eflags Bitwise OR of any of FLOOD_REG_* flags * @return 0 for successful match, #REG_NOMATCH otherwise */ int flood_regexec(const flood_regex_t *preg, const char *string, apr_size_t nmatch, flood_regmatch_t *pmatch, int eflags); /** * Return the error code returned by regcomp or regexec into error messages * @param errcode the error code returned by regexec or regcomp * @param preg The precompiled regex * @param errbuf A buffer to store the error in * @param errbuf_size The size of the buffer */ apr_size_t flood_regerror(int errcode, const flood_regex_t *preg, char *errbuf, apr_size_t errbuf_size); /** Destroy a pre-compiled regex. * @param preg The pre-compiled regex to free. */ void flood_regfree(flood_regex_t *preg); /* Expose our API as the POSIX compatibility layer */ #define regcomp flood_regcomp #define regexec flood_regexec #define regfree flood_regfree #define regex_t flood_regex_t #define regmatch_t flood_regmatch_t #define REG_EXTENDED FLOOD_REG_EXTENDED #ifdef __cplusplus } /* extern "C" */ #endif #endif /* FLOOD_REGEX_T */
36.18
79
0.719919
5ca28be78f879c2fbbb9b666ab43013982e0867c
2,290
h
C
test/qupzilla-master/src/lib/bookmarks/bookmarkstoolbarbutton.h
JamesMBallard/qmake-unity
cf5006a83e7fb1bbd173a9506771693a673d387f
[ "MIT" ]
16
2019-05-23T08:10:39.000Z
2021-12-21T11:20:37.000Z
test/qupzilla-master/src/lib/bookmarks/bookmarkstoolbarbutton.h
JamesMBallard/qmake-unity
cf5006a83e7fb1bbd173a9506771693a673d387f
[ "MIT" ]
null
null
null
test/qupzilla-master/src/lib/bookmarks/bookmarkstoolbarbutton.h
JamesMBallard/qmake-unity
cf5006a83e7fb1bbd173a9506771693a673d387f
[ "MIT" ]
2
2019-05-23T18:37:43.000Z
2021-08-24T21:29:40.000Z
/* ============================================================ * QupZilla - Qt web browser * Copyright (C) 2014-2018 David Rosca <nowrep@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 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 <http://www.gnu.org/licenses/>. * ============================================================ */ #pragma once #include <QPushButton> #include "qzcommon.h" class Menu; class BrowserWindow; class BookmarkItem; class QUPZILLA_EXPORT BookmarksToolbarButton : public QPushButton { Q_OBJECT public: explicit BookmarksToolbarButton(BookmarkItem* bookmark, QWidget* parent = 0); BookmarkItem* bookmark() const; void setMainWindow(BrowserWindow* window); bool showOnlyIcon() const; void setShowOnlyIcon(bool show); bool showOnlyText() const; void setShowOnlyText(bool show); QSize sizeHint() const override; QSize minimumSizeHint() const override; private slots: void createMenu(); void menuAboutToShow(); void menuMiddleClicked(Menu* menu); void bookmarkActivated(BookmarkItem* item = 0); void bookmarkCtrlActivated(BookmarkItem* item = 0); void bookmarkShiftActivated(BookmarkItem* item = 0); void openFolder(BookmarkItem* item); void openBookmark(BookmarkItem* item); void openBookmarkInNewTab(BookmarkItem* item); void openBookmarkInNewWindow(BookmarkItem* item); private: void init(); QString createTooltip() const; void enterEvent(QEvent* event); void leaveEvent(QEvent* event); void mousePressEvent(QMouseEvent* event); void mouseReleaseEvent(QMouseEvent* event); void paintEvent(QPaintEvent* event); BookmarkItem* m_bookmark; BrowserWindow* m_window; bool m_showOnlyIcon; bool m_showOnlyText; };
29.358974
81
0.699563
65905c1f3a472a3bf16cb67fca0febc2ffb643c2
2,273
h
C
lib/AFE-Configuration-Panel/AFE-Sites-Generator.h
tschaban/nxtBikeMonitor
f4299d4835ce096bfbb0f90ea5f3a8c33302e340
[ "MIT" ]
null
null
null
lib/AFE-Configuration-Panel/AFE-Sites-Generator.h
tschaban/nxtBikeMonitor
f4299d4835ce096bfbb0f90ea5f3a8c33302e340
[ "MIT" ]
null
null
null
lib/AFE-Configuration-Panel/AFE-Sites-Generator.h
tschaban/nxtBikeMonitor
f4299d4835ce096bfbb0f90ea5f3a8c33302e340
[ "MIT" ]
null
null
null
/* AFE Firmware for smart home devices LICENSE: https://github.com/tschaban/AFE-Firmware/blob/master/LICENSE DOC: https://www.smartnydom.pl/afe-firmware-pl/ */ #ifndef _AFE_Sites_Generator_h #define _AFE_Sites_Generator_h #if defined(ARDUINO) && ARDUINO >= 100 #include "arduino.h" #else #include "WProgram.h" #endif #include <AFE-Data-Access.h> #include <ESP8266WiFi.h> #include <AFE-I2C-Scanner.h> #ifdef DEBUG #include <Streaming.h> #endif class AFESitesGenerator { private: AFEDataAccess Data; uint8_t language; /* Method generates GPIO selecton list */ const String generateConfigParameter_GPIO(const char *field, uint8_t selected, const String title = "GPIO"); /* Method addes configuration block to the site */ String addConfigurationBlock(const String title, const String description, const String body); const String generateHardwareItemsList(uint8_t noOfItems, uint8_t noOffConnected, const char *field, const char *label); public: /* Constructor*/ AFESitesGenerator(); /* Method generates site header with menu. When redirect param is diff than 0 then it will redirect page to main page after redirect param time (in sec) */ const String generateHeader(uint8_t redirect = 0); /* Method generates site footer */ const char *generateFooter(); String addDeviceConfiguration(); String addNetworkConfiguration(); String addLEDConfiguration(uint8_t id); String addSystemLEDConfiguration(); String addRelayConfiguration(uint8_t id); String addSwitchConfiguration(uint8_t id); String addDS18B20Configuration(); String addDeviceI2CAddressSelection(uint8_t address); /* These methods generates firmware upgrade sections */ String addUpgradeSection(); String addPostUpgradeSection(boolean status); /* Method generate restore to defaults section. Command = 0 is pre-reset site, * 1 is a post reset site */ String addResetSection(uint8_t command); /* Method addes info that device is being reset */ String addExitSection(); /* Method generates section shown when device is in norma mode */ String addHelpSection(); }; #endif
29.141026
80
0.705235
659a69991ff6ec26c64ec97a983207b3d9d5b379
296
c
C
LIsta_03/Ex_01/Ex_01.c
vitoriasaturnino/Linguagem-C
110daeeb9db8858797342d0928e7b4d7a0736564
[ "MIT" ]
null
null
null
LIsta_03/Ex_01/Ex_01.c
vitoriasaturnino/Linguagem-C
110daeeb9db8858797342d0928e7b4d7a0736564
[ "MIT" ]
null
null
null
LIsta_03/Ex_01/Ex_01.c
vitoriasaturnino/Linguagem-C
110daeeb9db8858797342d0928e7b4d7a0736564
[ "MIT" ]
null
null
null
/*Exerc�cio 01 - Criar um programa em linguagem C que imprima os números de 0 a 100 com o intervalo de 0,5 segundos.*/ #include <stdio.h> void main() { int contador = 0; for (contador = 0; contador <= 100; contador++) { printf("%d\n", contador); sleep(0,5); } }
18.5
62
0.591216
b7a82a2e0916b5f27fe83c9e9b88c72ce6da53fd
4,013
c
C
driver/usb_switch_pi3usb9281.c
diodep/chromium-ec
b4d3cefda6a1ad0311c3fa15c12b8ed8942403b6
[ "BSD-3-Clause" ]
null
null
null
driver/usb_switch_pi3usb9281.c
diodep/chromium-ec
b4d3cefda6a1ad0311c3fa15c12b8ed8942403b6
[ "BSD-3-Clause" ]
null
null
null
driver/usb_switch_pi3usb9281.c
diodep/chromium-ec
b4d3cefda6a1ad0311c3fa15c12b8ed8942403b6
[ "BSD-3-Clause" ]
null
null
null
/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * Pericom PI3USB3281 USB port switch driver. */ #include "console.h" #include "gpio.h" #include "hooks.h" #include "i2c.h" #include "timer.h" #include "pi3usb9281.h" #include "util.h" /* Console output macros */ #define CPUTS(outstr) cputs(CC_USBCHARGE, outstr) #define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args) /* 8-bit I2C address */ #define PI3USB9281_I2C_ADDR (0x25 << 1) /* Delay values */ #define PI3USB9281_SW_RESET_DELAY 20 #ifdef CONFIG_USB_SWITCH_PI3USB9281_MUX_GPIO #define PI3USB9281_COUNT 2 static inline void select_chip(uint8_t chip_idx) { gpio_set_level(CONFIG_USB_SWITCH_PI3USB9281_MUX_GPIO, chip_idx); } #else #define PI3USB9281_COUNT 1 #define select_chip(x) #endif static int saved_interrupts[PI3USB9281_COUNT]; uint8_t pi3usb9281_read(uint8_t chip_idx, uint8_t reg) { int res, val; select_chip(chip_idx); res = i2c_read8(I2C_PORT_MASTER, PI3USB9281_I2C_ADDR, reg, &val); if (res) return 0xee; return val; } int pi3usb9281_write(uint8_t chip_idx, uint8_t reg, uint8_t val) { int res; select_chip(chip_idx); res = i2c_write8(I2C_PORT_MASTER, PI3USB9281_I2C_ADDR, reg, val); if (res) CPRINTS("PI3USB9281 I2C write failed"); return res; } int pi3usb9281_enable_interrupts(uint8_t chip_idx) { int ctrl = pi3usb9281_read(chip_idx, PI3USB9281_REG_CONTROL); if (ctrl == 0xee) return EC_ERROR_UNKNOWN; return pi3usb9281_write(chip_idx, PI3USB9281_REG_CONTROL, ctrl & 0x14); } int pi3usb9281_disable_interrupts(uint8_t chip_idx) { int ctrl = pi3usb9281_read(chip_idx, PI3USB9281_REG_CONTROL); int rv; if (ctrl == 0xee) return EC_ERROR_UNKNOWN; rv = pi3usb9281_write(chip_idx, PI3USB9281_REG_CONTROL, (ctrl | PI3USB9281_CTRL_INT_MASK) & 0x15); pi3usb9281_get_interrupts(chip_idx); return rv; } int pi3usb9281_set_interrupt_mask(uint8_t chip_idx, uint8_t mask) { return pi3usb9281_write(chip_idx, PI3USB9281_REG_INT_MASK, ~mask); } int pi3usb9281_get_interrupts(uint8_t chip_idx) { int ret = pi3usb9281_peek_interrupts(chip_idx); if (chip_idx >= PI3USB9281_COUNT) return EC_ERROR_PARAM1; saved_interrupts[chip_idx] = 0; return ret; } int pi3usb9281_peek_interrupts(uint8_t chip_idx) { if (chip_idx >= PI3USB9281_COUNT) return EC_ERROR_PARAM1; saved_interrupts[chip_idx] |= pi3usb9281_read(chip_idx, PI3USB9281_REG_INT); return saved_interrupts[chip_idx]; } int pi3usb9281_get_device_type(uint8_t chip_idx) { return pi3usb9281_read(chip_idx, PI3USB9281_REG_DEV_TYPE) & 0x77; } int pi3usb9281_get_charger_status(uint8_t chip_idx) { return pi3usb9281_read(chip_idx, PI3USB9281_REG_CHG_STATUS) & 0x1f; } int pi3usb9281_get_vbus(uint8_t chip_idx) { int vbus = pi3usb9281_read(chip_idx, PI3USB9281_REG_VBUS); if (vbus == 0xee) return EC_ERROR_UNKNOWN; return !!(vbus & 0x2); } int pi3usb9281_reset(uint8_t chip_idx) { int rv = pi3usb9281_write(chip_idx, PI3USB9281_REG_RESET, 0x1); if (!rv) /* Reset takes ~15ms. Wait for 20ms to be safe. */ msleep(PI3USB9281_SW_RESET_DELAY); return rv; } int pi3usb9281_set_switch_manual(uint8_t chip_idx, int val) { int ctrl; int rv; ctrl = pi3usb9281_read(chip_idx, PI3USB9281_REG_CONTROL); if (ctrl == 0xee) return EC_ERROR_UNKNOWN; if (val) rv = pi3usb9281_write(chip_idx, PI3USB9281_REG_CONTROL, ctrl & ~PI3USB9281_CTRL_AUTO); else rv = pi3usb9281_write(chip_idx, PI3USB9281_REG_CONTROL, ctrl | PI3USB9281_CTRL_AUTO); return rv; } int pi3usb9281_set_pins(uint8_t chip_idx, uint8_t val) { return pi3usb9281_write(chip_idx, PI3USB9281_REG_MANUAL, val); } static void pi3usb9281_init(void) { uint8_t dev_id; int i; for (i = 0; i < PI3USB9281_COUNT; i++) { dev_id = pi3usb9281_read(i, PI3USB9281_REG_DEV_ID); if (dev_id != 0x10) CPRINTS("PI3USB9281[%d] invalid ID 0x%02x", i, dev_id); } } DECLARE_HOOK(HOOK_INIT, pi3usb9281_init, HOOK_PRIO_LAST);
22.418994
73
0.765512
2e6cd9c4f5e514547867b95c02434b3bb0478cd1
349
c
C
3rdparty/f2c/exit_.c
nicholatian/cosmo-cstar
3d4d050346c34374679f19c3f39fc555502a0f72
[ "0BSD" ]
2
2021-02-13T19:26:06.000Z
2021-03-03T12:28:34.000Z
3rdparty/f2c/exit_.c
nicholatian/cosmo-cstar
3d4d050346c34374679f19c3f39fc555502a0f72
[ "0BSD" ]
null
null
null
3rdparty/f2c/exit_.c
nicholatian/cosmo-cstar
3d4d050346c34374679f19c3f39fc555502a0f72
[ "0BSD" ]
null
null
null
#include "libc/runtime/runtime.h" #include "third_party/f2c/f2c.h" #include "third_party/f2c/internal.h" /** * This gives the effect of * * subroutine exit(rc) * integer*4 rc * stop * end * * with the added side effect of supplying rc as the program's exit code. */ void exit_(integer *rc) { f_exit(); exit(*rc); }
18.368421
73
0.630372
2effa9fb35f87fa8f79e6ee7d3a7c53de92cc42c
1,010
c
C
reading-photo-electric-proximity-sensor-pic16f877a.c
fakhrizulkifli/PIC-Microchip
45c98658b24ec0964c67e9d46f9eb5a651d9f756
[ "MIT" ]
3
2018-09-08T05:38:55.000Z
2020-07-17T03:06:18.000Z
reading-photo-electric-proximity-sensor-pic16f877a.c
fakhrizulkifli/PIC-Microchip
45c98658b24ec0964c67e9d46f9eb5a651d9f756
[ "MIT" ]
null
null
null
reading-photo-electric-proximity-sensor-pic16f877a.c
fakhrizulkifli/PIC-Microchip
45c98658b24ec0964c67e9d46f9eb5a651d9f756
[ "MIT" ]
9
2018-02-21T21:02:24.000Z
2022-01-11T13:08:07.000Z
#define LED1 RB0_bit #define LED2 RB1_bit #define LED3 RB2_bit #define LED4 RB3_bit #define LED5 RB4_bit #define LED6 RB5_bit #define LED7 RB6_bit #define LED8 RB7_bit #define PE1 RD0_bit #define PE2 RD1_bit #define PE3 RD2_bit #define PE4 RD3_bit void main() { TRISB=0x00; PORTB=0x00; //clear PORTB by default TRISD0_bit=1; TRISD1_bit=1; TRISD2_bit=1; TRISD3_bit=1; while(1) { if(PE1==0)LED1=1; //turn ON LED1 if PE1 is active else LED1=0; //turn OFF LED1 if PE1 is not active if(PE2==0)LED2=1; //turn ON LED2 if PE2 is active else LED2=0; //turn OFF LED2 if PE2 is not active if(PE3==0)LED3=1; //turn ON LED3 if PE3 is active else LED3=0; //turn OFF LED3 if PE3 is not active if(PE4==0)LED4=1; //turn ON LED4 if PE4 is active else LED4=0; //turn OFF LED4 if PE4 is not active } }
24.634146
66
0.569307
c89e146b6659133f3d1038a22f01b26d9f1fcc48
15,826
h
C
magneticfield/inc/Geant/GUTCashKarpRKF45.h
Geant-RnD/geant
ffff95e23547531f3254ada2857c062a31f33e8f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
magneticfield/inc/Geant/GUTCashKarpRKF45.h
Geant-RnD/geant
ffff95e23547531f3254ada2857c062a31f33e8f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
magneticfield/inc/Geant/GUTCashKarpRKF45.h
Geant-RnD/geant
ffff95e23547531f3254ada2857c062a31f33e8f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
// // Runge-Kutta Stepper using Cash Karp's RK tableau // // Adapted from 'GUTCashKarpRKF45' by Qieshen Xie, GSoC 2014 // (derived from G4CashKarpRKF45) // // First version: John Apostolakis, 4 Nov 2015 // #ifndef TCASHKARPRKF45_H #define TCASHKARPRKF45_H #include <iomanip> // For C++ style output (debug) #include <iostream> #include "Geant/GULineSection.h" #include "Geant/VScalarIntegrationStepper.h" #include "base/Vector3D.h" #define INLINERHS 1 #ifdef INLINERHS #define REALLY_INLINE inline __attribute__((always_inline)) #else #define REALLY_INLINE inline #endif template <class T_Equation, unsigned int Nvar> class GUTCashKarpRKF45 : public VScalarIntegrationStepper { using ThreeVector = vecgeom::Vector3D<double>; public: static constexpr unsigned int sOrderMethod = 4; static constexpr unsigned int sNumVarBase = 6; // Expected min number of Vars static constexpr unsigned int sNstore = (sNumVarBase > Nvar) ? sNumVarBase : Nvar; // std::max( GUIntegrationNms::NumVarBase, Nvar); // static const IntegratorCorrection = 1./((1<<4)-1); inline double IntegratorCorrection() { return 1. / ((1 << 4) - 1); } inline void SetVerbose(bool v) { fVerbose = v; } public: inline GUTCashKarpRKF45(T_Equation *EqRhs, unsigned int numStateVariables = 0, bool verbose = false); GUTCashKarpRKF45(const GUTCashKarpRKF45 &); virtual ~GUTCashKarpRKF45(); VScalarIntegrationStepper *Clone() const override; REALLY_INLINE void StepWithErrorEstimate(const double *yInput, // Consider __restrict__ const double *dydx, double charge, double Step, double *yOut, double *yErr) override final; double DistChord(double charge) const override; REALLY_INLINE void RightHandSideInl(const double y[], double charge, double dydx[]) { fEquation_Rhs->T_Equation::RightHandSide(y, charge, dydx); } REALLY_INLINE void RightHandSideInl(const double y[], double charge, double dydx[], vecgeom::Vector3D<double> &Bfield ) { // vecgeom::Vector3D<double> Position = { y[0], y[1], y[2] } ; // PositionTmp.Set( y[0], y[1], y[2] ); // fEquation_Rhs->RightHandSide(y, /*PositionTmp,*/ dydx, charge, Bfield); //-- fEquation_Rhs->GetField()->T_Field::GetFieldValue(Point, Bfield); // fEquation_Rhs->T_Equation::RightHandSide(y, dydx, Bfield); // fEquation_Rhs->TEvaluateRhsGivenB( y, dydx, charge, Bfield); fEquation_Rhs->TEvaluateRhsReturnB(y, dydx, charge, Bfield); } void SetEquationOfMotion(T_Equation *equation); void PrintField(const char *label, const double y[6], const vecgeom::Vector3D<double> &Bfield) const; void PrintDyDx(const char *label, const double dydx[Nvar], const double y[Nvar]) const; void PrintDyDxLong(const char *label, const double dydx[Nvar], const double y[Nvar]) const; private: GUTCashKarpRKF45 &operator=(const GUTCashKarpRKF45 &) = delete; // private assignment operator. private: // 'Invariant' during integration - the pointers must not change // ----------- T_Equation *fEquation_Rhs; bool fOwnTheEquation; GUTCashKarpRKF45 *fAuxStepper; // State -- intermediate values used during RK step // ----- double ak2[sNstore]; double ak3[sNstore]; double ak4[sNstore]; double ak5[sNstore]; double ak6[sNstore]; double ak7[sNstore]; double yTemp2[sNstore]; double yTemp3[sNstore]; double yTemp4[sNstore]; double yTemp5[sNstore]; double yTemp6[sNstore]; double yIn[sNstore]; vecgeom::Vector3D<double> Bfield2, Bfield3, Bfield4, Bfield5, Bfield6; vecgeom::Vector3D<double> PositionTmp; // scratch space // State -- values used for subsequent call to DistChord // ----- double fLastStepLength; double *fLastInitialVector; double *fLastFinalVector; double *fLastDyDx; /*volatile*/ double *fMidVector; /*volatile*/ double *fMidError; // for DistChord calculations // Parameters - for debugging etc bool fVerbose; }; template <class T_Equation, unsigned int Nvar> inline GUTCashKarpRKF45<T_Equation, Nvar>::GUTCashKarpRKF45(T_Equation *EqRhs, // unsigned int noIntegrationVariables, unsigned int numStateVariables, bool verbose) : VScalarIntegrationStepper(EqRhs, // dynamic_cast<VScalarEquationOfMotion*>(EqRhs), sOrderMethod, Nvar, ((numStateVariables > 0) ? numStateVariables : sNstore)), fEquation_Rhs(EqRhs), fOwnTheEquation(true), fAuxStepper(0), fLastStepLength(0.), fVerbose(verbose) { assert(dynamic_cast<VScalarEquationOfMotion *>(EqRhs) != 0); assert((numStateVariables == 0) || (numStateVariables >= Nvar)); assert(IntegratorOrder() == sOrderMethod); assert(GetNumberOfVariables() == Nvar); fLastInitialVector = new double[sNstore]; fLastFinalVector = new double[sNstore]; fLastDyDx = new double[sNstore]; fMidVector = new double[sNstore]; fMidError = new double[sNstore]; if (verbose) std::cout << " GUTCashKarpRKF45 - constructed class. " << std::endl << " Nvar = " << Nvar << " Nstore= " << sNstore << std::endl; } template <class T_Equation, unsigned int Nvar> void GUTCashKarpRKF45<T_Equation, Nvar>::SetEquationOfMotion(T_Equation *equation) { fEquation_Rhs = equation; this->VScalarIntegrationStepper::SetEquationOfMotion(fEquation_Rhs); } // Copy - Constructor // template <class T_Equation, unsigned int Nvar> inline GUTCashKarpRKF45<T_Equation, Nvar>::GUTCashKarpRKF45(const GUTCashKarpRKF45 &right) : VScalarIntegrationStepper((VScalarEquationOfMotion *)0, sOrderMethod, Nvar, right.GetNumberOfStateVariables()), fEquation_Rhs((T_Equation *)0), fOwnTheEquation(true), fAuxStepper(0), // May overwrite below fLastStepLength(0.), fVerbose(right.fVerbose) { SetEquationOfMotion(new T_Equation(*(right.fEquation_Rhs))); fOwnTheEquation = true; // fEquation_Rhs= right.GetEquationOfMotion()->Clone()); assert(dynamic_cast<VScalarEquationOfMotion *>(fEquation_Rhs) != 0); assert(GetNumberOfStateVariables() >= Nvar); fLastInitialVector = new double[sNstore]; fLastFinalVector = new double[sNstore]; fLastDyDx = new double[sNstore]; fMidVector = new double[sNstore]; fMidError = new double[sNstore]; if (fVerbose) std::cout << " GUTCashKarpRKF45 - copy constructor: " << std::endl << " Nvar = " << Nvar << " Nstore= " << sNstore << " Own-the-Equation = " << fOwnTheEquation << std::endl; if (right.fAuxStepper) { // Reuse the Equation of motion in the Auxiliary Stepper fAuxStepper = new GUTCashKarpRKF45(fEquation_Rhs, GetNumberOfStateVariables(), false); } } template <class T_Equation, unsigned int Nvar> // inline REALLY_INLINE GUTCashKarpRKF45<T_Equation, Nvar>::~GUTCashKarpRKF45() { delete[] fLastInitialVector; delete[] fLastFinalVector; delete[] fLastDyDx; delete[] fMidVector; delete[] fMidError; delete fAuxStepper; if (fOwnTheEquation) delete fEquation_Rhs; // Expect to own the equation, except if auxiliary (then sharing the equation) } template <class T_Equation, unsigned int Nvar> VScalarIntegrationStepper *GUTCashKarpRKF45<T_Equation, Nvar>::Clone() const { // return new GUTCashKarpRKF45( *this ); return new GUTCashKarpRKF45<T_Equation, Nvar>(*this); } template <class T_Equation, unsigned int Nvar> inline void GUTCashKarpRKF45<T_Equation, Nvar>::StepWithErrorEstimate(const double *yInput, // [], const double *dydx, // [], double charge, double Step, double *yOut, // [], double *yErr) // []) { // const int nvar = 6 ; // const double a2 = 0.2 , a3 = 0.3 , a4 = 0.6 , a5 = 1.0 , a6 = 0.875; // std::cout << " Entered StepWithErrorEstimate of scalar " << std::endl; unsigned int i; const double b21 = 0.2, b31 = 3.0 / 40.0, b32 = 9.0 / 40.0, b41 = 0.3, b42 = -0.9, b43 = 1.2, b51 = -11.0 / 54.0, b52 = 2.5, b53 = -70.0 / 27.0, b54 = 35.0 / 27.0, b61 = 1631.0 / 55296.0, b62 = 175.0 / 512.0, b63 = 575.0 / 13824.0, b64 = 44275.0 / 110592.0, b65 = 253.0 / 4096.0, c1 = 37.0 / 378.0, c3 = 250.0 / 621.0, c4 = 125.0 / 594.0, c6 = 512.0 / 1771.0, dc5 = -277.0 / 14336.0; const double dc1 = c1 - 2825.0 / 27648.0, dc3 = c3 - 18575.0 / 48384.0, dc4 = c4 - 13525.0 / 55296.0, dc6 = c6 - 0.25; // std::cout<< " constants declared " <<std::endl; // Initialise time to t0, needed when it is not updated by the integration. // [ Note: Only for time dependent fields (usually electric) // is it neccessary to integrate the time.] // yOut[7] = yTemp[7] = yIn[7]; // Saving yInput because yInput and yOut can be aliases for same array for (i = 0; i < Nvar; i++) { yIn[i] = yInput[i]; } // RightHandSideInl(yIn, dydx) ; // 1st Step // PrintDyDx("dydx", dydx, yIn); // std::cout<< " yin made " << std::endl; #if 0 double ak1[sNstore]; vecgeom::Vector3D<double> Bfield1; RightHandSideInl(yIn, charge, ak1, Bfield1 ); // -- Get it again, for debugging // PrintField("yIn ", yIn, Bfield1); // PrintDyDx("ak1-", ak1, yIn); #endif // std::cout<<" empty if else " << std::endl; for (i = 0; i < Nvar; i++) { yTemp2[i] = yIn[i] + b21 * Step * dydx[i]; } // std::cout<<" just before rhs calculation " << std::endl; RightHandSideInl(yTemp2, charge, ak2, Bfield2); // 2nd Step // PrintField("yTemp2", yTemp2, Bfield2); // PrintDyDx("ak2", ak2, yTemp2); // std::cout<<" 1 RHS calculating " << std::endl; for (i = 0; i < Nvar; i++) { yTemp3[i] = yIn[i] + Step * (b31 * dydx[i] + b32 * ak2[i]); } RightHandSideInl(yTemp3, charge, ak3 // , Bfield3 ); // 3rd Step // PrintField("yTemp3", yTemp3, Bfield3); // PrintDyDx("ak3", ak3, yTemp3); for (i = 0; i < Nvar; i++) { yTemp4[i] = yIn[i] + Step * (b41 * dydx[i] + b42 * ak2[i] + b43 * ak3[i]); } RightHandSideInl(yTemp4, charge, ak4 // , Bfield4 ); // 4th Step // PrintField("yTemp4", yTemp4, Bfield4); // PrintDyDx("ak4", ak4, yTemp4); for (i = 0; i < Nvar; i++) { yTemp5[i] = yIn[i] + Step * (b51 * dydx[i] + b52 * ak2[i] + b53 * ak3[i] + b54 * ak4[i]); } RightHandSideInl(yTemp5, charge, ak5 // , Bfield5 ); // 5th Step // PrintField("yTemp5", yTemp5, Bfield5); // PrintDyDx("ak5", ak5, yTemp5); for (i = 0; i < Nvar; i++) { yTemp6[i] = yIn[i] + Step * (b61 * dydx[i] + b62 * ak2[i] + b63 * ak3[i] + b64 * ak4[i] + b65 * ak5[i]); } RightHandSideInl(yTemp6, charge, ak6 // , Bfield6 ); // 6th Step // PrintField("yTemp6", yTemp6, Bfield6); // PrintDyDx("ak6", ak6, yTemp6); for (i = 0; i < Nvar; i++) { // Accumulate increments with proper weights yOut[i] = yIn[i] + Step * (c1 * dydx[i] + c3 * ak3[i] + c4 * ak4[i] + c6 * ak6[i]); } for (i = 0; i < Nvar; i++) { // Estimate error as difference between 4th and // 5th order methods yErr[i] = Step * (dc1 * dydx[i] + dc3 * ak3[i] + dc4 * ak4[i] + dc5 * ak5[i] + dc6 * ak6[i]); } for (i = 0; i < Nvar; i++) { // Store Input and Final values, for possible use in calculating chord fLastInitialVector[i] = yIn[i]; fLastFinalVector[i] = yOut[i]; fLastDyDx[i] = dydx[i]; } fLastStepLength = Step; // std::cout << " Exiting StepWithErrorEstimate of scalar " << std::endl; return; } template <class T_Equation, unsigned int Nvar> inline double GUTCashKarpRKF45<T_Equation, Nvar>::DistChord(double charge) const { double distLine, distChord; ThreeVector initialPoint, finalPoint, midPoint; // Store last initial and final points (they will be overwritten in self-Stepper call!) initialPoint = ThreeVector(fLastInitialVector[0], fLastInitialVector[1], fLastInitialVector[2]); finalPoint = ThreeVector(fLastFinalVector[0], fLastFinalVector[1], fLastFinalVector[2]); // Do half a step using StepNoErr fAuxStepper->GUTCashKarpRKF45::StepWithErrorEstimate(fLastInitialVector, fLastDyDx, charge, 0.5 * fLastStepLength, fMidVector, fMidError); midPoint = ThreeVector(fMidVector[0], fMidVector[1], fMidVector[2]); // Use stored values of Initial and Endpoint + new Midpoint to evaluate // distance of Chord if (initialPoint != finalPoint) { distLine = GULineSection::Distline(midPoint, initialPoint, finalPoint); distChord = distLine; } else { distChord = (midPoint - initialPoint).Mag2(); } return distChord; } template <class T_Equation, unsigned int Nvar> inline void GUTCashKarpRKF45<T_Equation, Nvar>::PrintField(const char *label, const double y[Nvar], const vecgeom::Vector3D<double> &Bfield) const { std::cout << " PrintField/Stepper> Field " << label << " " << "at x,y,z= ( " << y[0] << " , " << y[1] << " , " << y[2] << " ) " << " is ( " << Bfield.x() << " , " << Bfield.y() << " , " << Bfield.z() << " ) kGauss - mag = " << Bfield.Mag() << std::endl; } template <class T_Equation, unsigned int Nvar> inline void GUTCashKarpRKF45<T_Equation, Nvar>::PrintDyDx(const char *label, const double dydx[Nvar], const double y[Nvar]) const { using std::cout; if (fVerbose > 0) { vecgeom::Vector3D<double> dir(dydx[0], dydx[1], dydx[2]); vecgeom::Vector3D<double> dpds(dydx[3], dydx[4], dydx[5]); vecgeom::Vector3D<double> p(y[3], y[4], y[5]); int oldPrec = cout.precision(3); cout << " DyDx " << std::setw(4) << label << "> " << " xyz: " << std::setw(12) << dydx[0] << " , " << std::setw(12) << dydx[1] << " , " << std::setw(12) << dydx[2] << " ) " << " - mag = " << std::setw(12) << dir.Mag() << " dp/ds: " << std::setw(12) << dydx[3] << " , " << std::setw(12) << dydx[4] << " , " << std::setw(12) << dydx[5] << " " << " - mag = " << std::setw(5) << dpds.Mag() << " p-mag= " << p.Mag() << std::endl; cout.precision(oldPrec); } } template <class T_Equation, unsigned int Nvar> inline void GUTCashKarpRKF45<T_Equation, Nvar>::PrintDyDxLong(const char *label, const double dydx[Nvar], const double y[Nvar]) const { vecgeom::Vector3D<double> dir(dydx[0], dydx[1], dydx[2]); vecgeom::Vector3D<double> dpds(dydx[3], dydx[4], dydx[5]); std::cout << " PrintDyDx/Stepper> dy/dx '" << std::setw(4) << label << "' " << " for x,y,z= ( " << dydx[0] << " , " << dydx[1] << " , " << dydx[2] << " ) " << " - mag = " << dir.Mag() << std::endl << " " << " dp/ds(x,y,z) = ( " << dydx[3] << " , " << dydx[4] << " , " << dydx[5] << " ) " << " ) - mag = " << dpds.Mag() << std::endl; vecgeom::Vector3D<double> p(y[3], y[4], y[5]); double pMag = p.Mag(); if (pMag == 0.0) pMag = 1.0; std::cout << " " << " 1/p dp/ds = " << dydx[3] / pMag << " , " << dydx[4] / pMag << " , " << dydx[5] / pMag << " ) " << std::endl; std::cout << " " << " p = " << y[3] << " , " << y[4] << " , " << y[5] << " ) " << std::endl; } #endif /*TCashKARP_RKF45 */
38.789216
120
0.595981
085d8f8ab1d60e42f533bf5e4064804d5e822b79
34,795
h
C
src/x86drc.h
rsn8887/mame2003-plus-libretro
2d0759df85a6e647a7301fed9eec37b4f4270812
[ "RSA-MD" ]
145
2018-04-10T17:24:39.000Z
2022-03-27T17:39:03.000Z
src/x86drc.h
rsn8887/mame2003-plus-libretro
2d0759df85a6e647a7301fed9eec37b4f4270812
[ "RSA-MD" ]
779
2018-04-09T21:30:15.000Z
2022-03-31T06:38:07.000Z
src/x86drc.h
rsn8887/mame2003-plus-libretro
2d0759df85a6e647a7301fed9eec37b4f4270812
[ "RSA-MD" ]
152
2018-04-10T10:52:18.000Z
2022-03-09T08:24:16.000Z
/*################################################################################################### ** ** ** drccore.h ** x86 Dynamic recompiler support routines. ** Written by Aaron Giles ** ** **#################################################################################################*/ #ifndef __DRCCORE_H__ #define __DRCCORE_H__ /*################################################################################################### ** TYPE DEFINITIONS **#################################################################################################*/ /* PC and pointer pair */ struct pc_ptr_pair { UINT32 pc; UINT8 * target; }; /* core interface structure for the drc common code */ struct drccore { UINT8 * cache_base; /* base pointer to the compiler cache */ UINT8 * cache_top; /* current top of cache */ UINT8 * cache_danger; /* high water mark for the end */ UINT8 * cache_end; /* end of cache memory */ void *** lookup_l1; /* level 1 lookup */ void ** lookup_l2_recompile; /* level 2 lookup populated with recompile pointers */ UINT8 l1bits; /* number of bits in level 1 lookup */ UINT8 l2bits; /* number of bits in level 2 lookup */ UINT8 l1shift; /* shift to go from PC to level 1 lookup */ UINT32 l2mask; /* mask to go from PC to level 2 lookup */ UINT8 l2scale; /* scale to get from masked PC value to final level 2 lookup */ void (*entry_point)(void); /* pointer to asm entry point */ void * out_of_cycles; /* pointer to out of cycles jump point */ void * recompile; /* pointer to recompile jump point */ void * dispatch; /* pointer to dispatch jump point */ UINT32 * pcptr; /* pointer to where the PC is stored */ UINT32 * icountptr; /* pointer to where the icount is stored */ UINT32 * esiptr; /* pointer to where the volatile data in ESI is stored */ UINT8 uses_fp; /* true if we need the FP unit */ UINT8 uses_sse; /* true if we need the SSE unit */ UINT16 fpcw_curr; /* current FPU control word */ UINT32 mcrxr_curr; /* current SSE control word */ UINT16 fpcw_save; /* saved FPU control word */ UINT32 mcrxr_save; /* saved SSE control word */ struct pc_ptr_pair *sequence_list; /* PC/pointer sets for the current instruction sequence */ UINT32 sequence_count; /* number of instructions in the current sequence */ UINT32 sequence_count_max; /* max number of instructions in the current sequence */ struct pc_ptr_pair *tentative_list; /* PC/pointer sets for tentative branches */ UINT32 tentative_count; /* number of tentative branches */ UINT32 tentative_count_max; /* max number of tentative branches */ void (*cb_reset)(struct drccore *drc); /* callback when the cache is reset */ void (*cb_recompile)(struct drccore *drc); /* callback when code needs to be recompiled */ void (*cb_entrygen)(struct drccore *drc); /* callback before generating the dispatcher on entry */ }; /* configuration structure for the drc common code */ struct drcconfig { UINT32 cache_size; /* size of cache to allocate */ UINT32 max_instructions; /* maximum instructions per sequence */ UINT8 address_bits; /* number of live address bits in the PC */ UINT8 lsbs_to_ignore; /* number of LSBs to ignore on the PC */ UINT8 uses_fp; /* true if we need the FP unit */ UINT8 uses_sse; /* true if we need the SSE unit */ UINT32 * pcptr; /* pointer to where the PC is stored */ UINT32 * icountptr; /* pointer to where the icount is stored */ UINT32 * esiptr; /* pointer to where the volatile data in ESI is stored */ void (*cb_reset)(struct drccore *drc); /* callback when the cache is reset */ void (*cb_recompile)(struct drccore *drc); /* callback when code needs to be recompiled */ void (*cb_entrygen)(struct drccore *drc); /* callback before generating the dispatcher on entry */ }; /* structure to hold link data to be filled in later */ struct linkdata { UINT8 size; UINT8 * target; }; /*################################################################################################### ** HELPER MACROS **#################################################################################################*/ /* useful macros for accessing hi/lo portions of 64-bit values */ #define LO(x) (&(((UINT32 *)(x))[0])) #define HI(x) (&(((UINT32 *)(x))[1])) extern const UINT8 scale_lookup[]; /*################################################################################################### ** CONSTANTS **#################################################################################################*/ /* architectural defines */ #define REG_EAX 0 #define REG_ECX 1 #define REG_EDX 2 #define REG_EBX 3 #define REG_ESP 4 #define REG_EBP 5 #define REG_ESI 6 #define REG_EDI 7 #define REG_AX 0 #define REG_CX 1 #define REG_DX 2 #define REG_BX 3 #define REG_SP 4 #define REG_BP 5 #define REG_SI 6 #define REG_DI 7 #define REG_AL 0 #define REG_CL 1 #define REG_DL 2 #define REG_BL 3 #define REG_AH 4 #define REG_CH 5 #define REG_DH 6 #define REG_BH 7 #define REG_XMM0 0 #define REG_XMM1 1 #define REG_XMM2 2 #define REG_XMM3 3 #define REG_XMM4 4 #define REG_XMM5 5 #define REG_XMM6 6 #define REG_XMM7 7 #define NO_BASE 5 #define COND_A 7 #define COND_AE 3 #define COND_B 2 #define COND_BE 6 #define COND_C 2 #define COND_E 4 #define COND_Z 4 #define COND_G 15 #define COND_GE 13 #define COND_L 12 #define COND_LE 14 #define COND_NA 6 #define COND_NAE 2 #define COND_NB 3 #define COND_NBE 7 #define COND_NC 3 #define COND_NE 5 #define COND_NG 14 #define COND_NGE 12 #define COND_NL 13 #define COND_NLE 15 #define COND_NO 1 #define COND_NP 11 #define COND_NS 9 #define COND_NZ 5 #define COND_O 0 #define COND_P 10 #define COND_PE 10 #define COND_PO 11 #define COND_S 8 #define COND_Z 4 /* rounding modes */ #define FPRND_NEAR 0 #define FPRND_DOWN 1 #define FPRND_UP 2 #define FPRND_CHOP 3 /*################################################################################################### ** LOW-LEVEL OPCODE EMITTERS **#################################################################################################*/ /* lowest-level opcode emitters */ #define OP1(x) do { *drc->cache_top++ = (UINT8)(x); } while (0) #define OP2(x) do { *(UINT16 *)drc->cache_top = (UINT16)(x); drc->cache_top += 2; } while (0) #define OP4(x) do { *(UINT32 *)drc->cache_top = (UINT32)(x); drc->cache_top += 4; } while (0) /*################################################################################################### ** MODRM EMITTERS **#################################################################################################*/ /* op reg,reg*/ #define MODRM_REG(reg, rm) \ do { OP1(0xc0 | (((reg) & 7) << 3) | ((rm) & 7)); } while (0) /* op reg,[addr]*/ #define MODRM_MABS(reg, addr) \ do { OP1(0x05 | (((reg) & 7) << 3)); OP4(addr); } while (0) /* op reg,[base+disp]*/ #define MODRM_MBD(reg, base, disp) \ do { \ if ((UINT32)(disp) == 0 && (base) != REG_ESP && (base) != REG_EBP) \ { \ OP1(0x00 | (((reg) & 7) << 3) | ((base) & 7)); \ } \ else if ((INT8)(INT32)(disp) == (INT32)(disp)) \ { \ if ((base) == REG_ESP) \ { \ OP1(0x44 | (((reg) & 7) << 3)); \ OP1(0x24); \ OP1((INT32)disp); \ } \ else \ { \ OP1(0x40 | (((reg) & 7) << 3) | ((base) & 7)); \ OP1((INT32)disp); \ } \ } \ else \ { \ if ((base) == REG_ESP) \ { \ OP1(0x84 | (((reg) & 7) << 3)); \ OP1(0x24); \ OP4(disp); \ } \ else \ { \ OP1(0x80 | (((reg) & 7) << 3) | ((base) & 7)); \ OP4(disp); \ } \ } \ } while (0) /* op reg,[base+indx*scale+disp]*/ #define MODRM_MBISD(reg, base, indx, scale, disp) \ do { \ if ((scale) == 1 && (base) == NO_BASE) \ MODRM_MBD(reg,indx,disp); \ else if ((UINT32)(disp) == 0 || (base) == NO_BASE) \ { \ OP1(0x04 | (((reg) & 7) << 3)); \ OP1((scale_lookup[scale] << 6) | (((indx) & 7) << 3) | ((base) & 7));\ if ((UINT32)(disp) != 0) OP4(disp); \ } \ else if ((INT8)(INT32)(disp) == (INT32)(disp)) \ { \ OP1(0x44 | (((reg) & 7) << 3)); \ OP1((scale_lookup[scale] << 6) | (((indx) & 7) << 3) | ((base) & 7));\ OP1((INT32)disp); \ } \ else \ { \ OP1(0x84 | (((reg) & 7) << 3)); \ OP1((scale_lookup[scale] << 6) | (((indx) & 7) << 3) | ((base) & 7));\ OP4(disp); \ } \ } while (0) /*################################################################################################### ** SIMPLE OPCODE EMITTERS **#################################################################################################*/ #define _pushad() \ do { OP1(0x60); } while (0) #define _push_r32(reg) \ do { OP1(0x50+(reg)); } while (0) #define _push_imm(imm) \ do { OP1(0x68); OP4(imm); } while (0) #define _push_m32abs(addr) \ do { OP1(0xff); MODRM_MABS(6, addr); } while (0) #define _popad() \ do { OP1(0x61); } while (0) #define _pop_r32(reg) \ do { OP1(0x58+(reg)); } while (0) #define _pop_m32abs(addr) \ do { OP1(0x8f); MODRM_MABS(0, addr); } while (0) #define _ret() \ do { OP1(0xc3); } while (0) #define _cdq() \ do { OP1(0x99); } while (0) #define _lahf() \ do { OP1(0x9F); } while(0); #define _sahf() \ do { OP1(0x9E); } while(0); /*################################################################################################### ** MOVE EMITTERS **#################################################################################################*/ #define _mov_r8_imm(dreg, imm) \ do { OP1(0xb0 + (dreg)); OP1(imm); } while (0) #define _mov_r8_r8(dreg, sreg) \ do { OP1(0x8a); MODRM_REG(dreg, sreg); } while (0) #define _mov_r8_m8abs(dreg, addr) \ do { OP1(0x8a); MODRM_MABS(dreg, addr); } while (0) #define _mov_r8_m8bd(dreg, base, disp) \ do { OP1(0x8a); MODRM_MBD(dreg, base, disp); } while (0) #define _mov_r8_m8isd(dreg, indx, scale, disp) \ do { OP1(0x8a); MODRM_MBISD(dreg, NO_BASE, indx, scale, disp); } while (0) #define _mov_r8_m8bisd(dreg, base, indx, scale, disp) \ do { OP1(0x8a); MODRM_MBISD(dreg, base, indx, scale, disp); } while (0) #define _mov_r16_imm(dreg, imm) \ do { OP1(0x66); OP1(0xb8 + (dreg)); OP2(imm); } while (0) #define _mov_r16_r16(dreg, sreg) \ do { OP1(0x66); OP1(0x8b); MODRM_REG(dreg, sreg); } while (0) #define _mov_r16_m16abs(dreg, addr) \ do { OP1(0x66); OP1(0x8b); MODRM_MABS(dreg, addr); } while (0) #define _mov_r16_m16bd(dreg, base, disp) \ do { OP1(0x66); OP1(0x8b); MODRM_MBD(dreg, base, disp); } while (0) #define _mov_r16_m16isd(dreg, indx, scale, disp) \ do { OP1(0x66); OP1(0x8b); MODRM_MBISD(dreg, NO_BASE, indx, scale, disp); } while (0) #define _mov_r16_m16bisd(dreg, base, indx, scale, disp) \ do { OP1(0x66); OP1(0x8b); MODRM_MBISD(dreg, base, indx, scale, disp); } while (0) #define _mov_r32_imm(dreg, imm) \ do { OP1(0xb8 + (dreg)); OP4(imm); } while (0) #define _mov_r32_r32(dreg, sreg) \ do { OP1(0x8b); MODRM_REG(dreg, sreg); } while (0) #define _mov_r32_m32abs(dreg, addr) \ do { OP1(0x8b); MODRM_MABS(dreg, addr); } while (0) #define _mov_r32_m32bd(dreg, base, disp) \ do { OP1(0x8b); MODRM_MBD(dreg, base, disp); } while (0) #define _mov_r32_m32isd(dreg, indx, scale, disp) \ do { OP1(0x8b); MODRM_MBISD(dreg, NO_BASE, indx, scale, disp); } while (0) #define _mov_r32_m32bisd(dreg, base, indx, scale, disp) \ do { OP1(0x8b); MODRM_MBISD(dreg, base, indx, scale, disp); } while (0) #define _mov_m8abs_imm(addr, imm) \ do { OP1(0xc6); MODRM_MABS(0, addr); OP1(imm); } while (0) #define _mov_m8abs_r8(addr, sreg) \ do { OP1(0x88); MODRM_MABS(sreg, addr); } while (0) #define _mov_m8bd_r8(base, disp, sreg) \ do { OP1(0x88); MODRM_MBD(sreg, base, disp); } while (0) #define _mov_m8isd_r8(indx, scale, disp, sreg) \ do { OP1(0x88); MODRM_MBISD(sreg, NO_BASE, indx, scale, disp); } while (0) #define _mov_m8bisd_r8(base, indx, scale, disp, sreg) \ do { OP1(0x88); MODRM_MBISD(sreg, base, indx, scale, disp); } while (0) #define _mov_m16abs_imm(addr, imm) \ do { OP1(0x66); OP1(0xc7); MODRM_MABS(0, addr); OP2(imm); } while (0) #define _mov_m16abs_r16(addr, sreg) \ do { OP1(0x66); OP1(0x89); MODRM_MABS(sreg, addr); } while (0) #define _mov_m16bd_r16(base, disp, sreg) \ do { OP1(0x66); OP1(0x89); MODRM_MBD(sreg, base, disp); } while (0) #define _mov_m32abs_imm(addr, imm) \ do { OP1(0xc7); MODRM_MABS(0, addr); OP4(imm); } while (0) #define _mov_m32bisd_imm(base, indx, scale, addr, imm) \ do { OP1(0xc7); MODRM_MBISD(0, base, indx, scale, addr); OP4(imm); } while (0) #define _mov_m32bd_r32(base, disp, sreg) \ do { OP1(0x89); MODRM_MBD(sreg, base, disp); } while (0) #define _mov_m32abs_r32(addr, sreg) \ do { OP1(0x89); MODRM_MABS(sreg, addr); } while (0) #define _mov_m32isd_r32(indx, scale, addr, dreg) \ do { OP1(0x89); MODRM_MBISD(dreg, NO_BASE, indx, scale, addr); } while (0) #define _mov_m32bisd_r32(base, indx, scale, addr, dreg) \ do { OP1(0x89); MODRM_MBISD(dreg, base, indx, scale, addr); } while (0) #define _mov_r64_m64abs(reghi, reglo, addr) \ do { _mov_r32_m32abs(reglo, LO(addr)); _mov_r32_m32abs(reghi, HI(addr)); } while (0) #define _mov_m64abs_r64(addr, reghi, reglo) \ do { _mov_m32abs_r32(LO(addr), reglo); _mov_m32abs_r32(HI(addr), reghi); } while (0) #define _mov_m64abs_imm32(addr, imm) \ do { _mov_m32abs_imm(LO(addr), imm); _mov_m32abs_imm(HI(addr), ((INT32)(imm) >> 31)); } while (0) #define _movsx_r32_r8(dreg, sreg) \ do { OP1(0x0f); OP1(0xbe); MODRM_REG(dreg, sreg); } while (0) #define _movsx_r32_r16(dreg, sreg) \ do { OP1(0x0f); OP1(0xbf); MODRM_REG(dreg, sreg); } while (0) #define _movsx_r32_m8abs(dreg, addr) \ do { OP1(0x0f); OP1(0xbe); MODRM_MABS(dreg, addr); } while (0) #define _movsx_r32_m16abs(dreg, addr) \ do { OP1(0x0f); OP1(0xbf); MODRM_MABS(dreg, addr); } while (0) #define _movzx_r32_r8(dreg, sreg) \ do { OP1(0x0f); OP1(0xb6); MODRM_REG(dreg, sreg); } while (0) #define _movzx_r32_r16(dreg, sreg) \ do { OP1(0x0f); OP1(0xb7); MODRM_REG(dreg, sreg); } while (0) #define _movzx_r32_m8abs(dreg, addr) \ do { OP1(0x0f); OP1(0xb6); MODRM_MABS(dreg, addr); } while (0) #define _movzx_r32_m16abs(dreg, addr) \ do { OP1(0x0f); OP1(0xb7); MODRM_MABS(dreg, addr); } while (0) #define _lea_r32_m32bd(dest, base, disp) \ do { OP1(0x8d); MODRM_MBD(dest, base, disp); } while (0) #define _lea_r32_m32isd(dest, indx, scale, disp) \ do { OP1(0x8d); MODRM_MBISD(dest, NO_BASE, indx, scale, disp); } while (0) /*################################################################################################### ** SHIFT EMITTERS **#################################################################################################*/ #define _sar_r32_cl(dreg) \ do { OP1(0xd3); MODRM_REG(7, dreg); } while (0) #define _shl_r32_cl(dreg) \ do { OP1(0xd3); MODRM_REG(4, dreg); } while (0) #define _shr_r32_cl(dreg) \ do { OP1(0xd3); MODRM_REG(5, dreg); } while (0) #define _sar_r32_imm(dreg, imm) \ do { \ if ((imm) == 1) { OP1(0xd1); MODRM_REG(7, dreg); } \ else { OP1(0xc1); MODRM_REG(7, dreg); OP1(imm); } \ } while (0) #define _shl_r32_imm(dreg, imm) \ do { \ if ((imm) == 1) { OP1(0xd1); MODRM_REG(4, dreg); } \ else { OP1(0xc1); MODRM_REG(4, dreg); OP1(imm); } \ } while (0) #define _shr_r32_imm(dreg, imm) \ do { \ if ((imm) == 1) { OP1(0xd1); MODRM_REG(5, dreg); } \ else { OP1(0xc1); MODRM_REG(5, dreg); OP1(imm); } \ } while (0) #define _shld_r32_r32_cl(dreg, sreg) \ do { OP1(0x0f); OP1(0xa5); MODRM_REG(sreg, dreg); } while (0) #define _shld_r32_r32_imm(dreg, sreg, imm) \ do { OP1(0x0f); OP1(0xa4); MODRM_REG(sreg, dreg); OP1(imm); } while (0) #define _shrd_r32_r32_cl(dreg, sreg) \ do { OP1(0x0f); OP1(0xad); MODRM_REG(sreg, dreg); } while (0) #define _shrd_r32_r32_imm(dreg, sreg, imm) \ do { OP1(0x0f); OP1(0xac); MODRM_REG(sreg, dreg); OP1(imm); } while (0) /*################################################################################################### ** UNARY ARITHMETIC EMITTERS **#################################################################################################*/ #define _neg_r32(reg) \ do { OP1(0xf7); MODRM_REG(3, reg); } while (0) #define _not_r32(reg) \ do { OP1(0xf7); MODRM_REG(2, reg); } while (0) /*################################################################################################### ** 32-BIT ARITHMETIC EMITTERS **#################################################################################################*/ #define _add_r32_r32(r1, r2) \ do { OP1(0x01); MODRM_REG(r2, r1); } while (0) #define _adc_r32_r32(r1, r2) \ do { OP1(0x11); MODRM_REG(r2, r1); } while (0) #define _or_r32_r32(r1, r2) \ do { OP1(0x09); MODRM_REG(r2, r1); } while (0) #define _sub_r32_r32(r1, r2) \ do { OP1(0x29); MODRM_REG(r2, r1); } while (0) #define _sbb_r32_r32(r1, r2) \ do { OP1(0x19); MODRM_REG(r2, r1); } while (0) #define _xor_r32_r32(r1, r2) \ do { OP1(0x31); MODRM_REG(r2, r1); } while (0) #define _or_r8_r8(r1, r2) \ do { OP1(0x0A); MODRM_REG(r2, r1); } while (0) #define _add_r32_m32abs(dreg, addr) \ do { OP1(0x03); MODRM_MABS(dreg, addr); } while (0) #define _adc_r32_m32abs(dreg, addr) \ do { OP1(0x13); MODRM_MABS(dreg, addr); } while (0) #define _and_r32_m32abs(dreg, addr) \ do { OP1(0x23); MODRM_MABS(dreg, addr); } while (0) #define _cmp_r32_m32abs(dreg, addr) \ do { OP1(0x3b); MODRM_MABS(dreg, addr); } while (0) #define _or_r32_m32abs(dreg, addr) \ do { OP1(0x0b); MODRM_MABS(dreg, addr); } while (0) #define _sub_r32_m32abs(dreg, addr) \ do { OP1(0x2b); MODRM_MABS(dreg, addr); } while (0) #define _sbb_r32_m32abs(dreg, addr) \ do { OP1(0x1b); MODRM_MABS(dreg, addr); } while (0) #define _xor_r32_m32abs(dreg, addr) \ do { OP1(0x33); MODRM_MABS(dreg, addr); } while (0) #define _arith_r32_imm_common(reg, dreg, imm) \ do { \ if ((INT8)(imm) == (INT32)(imm)) \ { \ OP1(0x83); MODRM_REG(reg, dreg); OP1(imm); \ } \ else \ { \ OP1(0x81); MODRM_REG(reg, dreg); OP4(imm); \ } \ } while (0) #define _add_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(0, dreg, imm); } while (0) #define _adc_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(2, dreg, imm); } while (0) #define _or_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(1, dreg, imm); } while (0) #define _sbb_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(3, dreg, imm); } while (0) #define _and_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(4, dreg, imm); } while (0) #define _sub_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(5, dreg, imm); } while (0) #define _xor_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(6, dreg, imm); } while (0) #define _cmp_r32_imm(dreg, imm) \ do { _arith_r32_imm_common(7, dreg, imm); } while (0) #define _test_r32_imm(dreg, imm) \ do { OP1(0xf7); MODRM_REG(0, dreg); OP4(imm); } while (0) #define _and_r32_r32(dreg, sreg) \ do { OP1(0x23); MODRM_REG(dreg, sreg); } while (0) #define _arith_m32abs_imm_common(reg, addr, imm) \ do { \ if ((INT8)(imm) == (INT32)(imm)) \ { \ OP1(0x83); MODRM_MABS(reg, addr); OP1(imm); \ } \ else \ { \ OP1(0x81); MODRM_MABS(reg, addr); OP4(imm); \ } \ } while (0) #define _add_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(0, addr, imm); } while (0) #define _adc_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(2, addr, imm); } while (0) #define _or_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(1, addr, imm); } while (0) #define _sbb_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(3, addr, imm); } while (0) #define _and_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(4, addr, imm); } while (0) #define _sub_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(5, addr, imm); } while (0) #define _xor_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(6, addr, imm); } while (0) #define _cmp_m32abs_imm(addr, imm) \ do { _arith_m32abs_imm_common(7, addr, imm); } while (0) #define _test_m32abs_imm(addr, imm) \ do { OP1(0xf7); MODRM_MABS(0, addr); OP4(imm); } while (0) #define _arith_m32bd_imm_common(reg, base, disp, imm) \ do { \ if ((INT8)(imm) == (INT32)(imm)) \ { \ OP1(0x83); MODRM_MBD(reg, base, disp); OP1(imm);\ } \ else \ { \ OP1(0x81); MODRM_MBD(reg, base, disp); OP4(imm);\ } \ } while (0) #define _add_m32bd_imm(base, disp, imm) \ do { _arith_m32bd_imm_common(0, base, disp, imm); } while (0) #define _and_r32_m32bd(dreg, base, disp) \ do { OP1(0x23); MODRM_MBD(dreg, base, disp); } while (0) #define _imul_r32(reg) \ do { OP1(0xf7); MODRM_REG(5, reg); } while (0) #define _mul_r32(reg) \ do { OP1(0xf7); MODRM_REG(4, reg); } while (0) #define _mul_m32abs(addr) \ do { OP1(0xf7); MODRM_MABS(4, addr); } while (0) #define _idiv_r32(reg) \ do { OP1(0xf7); MODRM_REG(7, reg); } while (0) #define _div_r32(reg) \ do { OP1(0xf7); MODRM_REG(6, reg); } while (0) #define _and_m32bd_r32(base, disp, sreg) \ do { OP1(0x21); MODRM_MBD(sreg, base, disp); } while (0) #define _add_m32bd_r32(base, disp, sreg) \ do { OP1(0x89); MODRM_MBD(sreg, base, disp); } while (0) #define _sub_m32bd_r32(base, disp, sreg) \ do { OP1(0x29); MODRM_MBD(sreg, base, disp); } while (0) #define _rol_r32_cl(reg) \ do { OP1(0xd3); OP1(0xc0 | ((reg) & 7)); } while(0) #define _ror_r32_cl(reg) \ do { OP1(0xd3); OP1(0xc8 | ((reg) & 7)); } while(0) #define _rcl_r32_cl(reg) \ do { OP1(0xd3); OP1(0xd0 | ((reg) & 7)); } while(0) #define _rcr_r32_cl(reg) \ do { OP1(0xd3); OP1(0xd8 | ((reg) & 7)); } while(0) /*################################################################################################### ** 16-BIT AND 8-BIT ARITHMETIC EMITTERS **#################################################################################################*/ #define _arith_m16abs_imm_common(reg, addr, imm) \ do { \ OP1(0x66); \ if ((INT8)(imm) == (INT16)(imm)) \ { \ OP1(0x83); MODRM_MABS(reg, addr); OP1(imm); \ } \ else \ { \ OP1(0x81); MODRM_MABS(reg, addr); OP2(imm); \ } \ } while (0) #define _add_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(0, addr, imm); } while (0) #define _or_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(1, addr, imm); } while (0) #define _sbb_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(3, addr, imm); } while (0) #define _and_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(4, addr, imm); } while (0) #define _sub_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(5, addr, imm); } while (0) #define _xor_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(6, addr, imm); } while (0) #define _cmp_m16abs_imm(addr, imm) \ do { _arith_m16abs_imm_common(7, addr, imm); } while (0) #define _test_m16abs_imm(addr, imm) \ do { OP1(0xf7); MODRM_MABS(0, addr); OP2(imm); } while (0) #define _arith_m8abs_imm_common(reg, addr, imm) \ do { OP1(0x80); MODRM_MABS(reg, addr); OP1(imm); } while (0) #define _add_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(0, addr, imm); } while (0) #define _or_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(1, addr, imm); } while (0) #define _sbb_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(3, addr, imm); } while (0) #define _and_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(4, addr, imm); } while (0) #define _sub_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(5, addr, imm); } while (0) #define _xor_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(6, addr, imm); } while (0) #define _cmp_m8abs_imm(addr, imm) \ do { _arith_m8abs_imm_common(7, addr, imm); } while (0) #define _test_m8abs_imm(addr, imm) \ do { OP1(0xf6); MODRM_MABS(0, addr); OP1(imm); } while (0) #define _and_m16bd_r16(base, disp, sreg) \ do { OP1(0x66); OP1(0x21); MODRM_MBD(sreg, base, disp); } while (0) #define _and_m8bd_r8(base, disp, sreg) \ do { OP1(0x20); MODRM_MBD(sreg, base, disp); } while (0) #define _and_r16_m16abs(dreg, addr) \ do { OP1(0x66); OP1(0x25); MODRM_MABS(dreg, addr); } while (0) #define _shl_r16_cl(dreg) \ do { OP1(0x66); OP1(0xd3); MODRM_REG(4, dreg); } while (0) #define _shr_r16_cl(dreg) \ do { OP1(0x66); OP1(0xd3); MODRM_REG(5, dreg); } while (0) #define _shl_r8_cl(dreg) \ do { OP1(0xd2); MODRM_REG(4, dreg); } while (0) #define _shr_r8_cl(dreg) \ do { OP1(0xd2); MODRM_REG(5, dreg); } while (0) #define _rol_r16_cl(reg) \ do { OP1(0x66); OP1(0xd3); OP1(0xc0 | ((reg) & 7)); } while(0) #define _rol_r8_cl(reg) \ do { OP1(0xd2); OP1(0xc0 | ((reg) & 7)); } while(0) #define _ror_r16_cl(reg) \ do { OP1(0x66); OP1(0xd3); OP1(0xc8 | ((reg) & 7)); } while(0) #define _ror_r8_cl(reg) \ do { OP1(0xd2); OP1(0xc8 | ((reg) & 7)); } while(0) #define _rcl_r16_cl(reg) \ do { OP1(0x66); OP1(0xd3); OP1(0xd0 | ((reg) & 7)); } while(0) #define _rcl_r8_cl(reg) \ do { OP1(0xd2); OP1(0xd0 | ((reg) & 7)); } while(0) #define _rcr_r16_cl(reg) \ do { OP1(0x66); OP1(0xd3); OP1(0xd8 | ((reg) & 7)); } while(0) #define _rcr_r8_cl(reg) \ do { OP1(0xd2); OP1(0xd8 | ((reg) & 7)); } while(0) /*################################################################################################### ** FLOATING POINT EMITTERS **#################################################################################################*/ #define _fnclex() \ do { OP1(0xdb); OP1(0xe2); } while (0) #define _fnstsw_ax() \ do { OP1(0xdf); OP1(0xe0); } while (0) #define _fldcw_m16abs(addr) \ do { OP1(0xd9); MODRM_MABS(5, addr); } while (0) #define _fldcw_m16isd(indx, scale, addr) \ do { OP1(0xd9); MODRM_MBISD(5, NO_BASE, indx, scale, addr); } while (0) #define _fnstcw_m16abs(addr) \ do { OP1(0xd9); MODRM_MABS(7, addr); } while (0) #define _fabs() \ do { OP1(0xd9); OP1(0xe1); } while (0) #define _faddp() \ do { OP1(0xde); OP1(0xc1); } while (0) #define _fchs() \ do { OP1(0xd9); OP1(0xe0); } while (0) #define _fcompp() \ do { OP1(0xde); OP1(0xd9); } while (0) #define _fdivp() \ do { OP1(0xde); OP1(0xf9); } while (0) #define _fmulp() \ do { OP1(0xde); OP1(0xc9); } while (0) #define _fsqrt() \ do { OP1(0xd9); OP1(0xfa); } while (0) #define _fsubp() \ do { OP1(0xde); OP1(0xe9); } while (0) #define _fsubrp() \ do { OP1(0xde); OP1(0xe1); } while (0) #define _fucompp() \ do { OP1(0xda); OP1(0xe9); } while (0) #define _fld1() \ do { OP1(0xd9); OP1(0xe8); } while (0) #define _fld_m32abs(addr) \ do { OP1(0xd9); MODRM_MABS(0, addr); } while (0) #define _fld_m64abs(addr) \ do { OP1(0xdd); MODRM_MABS(0, addr); } while (0) #define _fild_m32abs(addr) \ do { OP1(0xdb); MODRM_MABS(0, addr); } while (0) #define _fild_m64abs(addr) \ do { OP1(0xdf); MODRM_MABS(5, addr); } while (0) #define _fistp_m32abs(addr) \ do { OP1(0xdb); MODRM_MABS(3, addr); } while (0) #define _fistp_m64abs(addr) \ do { OP1(0xdf); MODRM_MABS(7, addr); } while (0) #define _fstp_m32abs(addr) \ do { OP1(0xd9); MODRM_MABS(3, addr); } while (0) #define _fstp_m64abs(addr) \ do { OP1(0xdd); MODRM_MABS(3, addr); } while (0) /*################################################################################################### ** BRANCH EMITTERS **#################################################################################################*/ #define _setcc_r8(cond, dreg) \ do { OP1(0x0f); OP1(0x90 + cond); MODRM_REG(0, dreg); } while (0) #define _setcc_m8abs(cond, addr) \ do { OP1(0x0f); OP1(0x90 + cond); MODRM_MABS(0, addr); } while (0) #define _jcc_short_link(cond, link) \ do { OP1(0x70 + (cond)); OP1(0x00); (link)->target = drc->cache_top; (link)->size = 1; } while (0) #define _jcc_near_link(cond, link) \ do { OP1(0x0f); OP1(0x80 + (cond)); OP4(0x00); (link)->target = drc->cache_top; (link)->size = 4; } while (0) #define _jcc(cond, target) \ do { \ INT32 delta = (UINT8 *)(target) - (drc->cache_top + 2); \ if ((INT8)delta == (INT32)delta) \ { \ OP1(0x70 + (cond)); OP1(delta); \ } \ else \ { \ delta = (UINT8 *)(target) - (drc->cache_top + 6); \ OP1(0x0f); OP1(0x80 + (cond)); OP4(delta); \ } \ } while (0) #define _jmp_short_link(link) \ do { OP1(0xeb); OP1(0x00); (link)->target = drc->cache_top; (link)->size = 1; } while (0) #define _jmp_near_link(link) \ do { OP1(0xe9); OP4(0x00); (link)->target = drc->cache_top; (link)->size = 4; } while (0) #define _jmp(target) \ do { OP1(0xe9); OP4((UINT32)(target) - ((UINT32)drc->cache_top + 4)); } while (0) #define _call(target) \ do { if (drc->uses_fp) OP1(0xe8); OP4((UINT32)(target) - ((UINT32)drc->cache_top + 4)); } while (0) #define _jmp_m32abs(addr) \ do { OP1(0xff); MODRM_MABS(4, addr); } while (0) #define _jmp_m32bd(base, disp) \ do { OP1(0xff); MODRM_MBD(4, base, disp); } while (0) #define _jmp_m32bisd(base, indx, scale, disp) \ do { OP1(0xff); MODRM_MBISD(4, base, indx, scale, disp); } while (0) #define _resolve_link(link) \ do { \ INT32 delta = drc->cache_top - (link)->target; \ if ((link)->size == 1) \ { \ if ((INT8)delta != delta) \ printf("Error: link out of range!\n"); \ (link)->target[-1] = delta; \ } \ else if ((link)->size == 4) \ *(UINT32 *)&(link)->target[-4] = delta; \ else \ printf("Unsized link!\n"); \ } while (0) /*################################################################################################### ** SSE EMITTERS **#################################################################################################*/ #define _movsd_r128_m64abs(reg, addr) \ do { OP1(0xf2); OP1(0x0f); OP1(0x10); MODRM_MABS(reg, addr); } while (0) #define _movsd_m64abs_r128(addr, reg) \ do { OP1(0xf2); OP1(0x0f); OP1(0x11); MODRM_MABS(reg, addr); } while (0) #define _movss_r128_m32abs(reg, addr) \ do { OP1(0xf3); OP1(0x0f); OP1(0x10); MODRM_MABS(reg, addr); } while (0) #define _movss_m32abs_r128(addr, reg) \ do { OP1(0xf3); OP1(0x0f); OP1(0x11); MODRM_MABS(reg, addr); } while (0) #define _addss_r128_m32abs(reg, addr) \ do { OP1(0xf3); OP1(0x0f); OP1(0x58); MODRM_MABS(reg, addr); } while (0) #define _addsd_r128_m64abs(reg, addr) \ do { OP1(0xf2); OP1(0x0f); OP1(0x58); MODRM_MABS(reg, addr); } while (0) #define _comiss_r128_m32abs(reg, addr) \ do { OP1(0x0f); OP1(0x2f); MODRM_MABS(reg, addr); } while (0) #define _comisd_r128_m64abs(reg, addr) \ do { OP1(0x66); OP1(0x0f); OP1(0x2f); MODRM_MABS(reg, addr); } while (0) #define _divss_r128_m32abs(reg, addr) \ do { OP1(0xf3); OP1(0x0f); OP1(0x5e); MODRM_MABS(reg, addr); } while (0) #define _divsd_r128_m64abs(reg, addr) \ do { OP1(0xf2); OP1(0x0f); OP1(0x5e); MODRM_MABS(reg, addr); } while (0) #define _mulss_r128_m32abs(reg, addr) \ do { OP1(0xf3); OP1(0x0f); OP1(0x59); MODRM_MABS(reg, addr); } while (0) #define _mulsd_r128_m64abs(reg, addr) \ do { OP1(0xf2); OP1(0x0f); OP1(0x59); MODRM_MABS(reg, addr); } while (0) #define _sqrtss_r128_m32abs(reg, addr) \ do { OP1(0xf3); OP1(0x0f); OP1(0x51); MODRM_MABS(reg, addr); } while (0) #define _sqrtsd_r128_m64abs(reg, addr) \ do { OP1(0xf2); OP1(0x0f); OP1(0x51); MODRM_MABS(reg, addr); } while (0) #define _subss_r128_m32abs(reg, addr) \ do { OP1(0xf3); OP1(0x0f); OP1(0x5c); MODRM_MABS(reg, addr); } while (0) #define _subsd_r128_m64abs(reg, addr) \ do { OP1(0xf2); OP1(0x0f); OP1(0x5c); MODRM_MABS(reg, addr); } while (0) #define _ucomiss_r128_m32abs(reg, addr) \ do { OP1(0x0f); OP1(0x2e); MODRM_MABS(reg, addr); } while (0) #define _ucomisd_r128_m64abs(reg, addr) \ do { OP1(0x66); OP1(0x0f); OP1(0x2e); MODRM_MABS(reg, addr); } while (0) #define _subss_r128_r128(r1, r2) \ do { OP1(0xf3); OP1(0x0f); OP1(0x5c); MODRM_REG(r1, r2); } while (0) #define _paddq_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xd4); MODRM_REG(r1, r2); } while (0) #define _pand_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xdb); MODRM_REG(r1, r2); } while (0) #define _pandn_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xdf); MODRM_REG(r1, r2); } while (0) #define _por_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xeb); MODRM_REG(r1, r2); } while (0) #define _psllq_r128_imm(reg, imm) \ do { OP1(0x66); OP1(0x0f); OP1(0x73); MODRM_REG(6, reg); OP1(imm); } while (0) #define _psllq_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xf3); MODRM_REG(r1, r2); } while (0) #define _psrlq_r128_imm(reg, imm) \ do { OP1(0x66); OP1(0x0f); OP1(0x73); MODRM_REG(2, reg); OP1(imm); } while (0) #define _psrlq_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xd3); MODRM_REG(r1, r2); } while (0) #define _psubq_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xfb); MODRM_REG(r1, r2); } while (0) #define _pxor_r128_r128(r1, r2) \ do { OP1(0x66); OP1(0x0f); OP1(0xef); MODRM_REG(r1, r2); } while (0) /*################################################################################################### ** FUNCTION PROTOTYPES **#################################################################################################*/ /* init/shutdown */ struct drccore *drc_init(UINT8 cpunum, struct drcconfig *config); void drc_cache_reset(struct drccore *drc); void drc_execute(struct drccore *drc); void drc_exit(struct drccore *drc); /* code management */ void drc_begin_sequence(struct drccore *drc, UINT32 pc); void drc_end_sequence(struct drccore *drc); void drc_register_code_at_cache_top(struct drccore *drc, UINT32 pc); void *drc_get_code_at_pc(struct drccore *drc, UINT32 pc); /* standard appendages */ void drc_append_dispatcher(struct drccore *drc); void drc_append_fixed_dispatcher(struct drccore *drc, UINT32 newpc); void drc_append_tentative_fixed_dispatcher(struct drccore *drc, UINT32 newpc); void drc_append_call_debugger(struct drccore *drc); void drc_append_standard_epilogue(struct drccore *drc, INT32 cycles, INT32 pcdelta, int allow_exit); void drc_append_save_volatiles(struct drccore *drc); void drc_append_restore_volatiles(struct drccore *drc); void drc_append_save_call_restore(struct drccore *drc, void *target, UINT32 stackadj); void drc_append_verify_code(struct drccore *drc, void *code, UINT8 length); void drc_append_set_fp_rounding(struct drccore *drc, UINT8 regindex); void drc_append_set_temp_fp_rounding(struct drccore *drc, UINT8 rounding); void drc_append_restore_fp_rounding(struct drccore *drc); /* disassembling drc code */ void drc_dasm(FILE *f, unsigned pc, void *begin, void *end); #endif
30.282855
109
0.573789
aefe2b2b9a56cd851552206455a96c4276ae4edf
5,617
h
C
include/qt5/QtGui/5.6.3/QtGui/private/qwindow_p.h
crocinc/aurora-rust-gui
67736d7c662f30519ba3157873cdd89aa87db91b
[ "MIT" ]
2
2021-03-02T09:45:36.000Z
2021-03-02T09:45:50.000Z
include/qt5/QtGui/5.6.3/QtGui/private/qwindow_p.h
crocinc/aurora-rust-gui
67736d7c662f30519ba3157873cdd89aa87db91b
[ "MIT" ]
null
null
null
include/qt5/QtGui/5.6.3/QtGui/private/qwindow_p.h
crocinc/aurora-rust-gui
67736d7c662f30519ba3157873cdd89aa87db91b
[ "MIT" ]
null
null
null
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** As a special exception, The Qt Company gives you certain additional ** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QWINDOW_P_H #define QWINDOW_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include <QtGui/qscreen.h> #include <QtGui/qwindow.h> #include <qpa/qplatformwindow.h> #include <QtCore/private/qobject_p.h> #include <QtCore/qelapsedtimer.h> #include <QtGui/QIcon> QT_BEGIN_NAMESPACE #define QWINDOWSIZE_MAX ((1<<24)-1) class Q_GUI_EXPORT QWindowPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QWindow) public: enum PositionPolicy { WindowFrameInclusive, WindowFrameExclusive }; QWindowPrivate() : QObjectPrivate() , surfaceType(QWindow::RasterSurface) , windowFlags(Qt::Window) , parentWindow(0) , platformWindow(0) , visible(false) , visibilityOnDestroy(false) , exposed(false) , windowState(Qt::WindowNoState) , visibility(QWindow::Hidden) , resizeEventPending(true) , receivedExpose(false) , positionPolicy(WindowFrameExclusive) , positionAutomatic(true) , contentOrientation(Qt::PrimaryOrientation) , opacity(qreal(1.0)) , minimumSize(0, 0) , maximumSize(QWINDOWSIZE_MAX, QWINDOWSIZE_MAX) , modality(Qt::NonModal) , blockedByModalWindow(false) , updateRequestPending(false) , updateTimer(0) , transientParent(0) , topLevelScreen(0) #ifndef QT_NO_CURSOR , cursor(Qt::ArrowCursor) , hasCursor(false) #endif , compositing(false) { isWindow = true; } ~QWindowPrivate() { } void init(); void maybeQuitOnLastWindowClosed(); #ifndef QT_NO_CURSOR void setCursor(const QCursor *c = 0); bool applyCursor(); #endif void deliverUpdateRequest(); QPoint globalPosition() const { Q_Q(const QWindow); QPoint offset = q->position(); for (const QWindow *p = q->parent(); p; p = p->parent()) offset += p->position(); return offset; } QWindow *topLevelWindow() const; virtual QWindow *eventReceiver() { Q_Q(QWindow); return q; } void updateVisibility(); void _q_clearAlert(); bool windowRecreationRequired(QScreen *newScreen) const; void create(bool recursive); void setTopLevelScreen(QScreen *newScreen, bool recreate); void connectToScreen(QScreen *topLevelScreen); void disconnectFromScreen(); void emitScreenChangedRecursion(QScreen *newScreen); QScreen *screenForGeometry(const QRect &rect); virtual void clearFocusObject(); virtual QRectF closestAcceptableGeometry(const QRectF &rect) const; bool isPopup() const { return (windowFlags & Qt::WindowType_Mask) == Qt::Popup; } static QWindowPrivate *get(QWindow *window) { return window->d_func(); } QWindow::SurfaceType surfaceType; Qt::WindowFlags windowFlags; QWindow *parentWindow; QPlatformWindow *platformWindow; bool visible; bool visibilityOnDestroy; bool exposed; QSurfaceFormat requestedFormat; QString windowTitle; QString windowFilePath; QIcon windowIcon; QRect geometry; Qt::WindowState windowState; QWindow::Visibility visibility; bool resizeEventPending; bool receivedExpose; PositionPolicy positionPolicy; bool positionAutomatic; Qt::ScreenOrientation contentOrientation; qreal opacity; QRegion mask; QSize minimumSize; QSize maximumSize; QSize baseSize; QSize sizeIncrement; Qt::WindowModality modality; bool blockedByModalWindow; bool updateRequestPending; int updateTimer; QPointer<QWindow> transientParent; QPointer<QScreen> topLevelScreen; #ifndef QT_NO_CURSOR QCursor cursor; bool hasCursor; #endif bool compositing; QElapsedTimer lastComposeTime; }; QT_END_NAMESPACE #endif // QWINDOW_P_H
28.368687
85
0.675806
08b98916a1a633ba6b6c930b008c1fe4a4980730
34,350
c
C
C/adtdefs.c
sray256/yap-6.3
be14db6898afdaf962ad9991d5623eccb2f07ba8
[ "Artistic-1.0-Perl", "ClArtistic" ]
1
2021-08-13T00:26:44.000Z
2021-08-13T00:26:44.000Z
C/adtdefs.c
sray256/yap-6.3
be14db6898afdaf962ad9991d5623eccb2f07ba8
[ "Artistic-1.0-Perl", "ClArtistic" ]
null
null
null
C/adtdefs.c
sray256/yap-6.3
be14db6898afdaf962ad9991d5623eccb2f07ba8
[ "Artistic-1.0-Perl", "ClArtistic" ]
1
2021-08-13T00:27:33.000Z
2021-08-13T00:27:33.000Z
/************************************************************************* * * * YAP Prolog * * * * Yap Prolog was developed at NCCUP - Universidade do Porto * * * * Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 * * * ************************************************************************** * * * File: adtdefs.c * * Last rev: * * mods: * * comments: abstract machine definitions * * * *************************************************************************/ #ifdef SCCS static char SccsId[] = "%W% %G%"; #endif #define ADTDEFS_C #ifdef __SUNPRO_CC #define inline #endif #include "Yap.h" #include "Yatom.h" #include "clause.h" #include "alloc.h" #include "yapio.h" #include <stdio.h> #include <wchar.h> #if HAVE_STRING_Hq #include <string.h> #endif uint64_t HashFunction(const unsigned char *CHP) { /* djb2 */ uint64_t hash = 5381; uint64_t c; while ((c = *CHP++) != '\0') { /* hash = ((hash << 5) + hash) + c; hash * 33 + c */ hash = hash * (uint64_t)33 + c; } return hash; /* UInt OUT=0, i = 1; while(*CHP != '\0') { OUT += (UInt)(*CHP++); } return OUT; */ } /* this routine must be run at least having a read lock on ae */ static Prop GetFunctorProp(AtomEntry *ae, arity_t arity) { /* look property list of atom a for kind */ PropEntry *p = ae->PropsOfAE; while (p != NIL) { if (p->KindOfPE == FunctorProperty && RepFunctorProp(p)->ArityOfFE == arity) { return p; } p = p->NextOfPE; } return NIL; } /* vsc: We must guarantee that IsVarTerm(functor) returns true! */ static inline Functor InlinedUnlockedMkFunctor(AtomEntry *ae, arity_t arity) { FunctorEntry *p; Prop p0; p0 = GetFunctorProp(ae, arity); if (p0 != NIL) { return ((Functor)RepProp(p0)); } p = (FunctorEntry *)Yap_AllocAtomSpace(sizeof(*p)); if (!p) return NULL; p->KindOfPE = FunctorProperty; p->NameOfFE = AbsAtom(ae); p->ArityOfFE = arity; p->PropsOfFE = NIL; INIT_RWLOCK(p->FRWLock); /* respect the first property, in case this is a wide atom */ AddPropToAtom(ae, (PropEntry *)p); return ((Functor)p); } Functor Yap_UnlockedMkFunctor(AtomEntry *ae, arity_t arity) { return (InlinedUnlockedMkFunctor(ae, arity)); } /* vsc: We must guarantee that IsVarTerm(functor) returns true! */ Functor Yap_MkFunctor(Atom ap, arity_t arity) { AtomEntry *ae = RepAtom(ap); Functor f; WRITE_LOCK(ae->ARWLock); f = InlinedUnlockedMkFunctor(ae, arity); WRITE_UNLOCK(ae->ARWLock); return f; } /* vsc: We must guarantee that IsVarTerm(functor) returns true! */ void Yap_MkFunctorWithAddress(Atom ap, unsigned int arity, FunctorEntry *p) { AtomEntry *ae = RepAtom(ap); WRITE_LOCK(ae->ARWLock); p->KindOfPE = FunctorProperty; p->NameOfFE = ap; p->ArityOfFE = arity; AddPropToAtom(ae, (PropEntry *)p); WRITE_UNLOCK(ae->ARWLock); } inline static Atom SearchInInvisible(const unsigned char *atom) { AtomEntry *chain; READ_LOCK(INVISIBLECHAIN.AERWLock); chain = RepAtom(INVISIBLECHAIN.Entry); while (!EndOfPAEntr(chain) && strcmp((char *)chain->StrOfAE, (char *)atom)) { chain = RepAtom(chain->NextOfAE); } READ_UNLOCK(INVISIBLECHAIN.AERWLock); if (EndOfPAEntr(chain)) return (NIL); else return (AbsAtom(chain)); } static inline Atom SearchAtom(const unsigned char *p, Atom a) { AtomEntry *ae; const char *ps = (const char *)p; /* search atom in chain */ while (a != NIL) { ae = RepAtom(a); if (strcmp(ae->StrOfAE, ps) == 0) { return (a); } a = ae->NextOfAE; } return (NIL); } Atom Yap_AtomInUse(const char *atom) { /* lookup atom in atom table */ uint64_t hash; const unsigned char *p; Atom a, na = NIL; size_t sz = AtomHashTableSize; /* compute hash */ p =( const unsigned char *) atom; hash = HashFunction(p); hash = hash % sz; /* we'll start by holding a read lock in order to avoid contention */ READ_LOCK(HashChain[hash].AERWLock); a = HashChain[hash].Entry; /* search atom in chain */ na = SearchAtom(p, a); if (na != NIL ) { READ_UNLOCK(HashChain[hash].AERWLock); return (na); } READ_UNLOCK(HashChain[hash].AERWLock); return NIL; } static Atom LookupAtom(const unsigned char *atom) { /* lookup atom in atom table */ uint64_t hash; const unsigned char *p; Atom a, na = NIL; AtomEntry *ae; size_t sz = AtomHashTableSize; /* compute hash */ p = atom; hash = HashFunction(p); hash = hash % sz; /* we'll start by holding a read lock in order to avoid contention */ READ_LOCK(HashChain[hash].AERWLock); a = HashChain[hash].Entry; /* search atom in chain */ na = SearchAtom(atom, a); if (na != NIL) { READ_UNLOCK(HashChain[hash].AERWLock); return (na); } READ_UNLOCK(HashChain[hash].AERWLock); /* we need a write lock */ WRITE_LOCK(HashChain[hash].AERWLock); /* concurrent version of Yap, need to take care */ #if defined(YAPOR) || defined(THREADS) if (a != HashChain[hash].Entry) { a = HashChain[hash].Entry; na = SearchAtom(atom, a); if (na != NIL) { WRITE_UNLOCK(HashChain[hash].AERWLock); return na; } } #endif /* add new atom to start of chain */ if (atom[0] == '\0') { sz = YAP_ALIGN; } else { sz = strlen((const char *)atom); } size_t asz = (sizeof *ae) + ( sz+1); ae = malloc(asz); if (ae == NULL) { WRITE_UNLOCK(HashChain[hash].AERWLock); return NIL; } // enable fast hashing by making sure that // the last cell is fully initialized. CELL *aec = (CELL*)ae; aec[asz/(YAP_ALIGN+1)-1] = 0; NOfAtoms++; na = AbsAtom(ae); ae->PropsOfAE = NIL; strcpy(ae->StrOfAE, (const char *)atom); ae->NextOfAE = a; HashChain[hash].Entry = na; INIT_RWLOCK(ae->ARWLock); WRITE_UNLOCK(HashChain[hash].AERWLock); if (NOfAtoms > 2 * AtomHashTableSize) { Yap_signal(YAP_CDOVF_SIGNAL); } return na; } Atom Yap_LookupAtomWithLength(const char *atom, size_t len0) { /* lookup atom in atom table */ Atom at; unsigned char *ptr; /* not really a wide atom */ ptr = Yap_AllocCodeSpace(len0 + 1); if (!ptr) return NIL; memmove(ptr, atom, len0); ptr[len0] = '\0'; at = LookupAtom(ptr); Yap_FreeCodeSpace(ptr); return at; } Atom Yap_LookupAtom(const char *atom) { /* lookup atom in atom table */ return LookupAtom((const unsigned char *)atom); } Atom Yap_ULookupAtom( const unsigned char *atom) { /* lookup atom in atom table */ return LookupAtom(atom); } Atom Yap_FullLookupAtom(const char *atom) { /* lookup atom in atom table */ Atom t; if ((t = SearchInInvisible((const unsigned char *)atom)) != NIL) { return (t); } return (LookupAtom((const unsigned char *)atom)); } void Yap_LookupAtomWithAddress(const char *atom, AtomEntry *ae) { /* lookup atom in atom table */ register CELL hash; register const unsigned char *p; Atom a; /* compute hash */ p = (const unsigned char *)atom; hash = HashFunction(p) % AtomHashTableSize; /* ask for a WRITE lock because it is highly unlikely we shall find anything */ WRITE_LOCK(HashChain[hash].AERWLock); a = HashChain[hash].Entry; /* search atom in chain */ if (SearchAtom(p, a) != NIL) { Yap_Error(SYSTEM_ERROR_INTERNAL, TermNil, "repeated initialization for atom %s", ae); WRITE_UNLOCK(HashChain[hash].AERWLock); return; } /* add new atom to start of chain */ NOfAtoms++; ae->NextOfAE = a; HashChain[hash].Entry = AbsAtom(ae); ae->PropsOfAE = NIL; strcpy((char *)ae->StrOfAE, (char *)atom); INIT_RWLOCK(ae->ARWLock); WRITE_UNLOCK(HashChain[hash].AERWLock); } void Yap_ReleaseAtom(Atom atom) { /* Releases an atom from the hash chain */ register Int hash; register const unsigned char *p; AtomEntry *inChain; AtomEntry *ap = RepAtom(atom); char unsigned *name = ap->UStrOfAE; /* compute hash */ p = name; hash = HashFunction(p) % AtomHashTableSize; WRITE_LOCK(HashChain[hash].AERWLock); if (HashChain[hash].Entry == atom) { NOfAtoms--; HashChain[hash].Entry = ap->NextOfAE; WRITE_UNLOCK(HashChain[hash].AERWLock); return; } /* else */ inChain = RepAtom(HashChain[hash].Entry); while (inChain && inChain->NextOfAE != atom) inChain = RepAtom(inChain->NextOfAE); if (!inChain) return; WRITE_LOCK(inChain->ARWLock); inChain->NextOfAE = ap->NextOfAE; WRITE_UNLOCK(inChain->ARWLock); WRITE_UNLOCK(HashChain[hash].AERWLock); ap->NextOfAE = NULL; } static Prop GetAPropHavingLock(AtomEntry *ae, PropFlags kind) { /* look property list of atom a for kind */ PropEntry *pp; pp = RepProp(ae->PropsOfAE); while (!EndOfPAEntr(pp) && pp->KindOfPE != kind) pp = RepProp(pp->NextOfPE); return (AbsProp(pp)); } Prop Yap_GetAPropHavingLock( AtomEntry *ae, PropFlags kind) { /* look property list of atom a for kind */ return GetAPropHavingLock(ae, kind); } static Prop GetAProp(Atom a, PropFlags kind) { /* look property list of atom a for kind */ AtomEntry *ae = RepAtom(a); Prop out; READ_LOCK(ae->ARWLock); out = GetAPropHavingLock(ae, kind); READ_UNLOCK(ae->ARWLock); return (out); } Prop Yap_GetAProp(Atom a, PropFlags kind) { /* look property list of atom a for kind */ return GetAProp(a, kind); } OpEntry *Yap_GetOpPropForAModuleHavingALock( Atom a, Term mod) { /* look property list of atom a for kind */ AtomEntry *ae = RepAtom(a); PropEntry *pp; pp = RepProp(ae->PropsOfAE); while (!EndOfPAEntr(pp) && (pp->KindOfPE != OpProperty || ((OpEntry *)pp)->OpModule != mod)) pp = RepProp(pp->NextOfPE); if (EndOfPAEntr(pp)) { return NULL; } return (OpEntry *)pp; } int Yap_HasOp(Atom a) { /* look property list of atom a for kind */ AtomEntry *ae = RepAtom(a); PropEntry *pp; READ_LOCK(ae->ARWLock); pp = RepProp(ae->PropsOfAE); while (!EndOfPAEntr(pp) && (pp->KindOfPE != OpProperty)) pp = RepProp(pp->NextOfPE); READ_UNLOCK(ae->ARWLock); if (EndOfPAEntr(pp)) { return FALSE; } else { return TRUE; } } OpEntry * Yap_OpPropForModule(Atom a, Term mod) { /* look property list of atom a for kind */ AtomEntry *ae = RepAtom(a); PropEntry *pp; OpEntry *info = NULL; if (mod == TermProlog) mod = PROLOG_MODULE; WRITE_LOCK(ae->ARWLock); pp = RepProp(ae->PropsOfAE); while (!EndOfPAEntr(pp)) { if (pp->KindOfPE == OpProperty) { info = (OpEntry *)pp; if (info->OpModule == mod) { WRITE_LOCK(info->OpRWLock); WRITE_UNLOCK(ae->ARWLock); return info; } } pp = pp->NextOfPE; } info = (OpEntry *)Yap_AllocAtomSpace(sizeof(OpEntry)); info->KindOfPE = Ord(OpProperty); info->NextOfPE = NULL; info->OpModule = mod; info->OpName = a; LOCK(OpListLock); info->OpNext = OpList; OpList = info; UNLOCK(OpListLock); AddPropToAtom(ae, (PropEntry *)info); INIT_RWLOCK(info->OpRWLock); WRITE_LOCK(info->OpRWLock); WRITE_UNLOCK(ae->ARWLock); info->Prefix = info->Infix = info->Posfix = 0; return info; } OpEntry * Yap_GetOpProp(Atom a, op_type type, Term cmod USES_REGS) { /* look property list of atom a for kind */ AtomEntry *ae = RepAtom(a); PropEntry *pp; OpEntry *oinfo = NULL; READ_LOCK(ae->ARWLock); pp = RepProp(ae->PropsOfAE); while (!EndOfPAEntr(pp)) { OpEntry *info = NULL; if (pp->KindOfPE != OpProperty) { pp = RepProp(pp->NextOfPE); continue; } info = (OpEntry *)pp; if (info->OpModule != cmod && info->OpModule != PROLOG_MODULE) { pp = RepProp(pp->NextOfPE); continue; } if (type == INFIX_OP) { if (!info->Infix) { pp = RepProp(pp->NextOfPE); continue; } } else if (type == POSFIX_OP) { if (!info->Posfix) { pp = RepProp(pp->NextOfPE); continue; } } else { if (!info->Prefix) { pp = RepProp(pp->NextOfPE); continue; } } /* if it is not the latest module */ if (info->OpModule == PROLOG_MODULE) { /* cannot commit now */ oinfo = info; pp = RepProp(pp->NextOfPE); } else { READ_LOCK(info->OpRWLock); READ_UNLOCK(ae->ARWLock); return info; } } if (oinfo) { READ_LOCK(oinfo->OpRWLock); READ_UNLOCK(ae->ARWLock); return oinfo; } READ_UNLOCK(ae->ARWLock); return NULL; } inline static Prop GetPredPropByAtomHavingLock(AtomEntry *ae, Term cur_mod) /* get predicate entry for ap/arity; create it if neccessary. */ { Prop p0; p0 = ae->PropsOfAE; while (p0) { PredEntry *pe = RepPredProp(p0); if (pe->KindOfPE == PEProp && (pe->ModuleOfPred == cur_mod || !pe->ModuleOfPred)) { return (p0); #if THREADS /* Thread Local Predicates */ if (pe->PredFlags & ThreadLocalPredFlag) { return AbsPredProp(Yap_GetThreadPred(pe INIT_REGS)); } #endif } p0 = pe->NextOfPE; } return (NIL); } Prop Yap_GetPredPropByAtom(Atom at, Term cur_mod) /* get predicate entry for ap/arity; create it if neccessary. */ { Prop p0; AtomEntry *ae = RepAtom(at); READ_LOCK(ae->ARWLock); p0 = GetPredPropByAtomHavingLock(ae, cur_mod); READ_UNLOCK(ae->ARWLock); return (p0); } inline static Prop GetPredPropByAtomHavingLockInThisModule(AtomEntry *ae, Term cur_mod) /* get predicate entry for ap/arity; create it if neccessary. */ { Prop p0; p0 = ae->PropsOfAE; while (p0) { PredEntry *pe = RepPredProp(p0); if (pe->KindOfPE == PEProp && pe->ModuleOfPred == cur_mod) { #if THREADS /* Thread Local Predicates */ if (pe->PredFlags & ThreadLocalPredFlag) { return AbsPredProp(Yap_GetThreadPred(pe INIT_REGS)); } #endif return (p0); } p0 = pe->NextOfPE; } return (NIL); } Prop Yap_GetPredPropByAtomInThisModule(Atom at, Term cur_mod) /* get predicate entry for ap/arity; create it if neccessary. */ { Prop p0; AtomEntry *ae = RepAtom(at); READ_LOCK(ae->ARWLock); p0 = GetPredPropByAtomHavingLockInThisModule(ae, cur_mod); READ_UNLOCK(ae->ARWLock); return (p0); } Prop Yap_GetPredPropByFunc(Functor f, Term cur_mod) /* get predicate entry for ap/arity; */ { Prop p0; FUNC_READ_LOCK(f); p0 = GetPredPropByFuncHavingLock(f, cur_mod); FUNC_READ_UNLOCK(f); return (p0); } Prop Yap_GetPredPropByFuncInThisModule(Functor f, Term cur_mod) /* get predicate entry for ap/arity; */ { Prop p0; FUNC_READ_LOCK(f); p0 = GetPredPropByFuncHavingLock(f, cur_mod); FUNC_READ_UNLOCK(f); return (p0); } Prop Yap_GetPredPropHavingLock(Atom ap, unsigned int arity, Term mod) /* get predicate entry for ap/arity; */ { Prop p0; AtomEntry *ae = RepAtom(ap); Functor f; if (arity == 0) { GetPredPropByAtomHavingLock(ae, mod); } f = InlinedUnlockedMkFunctor(ae, arity); FUNC_READ_LOCK(f); p0 = GetPredPropByFuncHavingLock(f, mod); FUNC_READ_UNLOCK(f); return (p0); } /* get expression entry for at/arity; */ Prop Yap_GetExpProp(Atom at, unsigned int arity) { Prop p0; AtomEntry *ae = RepAtom(at); ExpEntry *p; READ_LOCK(ae->ARWLock); p = RepExpProp(p0 = ae->PropsOfAE); while (p0 && (p->KindOfPE != ExpProperty || p->ArityOfEE != arity)) p = RepExpProp(p0 = p->NextOfPE); READ_UNLOCK(ae->ARWLock); return (p0); } /* get expression entry for at/arity, at is already locked; */ Prop Yap_GetExpPropHavingLock(AtomEntry *ae, unsigned int arity) { Prop p0; ExpEntry *p; p = RepExpProp(p0 = ae->PropsOfAE); while (p0 && (p->KindOfPE != ExpProperty || p->ArityOfEE != arity)) p = RepExpProp(p0 = p->NextOfPE); return (p0); } static int ExpandPredHash(void) { UInt new_size = PredHashTableSize + PredHashIncrement; PredEntry **oldp = PredHash; PredEntry **np = (PredEntry **)Yap_AllocAtomSpace(sizeof(PredEntry **) * new_size); UInt i; if (!np) { return FALSE; } for (i = 0; i < new_size; i++) { np[i] = NULL; } for (i = 0; i < PredHashTableSize; i++) { PredEntry *p = PredHash[i]; while (p) { PredEntry *nextp = p->NextPredOfHash; UInt hsh = PRED_HASH(p->FunctorOfPred, p->ModuleOfPred, new_size); p->NextPredOfHash = np[hsh]; np[hsh] = p; p = nextp; } } PredHashTableSize = new_size; PredHash = np; Yap_FreeAtomSpace((ADDR)oldp); return TRUE; } /* fe is supposed to be locked */ Prop Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod) { PredEntry *p = (PredEntry *)Yap_AllocAtomSpace(sizeof(*p)); if (p == NULL) { WRITE_UNLOCK(fe->FRWLock); return NULL; } if (cur_mod == TermProlog || cur_mod == 0L) { p->ModuleOfPred = 0L; } else p->ModuleOfPred = cur_mod; // TRUE_FUNC_WRITE_LOCK(fe); INIT_LOCK(p->PELock); p->KindOfPE = PEProp; p->ArityOfPE = fe->ArityOfFE; p->FirstClause = p->LastClause = NULL; p->NOfClauses = 0; p->PredFlags = UndefPredFlag; p->src.OwnerFile = Yap_source_file_name(); p->OpcodeOfPred = UNDEF_OPCODE; p->CodeOfPred = p->TrueCodeOfPred = (yamop *)(&(p->OpcodeOfPred)); p->cs.p_code.ExpandCode = EXPAND_OP_CODE; p->TimeStampOfPred = 0L; p->LastCallOfPred = LUCALL_ASSERT; p->MetaEntryOfPred = NULL; if (cur_mod == TermProlog) p->ModuleOfPred = 0L; else p->ModuleOfPred = cur_mod; p->StatisticsForPred = NULL; Yap_NewModulePred(cur_mod, p); #ifdef TABLING p->TableOfPred = NULL; #endif /* TABLING */ #ifdef BEAM p->beamTable = NULL; #endif /* BEAM */ /* careful that they don't cross MkFunctor */ if (!trueGlobalPrologFlag(DEBUG_INFO_FLAG)) { p->PredFlags |= NoTracePredFlag; } p->FunctorOfPred = fe; if (fe->PropsOfFE) { UInt hsh = PRED_HASH(fe, cur_mod, PredHashTableSize); WRITE_LOCK(PredHashRWLock); if (10 * (PredsInHashTable + 1) > 6 * PredHashTableSize) { if (!ExpandPredHash()) { Yap_FreeCodeSpace((ADDR)p); WRITE_UNLOCK(PredHashRWLock); FUNC_WRITE_UNLOCK(fe); return NULL; } /* retry hashing */ hsh = PRED_HASH(fe, cur_mod, PredHashTableSize); } PredsInHashTable++; if (p->ModuleOfPred == 0L) { PredEntry *pe = RepPredProp(fe->PropsOfFE); hsh = PRED_HASH(fe, pe->ModuleOfPred, PredHashTableSize); /* should be the first one */ pe->NextPredOfHash = PredHash[hsh]; PredHash[hsh] = pe; fe->PropsOfFE = AbsPredProp(p); p->NextOfPE = AbsPredProp(pe); } else { p->NextPredOfHash = PredHash[hsh]; PredHash[hsh] = p; p->NextOfPE = fe->PropsOfFE->NextOfPE; fe->PropsOfFE->NextOfPE = AbsPredProp(p); } WRITE_UNLOCK(PredHashRWLock); } else { fe->PropsOfFE = AbsPredProp(p); p->NextOfPE = NIL; } FUNC_WRITE_UNLOCK(fe); { Yap_inform_profiler_of_clause(&(p->OpcodeOfPred), &(p->OpcodeOfPred) + 1, p, GPROF_NEW_PRED_FUNC); if (!(p->PredFlags & (CPredFlag | AsmPredFlag))) { Yap_inform_profiler_of_clause(&(p->cs.p_code.ExpandCode), &(p->cs.p_code.ExpandCode) + 1, p, GPROF_NEW_PRED_FUNC); } } return AbsPredProp(p); } #if THREADS Prop Yap_NewThreadPred(PredEntry *ap USES_REGS) { PredEntry *p = (PredEntry *)Yap_AllocAtomSpace(sizeof(*p)); if (p == NULL) { return NIL; } INIT_LOCK(p->PELock); p->StatisticsForPred = NULL; p->KindOfPE = PEProp; p->ArityOfPE = ap->ArityOfPE; p->FirstClause = p->LastClause = NULL; p->NOfClauses = 0; p->PredFlags = ap->PredFlags & ~(IndexedPredFlag | SpiedPredFlag); #if SIZEOF_INT_P == 4 p->ExtraPredFlags = 0L; #endif p->MetaEntryOfPred = NULL; p->src.OwnerFile = ap->src.OwnerFile; p->OpcodeOfPred = FAIL_OPCODE; p->CodeOfPred = p->TrueCodeOfPred = (yamop *)(&(p->OpcodeOfPred)); p->cs.p_code.ExpandCode = EXPAND_OP_CODE; p->ModuleOfPred = ap->ModuleOfPred; p->NextPredOfModule = NULL; p->TimeStampOfPred = 0L; p->LastCallOfPred = LUCALL_ASSERT; #ifdef TABLING p->TableOfPred = NULL; #endif /* TABLING */ #ifdef BEAM p->beamTable = NULL; #endif /* careful that they don't cross MkFunctor */ p->NextOfPE = AbsPredProp(LOCAL_ThreadHandle.local_preds); LOCAL_ThreadHandle.local_preds = p; p->FunctorOfPred = ap->FunctorOfPred; Yap_inform_profiler_of_clause(&(p->OpcodeOfPred), &(p->OpcodeOfPred) + 1, p, GPROF_NEW_PRED_THREAD); if (falseGlobalPrologFlag(DEBUG_INFO_FLAG)) { p->PredFlags |= (NoSpyPredFlag | NoTracePredFlag); } if (!(p->PredFlags & (CPredFlag | AsmPredFlag))) { Yap_inform_profiler_of_clause(&(p->cs.p_code.ExpandCode), &(p->cs.p_code.ExpandCode) + 1, p, GPROF_NEW_PRED_THREAD); } return AbsPredProp(p); } #endif Prop Yap_NewPredPropByAtom(AtomEntry *ae, Term cur_mod) { Prop p0; PredEntry *p = (PredEntry *)Yap_AllocAtomSpace(sizeof(*p)); CACHE_REGS /* Printf("entering %s:%s/0\n", RepAtom(AtomOfTerm(cur_mod))->StrOfAE, * ae->StrOfAE); */ if (p == NULL) { WRITE_UNLOCK(ae->ARWLock); return NIL; } INIT_LOCK(p->PELock); p->KindOfPE = PEProp; p->ArityOfPE = 0; p->StatisticsForPred = NULL; p->FirstClause = p->LastClause = NULL; p->NOfClauses = 0; p->PredFlags = UndefPredFlag; p->src.OwnerFile = Yap_source_file_name(); p->OpcodeOfPred = UNDEF_OPCODE; p->cs.p_code.ExpandCode = EXPAND_OP_CODE; p->CodeOfPred = p->TrueCodeOfPred = (yamop *)(&(p->OpcodeOfPred)); p->MetaEntryOfPred = NULL; if (cur_mod == TermProlog) p->ModuleOfPred = 0; else p->ModuleOfPred = cur_mod; Yap_NewModulePred(cur_mod, p); p->TimeStampOfPred = 0L; p->LastCallOfPred = LUCALL_ASSERT; #ifdef TABLING p->TableOfPred = NULL; #endif /* TABLING */ #ifdef BEAM p->beamTable = NULL; #endif /* careful that they don't cross MkFunctor */ AddPropToAtom(ae, (PropEntry *)p); p0 = AbsPredProp(p); p->FunctorOfPred = (Functor)AbsAtom(ae); if (!trueGlobalPrologFlag(DEBUG_INFO_FLAG)) { p->PredFlags |= (NoTracePredFlag | NoSpyPredFlag); } if (Yap_isSystemModule(CurrentModule)) p->PredFlags |= StandardPredFlag; WRITE_UNLOCK(ae->ARWLock); { Yap_inform_profiler_of_clause(&(p->OpcodeOfPred), &(p->OpcodeOfPred) + 1, p, GPROF_NEW_PRED_ATOM); if (!(p->PredFlags & (CPredFlag | AsmPredFlag))) { Yap_inform_profiler_of_clause(&(p->cs.p_code.ExpandCode), &(p->cs.p_code.ExpandCode) + 1, p, GPROF_NEW_PRED_ATOM); } } return p0; } Prop Yap_PredPropByFunctorNonThreadLocal(Functor f, Term cur_mod) /* get predicate entry for ap/arity; create it if neccessary. */ { PredEntry *p; FUNC_WRITE_LOCK(f); if (!(p = RepPredProp(f->PropsOfFE))) return Yap_NewPredPropByFunctor(f, cur_mod); if ((p->ModuleOfPred == cur_mod || !(p->ModuleOfPred))) { /* don't match multi-files */ if (/*!(p->PredFlags & MultiFileFlag) ||*/ true || p->ModuleOfPred || !cur_mod || cur_mod == TermProlog) { FUNC_WRITE_UNLOCK(f); return AbsPredProp(p); } } if (p->NextOfPE) { UInt hash = PRED_HASH(f, cur_mod, PredHashTableSize); READ_LOCK(PredHashRWLock); p = PredHash[hash]; while (p) { if (p->FunctorOfPred == f && p->ModuleOfPred == cur_mod) { READ_UNLOCK(PredHashRWLock); FUNC_WRITE_UNLOCK(f); return AbsPredProp(p); } p = p->NextPredOfHash; } READ_UNLOCK(PredHashRWLock); } return Yap_NewPredPropByFunctor(f, cur_mod); } Prop Yap_PredPropByAtomNonThreadLocal(Atom at, Term cur_mod) /* get predicate entry for ap/arity; create it if neccessary. */ { Prop p0; AtomEntry *ae = RepAtom(at); WRITE_LOCK(ae->ARWLock); p0 = ae->PropsOfAE; while (p0) { PredEntry *pe = RepPredProp(p0); if (pe->KindOfPE == PEProp && (pe->ModuleOfPred == cur_mod || !pe->ModuleOfPred)) { /* don't match multi-files */ if (/*!(pe->PredFlags & MultiFileFlag) ||*/ true || pe->ModuleOfPred || !cur_mod || cur_mod == TermProlog) { WRITE_UNLOCK(ae->ARWLock); return (p0); } } p0 = pe->NextOfPE; } return Yap_NewPredPropByAtom(ae, cur_mod); } Term Yap_GetValue(Atom a) { Prop p0 = GetAProp(a, ValProperty); Term out; if (p0 == NIL) return (TermNil); READ_LOCK(RepValProp(p0)->VRWLock); out = RepValProp(p0)->ValueOfVE; if (IsApplTerm(out)) { Functor f = FunctorOfTerm(out); if (f == FunctorDouble) { CACHE_REGS out = MkFloatTerm(FloatOfTerm(out)); } else if (f == FunctorLongInt) { CACHE_REGS out = MkLongIntTerm(LongIntOfTerm(out)); } else if (f == FunctorString) { CACHE_REGS out = MkStringTerm(StringOfTerm(out)); } #ifdef USE_GMP else { out = Yap_MkBigIntTerm(Yap_BigIntOfTerm(out)); } #endif } READ_UNLOCK(RepValProp(p0)->VRWLock); return (out); } void Yap_PutValue(Atom a, Term v) { AtomEntry *ae = RepAtom(a); Prop p0; ValEntry *p; Term t0; WRITE_LOCK(ae->ARWLock); p0 = GetAPropHavingLock(ae, ValProperty); if (p0 != NIL) { p = RepValProp(p0); WRITE_LOCK(p->VRWLock); WRITE_UNLOCK(ae->ARWLock); } else { p = (ValEntry *)Yap_AllocAtomSpace(sizeof(ValEntry)); if (p == NULL) { WRITE_UNLOCK(ae->ARWLock); return; } p->KindOfPE = ValProperty; p->ValueOfVE = TermNil; AddPropToAtom(RepAtom(a), (PropEntry *)p); /* take care that the lock for the property will be inited even if someone else searches for the property */ INIT_RWLOCK(p->VRWLock); WRITE_LOCK(p->VRWLock); WRITE_UNLOCK(ae->ARWLock); } t0 = p->ValueOfVE; if (IsFloatTerm(v)) { /* store a float in code space, so that we can access the property */ union { Float f; CELL ar[sizeof(Float) / sizeof(CELL)]; } un; CELL *pt, *iptr; unsigned int i; un.f = FloatOfTerm(v); if (IsFloatTerm(t0)) { pt = RepAppl(t0); } else { if (IsApplTerm(t0)) { Yap_FreeCodeSpace((char *)(RepAppl(t0))); } pt = (CELL *)Yap_AllocAtomSpace(sizeof(CELL) * (1 + 2 * sizeof(Float) / sizeof(CELL))); if (pt == NULL) { WRITE_UNLOCK(ae->ARWLock); return; } p->ValueOfVE = AbsAppl(pt); pt[0] = (CELL)FunctorDouble; } iptr = pt + 1; for (i = 0; i < sizeof(Float) / sizeof(CELL); i++) { *iptr++ = (CELL)un.ar[i]; } } else if (IsLongIntTerm(v)) { CELL *pt; Int val = LongIntOfTerm(v); if (IsLongIntTerm(t0)) { pt = RepAppl(t0); } else { if (IsApplTerm(t0)) { Yap_FreeCodeSpace((char *)(RepAppl(t0))); } pt = (CELL *)Yap_AllocAtomSpace(2 * sizeof(CELL)); if (pt == NULL) { WRITE_UNLOCK(ae->ARWLock); return; } p->ValueOfVE = AbsAppl(pt); pt[0] = (CELL)FunctorLongInt; } pt[1] = (CELL)val; #ifdef USE_GMP } else if (IsBigIntTerm(v)) { CELL *ap = RepAppl(v); Int sz = sizeof(MP_INT) + sizeof(CELL) + (((MP_INT *)(ap + 1))->_mp_alloc * sizeof(mp_limb_t)); CELL *pt = (CELL *)Yap_AllocAtomSpace(sz); if (pt == NULL) { WRITE_UNLOCK(ae->ARWLock); return; } if (IsApplTerm(t0)) { Yap_FreeCodeSpace((char *)RepAppl(t0)); } memmove((void *)pt, (void *)ap, sz); p->ValueOfVE = AbsAppl(pt); #endif } else if (IsStringTerm(v)) { CELL *ap = RepAppl(v); Int sz = sizeof(CELL) * (3 + ap[1]); CELL *pt = (CELL *)Yap_AllocAtomSpace(sz); if (pt == NULL) { WRITE_UNLOCK(ae->ARWLock); return; } if (IsApplTerm(t0)) { Yap_FreeCodeSpace((char *)RepAppl(t0)); } memmove((void *)pt, (void *)ap, sz); p->ValueOfVE = AbsAppl(pt); } else { if (IsApplTerm(t0)) { /* recover space */ Yap_FreeCodeSpace((char *)(RepAppl(p->ValueOfVE))); } p->ValueOfVE = v; } WRITE_UNLOCK(p->VRWLock); } bool Yap_PutAtomTranslation(Atom a, arity_t arity, Int i) { AtomEntry *ae = RepAtom(a); Prop p0; TranslationEntry *p; WRITE_LOCK(ae->ARWLock); p0 = GetAPropHavingLock(ae, TranslationProperty); if (p0 == NIL) { p = (TranslationEntry *)Yap_AllocAtomSpace(sizeof(TranslationEntry)); if (p == NULL) { WRITE_UNLOCK(ae->ARWLock); return false; } p->KindOfPE = TranslationProperty; p->Translation = i; p->arity = arity; AddPropToAtom(RepAtom(a), (PropEntry *)p); } /* take care that the lock for the property will be inited even if someone else searches for the property */ WRITE_UNLOCK(ae->ARWLock); return true; } bool Yap_PutFunctorTranslation(Atom a, arity_t arity, Int i) { AtomEntry *ae = RepAtom(a); Prop p0; TranslationEntry *p; WRITE_LOCK(ae->ARWLock); p0 = GetAPropHavingLock(ae, TranslationProperty); if (p0 == NIL) { p = (TranslationEntry *)Yap_AllocAtomSpace(sizeof(TranslationEntry)); if (p == NULL) { WRITE_UNLOCK(ae->ARWLock); return false; } p->KindOfPE = TranslationProperty; p->Translation = i; p->arity = arity; AddPropToAtom(RepAtom(a), (PropEntry *)p); } /* take care that the lock for the property will be inited even if someone else searches for the property */ WRITE_UNLOCK(ae->ARWLock); return true; } bool Yap_PutAtomMutex(Atom a, void *i) { AtomEntry *ae = RepAtom(a); Prop p0; MutexEntry *p; WRITE_LOCK(ae->ARWLock); p0 = GetAPropHavingLock(ae, MutexProperty); if (p0 == NIL) { p = (MutexEntry *)Yap_AllocAtomSpace(sizeof(MutexEntry)); if (p == NULL) { WRITE_UNLOCK(ae->ARWLock); return false; } p->KindOfPE = MutexProperty; p->Mutex = i; AddPropToAtom(RepAtom(a), (PropEntry *)p); } /* take care that the lock for the property will be inited even if someone else searches for the property */ WRITE_UNLOCK(ae->ARWLock); return true; } Term Yap_ArrayToList(register Term *tp, size_t nof) { CACHE_REGS register Term *pt = tp + nof; register Term t; t = MkAtomTerm(AtomNil); while (pt > tp) { Term tm = *--pt; #if YAPOR_SBA if (tm == 0) t = MkPairTerm((CELL)pt, t); else #endif t = MkPairTerm(tm, t); } return (t); } int Yap_GetName(char *s, UInt max, Term t) { register Term Head; register Int i; if (IsVarTerm(t) || !IsPairTerm(t)) return FALSE; while (IsPairTerm(t)) { Head = HeadOfTerm(t); if (!IsNumTerm(Head)) return (FALSE); i = IntOfTerm(Head); if (i < 0 || i > MAX_ISO_LATIN1) return FALSE; *s++ = i; t = TailOfTerm(t); if (--max == 0) { Yap_Error(SYSTEM_ERROR_FATAL, t, "not enough space for GetName"); } } *s = '\0'; return TRUE; } #ifdef SFUNC Term MkSFTerm(Functor f, int n, Term *a, empty_value) { Term t, p = AbsAppl(H); int i; *H++ = f; RESET_VARIABLE(H); ++H; for (i = 1; i <= n; ++i) { t = Derefa(a++); if (t != empty_value) { *H++ = i; *H++ = t; } } *H++ = 0; return (p); } CELL *ArgsOfSFTerm(Term t) { CELL *p = RepAppl(t) + 1; while (*p != (CELL)p) p = CellPtr(*p) + 1; return (p + 1); } #endif static HoldEntry *InitAtomHold(void) { HoldEntry *x = (HoldEntry *)Yap_AllocAtomSpace(sizeof(struct hold_entry)); if (x == NULL) { return NULL; } x->KindOfPE = HoldProperty; x->NextOfPE = NIL; x->RefsOfPE = 1; return x; } int Yap_AtomIncreaseHold(Atom at) { AtomEntry *ae = RepAtom(at); HoldEntry *pp; Prop *opp = &(ae->PropsOfAE); WRITE_LOCK(ae->ARWLock); pp = RepHoldProp(ae->PropsOfAE); while (!EndOfPAEntr(pp) && pp->KindOfPE != HoldProperty) { opp = &(pp->NextOfPE); pp = RepHoldProp(pp->NextOfPE); } if (!pp) { HoldEntry *new = InitAtomHold(); if (!new) { WRITE_UNLOCK(ae->ARWLock); return FALSE; } *opp = AbsHoldProp(new); } else { pp->RefsOfPE++; } WRITE_UNLOCK(ae->ARWLock); return TRUE; } int Yap_AtomDecreaseHold(Atom at) { AtomEntry *ae = RepAtom(at); HoldEntry *pp; Prop *opp = &(ae->PropsOfAE); WRITE_LOCK(ae->ARWLock); pp = RepHoldProp(ae->PropsOfAE); while (!EndOfPAEntr(pp) && pp->KindOfPE != HoldProperty) { opp = &(pp->NextOfPE); pp = RepHoldProp(pp->NextOfPE); } if (!pp) { WRITE_UNLOCK(ae->ARWLock); return FALSE; } pp->RefsOfPE--; if (!pp->RefsOfPE) { *opp = pp->NextOfPE; Yap_FreeCodeSpace((ADDR)pp); } WRITE_UNLOCK(ae->ARWLock); return TRUE; } const char *IndicatorOfPred(PredEntry *pe) { CACHE_REGS const char *mods; Atom at; arity_t arity; if (pe->ModuleOfPred == IDB_MODULE) { mods = "idb"; if (pe->PredFlags & NumberDBPredFlag) { snprintf(LOCAL_FileNameBuf, YAP_FILENAME_MAX, "idb:" UInt_FORMAT, (Int)(pe->FunctorOfPred)); return LOCAL_FileNameBuf; } else if (pe->PredFlags & AtomDBPredFlag) { at = (Atom)pe->FunctorOfPred; arity = 0; } else { at = NameOfFunctor(pe->FunctorOfPred); arity = ArityOfFunctor(pe->FunctorOfPred); } } else { if (pe->ModuleOfPred == 0) mods = "prolog"; else mods = RepAtom(AtomOfTerm(pe->ModuleOfPred))->StrOfAE; arity = pe->ArityOfPE; if (arity == 0) { at = (Atom)pe->FunctorOfPred; } else { at = NameOfFunctor(pe->FunctorOfPred); } } if (pe->ModuleOfPred == PROLOG_MODULE || pe->ModuleOfPred == USER_MODULE) snprintf(LOCAL_FileNameBuf, YAP_FILENAME_MAX, "%s/" UInt_FORMAT, RepAtom(at)->StrOfAE, arity); else snprintf(LOCAL_FileNameBuf, YAP_FILENAME_MAX, "%s:%s/" UInt_FORMAT, mods, RepAtom(at)->StrOfAE, arity); return LOCAL_FileNameBuf; }
26.261468
89
0.607132
2606bda2c0da0cbe0eb3f4e44c06b5eaa1e5535b
1,073
c
C
drivers/watchdog/wdt_esp32.c
dmgerman/zephyrd3
b6a23cc9c5d534c352e33fd18fff7799ac3c2886
[ "Apache-2.0" ]
null
null
null
drivers/watchdog/wdt_esp32.c
dmgerman/zephyrd3
b6a23cc9c5d534c352e33fd18fff7799ac3c2886
[ "Apache-2.0" ]
null
null
null
drivers/watchdog/wdt_esp32.c
dmgerman/zephyrd3
b6a23cc9c5d534c352e33fd18fff7799ac3c2886
[ "Apache-2.0" ]
null
null
null
DECL|adjust_timeout|function|static void adjust_timeout(u32_t timeout) DECL|config|member|struct wdt_config config; DECL|set_interrupt_enabled|function|static void set_interrupt_enabled(bool setting) DECL|shared_data|variable|shared_data DECL|wdt_api|variable|wdt_api DECL|wdt_esp32_data|struct|struct wdt_esp32_data { DECL|wdt_esp32_disable|function|static int wdt_esp32_disable(struct device *dev) DECL|wdt_esp32_enable|function|static void wdt_esp32_enable(struct device *dev) DECL|wdt_esp32_get_config|function|static void wdt_esp32_get_config(struct device *dev, struct wdt_config *config) DECL|wdt_esp32_init|function|static int wdt_esp32_init(struct device *dev) DECL|wdt_esp32_isr|function|static void wdt_esp32_isr(void *param) DECL|wdt_esp32_reload|function|static void wdt_esp32_reload(struct device *dev) DECL|wdt_esp32_seal|function|static inline void wdt_esp32_seal(void) DECL|wdt_esp32_set_config|function|static int wdt_esp32_set_config(struct device *dev, struct wdt_config *config) DECL|wdt_esp32_unseal|function|static inline void wdt_esp32_unseal(void)
67.0625
114
0.865797
2646913f19e403e2c7828e8c343dffe1f52566bd
1,502
h
C
algorithm/leetcode/divide/leet_code_46_permutations.h
zengpw/algorithm-cpp
7e57b3e08bee751218322739f5505d0dd4bf2d99
[ "MIT" ]
null
null
null
algorithm/leetcode/divide/leet_code_46_permutations.h
zengpw/algorithm-cpp
7e57b3e08bee751218322739f5505d0dd4bf2d99
[ "MIT" ]
null
null
null
algorithm/leetcode/divide/leet_code_46_permutations.h
zengpw/algorithm-cpp
7e57b3e08bee751218322739f5505d0dd4bf2d99
[ "MIT" ]
null
null
null
// // leet_code_46_permutations.h // algorithm-cpp // // Created by Vincent Zeng on 2019/10/18. // Copyright © 2019 Vincent Zeng. All rights reserved. // #ifndef divide_leet_code_46_permutations_h #define divide_leet_code_46_permutations_h #include <algorithm> #include <string> #include <vector> using namespace std; // // https://leetcode.com/problems/permutations/ // 题意: 全排列模板题 // class Solution46 { private: vector<vector<int>> result; public: vector<vector<int>> permute(vector<int> &nums) { permuteRecursion(nums, 0); return result; } private: void permuteRecursion(vector<int> &nums, int start) { // 当排列区间为 [n, n] 时,实际上不需要排列,此时为全排列的其中一种情况 if (start == nums.size() - 1) { result.push_back(nums); return; } // 每次大循环,固定 start 位,并排列所有的 [start + 1, nums.size()) // // i = start 并且 swap(nums, start, i), 意味着第一次循环,是固定“初始” start 位,循环后面部分 // 当 i 递增时,比如 swap(nums, 0, 5) 以后,调用函数排列 [1, 5], 实际上固定了 第 i 位 // 一定要理解,当 i 递增(并交换)时,始终固定第 i 位,而不是第 i + 1 位,然后排列后面的区间 // for (int i = start; i < nums.size(); ++i) { swap(nums, start, i); permuteRecursion(nums, start + 1); swap(nums, start, i); } } void swap(vector<int> &nums, int x, int y) { int t = nums[x]; nums[x] = nums[y]; nums[y] = t; } }; #endif // divide_leet_code_46_permutations_h
22.757576
82
0.565246
d3a5722e4acbde4318d3b8f9501214dfe8cbdbb1
70,925
c
C
linux/drivers/pinctrl/pinctrl-tegra20.c
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
1
2022-01-11T11:12:00.000Z
2022-01-11T11:12:00.000Z
linux/drivers/pinctrl/pinctrl-tegra20.c
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
null
null
null
linux/drivers/pinctrl/pinctrl-tegra20.c
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
null
null
null
/* * Pinctrl data for the NVIDIA Tegra20 pinmux * * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. * * Derived from code: * Copyright (C) 2010 Google, Inc. * Copyright (C) 2010 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope 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. */ #include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h> #include <linux/pinctrl/pinctrl.h> #include <linux/pinctrl/pinmux.h> #include "pinctrl-tegra.h" /* * Most pins affected by the pinmux can also be GPIOs. Define these first. * These must match how the GPIO driver names/numbers its pins. */ #define _GPIO(offset) (offset) #define TEGRA_PIN_VI_GP6_PA0 _GPIO(0) #define TEGRA_PIN_UART3_CTS_N_PA1 _GPIO(1) #define TEGRA_PIN_DAP2_FS_PA2 _GPIO(2) #define TEGRA_PIN_DAP2_SCLK_PA3 _GPIO(3) #define TEGRA_PIN_DAP2_DIN_PA4 _GPIO(4) #define TEGRA_PIN_DAP2_DOUT_PA5 _GPIO(5) #define TEGRA_PIN_SDIO3_CLK_PA6 _GPIO(6) #define TEGRA_PIN_SDIO3_CMD_PA7 _GPIO(7) #define TEGRA_PIN_GMI_AD17_PB0 _GPIO(8) #define TEGRA_PIN_GMI_AD18_PB1 _GPIO(9) #define TEGRA_PIN_LCD_PWR0_PB2 _GPIO(10) #define TEGRA_PIN_LCD_PCLK_PB3 _GPIO(11) #define TEGRA_PIN_SDIO3_DAT3_PB4 _GPIO(12) #define TEGRA_PIN_SDIO3_DAT2_PB5 _GPIO(13) #define TEGRA_PIN_SDIO3_DAT1_PB6 _GPIO(14) #define TEGRA_PIN_SDIO3_DAT0_PB7 _GPIO(15) #define TEGRA_PIN_UART3_RTS_N_PC0 _GPIO(16) #define TEGRA_PIN_LCD_PWR1_PC1 _GPIO(17) #define TEGRA_PIN_UART2_TXD_PC2 _GPIO(18) #define TEGRA_PIN_UART2_RXD_PC3 _GPIO(19) #define TEGRA_PIN_GEN1_I2C_SCL_PC4 _GPIO(20) #define TEGRA_PIN_GEN1_I2C_SDA_PC5 _GPIO(21) #define TEGRA_PIN_LCD_PWR2_PC6 _GPIO(22) #define TEGRA_PIN_GMI_WP_N_PC7 _GPIO(23) #define TEGRA_PIN_SDIO3_DAT5_PD0 _GPIO(24) #define TEGRA_PIN_SDIO3_DAT4_PD1 _GPIO(25) #define TEGRA_PIN_VI_GP5_PD2 _GPIO(26) #define TEGRA_PIN_SDIO3_DAT6_PD3 _GPIO(27) #define TEGRA_PIN_SDIO3_DAT7_PD4 _GPIO(28) #define TEGRA_PIN_VI_D1_PD5 _GPIO(29) #define TEGRA_PIN_VI_VSYNC_PD6 _GPIO(30) #define TEGRA_PIN_VI_HSYNC_PD7 _GPIO(31) #define TEGRA_PIN_LCD_D0_PE0 _GPIO(32) #define TEGRA_PIN_LCD_D1_PE1 _GPIO(33) #define TEGRA_PIN_LCD_D2_PE2 _GPIO(34) #define TEGRA_PIN_LCD_D3_PE3 _GPIO(35) #define TEGRA_PIN_LCD_D4_PE4 _GPIO(36) #define TEGRA_PIN_LCD_D5_PE5 _GPIO(37) #define TEGRA_PIN_LCD_D6_PE6 _GPIO(38) #define TEGRA_PIN_LCD_D7_PE7 _GPIO(39) #define TEGRA_PIN_LCD_D8_PF0 _GPIO(40) #define TEGRA_PIN_LCD_D9_PF1 _GPIO(41) #define TEGRA_PIN_LCD_D10_PF2 _GPIO(42) #define TEGRA_PIN_LCD_D11_PF3 _GPIO(43) #define TEGRA_PIN_LCD_D12_PF4 _GPIO(44) #define TEGRA_PIN_LCD_D13_PF5 _GPIO(45) #define TEGRA_PIN_LCD_D14_PF6 _GPIO(46) #define TEGRA_PIN_LCD_D15_PF7 _GPIO(47) #define TEGRA_PIN_GMI_AD0_PG0 _GPIO(48) #define TEGRA_PIN_GMI_AD1_PG1 _GPIO(49) #define TEGRA_PIN_GMI_AD2_PG2 _GPIO(50) #define TEGRA_PIN_GMI_AD3_PG3 _GPIO(51) #define TEGRA_PIN_GMI_AD4_PG4 _GPIO(52) #define TEGRA_PIN_GMI_AD5_PG5 _GPIO(53) #define TEGRA_PIN_GMI_AD6_PG6 _GPIO(54) #define TEGRA_PIN_GMI_AD7_PG7 _GPIO(55) #define TEGRA_PIN_GMI_AD8_PH0 _GPIO(56) #define TEGRA_PIN_GMI_AD9_PH1 _GPIO(57) #define TEGRA_PIN_GMI_AD10_PH2 _GPIO(58) #define TEGRA_PIN_GMI_AD11_PH3 _GPIO(59) #define TEGRA_PIN_GMI_AD12_PH4 _GPIO(60) #define TEGRA_PIN_GMI_AD13_PH5 _GPIO(61) #define TEGRA_PIN_GMI_AD14_PH6 _GPIO(62) #define TEGRA_PIN_GMI_AD15_PH7 _GPIO(63) #define TEGRA_PIN_GMI_HIOW_N_PI0 _GPIO(64) #define TEGRA_PIN_GMI_HIOR_N_PI1 _GPIO(65) #define TEGRA_PIN_GMI_CS5_N_PI2 _GPIO(66) #define TEGRA_PIN_GMI_CS6_N_PI3 _GPIO(67) #define TEGRA_PIN_GMI_RST_N_PI4 _GPIO(68) #define TEGRA_PIN_GMI_IORDY_PI5 _GPIO(69) #define TEGRA_PIN_GMI_CS7_N_PI6 _GPIO(70) #define TEGRA_PIN_GMI_WAIT_PI7 _GPIO(71) #define TEGRA_PIN_GMI_CS0_N_PJ0 _GPIO(72) #define TEGRA_PIN_LCD_DE_PJ1 _GPIO(73) #define TEGRA_PIN_GMI_CS1_N_PJ2 _GPIO(74) #define TEGRA_PIN_LCD_HSYNC_PJ3 _GPIO(75) #define TEGRA_PIN_LCD_VSYNC_PJ4 _GPIO(76) #define TEGRA_PIN_UART2_CTS_N_PJ5 _GPIO(77) #define TEGRA_PIN_UART2_RTS_N_PJ6 _GPIO(78) #define TEGRA_PIN_GMI_AD16_PJ7 _GPIO(79) #define TEGRA_PIN_GMI_ADV_N_PK0 _GPIO(80) #define TEGRA_PIN_GMI_CLK_PK1 _GPIO(81) #define TEGRA_PIN_GMI_CS4_N_PK2 _GPIO(82) #define TEGRA_PIN_GMI_CS2_N_PK3 _GPIO(83) #define TEGRA_PIN_GMI_CS3_N_PK4 _GPIO(84) #define TEGRA_PIN_SPDIF_OUT_PK5 _GPIO(85) #define TEGRA_PIN_SPDIF_IN_PK6 _GPIO(86) #define TEGRA_PIN_GMI_AD19_PK7 _GPIO(87) #define TEGRA_PIN_VI_D2_PL0 _GPIO(88) #define TEGRA_PIN_VI_D3_PL1 _GPIO(89) #define TEGRA_PIN_VI_D4_PL2 _GPIO(90) #define TEGRA_PIN_VI_D5_PL3 _GPIO(91) #define TEGRA_PIN_VI_D6_PL4 _GPIO(92) #define TEGRA_PIN_VI_D7_PL5 _GPIO(93) #define TEGRA_PIN_VI_D8_PL6 _GPIO(94) #define TEGRA_PIN_VI_D9_PL7 _GPIO(95) #define TEGRA_PIN_LCD_D16_PM0 _GPIO(96) #define TEGRA_PIN_LCD_D17_PM1 _GPIO(97) #define TEGRA_PIN_LCD_D18_PM2 _GPIO(98) #define TEGRA_PIN_LCD_D19_PM3 _GPIO(99) #define TEGRA_PIN_LCD_D20_PM4 _GPIO(100) #define TEGRA_PIN_LCD_D21_PM5 _GPIO(101) #define TEGRA_PIN_LCD_D22_PM6 _GPIO(102) #define TEGRA_PIN_LCD_D23_PM7 _GPIO(103) #define TEGRA_PIN_DAP1_FS_PN0 _GPIO(104) #define TEGRA_PIN_DAP1_DIN_PN1 _GPIO(105) #define TEGRA_PIN_DAP1_DOUT_PN2 _GPIO(106) #define TEGRA_PIN_DAP1_SCLK_PN3 _GPIO(107) #define TEGRA_PIN_LCD_CS0_N_PN4 _GPIO(108) #define TEGRA_PIN_LCD_SDOUT_PN5 _GPIO(109) #define TEGRA_PIN_LCD_DC0_PN6 _GPIO(110) #define TEGRA_PIN_HDMI_INT_N_PN7 _GPIO(111) #define TEGRA_PIN_ULPI_DATA7_PO0 _GPIO(112) #define TEGRA_PIN_ULPI_DATA0_PO1 _GPIO(113) #define TEGRA_PIN_ULPI_DATA1_PO2 _GPIO(114) #define TEGRA_PIN_ULPI_DATA2_PO3 _GPIO(115) #define TEGRA_PIN_ULPI_DATA3_PO4 _GPIO(116) #define TEGRA_PIN_ULPI_DATA4_PO5 _GPIO(117) #define TEGRA_PIN_ULPI_DATA5_PO6 _GPIO(118) #define TEGRA_PIN_ULPI_DATA6_PO7 _GPIO(119) #define TEGRA_PIN_DAP3_FS_PP0 _GPIO(120) #define TEGRA_PIN_DAP3_DIN_PP1 _GPIO(121) #define TEGRA_PIN_DAP3_DOUT_PP2 _GPIO(122) #define TEGRA_PIN_DAP3_SCLK_PP3 _GPIO(123) #define TEGRA_PIN_DAP4_FS_PP4 _GPIO(124) #define TEGRA_PIN_DAP4_DIN_PP5 _GPIO(125) #define TEGRA_PIN_DAP4_DOUT_PP6 _GPIO(126) #define TEGRA_PIN_DAP4_SCLK_PP7 _GPIO(127) #define TEGRA_PIN_KB_COL0_PQ0 _GPIO(128) #define TEGRA_PIN_KB_COL1_PQ1 _GPIO(129) #define TEGRA_PIN_KB_COL2_PQ2 _GPIO(130) #define TEGRA_PIN_KB_COL3_PQ3 _GPIO(131) #define TEGRA_PIN_KB_COL4_PQ4 _GPIO(132) #define TEGRA_PIN_KB_COL5_PQ5 _GPIO(133) #define TEGRA_PIN_KB_COL6_PQ6 _GPIO(134) #define TEGRA_PIN_KB_COL7_PQ7 _GPIO(135) #define TEGRA_PIN_KB_ROW0_PR0 _GPIO(136) #define TEGRA_PIN_KB_ROW1_PR1 _GPIO(137) #define TEGRA_PIN_KB_ROW2_PR2 _GPIO(138) #define TEGRA_PIN_KB_ROW3_PR3 _GPIO(139) #define TEGRA_PIN_KB_ROW4_PR4 _GPIO(140) #define TEGRA_PIN_KB_ROW5_PR5 _GPIO(141) #define TEGRA_PIN_KB_ROW6_PR6 _GPIO(142) #define TEGRA_PIN_KB_ROW7_PR7 _GPIO(143) #define TEGRA_PIN_KB_ROW8_PS0 _GPIO(144) #define TEGRA_PIN_KB_ROW9_PS1 _GPIO(145) #define TEGRA_PIN_KB_ROW10_PS2 _GPIO(146) #define TEGRA_PIN_KB_ROW11_PS3 _GPIO(147) #define TEGRA_PIN_KB_ROW12_PS4 _GPIO(148) #define TEGRA_PIN_KB_ROW13_PS5 _GPIO(149) #define TEGRA_PIN_KB_ROW14_PS6 _GPIO(150) #define TEGRA_PIN_KB_ROW15_PS7 _GPIO(151) #define TEGRA_PIN_VI_PCLK_PT0 _GPIO(152) #define TEGRA_PIN_VI_MCLK_PT1 _GPIO(153) #define TEGRA_PIN_VI_D10_PT2 _GPIO(154) #define TEGRA_PIN_VI_D11_PT3 _GPIO(155) #define TEGRA_PIN_VI_D0_PT4 _GPIO(156) #define TEGRA_PIN_GEN2_I2C_SCL_PT5 _GPIO(157) #define TEGRA_PIN_GEN2_I2C_SDA_PT6 _GPIO(158) #define TEGRA_PIN_GMI_DPD_PT7 _GPIO(159) #define TEGRA_PIN_PU0 _GPIO(160) #define TEGRA_PIN_PU1 _GPIO(161) #define TEGRA_PIN_PU2 _GPIO(162) #define TEGRA_PIN_PU3 _GPIO(163) #define TEGRA_PIN_PU4 _GPIO(164) #define TEGRA_PIN_PU5 _GPIO(165) #define TEGRA_PIN_PU6 _GPIO(166) #define TEGRA_PIN_JTAG_RTCK_PU7 _GPIO(167) #define TEGRA_PIN_PV0 _GPIO(168) #define TEGRA_PIN_PV1 _GPIO(169) #define TEGRA_PIN_PV2 _GPIO(170) #define TEGRA_PIN_PV3 _GPIO(171) #define TEGRA_PIN_PV4 _GPIO(172) #define TEGRA_PIN_PV5 _GPIO(173) #define TEGRA_PIN_PV6 _GPIO(174) #define TEGRA_PIN_LCD_DC1_PV7 _GPIO(175) #define TEGRA_PIN_LCD_CS1_N_PW0 _GPIO(176) #define TEGRA_PIN_LCD_M1_PW1 _GPIO(177) #define TEGRA_PIN_SPI2_CS1_N_PW2 _GPIO(178) #define TEGRA_PIN_SPI2_CS2_N_PW3 _GPIO(179) #define TEGRA_PIN_DAP_MCLK1_PW4 _GPIO(180) #define TEGRA_PIN_DAP_MCLK2_PW5 _GPIO(181) #define TEGRA_PIN_UART3_TXD_PW6 _GPIO(182) #define TEGRA_PIN_UART3_RXD_PW7 _GPIO(183) #define TEGRA_PIN_SPI2_MOSI_PX0 _GPIO(184) #define TEGRA_PIN_SPI2_MISO_PX1 _GPIO(185) #define TEGRA_PIN_SPI2_SCK_PX2 _GPIO(186) #define TEGRA_PIN_SPI2_CS0_N_PX3 _GPIO(187) #define TEGRA_PIN_SPI1_MOSI_PX4 _GPIO(188) #define TEGRA_PIN_SPI1_SCK_PX5 _GPIO(189) #define TEGRA_PIN_SPI1_CS0_N_PX6 _GPIO(190) #define TEGRA_PIN_SPI1_MISO_PX7 _GPIO(191) #define TEGRA_PIN_ULPI_CLK_PY0 _GPIO(192) #define TEGRA_PIN_ULPI_DIR_PY1 _GPIO(193) #define TEGRA_PIN_ULPI_NXT_PY2 _GPIO(194) #define TEGRA_PIN_ULPI_STP_PY3 _GPIO(195) #define TEGRA_PIN_SDIO1_DAT3_PY4 _GPIO(196) #define TEGRA_PIN_SDIO1_DAT2_PY5 _GPIO(197) #define TEGRA_PIN_SDIO1_DAT1_PY6 _GPIO(198) #define TEGRA_PIN_SDIO1_DAT0_PY7 _GPIO(199) #define TEGRA_PIN_SDIO1_CLK_PZ0 _GPIO(200) #define TEGRA_PIN_SDIO1_CMD_PZ1 _GPIO(201) #define TEGRA_PIN_LCD_SDIN_PZ2 _GPIO(202) #define TEGRA_PIN_LCD_WR_N_PZ3 _GPIO(203) #define TEGRA_PIN_LCD_SCK_PZ4 _GPIO(204) #define TEGRA_PIN_SYS_CLK_REQ_PZ5 _GPIO(205) #define TEGRA_PIN_PWR_I2C_SCL_PZ6 _GPIO(206) #define TEGRA_PIN_PWR_I2C_SDA_PZ7 _GPIO(207) #define TEGRA_PIN_GMI_AD20_PAA0 _GPIO(208) #define TEGRA_PIN_GMI_AD21_PAA1 _GPIO(209) #define TEGRA_PIN_GMI_AD22_PAA2 _GPIO(210) #define TEGRA_PIN_GMI_AD23_PAA3 _GPIO(211) #define TEGRA_PIN_GMI_AD24_PAA4 _GPIO(212) #define TEGRA_PIN_GMI_AD25_PAA5 _GPIO(213) #define TEGRA_PIN_GMI_AD26_PAA6 _GPIO(214) #define TEGRA_PIN_GMI_AD27_PAA7 _GPIO(215) #define TEGRA_PIN_LED_BLINK_PBB0 _GPIO(216) #define TEGRA_PIN_VI_GP0_PBB1 _GPIO(217) #define TEGRA_PIN_CAM_I2C_SCL_PBB2 _GPIO(218) #define TEGRA_PIN_CAM_I2C_SDA_PBB3 _GPIO(219) #define TEGRA_PIN_VI_GP3_PBB4 _GPIO(220) #define TEGRA_PIN_VI_GP4_PBB5 _GPIO(221) #define TEGRA_PIN_PBB6 _GPIO(222) #define TEGRA_PIN_PBB7 _GPIO(223) /* All non-GPIO pins follow */ #define NUM_GPIOS (TEGRA_PIN_PBB7 + 1) #define _PIN(offset) (NUM_GPIOS + (offset)) #define TEGRA_PIN_CRT_HSYNC _PIN(30) #define TEGRA_PIN_CRT_VSYNC _PIN(31) #define TEGRA_PIN_DDC_SCL _PIN(32) #define TEGRA_PIN_DDC_SDA _PIN(33) #define TEGRA_PIN_OWC _PIN(34) #define TEGRA_PIN_CORE_PWR_REQ _PIN(35) #define TEGRA_PIN_CPU_PWR_REQ _PIN(36) #define TEGRA_PIN_PWR_INT_N _PIN(37) #define TEGRA_PIN_CLK_32_K_IN _PIN(38) #define TEGRA_PIN_DDR_COMP_PD _PIN(39) #define TEGRA_PIN_DDR_COMP_PU _PIN(40) #define TEGRA_PIN_DDR_A0 _PIN(41) #define TEGRA_PIN_DDR_A1 _PIN(42) #define TEGRA_PIN_DDR_A2 _PIN(43) #define TEGRA_PIN_DDR_A3 _PIN(44) #define TEGRA_PIN_DDR_A4 _PIN(45) #define TEGRA_PIN_DDR_A5 _PIN(46) #define TEGRA_PIN_DDR_A6 _PIN(47) #define TEGRA_PIN_DDR_A7 _PIN(48) #define TEGRA_PIN_DDR_A8 _PIN(49) #define TEGRA_PIN_DDR_A9 _PIN(50) #define TEGRA_PIN_DDR_A10 _PIN(51) #define TEGRA_PIN_DDR_A11 _PIN(52) #define TEGRA_PIN_DDR_A12 _PIN(53) #define TEGRA_PIN_DDR_A13 _PIN(54) #define TEGRA_PIN_DDR_A14 _PIN(55) #define TEGRA_PIN_DDR_CAS_N _PIN(56) #define TEGRA_PIN_DDR_BA0 _PIN(57) #define TEGRA_PIN_DDR_BA1 _PIN(58) #define TEGRA_PIN_DDR_BA2 _PIN(59) #define TEGRA_PIN_DDR_DQS0P _PIN(60) #define TEGRA_PIN_DDR_DQS0N _PIN(61) #define TEGRA_PIN_DDR_DQS1P _PIN(62) #define TEGRA_PIN_DDR_DQS1N _PIN(63) #define TEGRA_PIN_DDR_DQS2P _PIN(64) #define TEGRA_PIN_DDR_DQS2N _PIN(65) #define TEGRA_PIN_DDR_DQS3P _PIN(66) #define TEGRA_PIN_DDR_DQS3N _PIN(67) #define TEGRA_PIN_DDR_CKE0 _PIN(68) #define TEGRA_PIN_DDR_CKE1 _PIN(69) #define TEGRA_PIN_DDR_CLK _PIN(70) #define TEGRA_PIN_DDR_CLK_N _PIN(71) #define TEGRA_PIN_DDR_DM0 _PIN(72) #define TEGRA_PIN_DDR_DM1 _PIN(73) #define TEGRA_PIN_DDR_DM2 _PIN(74) #define TEGRA_PIN_DDR_DM3 _PIN(75) #define TEGRA_PIN_DDR_ODT _PIN(76) #define TEGRA_PIN_DDR_QUSE0 _PIN(77) #define TEGRA_PIN_DDR_QUSE1 _PIN(78) #define TEGRA_PIN_DDR_QUSE2 _PIN(79) #define TEGRA_PIN_DDR_QUSE3 _PIN(80) #define TEGRA_PIN_DDR_RAS_N _PIN(81) #define TEGRA_PIN_DDR_WE_N _PIN(82) #define TEGRA_PIN_DDR_DQ0 _PIN(83) #define TEGRA_PIN_DDR_DQ1 _PIN(84) #define TEGRA_PIN_DDR_DQ2 _PIN(85) #define TEGRA_PIN_DDR_DQ3 _PIN(86) #define TEGRA_PIN_DDR_DQ4 _PIN(87) #define TEGRA_PIN_DDR_DQ5 _PIN(88) #define TEGRA_PIN_DDR_DQ6 _PIN(89) #define TEGRA_PIN_DDR_DQ7 _PIN(90) #define TEGRA_PIN_DDR_DQ8 _PIN(91) #define TEGRA_PIN_DDR_DQ9 _PIN(92) #define TEGRA_PIN_DDR_DQ10 _PIN(93) #define TEGRA_PIN_DDR_DQ11 _PIN(94) #define TEGRA_PIN_DDR_DQ12 _PIN(95) #define TEGRA_PIN_DDR_DQ13 _PIN(96) #define TEGRA_PIN_DDR_DQ14 _PIN(97) #define TEGRA_PIN_DDR_DQ15 _PIN(98) #define TEGRA_PIN_DDR_DQ16 _PIN(99) #define TEGRA_PIN_DDR_DQ17 _PIN(100) #define TEGRA_PIN_DDR_DQ18 _PIN(101) #define TEGRA_PIN_DDR_DQ19 _PIN(102) #define TEGRA_PIN_DDR_DQ20 _PIN(103) #define TEGRA_PIN_DDR_DQ21 _PIN(104) #define TEGRA_PIN_DDR_DQ22 _PIN(105) #define TEGRA_PIN_DDR_DQ23 _PIN(106) #define TEGRA_PIN_DDR_DQ24 _PIN(107) #define TEGRA_PIN_DDR_DQ25 _PIN(108) #define TEGRA_PIN_DDR_DQ26 _PIN(109) #define TEGRA_PIN_DDR_DQ27 _PIN(110) #define TEGRA_PIN_DDR_DQ28 _PIN(111) #define TEGRA_PIN_DDR_DQ29 _PIN(112) #define TEGRA_PIN_DDR_DQ30 _PIN(113) #define TEGRA_PIN_DDR_DQ31 _PIN(114) #define TEGRA_PIN_DDR_CS0_N _PIN(115) #define TEGRA_PIN_DDR_CS1_N _PIN(116) #define TEGRA_PIN_SYS_RESET _PIN(117) #define TEGRA_PIN_JTAG_TRST_N _PIN(118) #define TEGRA_PIN_JTAG_TDO _PIN(119) #define TEGRA_PIN_JTAG_TMS _PIN(120) #define TEGRA_PIN_JTAG_TCK _PIN(121) #define TEGRA_PIN_JTAG_TDI _PIN(122) #define TEGRA_PIN_TEST_MODE_EN _PIN(123) static const struct pinctrl_pin_desc tegra20_pins[] = { PINCTRL_PIN(TEGRA_PIN_VI_GP6_PA0, "VI_GP6 PA0"), PINCTRL_PIN(TEGRA_PIN_UART3_CTS_N_PA1, "UART3_CTS_N PA1"), PINCTRL_PIN(TEGRA_PIN_DAP2_FS_PA2, "DAP2_FS PA2"), PINCTRL_PIN(TEGRA_PIN_DAP2_SCLK_PA3, "DAP2_SCLK PA3"), PINCTRL_PIN(TEGRA_PIN_DAP2_DIN_PA4, "DAP2_DIN PA4"), PINCTRL_PIN(TEGRA_PIN_DAP2_DOUT_PA5, "DAP2_DOUT PA5"), PINCTRL_PIN(TEGRA_PIN_SDIO3_CLK_PA6, "SDIO3_CLK PA6"), PINCTRL_PIN(TEGRA_PIN_SDIO3_CMD_PA7, "SDIO3_CMD PA7"), PINCTRL_PIN(TEGRA_PIN_GMI_AD17_PB0, "GMI_AD17 PB0"), PINCTRL_PIN(TEGRA_PIN_GMI_AD18_PB1, "GMI_AD18 PB1"), PINCTRL_PIN(TEGRA_PIN_LCD_PWR0_PB2, "LCD_PWR0 PB2"), PINCTRL_PIN(TEGRA_PIN_LCD_PCLK_PB3, "LCD_PCLK PB3"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT3_PB4, "SDIO3_DAT3 PB4"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT2_PB5, "SDIO3_DAT2 PB5"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT1_PB6, "SDIO3_DAT1 PB6"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT0_PB7, "SDIO3_DAT0 PB7"), PINCTRL_PIN(TEGRA_PIN_UART3_RTS_N_PC0, "UART3_RTS_N PC0"), PINCTRL_PIN(TEGRA_PIN_LCD_PWR1_PC1, "LCD_PWR1 PC1"), PINCTRL_PIN(TEGRA_PIN_UART2_TXD_PC2, "UART2_TXD PC2"), PINCTRL_PIN(TEGRA_PIN_UART2_RXD_PC3, "UART2_RXD PC3"), PINCTRL_PIN(TEGRA_PIN_GEN1_I2C_SCL_PC4, "GEN1_I2C_SCL PC4"), PINCTRL_PIN(TEGRA_PIN_GEN1_I2C_SDA_PC5, "GEN1_I2C_SDA PC5"), PINCTRL_PIN(TEGRA_PIN_LCD_PWR2_PC6, "LCD_PWR2 PC6"), PINCTRL_PIN(TEGRA_PIN_GMI_WP_N_PC7, "GMI_WP_N PC7"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT5_PD0, "SDIO3_DAT5 PD0"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT4_PD1, "SDIO3_DAT4 PD1"), PINCTRL_PIN(TEGRA_PIN_VI_GP5_PD2, "VI_GP5 PD2"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT6_PD3, "SDIO3_DAT6 PD3"), PINCTRL_PIN(TEGRA_PIN_SDIO3_DAT7_PD4, "SDIO3_DAT7 PD4"), PINCTRL_PIN(TEGRA_PIN_VI_D1_PD5, "VI_D1 PD5"), PINCTRL_PIN(TEGRA_PIN_VI_VSYNC_PD6, "VI_VSYNC PD6"), PINCTRL_PIN(TEGRA_PIN_VI_HSYNC_PD7, "VI_HSYNC PD7"), PINCTRL_PIN(TEGRA_PIN_LCD_D0_PE0, "LCD_D0 PE0"), PINCTRL_PIN(TEGRA_PIN_LCD_D1_PE1, "LCD_D1 PE1"), PINCTRL_PIN(TEGRA_PIN_LCD_D2_PE2, "LCD_D2 PE2"), PINCTRL_PIN(TEGRA_PIN_LCD_D3_PE3, "LCD_D3 PE3"), PINCTRL_PIN(TEGRA_PIN_LCD_D4_PE4, "LCD_D4 PE4"), PINCTRL_PIN(TEGRA_PIN_LCD_D5_PE5, "LCD_D5 PE5"), PINCTRL_PIN(TEGRA_PIN_LCD_D6_PE6, "LCD_D6 PE6"), PINCTRL_PIN(TEGRA_PIN_LCD_D7_PE7, "LCD_D7 PE7"), PINCTRL_PIN(TEGRA_PIN_LCD_D8_PF0, "LCD_D8 PF0"), PINCTRL_PIN(TEGRA_PIN_LCD_D9_PF1, "LCD_D9 PF1"), PINCTRL_PIN(TEGRA_PIN_LCD_D10_PF2, "LCD_D10 PF2"), PINCTRL_PIN(TEGRA_PIN_LCD_D11_PF3, "LCD_D11 PF3"), PINCTRL_PIN(TEGRA_PIN_LCD_D12_PF4, "LCD_D12 PF4"), PINCTRL_PIN(TEGRA_PIN_LCD_D13_PF5, "LCD_D13 PF5"), PINCTRL_PIN(TEGRA_PIN_LCD_D14_PF6, "LCD_D14 PF6"), PINCTRL_PIN(TEGRA_PIN_LCD_D15_PF7, "LCD_D15 PF7"), PINCTRL_PIN(TEGRA_PIN_GMI_AD0_PG0, "GMI_AD0 PG0"), PINCTRL_PIN(TEGRA_PIN_GMI_AD1_PG1, "GMI_AD1 PG1"), PINCTRL_PIN(TEGRA_PIN_GMI_AD2_PG2, "GMI_AD2 PG2"), PINCTRL_PIN(TEGRA_PIN_GMI_AD3_PG3, "GMI_AD3 PG3"), PINCTRL_PIN(TEGRA_PIN_GMI_AD4_PG4, "GMI_AD4 PG4"), PINCTRL_PIN(TEGRA_PIN_GMI_AD5_PG5, "GMI_AD5 PG5"), PINCTRL_PIN(TEGRA_PIN_GMI_AD6_PG6, "GMI_AD6 PG6"), PINCTRL_PIN(TEGRA_PIN_GMI_AD7_PG7, "GMI_AD7 PG7"), PINCTRL_PIN(TEGRA_PIN_GMI_AD8_PH0, "GMI_AD8 PH0"), PINCTRL_PIN(TEGRA_PIN_GMI_AD9_PH1, "GMI_AD9 PH1"), PINCTRL_PIN(TEGRA_PIN_GMI_AD10_PH2, "GMI_AD10 PH2"), PINCTRL_PIN(TEGRA_PIN_GMI_AD11_PH3, "GMI_AD11 PH3"), PINCTRL_PIN(TEGRA_PIN_GMI_AD12_PH4, "GMI_AD12 PH4"), PINCTRL_PIN(TEGRA_PIN_GMI_AD13_PH5, "GMI_AD13 PH5"), PINCTRL_PIN(TEGRA_PIN_GMI_AD14_PH6, "GMI_AD14 PH6"), PINCTRL_PIN(TEGRA_PIN_GMI_AD15_PH7, "GMI_AD15 PH7"), PINCTRL_PIN(TEGRA_PIN_GMI_HIOW_N_PI0, "GMI_HIOW_N PI0"), PINCTRL_PIN(TEGRA_PIN_GMI_HIOR_N_PI1, "GMI_HIOR_N PI1"), PINCTRL_PIN(TEGRA_PIN_GMI_CS5_N_PI2, "GMI_CS5_N PI2"), PINCTRL_PIN(TEGRA_PIN_GMI_CS6_N_PI3, "GMI_CS6_N PI3"), PINCTRL_PIN(TEGRA_PIN_GMI_RST_N_PI4, "GMI_RST_N PI4"), PINCTRL_PIN(TEGRA_PIN_GMI_IORDY_PI5, "GMI_IORDY PI5"), PINCTRL_PIN(TEGRA_PIN_GMI_CS7_N_PI6, "GMI_CS7_N PI6"), PINCTRL_PIN(TEGRA_PIN_GMI_WAIT_PI7, "GMI_WAIT PI7"), PINCTRL_PIN(TEGRA_PIN_GMI_CS0_N_PJ0, "GMI_CS0_N PJ0"), PINCTRL_PIN(TEGRA_PIN_LCD_DE_PJ1, "LCD_DE PJ1"), PINCTRL_PIN(TEGRA_PIN_GMI_CS1_N_PJ2, "GMI_CS1_N PJ2"), PINCTRL_PIN(TEGRA_PIN_LCD_HSYNC_PJ3, "LCD_HSYNC PJ3"), PINCTRL_PIN(TEGRA_PIN_LCD_VSYNC_PJ4, "LCD_VSYNC PJ4"), PINCTRL_PIN(TEGRA_PIN_UART2_CTS_N_PJ5, "UART2_CTS_N PJ5"), PINCTRL_PIN(TEGRA_PIN_UART2_RTS_N_PJ6, "UART2_RTS_N PJ6"), PINCTRL_PIN(TEGRA_PIN_GMI_AD16_PJ7, "GMI_AD16 PJ7"), PINCTRL_PIN(TEGRA_PIN_GMI_ADV_N_PK0, "GMI_ADV_N PK0"), PINCTRL_PIN(TEGRA_PIN_GMI_CLK_PK1, "GMI_CLK PK1"), PINCTRL_PIN(TEGRA_PIN_GMI_CS4_N_PK2, "GMI_CS4_N PK2"), PINCTRL_PIN(TEGRA_PIN_GMI_CS2_N_PK3, "GMI_CS2_N PK3"), PINCTRL_PIN(TEGRA_PIN_GMI_CS3_N_PK4, "GMI_CS3_N PK4"), PINCTRL_PIN(TEGRA_PIN_SPDIF_OUT_PK5, "SPDIF_OUT PK5"), PINCTRL_PIN(TEGRA_PIN_SPDIF_IN_PK6, "SPDIF_IN PK6"), PINCTRL_PIN(TEGRA_PIN_GMI_AD19_PK7, "GMI_AD19 PK7"), PINCTRL_PIN(TEGRA_PIN_VI_D2_PL0, "VI_D2 PL0"), PINCTRL_PIN(TEGRA_PIN_VI_D3_PL1, "VI_D3 PL1"), PINCTRL_PIN(TEGRA_PIN_VI_D4_PL2, "VI_D4 PL2"), PINCTRL_PIN(TEGRA_PIN_VI_D5_PL3, "VI_D5 PL3"), PINCTRL_PIN(TEGRA_PIN_VI_D6_PL4, "VI_D6 PL4"), PINCTRL_PIN(TEGRA_PIN_VI_D7_PL5, "VI_D7 PL5"), PINCTRL_PIN(TEGRA_PIN_VI_D8_PL6, "VI_D8 PL6"), PINCTRL_PIN(TEGRA_PIN_VI_D9_PL7, "VI_D9 PL7"), PINCTRL_PIN(TEGRA_PIN_LCD_D16_PM0, "LCD_D16 PM0"), PINCTRL_PIN(TEGRA_PIN_LCD_D17_PM1, "LCD_D17 PM1"), PINCTRL_PIN(TEGRA_PIN_LCD_D18_PM2, "LCD_D18 PM2"), PINCTRL_PIN(TEGRA_PIN_LCD_D19_PM3, "LCD_D19 PM3"), PINCTRL_PIN(TEGRA_PIN_LCD_D20_PM4, "LCD_D20 PM4"), PINCTRL_PIN(TEGRA_PIN_LCD_D21_PM5, "LCD_D21 PM5"), PINCTRL_PIN(TEGRA_PIN_LCD_D22_PM6, "LCD_D22 PM6"), PINCTRL_PIN(TEGRA_PIN_LCD_D23_PM7, "LCD_D23 PM7"), PINCTRL_PIN(TEGRA_PIN_DAP1_FS_PN0, "DAP1_FS PN0"), PINCTRL_PIN(TEGRA_PIN_DAP1_DIN_PN1, "DAP1_DIN PN1"), PINCTRL_PIN(TEGRA_PIN_DAP1_DOUT_PN2, "DAP1_DOUT PN2"), PINCTRL_PIN(TEGRA_PIN_DAP1_SCLK_PN3, "DAP1_SCLK PN3"), PINCTRL_PIN(TEGRA_PIN_LCD_CS0_N_PN4, "LCD_CS0_N PN4"), PINCTRL_PIN(TEGRA_PIN_LCD_SDOUT_PN5, "LCD_SDOUT PN5"), PINCTRL_PIN(TEGRA_PIN_LCD_DC0_PN6, "LCD_DC0 PN6"), PINCTRL_PIN(TEGRA_PIN_HDMI_INT_N_PN7, "HDMI_INT_N PN7"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA7_PO0, "ULPI_DATA7 PO0"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA0_PO1, "ULPI_DATA0 PO1"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA1_PO2, "ULPI_DATA1 PO2"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA2_PO3, "ULPI_DATA2 PO3"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA3_PO4, "ULPI_DATA3 PO4"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA4_PO5, "ULPI_DATA4 PO5"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA5_PO6, "ULPI_DATA5 PO6"), PINCTRL_PIN(TEGRA_PIN_ULPI_DATA6_PO7, "ULPI_DATA6 PO7"), PINCTRL_PIN(TEGRA_PIN_DAP3_FS_PP0, "DAP3_FS PP0"), PINCTRL_PIN(TEGRA_PIN_DAP3_DIN_PP1, "DAP3_DIN PP1"), PINCTRL_PIN(TEGRA_PIN_DAP3_DOUT_PP2, "DAP3_DOUT PP2"), PINCTRL_PIN(TEGRA_PIN_DAP3_SCLK_PP3, "DAP3_SCLK PP3"), PINCTRL_PIN(TEGRA_PIN_DAP4_FS_PP4, "DAP4_FS PP4"), PINCTRL_PIN(TEGRA_PIN_DAP4_DIN_PP5, "DAP4_DIN PP5"), PINCTRL_PIN(TEGRA_PIN_DAP4_DOUT_PP6, "DAP4_DOUT PP6"), PINCTRL_PIN(TEGRA_PIN_DAP4_SCLK_PP7, "DAP4_SCLK PP7"), PINCTRL_PIN(TEGRA_PIN_KB_COL0_PQ0, "KB_COL0 PQ0"), PINCTRL_PIN(TEGRA_PIN_KB_COL1_PQ1, "KB_COL1 PQ1"), PINCTRL_PIN(TEGRA_PIN_KB_COL2_PQ2, "KB_COL2 PQ2"), PINCTRL_PIN(TEGRA_PIN_KB_COL3_PQ3, "KB_COL3 PQ3"), PINCTRL_PIN(TEGRA_PIN_KB_COL4_PQ4, "KB_COL4 PQ4"), PINCTRL_PIN(TEGRA_PIN_KB_COL5_PQ5, "KB_COL5 PQ5"), PINCTRL_PIN(TEGRA_PIN_KB_COL6_PQ6, "KB_COL6 PQ6"), PINCTRL_PIN(TEGRA_PIN_KB_COL7_PQ7, "KB_COL7 PQ7"), PINCTRL_PIN(TEGRA_PIN_KB_ROW0_PR0, "KB_ROW0 PR0"), PINCTRL_PIN(TEGRA_PIN_KB_ROW1_PR1, "KB_ROW1 PR1"), PINCTRL_PIN(TEGRA_PIN_KB_ROW2_PR2, "KB_ROW2 PR2"), PINCTRL_PIN(TEGRA_PIN_KB_ROW3_PR3, "KB_ROW3 PR3"), PINCTRL_PIN(TEGRA_PIN_KB_ROW4_PR4, "KB_ROW4 PR4"), PINCTRL_PIN(TEGRA_PIN_KB_ROW5_PR5, "KB_ROW5 PR5"), PINCTRL_PIN(TEGRA_PIN_KB_ROW6_PR6, "KB_ROW6 PR6"), PINCTRL_PIN(TEGRA_PIN_KB_ROW7_PR7, "KB_ROW7 PR7"), PINCTRL_PIN(TEGRA_PIN_KB_ROW8_PS0, "KB_ROW8 PS0"), PINCTRL_PIN(TEGRA_PIN_KB_ROW9_PS1, "KB_ROW9 PS1"), PINCTRL_PIN(TEGRA_PIN_KB_ROW10_PS2, "KB_ROW10 PS2"), PINCTRL_PIN(TEGRA_PIN_KB_ROW11_PS3, "KB_ROW11 PS3"), PINCTRL_PIN(TEGRA_PIN_KB_ROW12_PS4, "KB_ROW12 PS4"), PINCTRL_PIN(TEGRA_PIN_KB_ROW13_PS5, "KB_ROW13 PS5"), PINCTRL_PIN(TEGRA_PIN_KB_ROW14_PS6, "KB_ROW14 PS6"), PINCTRL_PIN(TEGRA_PIN_KB_ROW15_PS7, "KB_ROW15 PS7"), PINCTRL_PIN(TEGRA_PIN_VI_PCLK_PT0, "VI_PCLK PT0"), PINCTRL_PIN(TEGRA_PIN_VI_MCLK_PT1, "VI_MCLK PT1"), PINCTRL_PIN(TEGRA_PIN_VI_D10_PT2, "VD_D10 PT2"), PINCTRL_PIN(TEGRA_PIN_VI_D11_PT3, "VI_D11 PT3"), PINCTRL_PIN(TEGRA_PIN_VI_D0_PT4, "VI_D0 PT4"), PINCTRL_PIN(TEGRA_PIN_GEN2_I2C_SCL_PT5, "GEN2_I2C_SCL PT5"), PINCTRL_PIN(TEGRA_PIN_GEN2_I2C_SDA_PT6, "GEN2_I2C_SDA PT6"), PINCTRL_PIN(TEGRA_PIN_GMI_DPD_PT7, "GMI_DPD PT7"), /* PU0..6: GPIO only */ PINCTRL_PIN(TEGRA_PIN_PU0, "PU0"), PINCTRL_PIN(TEGRA_PIN_PU1, "PU1"), PINCTRL_PIN(TEGRA_PIN_PU2, "PU2"), PINCTRL_PIN(TEGRA_PIN_PU3, "PU3"), PINCTRL_PIN(TEGRA_PIN_PU4, "PU4"), PINCTRL_PIN(TEGRA_PIN_PU5, "PU5"), PINCTRL_PIN(TEGRA_PIN_PU6, "PU6"), PINCTRL_PIN(TEGRA_PIN_JTAG_RTCK_PU7, "JTAG_RTCK PU7"), /* PV0..1: GPIO only */ PINCTRL_PIN(TEGRA_PIN_PV0, "PV0"), PINCTRL_PIN(TEGRA_PIN_PV1, "PV1"), /* PV2..3: Balls are named after GPIO not function */ PINCTRL_PIN(TEGRA_PIN_PV2, "PV2"), PINCTRL_PIN(TEGRA_PIN_PV3, "PV3"), /* PV4..6: GPIO only */ PINCTRL_PIN(TEGRA_PIN_PV4, "PV4"), PINCTRL_PIN(TEGRA_PIN_PV5, "PV5"), PINCTRL_PIN(TEGRA_PIN_PV6, "PV6"), PINCTRL_PIN(TEGRA_PIN_LCD_DC1_PV7, "LCD_DC1 PV7"), PINCTRL_PIN(TEGRA_PIN_LCD_CS1_N_PW0, "LCD_CS1_N PW0"), PINCTRL_PIN(TEGRA_PIN_LCD_M1_PW1, "LCD_M1 PW1"), PINCTRL_PIN(TEGRA_PIN_SPI2_CS1_N_PW2, "SPI2_CS1_N PW2"), PINCTRL_PIN(TEGRA_PIN_SPI2_CS2_N_PW3, "SPI2_CS2_N PW3"), PINCTRL_PIN(TEGRA_PIN_DAP_MCLK1_PW4, "DAP_MCLK1 PW4"), PINCTRL_PIN(TEGRA_PIN_DAP_MCLK2_PW5, "DAP_MCLK2 PW5"), PINCTRL_PIN(TEGRA_PIN_UART3_TXD_PW6, "UART3_TXD PW6"), PINCTRL_PIN(TEGRA_PIN_UART3_RXD_PW7, "UART3_RXD PW7"), PINCTRL_PIN(TEGRA_PIN_SPI2_MOSI_PX0, "SPI2_MOSI PX0"), PINCTRL_PIN(TEGRA_PIN_SPI2_MISO_PX1, "SPI2_MISO PX1"), PINCTRL_PIN(TEGRA_PIN_SPI2_SCK_PX2, "SPI2_SCK PX2"), PINCTRL_PIN(TEGRA_PIN_SPI2_CS0_N_PX3, "SPI2_CS0_N PX3"), PINCTRL_PIN(TEGRA_PIN_SPI1_MOSI_PX4, "SPI1_MOSI PX4"), PINCTRL_PIN(TEGRA_PIN_SPI1_SCK_PX5, "SPI1_SCK PX5"), PINCTRL_PIN(TEGRA_PIN_SPI1_CS0_N_PX6, "SPI1_CS0_N PX6"), PINCTRL_PIN(TEGRA_PIN_SPI1_MISO_PX7, "SPI1_MISO PX7"), PINCTRL_PIN(TEGRA_PIN_ULPI_CLK_PY0, "ULPI_CLK PY0"), PINCTRL_PIN(TEGRA_PIN_ULPI_DIR_PY1, "ULPI_DIR PY1"), PINCTRL_PIN(TEGRA_PIN_ULPI_NXT_PY2, "ULPI_NXT PY2"), PINCTRL_PIN(TEGRA_PIN_ULPI_STP_PY3, "ULPI_STP PY3"), PINCTRL_PIN(TEGRA_PIN_SDIO1_DAT3_PY4, "SDIO1_DAT3 PY4"), PINCTRL_PIN(TEGRA_PIN_SDIO1_DAT2_PY5, "SDIO1_DAT2 PY5"), PINCTRL_PIN(TEGRA_PIN_SDIO1_DAT1_PY6, "SDIO1_DAT1 PY6"), PINCTRL_PIN(TEGRA_PIN_SDIO1_DAT0_PY7, "SDIO1_DAT0 PY7"), PINCTRL_PIN(TEGRA_PIN_SDIO1_CLK_PZ0, "SDIO1_CLK PZ0"), PINCTRL_PIN(TEGRA_PIN_SDIO1_CMD_PZ1, "SDIO1_CMD PZ1"), PINCTRL_PIN(TEGRA_PIN_LCD_SDIN_PZ2, "LCD_SDIN PZ2"), PINCTRL_PIN(TEGRA_PIN_LCD_WR_N_PZ3, "LCD_WR_N PZ3"), PINCTRL_PIN(TEGRA_PIN_LCD_SCK_PZ4, "LCD_SCK PZ4"), PINCTRL_PIN(TEGRA_PIN_SYS_CLK_REQ_PZ5, "SYS_CLK_REQ PZ5"), PINCTRL_PIN(TEGRA_PIN_PWR_I2C_SCL_PZ6, "PWR_I2C_SCL PZ6"), PINCTRL_PIN(TEGRA_PIN_PWR_I2C_SDA_PZ7, "PWR_I2C_SDA PZ7"), PINCTRL_PIN(TEGRA_PIN_GMI_AD20_PAA0, "GMI_AD20 PAA0"), PINCTRL_PIN(TEGRA_PIN_GMI_AD21_PAA1, "GMI_AD21 PAA1"), PINCTRL_PIN(TEGRA_PIN_GMI_AD22_PAA2, "GMI_AD22 PAA2"), PINCTRL_PIN(TEGRA_PIN_GMI_AD23_PAA3, "GMI_AD23 PAA3"), PINCTRL_PIN(TEGRA_PIN_GMI_AD24_PAA4, "GMI_AD24 PAA4"), PINCTRL_PIN(TEGRA_PIN_GMI_AD25_PAA5, "GMI_AD25 PAA5"), PINCTRL_PIN(TEGRA_PIN_GMI_AD26_PAA6, "GMI_AD26 PAA6"), PINCTRL_PIN(TEGRA_PIN_GMI_AD27_PAA7, "GMI_AD27 PAA7"), PINCTRL_PIN(TEGRA_PIN_LED_BLINK_PBB0, "LED_BLINK PBB0"), PINCTRL_PIN(TEGRA_PIN_VI_GP0_PBB1, "VI_GP0 PBB1"), PINCTRL_PIN(TEGRA_PIN_CAM_I2C_SCL_PBB2, "CAM_I2C_SCL PBB2"), PINCTRL_PIN(TEGRA_PIN_CAM_I2C_SDA_PBB3, "CAM_I2C_SDA PBB3"), PINCTRL_PIN(TEGRA_PIN_VI_GP3_PBB4, "VI_GP3 PBB4"), PINCTRL_PIN(TEGRA_PIN_VI_GP4_PBB5, "VI_GP4 PBB5"), PINCTRL_PIN(TEGRA_PIN_PBB6, "PBB6"), PINCTRL_PIN(TEGRA_PIN_PBB7, "PBB7"), PINCTRL_PIN(TEGRA_PIN_CRT_HSYNC, "CRT_HSYNC"), PINCTRL_PIN(TEGRA_PIN_CRT_VSYNC, "CRT_VSYNC"), PINCTRL_PIN(TEGRA_PIN_DDC_SCL, "DDC_SCL"), PINCTRL_PIN(TEGRA_PIN_DDC_SDA, "DDC_SDA"), PINCTRL_PIN(TEGRA_PIN_OWC, "OWC"), PINCTRL_PIN(TEGRA_PIN_CORE_PWR_REQ, "CORE_PWR_REQ"), PINCTRL_PIN(TEGRA_PIN_CPU_PWR_REQ, "CPU_PWR_REQ"), PINCTRL_PIN(TEGRA_PIN_PWR_INT_N, "PWR_INT_N"), PINCTRL_PIN(TEGRA_PIN_CLK_32_K_IN, "CLK_32_K_IN"), PINCTRL_PIN(TEGRA_PIN_DDR_COMP_PD, "DDR_COMP_PD"), PINCTRL_PIN(TEGRA_PIN_DDR_COMP_PU, "DDR_COMP_PU"), PINCTRL_PIN(TEGRA_PIN_DDR_A0, "DDR_A0"), PINCTRL_PIN(TEGRA_PIN_DDR_A1, "DDR_A1"), PINCTRL_PIN(TEGRA_PIN_DDR_A2, "DDR_A2"), PINCTRL_PIN(TEGRA_PIN_DDR_A3, "DDR_A3"), PINCTRL_PIN(TEGRA_PIN_DDR_A4, "DDR_A4"), PINCTRL_PIN(TEGRA_PIN_DDR_A5, "DDR_A5"), PINCTRL_PIN(TEGRA_PIN_DDR_A6, "DDR_A6"), PINCTRL_PIN(TEGRA_PIN_DDR_A7, "DDR_A7"), PINCTRL_PIN(TEGRA_PIN_DDR_A8, "DDR_A8"), PINCTRL_PIN(TEGRA_PIN_DDR_A9, "DDR_A9"), PINCTRL_PIN(TEGRA_PIN_DDR_A10, "DDR_A10"), PINCTRL_PIN(TEGRA_PIN_DDR_A11, "DDR_A11"), PINCTRL_PIN(TEGRA_PIN_DDR_A12, "DDR_A12"), PINCTRL_PIN(TEGRA_PIN_DDR_A13, "DDR_A13"), PINCTRL_PIN(TEGRA_PIN_DDR_A14, "DDR_A14"), PINCTRL_PIN(TEGRA_PIN_DDR_CAS_N, "DDR_CAS_N"), PINCTRL_PIN(TEGRA_PIN_DDR_BA0, "DDR_BA0"), PINCTRL_PIN(TEGRA_PIN_DDR_BA1, "DDR_BA1"), PINCTRL_PIN(TEGRA_PIN_DDR_BA2, "DDR_BA2"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS0P, "DDR_DQS0P"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS0N, "DDR_DQS0N"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS1P, "DDR_DQS1P"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS1N, "DDR_DQS1N"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS2P, "DDR_DQS2P"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS2N, "DDR_DQS2N"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS3P, "DDR_DQS3P"), PINCTRL_PIN(TEGRA_PIN_DDR_DQS3N, "DDR_DQS3N"), PINCTRL_PIN(TEGRA_PIN_DDR_CKE0, "DDR_CKE0"), PINCTRL_PIN(TEGRA_PIN_DDR_CKE1, "DDR_CKE1"), PINCTRL_PIN(TEGRA_PIN_DDR_CLK, "DDR_CLK"), PINCTRL_PIN(TEGRA_PIN_DDR_CLK_N, "DDR_CLK_N"), PINCTRL_PIN(TEGRA_PIN_DDR_DM0, "DDR_DM0"), PINCTRL_PIN(TEGRA_PIN_DDR_DM1, "DDR_DM1"), PINCTRL_PIN(TEGRA_PIN_DDR_DM2, "DDR_DM2"), PINCTRL_PIN(TEGRA_PIN_DDR_DM3, "DDR_DM3"), PINCTRL_PIN(TEGRA_PIN_DDR_ODT, "DDR_ODT"), PINCTRL_PIN(TEGRA_PIN_DDR_QUSE0, "DDR_QUSE0"), PINCTRL_PIN(TEGRA_PIN_DDR_QUSE1, "DDR_QUSE1"), PINCTRL_PIN(TEGRA_PIN_DDR_QUSE2, "DDR_QUSE2"), PINCTRL_PIN(TEGRA_PIN_DDR_QUSE3, "DDR_QUSE3"), PINCTRL_PIN(TEGRA_PIN_DDR_RAS_N, "DDR_RAS_N"), PINCTRL_PIN(TEGRA_PIN_DDR_WE_N, "DDR_WE_N"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ0, "DDR_DQ0"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ1, "DDR_DQ1"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ2, "DDR_DQ2"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ3, "DDR_DQ3"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ4, "DDR_DQ4"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ5, "DDR_DQ5"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ6, "DDR_DQ6"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ7, "DDR_DQ7"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ8, "DDR_DQ8"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ9, "DDR_DQ9"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ10, "DDR_DQ10"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ11, "DDR_DQ11"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ12, "DDR_DQ12"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ13, "DDR_DQ13"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ14, "DDR_DQ14"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ15, "DDR_DQ15"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ16, "DDR_DQ16"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ17, "DDR_DQ17"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ18, "DDR_DQ18"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ19, "DDR_DQ19"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ20, "DDR_DQ20"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ21, "DDR_DQ21"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ22, "DDR_DQ22"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ23, "DDR_DQ23"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ24, "DDR_DQ24"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ25, "DDR_DQ25"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ26, "DDR_DQ26"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ27, "DDR_DQ27"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ28, "DDR_DQ28"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ29, "DDR_DQ29"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ30, "DDR_DQ30"), PINCTRL_PIN(TEGRA_PIN_DDR_DQ31, "DDR_DQ31"), PINCTRL_PIN(TEGRA_PIN_DDR_CS0_N, "DDR_CS0_N"), PINCTRL_PIN(TEGRA_PIN_DDR_CS1_N, "DDR_CS1_N"), PINCTRL_PIN(TEGRA_PIN_SYS_RESET, "SYS_RESET"), PINCTRL_PIN(TEGRA_PIN_JTAG_TRST_N, "JTAG_TRST_N"), PINCTRL_PIN(TEGRA_PIN_JTAG_TDO, "JTAG_TDO"), PINCTRL_PIN(TEGRA_PIN_JTAG_TMS, "JTAG_TMS"), PINCTRL_PIN(TEGRA_PIN_JTAG_TCK, "JTAG_TCK"), PINCTRL_PIN(TEGRA_PIN_JTAG_TDI, "JTAG_TDI"), PINCTRL_PIN(TEGRA_PIN_TEST_MODE_EN, "TEST_MODE_EN"), }; static const unsigned ata_pins[] = { TEGRA_PIN_GMI_CS6_N_PI3, TEGRA_PIN_GMI_CS7_N_PI6, TEGRA_PIN_GMI_RST_N_PI4, }; static const unsigned atb_pins[] = { TEGRA_PIN_GMI_CS5_N_PI2, TEGRA_PIN_GMI_DPD_PT7, }; static const unsigned atc_pins[] = { TEGRA_PIN_GMI_IORDY_PI5, TEGRA_PIN_GMI_WAIT_PI7, TEGRA_PIN_GMI_ADV_N_PK0, TEGRA_PIN_GMI_CLK_PK1, TEGRA_PIN_GMI_CS2_N_PK3, TEGRA_PIN_GMI_CS3_N_PK4, TEGRA_PIN_GMI_CS4_N_PK2, TEGRA_PIN_GMI_AD0_PG0, TEGRA_PIN_GMI_AD1_PG1, TEGRA_PIN_GMI_AD2_PG2, TEGRA_PIN_GMI_AD3_PG3, TEGRA_PIN_GMI_AD4_PG4, TEGRA_PIN_GMI_AD5_PG5, TEGRA_PIN_GMI_AD6_PG6, TEGRA_PIN_GMI_AD7_PG7, TEGRA_PIN_GMI_HIOW_N_PI0, TEGRA_PIN_GMI_HIOR_N_PI1, }; static const unsigned atd_pins[] = { TEGRA_PIN_GMI_AD8_PH0, TEGRA_PIN_GMI_AD9_PH1, TEGRA_PIN_GMI_AD10_PH2, TEGRA_PIN_GMI_AD11_PH3, }; static const unsigned ate_pins[] = { TEGRA_PIN_GMI_AD12_PH4, TEGRA_PIN_GMI_AD13_PH5, TEGRA_PIN_GMI_AD14_PH6, TEGRA_PIN_GMI_AD15_PH7, }; static const unsigned cdev1_pins[] = { TEGRA_PIN_DAP_MCLK1_PW4, }; static const unsigned cdev2_pins[] = { TEGRA_PIN_DAP_MCLK2_PW5, }; static const unsigned crtp_pins[] = { TEGRA_PIN_CRT_HSYNC, TEGRA_PIN_CRT_VSYNC, }; static const unsigned csus_pins[] = { TEGRA_PIN_VI_MCLK_PT1, }; static const unsigned dap1_pins[] = { TEGRA_PIN_DAP1_FS_PN0, TEGRA_PIN_DAP1_DIN_PN1, TEGRA_PIN_DAP1_DOUT_PN2, TEGRA_PIN_DAP1_SCLK_PN3, }; static const unsigned dap2_pins[] = { TEGRA_PIN_DAP2_FS_PA2, TEGRA_PIN_DAP2_SCLK_PA3, TEGRA_PIN_DAP2_DIN_PA4, TEGRA_PIN_DAP2_DOUT_PA5, }; static const unsigned dap3_pins[] = { TEGRA_PIN_DAP3_FS_PP0, TEGRA_PIN_DAP3_DIN_PP1, TEGRA_PIN_DAP3_DOUT_PP2, TEGRA_PIN_DAP3_SCLK_PP3, }; static const unsigned dap4_pins[] = { TEGRA_PIN_DAP4_FS_PP4, TEGRA_PIN_DAP4_DIN_PP5, TEGRA_PIN_DAP4_DOUT_PP6, TEGRA_PIN_DAP4_SCLK_PP7, }; static const unsigned ddc_pins[] = { TEGRA_PIN_DDC_SCL, TEGRA_PIN_DDC_SDA, }; static const unsigned dta_pins[] = { TEGRA_PIN_VI_D0_PT4, TEGRA_PIN_VI_D1_PD5, }; static const unsigned dtb_pins[] = { TEGRA_PIN_VI_D10_PT2, TEGRA_PIN_VI_D11_PT3, }; static const unsigned dtc_pins[] = { TEGRA_PIN_VI_HSYNC_PD7, TEGRA_PIN_VI_VSYNC_PD6, }; static const unsigned dtd_pins[] = { TEGRA_PIN_VI_PCLK_PT0, TEGRA_PIN_VI_D2_PL0, TEGRA_PIN_VI_D3_PL1, TEGRA_PIN_VI_D4_PL2, TEGRA_PIN_VI_D5_PL3, TEGRA_PIN_VI_D6_PL4, TEGRA_PIN_VI_D7_PL5, TEGRA_PIN_VI_D8_PL6, TEGRA_PIN_VI_D9_PL7, }; static const unsigned dte_pins[] = { TEGRA_PIN_VI_GP0_PBB1, TEGRA_PIN_VI_GP3_PBB4, TEGRA_PIN_VI_GP4_PBB5, TEGRA_PIN_VI_GP5_PD2, TEGRA_PIN_VI_GP6_PA0, }; static const unsigned dtf_pins[] = { TEGRA_PIN_CAM_I2C_SCL_PBB2, TEGRA_PIN_CAM_I2C_SDA_PBB3, }; static const unsigned gma_pins[] = { TEGRA_PIN_GMI_AD20_PAA0, TEGRA_PIN_GMI_AD21_PAA1, TEGRA_PIN_GMI_AD22_PAA2, TEGRA_PIN_GMI_AD23_PAA3, }; static const unsigned gmb_pins[] = { TEGRA_PIN_GMI_WP_N_PC7, }; static const unsigned gmc_pins[] = { TEGRA_PIN_GMI_AD16_PJ7, TEGRA_PIN_GMI_AD17_PB0, TEGRA_PIN_GMI_AD18_PB1, TEGRA_PIN_GMI_AD19_PK7, }; static const unsigned gmd_pins[] = { TEGRA_PIN_GMI_CS0_N_PJ0, TEGRA_PIN_GMI_CS1_N_PJ2, }; static const unsigned gme_pins[] = { TEGRA_PIN_GMI_AD24_PAA4, TEGRA_PIN_GMI_AD25_PAA5, TEGRA_PIN_GMI_AD26_PAA6, TEGRA_PIN_GMI_AD27_PAA7, }; static const unsigned gpu_pins[] = { TEGRA_PIN_PU0, TEGRA_PIN_PU1, TEGRA_PIN_PU2, TEGRA_PIN_PU3, TEGRA_PIN_PU4, TEGRA_PIN_PU5, TEGRA_PIN_PU6, }; static const unsigned gpu7_pins[] = { TEGRA_PIN_JTAG_RTCK_PU7, }; static const unsigned gpv_pins[] = { TEGRA_PIN_PV4, TEGRA_PIN_PV5, TEGRA_PIN_PV6, }; static const unsigned hdint_pins[] = { TEGRA_PIN_HDMI_INT_N_PN7, }; static const unsigned i2cp_pins[] = { TEGRA_PIN_PWR_I2C_SCL_PZ6, TEGRA_PIN_PWR_I2C_SDA_PZ7, }; static const unsigned irrx_pins[] = { TEGRA_PIN_UART2_RTS_N_PJ6, }; static const unsigned irtx_pins[] = { TEGRA_PIN_UART2_CTS_N_PJ5, }; static const unsigned kbca_pins[] = { TEGRA_PIN_KB_ROW0_PR0, TEGRA_PIN_KB_ROW1_PR1, TEGRA_PIN_KB_ROW2_PR2, }; static const unsigned kbcb_pins[] = { TEGRA_PIN_KB_ROW7_PR7, TEGRA_PIN_KB_ROW8_PS0, TEGRA_PIN_KB_ROW9_PS1, TEGRA_PIN_KB_ROW10_PS2, TEGRA_PIN_KB_ROW11_PS3, TEGRA_PIN_KB_ROW12_PS4, TEGRA_PIN_KB_ROW13_PS5, TEGRA_PIN_KB_ROW14_PS6, TEGRA_PIN_KB_ROW15_PS7, }; static const unsigned kbcc_pins[] = { TEGRA_PIN_KB_COL0_PQ0, TEGRA_PIN_KB_COL1_PQ1, }; static const unsigned kbcd_pins[] = { TEGRA_PIN_KB_ROW3_PR3, TEGRA_PIN_KB_ROW4_PR4, TEGRA_PIN_KB_ROW5_PR5, TEGRA_PIN_KB_ROW6_PR6, }; static const unsigned kbce_pins[] = { TEGRA_PIN_KB_COL7_PQ7, }; static const unsigned kbcf_pins[] = { TEGRA_PIN_KB_COL2_PQ2, TEGRA_PIN_KB_COL3_PQ3, TEGRA_PIN_KB_COL4_PQ4, TEGRA_PIN_KB_COL5_PQ5, TEGRA_PIN_KB_COL6_PQ6, }; static const unsigned lcsn_pins[] = { TEGRA_PIN_LCD_CS0_N_PN4, }; static const unsigned ld0_pins[] = { TEGRA_PIN_LCD_D0_PE0, }; static const unsigned ld1_pins[] = { TEGRA_PIN_LCD_D1_PE1, }; static const unsigned ld2_pins[] = { TEGRA_PIN_LCD_D2_PE2, }; static const unsigned ld3_pins[] = { TEGRA_PIN_LCD_D3_PE3, }; static const unsigned ld4_pins[] = { TEGRA_PIN_LCD_D4_PE4, }; static const unsigned ld5_pins[] = { TEGRA_PIN_LCD_D5_PE5, }; static const unsigned ld6_pins[] = { TEGRA_PIN_LCD_D6_PE6, }; static const unsigned ld7_pins[] = { TEGRA_PIN_LCD_D7_PE7, }; static const unsigned ld8_pins[] = { TEGRA_PIN_LCD_D8_PF0, }; static const unsigned ld9_pins[] = { TEGRA_PIN_LCD_D9_PF1, }; static const unsigned ld10_pins[] = { TEGRA_PIN_LCD_D10_PF2, }; static const unsigned ld11_pins[] = { TEGRA_PIN_LCD_D11_PF3, }; static const unsigned ld12_pins[] = { TEGRA_PIN_LCD_D12_PF4, }; static const unsigned ld13_pins[] = { TEGRA_PIN_LCD_D13_PF5, }; static const unsigned ld14_pins[] = { TEGRA_PIN_LCD_D14_PF6, }; static const unsigned ld15_pins[] = { TEGRA_PIN_LCD_D15_PF7, }; static const unsigned ld16_pins[] = { TEGRA_PIN_LCD_D16_PM0, }; static const unsigned ld17_pins[] = { TEGRA_PIN_LCD_D17_PM1, }; static const unsigned ldc_pins[] = { TEGRA_PIN_LCD_DC0_PN6, }; static const unsigned ldi_pins[] = { TEGRA_PIN_LCD_D22_PM6, }; static const unsigned lhp0_pins[] = { TEGRA_PIN_LCD_D21_PM5, }; static const unsigned lhp1_pins[] = { TEGRA_PIN_LCD_D18_PM2, }; static const unsigned lhp2_pins[] = { TEGRA_PIN_LCD_D19_PM3, }; static const unsigned lhs_pins[] = { TEGRA_PIN_LCD_HSYNC_PJ3, }; static const unsigned lm0_pins[] = { TEGRA_PIN_LCD_CS1_N_PW0, }; static const unsigned lm1_pins[] = { TEGRA_PIN_LCD_M1_PW1, }; static const unsigned lpp_pins[] = { TEGRA_PIN_LCD_D23_PM7, }; static const unsigned lpw0_pins[] = { TEGRA_PIN_LCD_PWR0_PB2, }; static const unsigned lpw1_pins[] = { TEGRA_PIN_LCD_PWR1_PC1, }; static const unsigned lpw2_pins[] = { TEGRA_PIN_LCD_PWR2_PC6, }; static const unsigned lsc0_pins[] = { TEGRA_PIN_LCD_PCLK_PB3, }; static const unsigned lsc1_pins[] = { TEGRA_PIN_LCD_WR_N_PZ3, }; static const unsigned lsck_pins[] = { TEGRA_PIN_LCD_SCK_PZ4, }; static const unsigned lsda_pins[] = { TEGRA_PIN_LCD_SDOUT_PN5, }; static const unsigned lsdi_pins[] = { TEGRA_PIN_LCD_SDIN_PZ2, }; static const unsigned lspi_pins[] = { TEGRA_PIN_LCD_DE_PJ1, }; static const unsigned lvp0_pins[] = { TEGRA_PIN_LCD_DC1_PV7, }; static const unsigned lvp1_pins[] = { TEGRA_PIN_LCD_D20_PM4, }; static const unsigned lvs_pins[] = { TEGRA_PIN_LCD_VSYNC_PJ4, }; static const unsigned ls_pins[] = { TEGRA_PIN_LCD_PWR0_PB2, TEGRA_PIN_LCD_PWR1_PC1, TEGRA_PIN_LCD_PWR2_PC6, TEGRA_PIN_LCD_SDIN_PZ2, TEGRA_PIN_LCD_SDOUT_PN5, TEGRA_PIN_LCD_WR_N_PZ3, TEGRA_PIN_LCD_CS0_N_PN4, TEGRA_PIN_LCD_DC0_PN6, TEGRA_PIN_LCD_SCK_PZ4, }; static const unsigned lc_pins[] = { TEGRA_PIN_LCD_PCLK_PB3, TEGRA_PIN_LCD_DE_PJ1, TEGRA_PIN_LCD_HSYNC_PJ3, TEGRA_PIN_LCD_VSYNC_PJ4, TEGRA_PIN_LCD_CS1_N_PW0, TEGRA_PIN_LCD_M1_PW1, TEGRA_PIN_LCD_DC1_PV7, TEGRA_PIN_HDMI_INT_N_PN7, }; static const unsigned ld17_0_pins[] = { TEGRA_PIN_LCD_D0_PE0, TEGRA_PIN_LCD_D1_PE1, TEGRA_PIN_LCD_D2_PE2, TEGRA_PIN_LCD_D3_PE3, TEGRA_PIN_LCD_D4_PE4, TEGRA_PIN_LCD_D5_PE5, TEGRA_PIN_LCD_D6_PE6, TEGRA_PIN_LCD_D7_PE7, TEGRA_PIN_LCD_D8_PF0, TEGRA_PIN_LCD_D9_PF1, TEGRA_PIN_LCD_D10_PF2, TEGRA_PIN_LCD_D11_PF3, TEGRA_PIN_LCD_D12_PF4, TEGRA_PIN_LCD_D13_PF5, TEGRA_PIN_LCD_D14_PF6, TEGRA_PIN_LCD_D15_PF7, TEGRA_PIN_LCD_D16_PM0, TEGRA_PIN_LCD_D17_PM1, }; static const unsigned ld19_18_pins[] = { TEGRA_PIN_LCD_D18_PM2, TEGRA_PIN_LCD_D19_PM3, }; static const unsigned ld21_20_pins[] = { TEGRA_PIN_LCD_D20_PM4, TEGRA_PIN_LCD_D21_PM5, }; static const unsigned ld23_22_pins[] = { TEGRA_PIN_LCD_D22_PM6, TEGRA_PIN_LCD_D23_PM7, }; static const unsigned owc_pins[] = { TEGRA_PIN_OWC, }; static const unsigned pmc_pins[] = { TEGRA_PIN_LED_BLINK_PBB0, TEGRA_PIN_SYS_CLK_REQ_PZ5, TEGRA_PIN_CORE_PWR_REQ, TEGRA_PIN_CPU_PWR_REQ, TEGRA_PIN_PWR_INT_N, }; static const unsigned pta_pins[] = { TEGRA_PIN_GEN2_I2C_SCL_PT5, TEGRA_PIN_GEN2_I2C_SDA_PT6, }; static const unsigned rm_pins[] = { TEGRA_PIN_GEN1_I2C_SCL_PC4, TEGRA_PIN_GEN1_I2C_SDA_PC5, }; static const unsigned sdb_pins[] = { TEGRA_PIN_SDIO3_CMD_PA7, }; static const unsigned sdc_pins[] = { TEGRA_PIN_SDIO3_DAT0_PB7, TEGRA_PIN_SDIO3_DAT1_PB6, TEGRA_PIN_SDIO3_DAT2_PB5, TEGRA_PIN_SDIO3_DAT3_PB4, }; static const unsigned sdd_pins[] = { TEGRA_PIN_SDIO3_CLK_PA6, }; static const unsigned sdio1_pins[] = { TEGRA_PIN_SDIO1_CLK_PZ0, TEGRA_PIN_SDIO1_CMD_PZ1, TEGRA_PIN_SDIO1_DAT0_PY7, TEGRA_PIN_SDIO1_DAT1_PY6, TEGRA_PIN_SDIO1_DAT2_PY5, TEGRA_PIN_SDIO1_DAT3_PY4, }; static const unsigned slxa_pins[] = { TEGRA_PIN_SDIO3_DAT4_PD1, }; static const unsigned slxc_pins[] = { TEGRA_PIN_SDIO3_DAT6_PD3, }; static const unsigned slxd_pins[] = { TEGRA_PIN_SDIO3_DAT7_PD4, }; static const unsigned slxk_pins[] = { TEGRA_PIN_SDIO3_DAT5_PD0, }; static const unsigned spdi_pins[] = { TEGRA_PIN_SPDIF_IN_PK6, }; static const unsigned spdo_pins[] = { TEGRA_PIN_SPDIF_OUT_PK5, }; static const unsigned spia_pins[] = { TEGRA_PIN_SPI2_MOSI_PX0, }; static const unsigned spib_pins[] = { TEGRA_PIN_SPI2_MISO_PX1, }; static const unsigned spic_pins[] = { TEGRA_PIN_SPI2_CS0_N_PX3, TEGRA_PIN_SPI2_SCK_PX2, }; static const unsigned spid_pins[] = { TEGRA_PIN_SPI1_MOSI_PX4, }; static const unsigned spie_pins[] = { TEGRA_PIN_SPI1_CS0_N_PX6, TEGRA_PIN_SPI1_SCK_PX5, }; static const unsigned spif_pins[] = { TEGRA_PIN_SPI1_MISO_PX7, }; static const unsigned spig_pins[] = { TEGRA_PIN_SPI2_CS1_N_PW2, }; static const unsigned spih_pins[] = { TEGRA_PIN_SPI2_CS2_N_PW3, }; static const unsigned uaa_pins[] = { TEGRA_PIN_ULPI_DATA0_PO1, TEGRA_PIN_ULPI_DATA1_PO2, TEGRA_PIN_ULPI_DATA2_PO3, TEGRA_PIN_ULPI_DATA3_PO4, }; static const unsigned uab_pins[] = { TEGRA_PIN_ULPI_DATA4_PO5, TEGRA_PIN_ULPI_DATA5_PO6, TEGRA_PIN_ULPI_DATA6_PO7, TEGRA_PIN_ULPI_DATA7_PO0, }; static const unsigned uac_pins[] = { TEGRA_PIN_PV0, TEGRA_PIN_PV1, TEGRA_PIN_PV2, TEGRA_PIN_PV3, }; static const unsigned ck32_pins[] = { TEGRA_PIN_CLK_32_K_IN, }; static const unsigned uad_pins[] = { TEGRA_PIN_UART2_RXD_PC3, TEGRA_PIN_UART2_TXD_PC2, }; static const unsigned uca_pins[] = { TEGRA_PIN_UART3_RXD_PW7, TEGRA_PIN_UART3_TXD_PW6, }; static const unsigned ucb_pins[] = { TEGRA_PIN_UART3_CTS_N_PA1, TEGRA_PIN_UART3_RTS_N_PC0, }; static const unsigned uda_pins[] = { TEGRA_PIN_ULPI_CLK_PY0, TEGRA_PIN_ULPI_DIR_PY1, TEGRA_PIN_ULPI_NXT_PY2, TEGRA_PIN_ULPI_STP_PY3, }; static const unsigned ddrc_pins[] = { TEGRA_PIN_DDR_COMP_PD, TEGRA_PIN_DDR_COMP_PU, }; static const unsigned pmca_pins[] = { TEGRA_PIN_LED_BLINK_PBB0, }; static const unsigned pmcb_pins[] = { TEGRA_PIN_SYS_CLK_REQ_PZ5, }; static const unsigned pmcc_pins[] = { TEGRA_PIN_CORE_PWR_REQ, }; static const unsigned pmcd_pins[] = { TEGRA_PIN_CPU_PWR_REQ, }; static const unsigned pmce_pins[] = { TEGRA_PIN_PWR_INT_N, }; static const unsigned xm2c_pins[] = { TEGRA_PIN_DDR_A0, TEGRA_PIN_DDR_A1, TEGRA_PIN_DDR_A2, TEGRA_PIN_DDR_A3, TEGRA_PIN_DDR_A4, TEGRA_PIN_DDR_A5, TEGRA_PIN_DDR_A6, TEGRA_PIN_DDR_A7, TEGRA_PIN_DDR_A8, TEGRA_PIN_DDR_A9, TEGRA_PIN_DDR_A10, TEGRA_PIN_DDR_A11, TEGRA_PIN_DDR_A12, TEGRA_PIN_DDR_A13, TEGRA_PIN_DDR_A14, TEGRA_PIN_DDR_CAS_N, TEGRA_PIN_DDR_BA0, TEGRA_PIN_DDR_BA1, TEGRA_PIN_DDR_BA2, TEGRA_PIN_DDR_DQS0P, TEGRA_PIN_DDR_DQS0N, TEGRA_PIN_DDR_DQS1P, TEGRA_PIN_DDR_DQS1N, TEGRA_PIN_DDR_DQS2P, TEGRA_PIN_DDR_DQS2N, TEGRA_PIN_DDR_DQS3P, TEGRA_PIN_DDR_DQS3N, TEGRA_PIN_DDR_CS0_N, TEGRA_PIN_DDR_CS1_N, TEGRA_PIN_DDR_CKE0, TEGRA_PIN_DDR_CKE1, TEGRA_PIN_DDR_CLK, TEGRA_PIN_DDR_CLK_N, TEGRA_PIN_DDR_DM0, TEGRA_PIN_DDR_DM1, TEGRA_PIN_DDR_DM2, TEGRA_PIN_DDR_DM3, TEGRA_PIN_DDR_ODT, TEGRA_PIN_DDR_RAS_N, TEGRA_PIN_DDR_WE_N, TEGRA_PIN_DDR_QUSE0, TEGRA_PIN_DDR_QUSE1, TEGRA_PIN_DDR_QUSE2, TEGRA_PIN_DDR_QUSE3, }; static const unsigned xm2d_pins[] = { TEGRA_PIN_DDR_DQ0, TEGRA_PIN_DDR_DQ1, TEGRA_PIN_DDR_DQ2, TEGRA_PIN_DDR_DQ3, TEGRA_PIN_DDR_DQ4, TEGRA_PIN_DDR_DQ5, TEGRA_PIN_DDR_DQ6, TEGRA_PIN_DDR_DQ7, TEGRA_PIN_DDR_DQ8, TEGRA_PIN_DDR_DQ9, TEGRA_PIN_DDR_DQ10, TEGRA_PIN_DDR_DQ11, TEGRA_PIN_DDR_DQ12, TEGRA_PIN_DDR_DQ13, TEGRA_PIN_DDR_DQ14, TEGRA_PIN_DDR_DQ15, TEGRA_PIN_DDR_DQ16, TEGRA_PIN_DDR_DQ17, TEGRA_PIN_DDR_DQ18, TEGRA_PIN_DDR_DQ19, TEGRA_PIN_DDR_DQ20, TEGRA_PIN_DDR_DQ21, TEGRA_PIN_DDR_DQ22, TEGRA_PIN_DDR_DQ23, TEGRA_PIN_DDR_DQ24, TEGRA_PIN_DDR_DQ25, TEGRA_PIN_DDR_DQ26, TEGRA_PIN_DDR_DQ27, TEGRA_PIN_DDR_DQ28, TEGRA_PIN_DDR_DQ29, TEGRA_PIN_DDR_DQ30, TEGRA_PIN_DDR_DQ31, }; static const unsigned drive_ao1_pins[] = { TEGRA_PIN_SYS_RESET, TEGRA_PIN_PWR_I2C_SCL_PZ6, TEGRA_PIN_PWR_I2C_SDA_PZ7, TEGRA_PIN_KB_ROW0_PR0, TEGRA_PIN_KB_ROW1_PR1, TEGRA_PIN_KB_ROW2_PR2, TEGRA_PIN_KB_ROW3_PR3, TEGRA_PIN_KB_ROW4_PR4, TEGRA_PIN_KB_ROW5_PR5, TEGRA_PIN_KB_ROW6_PR6, TEGRA_PIN_KB_ROW7_PR7, }; static const unsigned drive_ao2_pins[] = { TEGRA_PIN_KB_ROW8_PS0, TEGRA_PIN_KB_ROW9_PS1, TEGRA_PIN_KB_ROW10_PS2, TEGRA_PIN_KB_ROW11_PS3, TEGRA_PIN_KB_ROW12_PS4, TEGRA_PIN_KB_ROW13_PS5, TEGRA_PIN_KB_ROW14_PS6, TEGRA_PIN_KB_ROW15_PS7, TEGRA_PIN_KB_COL0_PQ0, TEGRA_PIN_KB_COL1_PQ1, TEGRA_PIN_KB_COL2_PQ2, TEGRA_PIN_KB_COL3_PQ3, TEGRA_PIN_KB_COL4_PQ4, TEGRA_PIN_KB_COL5_PQ5, TEGRA_PIN_KB_COL6_PQ6, TEGRA_PIN_KB_COL7_PQ7, TEGRA_PIN_LED_BLINK_PBB0, TEGRA_PIN_SYS_CLK_REQ_PZ5, TEGRA_PIN_CORE_PWR_REQ, TEGRA_PIN_CPU_PWR_REQ, TEGRA_PIN_PWR_INT_N, TEGRA_PIN_CLK_32_K_IN, }; static const unsigned drive_at1_pins[] = { TEGRA_PIN_GMI_IORDY_PI5, TEGRA_PIN_GMI_AD8_PH0, TEGRA_PIN_GMI_AD9_PH1, TEGRA_PIN_GMI_AD10_PH2, TEGRA_PIN_GMI_AD11_PH3, TEGRA_PIN_GMI_AD12_PH4, TEGRA_PIN_GMI_AD13_PH5, TEGRA_PIN_GMI_AD14_PH6, TEGRA_PIN_GMI_AD15_PH7, TEGRA_PIN_GMI_CS7_N_PI6, TEGRA_PIN_GMI_DPD_PT7, TEGRA_PIN_GEN2_I2C_SCL_PT5, TEGRA_PIN_GEN2_I2C_SDA_PT6, }; static const unsigned drive_at2_pins[] = { TEGRA_PIN_GMI_WAIT_PI7, TEGRA_PIN_GMI_ADV_N_PK0, TEGRA_PIN_GMI_CLK_PK1, TEGRA_PIN_GMI_CS6_N_PI3, TEGRA_PIN_GMI_CS5_N_PI2, TEGRA_PIN_GMI_CS4_N_PK2, TEGRA_PIN_GMI_CS3_N_PK4, TEGRA_PIN_GMI_CS2_N_PK3, TEGRA_PIN_GMI_AD0_PG0, TEGRA_PIN_GMI_AD1_PG1, TEGRA_PIN_GMI_AD2_PG2, TEGRA_PIN_GMI_AD3_PG3, TEGRA_PIN_GMI_AD4_PG4, TEGRA_PIN_GMI_AD5_PG5, TEGRA_PIN_GMI_AD6_PG6, TEGRA_PIN_GMI_AD7_PG7, TEGRA_PIN_GMI_HIOW_N_PI0, TEGRA_PIN_GMI_HIOR_N_PI1, TEGRA_PIN_GMI_RST_N_PI4, }; static const unsigned drive_cdev1_pins[] = { TEGRA_PIN_DAP_MCLK1_PW4, }; static const unsigned drive_cdev2_pins[] = { TEGRA_PIN_DAP_MCLK2_PW5, }; static const unsigned drive_csus_pins[] = { TEGRA_PIN_VI_MCLK_PT1, }; static const unsigned drive_dap1_pins[] = { TEGRA_PIN_DAP1_FS_PN0, TEGRA_PIN_DAP1_DIN_PN1, TEGRA_PIN_DAP1_DOUT_PN2, TEGRA_PIN_DAP1_SCLK_PN3, TEGRA_PIN_SPDIF_OUT_PK5, TEGRA_PIN_SPDIF_IN_PK6, }; static const unsigned drive_dap2_pins[] = { TEGRA_PIN_DAP2_FS_PA2, TEGRA_PIN_DAP2_SCLK_PA3, TEGRA_PIN_DAP2_DIN_PA4, TEGRA_PIN_DAP2_DOUT_PA5, }; static const unsigned drive_dap3_pins[] = { TEGRA_PIN_DAP3_FS_PP0, TEGRA_PIN_DAP3_DIN_PP1, TEGRA_PIN_DAP3_DOUT_PP2, TEGRA_PIN_DAP3_SCLK_PP3, }; static const unsigned drive_dap4_pins[] = { TEGRA_PIN_DAP4_FS_PP4, TEGRA_PIN_DAP4_DIN_PP5, TEGRA_PIN_DAP4_DOUT_PP6, TEGRA_PIN_DAP4_SCLK_PP7, }; static const unsigned drive_dbg_pins[] = { TEGRA_PIN_PU0, TEGRA_PIN_PU1, TEGRA_PIN_PU2, TEGRA_PIN_PU3, TEGRA_PIN_PU4, TEGRA_PIN_PU5, TEGRA_PIN_PU6, TEGRA_PIN_JTAG_RTCK_PU7, TEGRA_PIN_GEN1_I2C_SDA_PC5, TEGRA_PIN_GEN1_I2C_SCL_PC4, TEGRA_PIN_JTAG_TRST_N, TEGRA_PIN_JTAG_TDO, TEGRA_PIN_JTAG_TMS, TEGRA_PIN_JTAG_TCK, TEGRA_PIN_JTAG_TDI, TEGRA_PIN_TEST_MODE_EN, }; static const unsigned drive_lcd1_pins[] = { TEGRA_PIN_LCD_PWR1_PC1, TEGRA_PIN_LCD_PWR2_PC6, TEGRA_PIN_LCD_SDIN_PZ2, TEGRA_PIN_LCD_SDOUT_PN5, TEGRA_PIN_LCD_WR_N_PZ3, TEGRA_PIN_LCD_CS0_N_PN4, TEGRA_PIN_LCD_DC0_PN6, TEGRA_PIN_LCD_SCK_PZ4, }; static const unsigned drive_lcd2_pins[] = { TEGRA_PIN_LCD_PWR0_PB2, TEGRA_PIN_LCD_PCLK_PB3, TEGRA_PIN_LCD_DE_PJ1, TEGRA_PIN_LCD_HSYNC_PJ3, TEGRA_PIN_LCD_VSYNC_PJ4, TEGRA_PIN_LCD_D0_PE0, TEGRA_PIN_LCD_D1_PE1, TEGRA_PIN_LCD_D2_PE2, TEGRA_PIN_LCD_D3_PE3, TEGRA_PIN_LCD_D4_PE4, TEGRA_PIN_LCD_D5_PE5, TEGRA_PIN_LCD_D6_PE6, TEGRA_PIN_LCD_D7_PE7, TEGRA_PIN_LCD_D8_PF0, TEGRA_PIN_LCD_D9_PF1, TEGRA_PIN_LCD_D10_PF2, TEGRA_PIN_LCD_D11_PF3, TEGRA_PIN_LCD_D12_PF4, TEGRA_PIN_LCD_D13_PF5, TEGRA_PIN_LCD_D14_PF6, TEGRA_PIN_LCD_D15_PF7, TEGRA_PIN_LCD_D16_PM0, TEGRA_PIN_LCD_D17_PM1, TEGRA_PIN_LCD_D18_PM2, TEGRA_PIN_LCD_D19_PM3, TEGRA_PIN_LCD_D20_PM4, TEGRA_PIN_LCD_D21_PM5, TEGRA_PIN_LCD_D22_PM6, TEGRA_PIN_LCD_D23_PM7, TEGRA_PIN_LCD_CS1_N_PW0, TEGRA_PIN_LCD_M1_PW1, TEGRA_PIN_LCD_DC1_PV7, TEGRA_PIN_HDMI_INT_N_PN7, }; static const unsigned drive_sdmmc2_pins[] = { TEGRA_PIN_SDIO3_DAT4_PD1, TEGRA_PIN_SDIO3_DAT5_PD0, TEGRA_PIN_SDIO3_DAT6_PD3, TEGRA_PIN_SDIO3_DAT7_PD4, }; static const unsigned drive_sdmmc3_pins[] = { TEGRA_PIN_SDIO3_CLK_PA6, TEGRA_PIN_SDIO3_CMD_PA7, TEGRA_PIN_SDIO3_DAT0_PB7, TEGRA_PIN_SDIO3_DAT1_PB6, TEGRA_PIN_SDIO3_DAT2_PB5, TEGRA_PIN_SDIO3_DAT3_PB4, TEGRA_PIN_PV4, TEGRA_PIN_PV5, TEGRA_PIN_PV6, }; static const unsigned drive_spi_pins[] = { TEGRA_PIN_SPI2_MOSI_PX0, TEGRA_PIN_SPI2_MISO_PX1, TEGRA_PIN_SPI2_SCK_PX2, TEGRA_PIN_SPI2_CS0_N_PX3, TEGRA_PIN_SPI1_MOSI_PX4, TEGRA_PIN_SPI1_SCK_PX5, TEGRA_PIN_SPI1_CS0_N_PX6, TEGRA_PIN_SPI1_MISO_PX7, TEGRA_PIN_SPI2_CS1_N_PW2, TEGRA_PIN_SPI2_CS2_N_PW3, }; static const unsigned drive_uaa_pins[] = { TEGRA_PIN_ULPI_DATA0_PO1, TEGRA_PIN_ULPI_DATA1_PO2, TEGRA_PIN_ULPI_DATA2_PO3, TEGRA_PIN_ULPI_DATA3_PO4, }; static const unsigned drive_uab_pins[] = { TEGRA_PIN_ULPI_DATA4_PO5, TEGRA_PIN_ULPI_DATA5_PO6, TEGRA_PIN_ULPI_DATA6_PO7, TEGRA_PIN_ULPI_DATA7_PO0, TEGRA_PIN_PV0, TEGRA_PIN_PV1, TEGRA_PIN_PV2, TEGRA_PIN_PV3, }; static const unsigned drive_uart2_pins[] = { TEGRA_PIN_UART2_TXD_PC2, TEGRA_PIN_UART2_RXD_PC3, TEGRA_PIN_UART2_RTS_N_PJ6, TEGRA_PIN_UART2_CTS_N_PJ5, }; static const unsigned drive_uart3_pins[] = { TEGRA_PIN_UART3_TXD_PW6, TEGRA_PIN_UART3_RXD_PW7, TEGRA_PIN_UART3_RTS_N_PC0, TEGRA_PIN_UART3_CTS_N_PA1, }; static const unsigned drive_vi1_pins[] = { TEGRA_PIN_VI_D0_PT4, TEGRA_PIN_VI_D1_PD5, TEGRA_PIN_VI_D2_PL0, TEGRA_PIN_VI_D3_PL1, TEGRA_PIN_VI_D4_PL2, TEGRA_PIN_VI_D5_PL3, TEGRA_PIN_VI_D6_PL4, TEGRA_PIN_VI_D7_PL5, TEGRA_PIN_VI_D8_PL6, TEGRA_PIN_VI_D9_PL7, TEGRA_PIN_VI_D10_PT2, TEGRA_PIN_VI_D11_PT3, TEGRA_PIN_VI_PCLK_PT0, TEGRA_PIN_VI_VSYNC_PD6, TEGRA_PIN_VI_HSYNC_PD7, }; static const unsigned drive_vi2_pins[] = { TEGRA_PIN_VI_GP0_PBB1, TEGRA_PIN_CAM_I2C_SCL_PBB2, TEGRA_PIN_CAM_I2C_SDA_PBB3, TEGRA_PIN_VI_GP3_PBB4, TEGRA_PIN_VI_GP4_PBB5, TEGRA_PIN_VI_GP5_PD2, TEGRA_PIN_VI_GP6_PA0, }; static const unsigned drive_xm2a_pins[] = { TEGRA_PIN_DDR_A0, TEGRA_PIN_DDR_A1, TEGRA_PIN_DDR_A2, TEGRA_PIN_DDR_A3, TEGRA_PIN_DDR_A4, TEGRA_PIN_DDR_A5, TEGRA_PIN_DDR_A6, TEGRA_PIN_DDR_A7, TEGRA_PIN_DDR_A8, TEGRA_PIN_DDR_A9, TEGRA_PIN_DDR_A10, TEGRA_PIN_DDR_A11, TEGRA_PIN_DDR_A12, TEGRA_PIN_DDR_A13, TEGRA_PIN_DDR_A14, TEGRA_PIN_DDR_BA0, TEGRA_PIN_DDR_BA1, TEGRA_PIN_DDR_BA2, TEGRA_PIN_DDR_CS0_N, TEGRA_PIN_DDR_CS1_N, TEGRA_PIN_DDR_ODT, TEGRA_PIN_DDR_RAS_N, TEGRA_PIN_DDR_CAS_N, TEGRA_PIN_DDR_WE_N, TEGRA_PIN_DDR_CKE0, TEGRA_PIN_DDR_CKE1, }; static const unsigned drive_xm2c_pins[] = { TEGRA_PIN_DDR_DQS0P, TEGRA_PIN_DDR_DQS0N, TEGRA_PIN_DDR_DQS1P, TEGRA_PIN_DDR_DQS1N, TEGRA_PIN_DDR_DQS2P, TEGRA_PIN_DDR_DQS2N, TEGRA_PIN_DDR_DQS3P, TEGRA_PIN_DDR_DQS3N, TEGRA_PIN_DDR_QUSE0, TEGRA_PIN_DDR_QUSE1, TEGRA_PIN_DDR_QUSE2, TEGRA_PIN_DDR_QUSE3, }; static const unsigned drive_xm2d_pins[] = { TEGRA_PIN_DDR_DQ0, TEGRA_PIN_DDR_DQ1, TEGRA_PIN_DDR_DQ2, TEGRA_PIN_DDR_DQ3, TEGRA_PIN_DDR_DQ4, TEGRA_PIN_DDR_DQ5, TEGRA_PIN_DDR_DQ6, TEGRA_PIN_DDR_DQ7, TEGRA_PIN_DDR_DQ8, TEGRA_PIN_DDR_DQ9, TEGRA_PIN_DDR_DQ10, TEGRA_PIN_DDR_DQ11, TEGRA_PIN_DDR_DQ12, TEGRA_PIN_DDR_DQ13, TEGRA_PIN_DDR_DQ14, TEGRA_PIN_DDR_DQ15, TEGRA_PIN_DDR_DQ16, TEGRA_PIN_DDR_DQ17, TEGRA_PIN_DDR_DQ18, TEGRA_PIN_DDR_DQ19, TEGRA_PIN_DDR_DQ20, TEGRA_PIN_DDR_DQ21, TEGRA_PIN_DDR_DQ22, TEGRA_PIN_DDR_DQ23, TEGRA_PIN_DDR_DQ24, TEGRA_PIN_DDR_DQ25, TEGRA_PIN_DDR_DQ26, TEGRA_PIN_DDR_DQ27, TEGRA_PIN_DDR_DQ28, TEGRA_PIN_DDR_DQ29, TEGRA_PIN_DDR_DQ30, TEGRA_PIN_DDR_DQ31, TEGRA_PIN_DDR_DM0, TEGRA_PIN_DDR_DM1, TEGRA_PIN_DDR_DM2, TEGRA_PIN_DDR_DM3, }; static const unsigned drive_xm2clk_pins[] = { TEGRA_PIN_DDR_CLK, TEGRA_PIN_DDR_CLK_N, }; static const unsigned drive_sdio1_pins[] = { TEGRA_PIN_SDIO1_CLK_PZ0, TEGRA_PIN_SDIO1_CMD_PZ1, TEGRA_PIN_SDIO1_DAT0_PY7, TEGRA_PIN_SDIO1_DAT1_PY6, TEGRA_PIN_SDIO1_DAT2_PY5, TEGRA_PIN_SDIO1_DAT3_PY4, }; static const unsigned drive_crt_pins[] = { TEGRA_PIN_CRT_HSYNC, TEGRA_PIN_CRT_VSYNC, }; static const unsigned drive_ddc_pins[] = { TEGRA_PIN_DDC_SCL, TEGRA_PIN_DDC_SDA, }; static const unsigned drive_gma_pins[] = { TEGRA_PIN_GMI_AD20_PAA0, TEGRA_PIN_GMI_AD21_PAA1, TEGRA_PIN_GMI_AD22_PAA2, TEGRA_PIN_GMI_AD23_PAA3, }; static const unsigned drive_gmb_pins[] = { TEGRA_PIN_GMI_WP_N_PC7, }; static const unsigned drive_gmc_pins[] = { TEGRA_PIN_GMI_AD16_PJ7, TEGRA_PIN_GMI_AD17_PB0, TEGRA_PIN_GMI_AD18_PB1, TEGRA_PIN_GMI_AD19_PK7, }; static const unsigned drive_gmd_pins[] = { TEGRA_PIN_GMI_CS0_N_PJ0, TEGRA_PIN_GMI_CS1_N_PJ2, }; static const unsigned drive_gme_pins[] = { TEGRA_PIN_GMI_AD24_PAA4, TEGRA_PIN_GMI_AD25_PAA5, TEGRA_PIN_GMI_AD26_PAA6, TEGRA_PIN_GMI_AD27_PAA7, }; static const unsigned drive_owr_pins[] = { TEGRA_PIN_OWC, }; static const unsigned drive_uda_pins[] = { TEGRA_PIN_ULPI_CLK_PY0, TEGRA_PIN_ULPI_DIR_PY1, TEGRA_PIN_ULPI_NXT_PY2, TEGRA_PIN_ULPI_STP_PY3, }; enum tegra_mux { TEGRA_MUX_AHB_CLK, TEGRA_MUX_APB_CLK, TEGRA_MUX_AUDIO_SYNC, TEGRA_MUX_CRT, TEGRA_MUX_DAP1, TEGRA_MUX_DAP2, TEGRA_MUX_DAP3, TEGRA_MUX_DAP4, TEGRA_MUX_DAP5, TEGRA_MUX_DISPLAYA, TEGRA_MUX_DISPLAYB, TEGRA_MUX_EMC_TEST0_DLL, TEGRA_MUX_EMC_TEST1_DLL, TEGRA_MUX_GMI, TEGRA_MUX_GMI_INT, TEGRA_MUX_HDMI, TEGRA_MUX_I2CP, TEGRA_MUX_I2C1, TEGRA_MUX_I2C2, TEGRA_MUX_I2C3, TEGRA_MUX_IDE, TEGRA_MUX_IRDA, TEGRA_MUX_KBC, TEGRA_MUX_MIO, TEGRA_MUX_MIPI_HS, TEGRA_MUX_NAND, TEGRA_MUX_OSC, TEGRA_MUX_OWR, TEGRA_MUX_PCIE, TEGRA_MUX_PLLA_OUT, TEGRA_MUX_PLLC_OUT1, TEGRA_MUX_PLLM_OUT1, TEGRA_MUX_PLLP_OUT2, TEGRA_MUX_PLLP_OUT3, TEGRA_MUX_PLLP_OUT4, TEGRA_MUX_PWM, TEGRA_MUX_PWR_INTR, TEGRA_MUX_PWR_ON, TEGRA_MUX_RSVD1, TEGRA_MUX_RSVD2, TEGRA_MUX_RSVD3, TEGRA_MUX_RSVD4, TEGRA_MUX_RTCK, TEGRA_MUX_SDIO1, TEGRA_MUX_SDIO2, TEGRA_MUX_SDIO3, TEGRA_MUX_SDIO4, TEGRA_MUX_SFLASH, TEGRA_MUX_SPDIF, TEGRA_MUX_SPI1, TEGRA_MUX_SPI2, TEGRA_MUX_SPI2_ALT, TEGRA_MUX_SPI3, TEGRA_MUX_SPI4, TEGRA_MUX_TRACE, TEGRA_MUX_TWC, TEGRA_MUX_UARTA, TEGRA_MUX_UARTB, TEGRA_MUX_UARTC, TEGRA_MUX_UARTD, TEGRA_MUX_UARTE, TEGRA_MUX_ULPI, TEGRA_MUX_VI, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_MUX_XIO, }; #define FUNCTION(fname) \ { \ .name = #fname, \ } static struct tegra_function tegra20_functions[] = { FUNCTION(ahb_clk), FUNCTION(apb_clk), FUNCTION(audio_sync), FUNCTION(crt), FUNCTION(dap1), FUNCTION(dap2), FUNCTION(dap3), FUNCTION(dap4), FUNCTION(dap5), FUNCTION(displaya), FUNCTION(displayb), FUNCTION(emc_test0_dll), FUNCTION(emc_test1_dll), FUNCTION(gmi), FUNCTION(gmi_int), FUNCTION(hdmi), FUNCTION(i2cp), FUNCTION(i2c1), FUNCTION(i2c2), FUNCTION(i2c3), FUNCTION(ide), FUNCTION(irda), FUNCTION(kbc), FUNCTION(mio), FUNCTION(mipi_hs), FUNCTION(nand), FUNCTION(osc), FUNCTION(owr), FUNCTION(pcie), FUNCTION(plla_out), FUNCTION(pllc_out1), FUNCTION(pllm_out1), FUNCTION(pllp_out2), FUNCTION(pllp_out3), FUNCTION(pllp_out4), FUNCTION(pwm), FUNCTION(pwr_intr), FUNCTION(pwr_on), FUNCTION(rsvd1), FUNCTION(rsvd2), FUNCTION(rsvd3), FUNCTION(rsvd4), FUNCTION(rtck), FUNCTION(sdio1), FUNCTION(sdio2), FUNCTION(sdio3), FUNCTION(sdio4), FUNCTION(sflash), FUNCTION(spdif), FUNCTION(spi1), FUNCTION(spi2), FUNCTION(spi2_alt), FUNCTION(spi3), FUNCTION(spi4), FUNCTION(trace), FUNCTION(twc), FUNCTION(uarta), FUNCTION(uartb), FUNCTION(uartc), FUNCTION(uartd), FUNCTION(uarte), FUNCTION(ulpi), FUNCTION(vi), FUNCTION(vi_sensor_clk), FUNCTION(xio), }; #define TRISTATE_REG_A 0x14 #define PIN_MUX_CTL_REG_A 0x80 #define PULLUPDOWN_REG_A 0xa0 #define PINGROUP_REG_A 0x868 /* Pin group with mux control, and typically tri-state and pull-up/down too */ #define MUX_PG(pg_name, f0, f1, f2, f3, \ tri_r, tri_b, mux_r, mux_b, pupd_r, pupd_b) \ { \ .name = #pg_name, \ .pins = pg_name##_pins, \ .npins = ARRAY_SIZE(pg_name##_pins), \ .funcs = { \ TEGRA_MUX_ ## f0, \ TEGRA_MUX_ ## f1, \ TEGRA_MUX_ ## f2, \ TEGRA_MUX_ ## f3, \ }, \ .mux_reg = ((mux_r) - PIN_MUX_CTL_REG_A), \ .mux_bank = 1, \ .mux_bit = mux_b, \ .pupd_reg = ((pupd_r) - PULLUPDOWN_REG_A), \ .pupd_bank = 2, \ .pupd_bit = pupd_b, \ .tri_reg = ((tri_r) - TRISTATE_REG_A), \ .tri_bank = 0, \ .tri_bit = tri_b, \ .einput_bit = -1, \ .odrain_bit = -1, \ .lock_bit = -1, \ .ioreset_bit = -1, \ .rcv_sel_bit = -1, \ .drv_reg = -1, \ } /* Pin groups with only pull up and pull down control */ #define PULL_PG(pg_name, pupd_r, pupd_b) \ { \ .name = #pg_name, \ .pins = pg_name##_pins, \ .npins = ARRAY_SIZE(pg_name##_pins), \ .mux_reg = -1, \ .pupd_reg = ((pupd_r) - PULLUPDOWN_REG_A), \ .pupd_bank = 2, \ .pupd_bit = pupd_b, \ .drv_reg = -1, \ } /* Pin groups for drive strength registers (configurable version) */ #define DRV_PG_EXT(pg_name, r, hsm_b, schmitt_b, lpmd_b, \ drvdn_b, drvup_b, \ slwr_b, slwr_w, slwf_b, slwf_w) \ { \ .name = "drive_" #pg_name, \ .pins = drive_##pg_name##_pins, \ .npins = ARRAY_SIZE(drive_##pg_name##_pins), \ .mux_reg = -1, \ .pupd_reg = -1, \ .tri_reg = -1, \ .drv_reg = ((r) - PINGROUP_REG_A), \ .drv_bank = 3, \ .hsm_bit = hsm_b, \ .schmitt_bit = schmitt_b, \ .lpmd_bit = lpmd_b, \ .drvdn_bit = drvdn_b, \ .drvdn_width = 5, \ .drvup_bit = drvup_b, \ .drvup_width = 5, \ .slwr_bit = slwr_b, \ .slwr_width = slwr_w, \ .slwf_bit = slwf_b, \ .slwf_width = slwf_w, \ .drvtype_bit = -1, \ } /* Pin groups for drive strength registers (simple version) */ #define DRV_PG(pg_name, r) \ DRV_PG_EXT(pg_name, r, 2, 3, 4, 12, 20, 28, 2, 30, 2) static const struct tegra_pingroup tegra20_groups[] = { /* name, f0, f1, f2, f3, tri r/b, mux r/b, pupd r/b */ MUX_PG(ata, IDE, NAND, GMI, RSVD4, 0x14, 0, 0x80, 24, 0xa0, 0), MUX_PG(atb, IDE, NAND, GMI, SDIO4, 0x14, 1, 0x80, 16, 0xa0, 2), MUX_PG(atc, IDE, NAND, GMI, SDIO4, 0x14, 2, 0x80, 22, 0xa0, 4), MUX_PG(atd, IDE, NAND, GMI, SDIO4, 0x14, 3, 0x80, 20, 0xa0, 6), MUX_PG(ate, IDE, NAND, GMI, RSVD4, 0x18, 25, 0x80, 12, 0xa0, 8), MUX_PG(cdev1, OSC, PLLA_OUT, PLLM_OUT1, AUDIO_SYNC, 0x14, 4, 0x88, 2, 0xa8, 0), MUX_PG(cdev2, OSC, AHB_CLK, APB_CLK, PLLP_OUT4, 0x14, 5, 0x88, 4, 0xa8, 2), MUX_PG(crtp, CRT, RSVD2, RSVD3, RSVD4, 0x20, 14, 0x98, 20, 0xa4, 24), MUX_PG(csus, PLLC_OUT1, PLLP_OUT2, PLLP_OUT3, VI_SENSOR_CLK, 0x14, 6, 0x88, 6, 0xac, 24), MUX_PG(dap1, DAP1, RSVD2, GMI, SDIO2, 0x14, 7, 0x88, 20, 0xa0, 10), MUX_PG(dap2, DAP2, TWC, RSVD3, GMI, 0x14, 8, 0x88, 22, 0xa0, 12), MUX_PG(dap3, DAP3, RSVD2, RSVD3, RSVD4, 0x14, 9, 0x88, 24, 0xa0, 14), MUX_PG(dap4, DAP4, RSVD2, GMI, RSVD4, 0x14, 10, 0x88, 26, 0xa0, 16), MUX_PG(ddc, I2C2, RSVD2, RSVD3, RSVD4, 0x18, 31, 0x88, 0, 0xb0, 28), MUX_PG(dta, RSVD1, SDIO2, VI, RSVD4, 0x14, 11, 0x84, 20, 0xa0, 18), MUX_PG(dtb, RSVD1, RSVD2, VI, SPI1, 0x14, 12, 0x84, 22, 0xa0, 20), MUX_PG(dtc, RSVD1, RSVD2, VI, RSVD4, 0x14, 13, 0x84, 26, 0xa0, 22), MUX_PG(dtd, RSVD1, SDIO2, VI, RSVD4, 0x14, 14, 0x84, 28, 0xa0, 24), MUX_PG(dte, RSVD1, RSVD2, VI, SPI1, 0x14, 15, 0x84, 30, 0xa0, 26), MUX_PG(dtf, I2C3, RSVD2, VI, RSVD4, 0x20, 12, 0x98, 30, 0xa0, 28), MUX_PG(gma, UARTE, SPI3, GMI, SDIO4, 0x14, 28, 0x84, 0, 0xb0, 20), MUX_PG(gmb, IDE, NAND, GMI, GMI_INT, 0x18, 29, 0x88, 28, 0xb0, 22), MUX_PG(gmc, UARTD, SPI4, GMI, SFLASH, 0x14, 29, 0x84, 2, 0xb0, 24), MUX_PG(gmd, RSVD1, NAND, GMI, SFLASH, 0x18, 30, 0x88, 30, 0xb0, 26), MUX_PG(gme, RSVD1, DAP5, GMI, SDIO4, 0x18, 0, 0x8c, 0, 0xa8, 24), MUX_PG(gpu, PWM, UARTA, GMI, RSVD4, 0x14, 16, 0x8c, 4, 0xa4, 20), MUX_PG(gpu7, RTCK, RSVD2, RSVD3, RSVD4, 0x20, 11, 0x98, 28, 0xa4, 6), MUX_PG(gpv, PCIE, RSVD2, RSVD3, RSVD4, 0x14, 17, 0x8c, 2, 0xa0, 30), MUX_PG(hdint, HDMI, RSVD2, RSVD3, RSVD4, 0x1c, 23, 0x84, 4, -1, -1), MUX_PG(i2cp, I2CP, RSVD2, RSVD3, RSVD4, 0x14, 18, 0x88, 8, 0xa4, 2), MUX_PG(irrx, UARTA, UARTB, GMI, SPI4, 0x14, 20, 0x88, 18, 0xa8, 22), MUX_PG(irtx, UARTA, UARTB, GMI, SPI4, 0x14, 19, 0x88, 16, 0xa8, 20), MUX_PG(kbca, KBC, NAND, SDIO2, EMC_TEST0_DLL, 0x14, 22, 0x88, 10, 0xa4, 8), MUX_PG(kbcb, KBC, NAND, SDIO2, MIO, 0x14, 21, 0x88, 12, 0xa4, 10), MUX_PG(kbcc, KBC, NAND, TRACE, EMC_TEST1_DLL, 0x18, 26, 0x88, 14, 0xa4, 12), MUX_PG(kbcd, KBC, NAND, SDIO2, MIO, 0x20, 10, 0x98, 26, 0xa4, 14), MUX_PG(kbce, KBC, NAND, OWR, RSVD4, 0x14, 26, 0x80, 28, 0xb0, 2), MUX_PG(kbcf, KBC, NAND, TRACE, MIO, 0x14, 27, 0x80, 26, 0xb0, 0), MUX_PG(lcsn, DISPLAYA, DISPLAYB, SPI3, RSVD4, 0x1c, 31, 0x90, 12, -1, -1), MUX_PG(ld0, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 0, 0x94, 0, -1, -1), MUX_PG(ld1, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 1, 0x94, 2, -1, -1), MUX_PG(ld2, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 2, 0x94, 4, -1, -1), MUX_PG(ld3, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 3, 0x94, 6, -1, -1), MUX_PG(ld4, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 4, 0x94, 8, -1, -1), MUX_PG(ld5, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 5, 0x94, 10, -1, -1), MUX_PG(ld6, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 6, 0x94, 12, -1, -1), MUX_PG(ld7, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 7, 0x94, 14, -1, -1), MUX_PG(ld8, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 8, 0x94, 16, -1, -1), MUX_PG(ld9, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 9, 0x94, 18, -1, -1), MUX_PG(ld10, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 10, 0x94, 20, -1, -1), MUX_PG(ld11, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 11, 0x94, 22, -1, -1), MUX_PG(ld12, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 12, 0x94, 24, -1, -1), MUX_PG(ld13, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 13, 0x94, 26, -1, -1), MUX_PG(ld14, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 14, 0x94, 28, -1, -1), MUX_PG(ld15, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 15, 0x94, 30, -1, -1), MUX_PG(ld16, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 16, 0x98, 0, -1, -1), MUX_PG(ld17, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 17, 0x98, 2, -1, -1), MUX_PG(ldc, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 30, 0x90, 14, -1, -1), MUX_PG(ldi, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x20, 6, 0x98, 16, -1, -1), MUX_PG(lhp0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 18, 0x98, 10, -1, -1), MUX_PG(lhp1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 19, 0x98, 4, -1, -1), MUX_PG(lhp2, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 20, 0x98, 6, -1, -1), MUX_PG(lhs, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x20, 7, 0x90, 22, -1, -1), MUX_PG(lm0, DISPLAYA, DISPLAYB, SPI3, RSVD4, 0x1c, 24, 0x90, 26, -1, -1), MUX_PG(lm1, DISPLAYA, DISPLAYB, RSVD3, CRT, 0x1c, 25, 0x90, 28, -1, -1), MUX_PG(lpp, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x20, 8, 0x98, 14, -1, -1), MUX_PG(lpw0, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x20, 3, 0x90, 0, -1, -1), MUX_PG(lpw1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x20, 4, 0x90, 2, -1, -1), MUX_PG(lpw2, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x20, 5, 0x90, 4, -1, -1), MUX_PG(lsc0, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 27, 0x90, 18, -1, -1), MUX_PG(lsc1, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x1c, 28, 0x90, 20, -1, -1), MUX_PG(lsck, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x1c, 29, 0x90, 16, -1, -1), MUX_PG(lsda, DISPLAYA, DISPLAYB, SPI3, HDMI, 0x20, 1, 0x90, 8, -1, -1), MUX_PG(lsdi, DISPLAYA, DISPLAYB, SPI3, RSVD4, 0x20, 2, 0x90, 6, -1, -1), MUX_PG(lspi, DISPLAYA, DISPLAYB, XIO, HDMI, 0x20, 0, 0x90, 10, -1, -1), MUX_PG(lvp0, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 21, 0x90, 30, -1, -1), MUX_PG(lvp1, DISPLAYA, DISPLAYB, RSVD3, RSVD4, 0x1c, 22, 0x98, 8, -1, -1), MUX_PG(lvs, DISPLAYA, DISPLAYB, XIO, RSVD4, 0x1c, 26, 0x90, 24, -1, -1), MUX_PG(owc, OWR, RSVD2, RSVD3, RSVD4, 0x14, 31, 0x84, 8, 0xb0, 30), MUX_PG(pmc, PWR_ON, PWR_INTR, RSVD3, RSVD4, 0x14, 23, 0x98, 18, -1, -1), MUX_PG(pta, I2C2, HDMI, GMI, RSVD4, 0x14, 24, 0x98, 22, 0xa4, 4), MUX_PG(rm, I2C1, RSVD2, RSVD3, RSVD4, 0x14, 25, 0x80, 14, 0xa4, 0), MUX_PG(sdb, UARTA, PWM, SDIO3, SPI2, 0x20, 15, 0x8c, 10, -1, -1), MUX_PG(sdc, PWM, TWC, SDIO3, SPI3, 0x18, 1, 0x8c, 12, 0xac, 28), MUX_PG(sdd, UARTA, PWM, SDIO3, SPI3, 0x18, 2, 0x8c, 14, 0xac, 30), MUX_PG(sdio1, SDIO1, RSVD2, UARTE, UARTA, 0x14, 30, 0x80, 30, 0xb0, 18), MUX_PG(slxa, PCIE, SPI4, SDIO3, SPI2, 0x18, 3, 0x84, 6, 0xa4, 22), MUX_PG(slxc, SPDIF, SPI4, SDIO3, SPI2, 0x18, 5, 0x84, 10, 0xa4, 26), MUX_PG(slxd, SPDIF, SPI4, SDIO3, SPI2, 0x18, 6, 0x84, 12, 0xa4, 28), MUX_PG(slxk, PCIE, SPI4, SDIO3, SPI2, 0x18, 7, 0x84, 14, 0xa4, 30), MUX_PG(spdi, SPDIF, RSVD2, I2C1, SDIO2, 0x18, 8, 0x8c, 8, 0xa4, 16), MUX_PG(spdo, SPDIF, RSVD2, I2C1, SDIO2, 0x18, 9, 0x8c, 6, 0xa4, 18), MUX_PG(spia, SPI1, SPI2, SPI3, GMI, 0x18, 10, 0x8c, 30, 0xa8, 4), MUX_PG(spib, SPI1, SPI2, SPI3, GMI, 0x18, 11, 0x8c, 28, 0xa8, 6), MUX_PG(spic, SPI1, SPI2, SPI3, GMI, 0x18, 12, 0x8c, 26, 0xa8, 8), MUX_PG(spid, SPI2, SPI1, SPI2_ALT, GMI, 0x18, 13, 0x8c, 24, 0xa8, 10), MUX_PG(spie, SPI2, SPI1, SPI2_ALT, GMI, 0x18, 14, 0x8c, 22, 0xa8, 12), MUX_PG(spif, SPI3, SPI1, SPI2, RSVD4, 0x18, 15, 0x8c, 20, 0xa8, 14), MUX_PG(spig, SPI3, SPI2, SPI2_ALT, I2C1, 0x18, 16, 0x8c, 18, 0xa8, 16), MUX_PG(spih, SPI3, SPI2, SPI2_ALT, I2C1, 0x18, 17, 0x8c, 16, 0xa8, 18), MUX_PG(uaa, SPI3, MIPI_HS, UARTA, ULPI, 0x18, 18, 0x80, 0, 0xac, 0), MUX_PG(uab, SPI2, MIPI_HS, UARTA, ULPI, 0x18, 19, 0x80, 2, 0xac, 2), MUX_PG(uac, OWR, RSVD2, RSVD3, RSVD4, 0x18, 20, 0x80, 4, 0xac, 4), MUX_PG(uad, IRDA, SPDIF, UARTA, SPI4, 0x18, 21, 0x80, 6, 0xac, 6), MUX_PG(uca, UARTC, RSVD2, GMI, RSVD4, 0x18, 22, 0x84, 16, 0xac, 8), MUX_PG(ucb, UARTC, PWM, GMI, RSVD4, 0x18, 23, 0x84, 18, 0xac, 10), MUX_PG(uda, SPI1, RSVD2, UARTD, ULPI, 0x20, 13, 0x80, 8, 0xb0, 16), /* pg_name, pupd_r/b */ PULL_PG(ck32, 0xb0, 14), PULL_PG(ddrc, 0xac, 26), PULL_PG(pmca, 0xb0, 4), PULL_PG(pmcb, 0xb0, 6), PULL_PG(pmcc, 0xb0, 8), PULL_PG(pmcd, 0xb0, 10), PULL_PG(pmce, 0xb0, 12), PULL_PG(xm2c, 0xa8, 30), PULL_PG(xm2d, 0xa8, 28), PULL_PG(ls, 0xac, 20), PULL_PG(lc, 0xac, 22), PULL_PG(ld17_0, 0xac, 12), PULL_PG(ld19_18, 0xac, 14), PULL_PG(ld21_20, 0xac, 16), PULL_PG(ld23_22, 0xac, 18), /* pg_name, r */ DRV_PG(ao1, 0x868), DRV_PG(ao2, 0x86c), DRV_PG(at1, 0x870), DRV_PG(at2, 0x874), DRV_PG(cdev1, 0x878), DRV_PG(cdev2, 0x87c), DRV_PG(csus, 0x880), DRV_PG(dap1, 0x884), DRV_PG(dap2, 0x888), DRV_PG(dap3, 0x88c), DRV_PG(dap4, 0x890), DRV_PG(dbg, 0x894), DRV_PG(lcd1, 0x898), DRV_PG(lcd2, 0x89c), DRV_PG(sdmmc2, 0x8a0), DRV_PG(sdmmc3, 0x8a4), DRV_PG(spi, 0x8a8), DRV_PG(uaa, 0x8ac), DRV_PG(uab, 0x8b0), DRV_PG(uart2, 0x8b4), DRV_PG(uart3, 0x8b8), DRV_PG(vi1, 0x8bc), DRV_PG(vi2, 0x8c0), /* pg_name, r, hsm_b, schmitt_b, lpmd_b, drvdn_b, drvup_b, slwr_b, slwr_w, slwf_b, slwf_w */ DRV_PG_EXT(xm2a, 0x8c4, -1, -1, 4, 14, 19, 24, 4, 28, 4), DRV_PG_EXT(xm2c, 0x8c8, -1, 3, -1, 14, 19, 24, 4, 28, 4), DRV_PG_EXT(xm2d, 0x8cc, -1, 3, -1, 14, 19, 24, 4, 28, 4), DRV_PG_EXT(xm2clk, 0x8d0, -1, -1, -1, 14, 19, 24, 4, 28, 4), /* pg_name, r */ DRV_PG(sdio1, 0x8e0), DRV_PG(crt, 0x8ec), DRV_PG(ddc, 0x8f0), DRV_PG(gma, 0x8f4), DRV_PG(gmb, 0x8f8), DRV_PG(gmc, 0x8fc), DRV_PG(gmd, 0x900), DRV_PG(gme, 0x904), DRV_PG(owr, 0x908), DRV_PG(uda, 0x90c), }; static const struct tegra_pinctrl_soc_data tegra20_pinctrl = { .ngpios = NUM_GPIOS, .pins = tegra20_pins, .npins = ARRAY_SIZE(tegra20_pins), .functions = tegra20_functions, .nfunctions = ARRAY_SIZE(tegra20_functions), .groups = tegra20_groups, .ngroups = ARRAY_SIZE(tegra20_groups), }; static int tegra20_pinctrl_probe(struct platform_device *pdev) { return tegra_pinctrl_probe(pdev, &tegra20_pinctrl); } static const struct of_device_id tegra20_pinctrl_of_match[] = { { .compatible = "nvidia,tegra20-pinmux", }, { }, }; static struct platform_driver tegra20_pinctrl_driver = { .driver = { .name = "tegra20-pinctrl", .of_match_table = tegra20_pinctrl_of_match, }, .probe = tegra20_pinctrl_probe, .remove = tegra_pinctrl_remove, }; module_platform_driver(tegra20_pinctrl_driver); MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); MODULE_DESCRIPTION("NVIDIA Tegra20 pinctrl driver"); MODULE_LICENSE("GPL v2"); MODULE_DEVICE_TABLE(of, tegra20_pinctrl_of_match);
31.522222
101
0.748213
ebed251f7e278ae9f6d9d23a89d717bab2d11e03
442
h
C
usr/sbin/usr/libexec/teslad/CCDDeviceUploadRetrieveRequestTypesRequest.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
2
2021-04-15T10:50:21.000Z
2021-08-19T19:00:09.000Z
usr/libexec/teslad/CCDDeviceUploadRetrieveRequestTypesRequest.h
lechium/tvOS142Headers
c7696f6d760e4822f61b9f2c2adcd18749700fda
[ "MIT" ]
null
null
null
usr/libexec/teslad/CCDDeviceUploadRetrieveRequestTypesRequest.h
lechium/tvOS142Headers
c7696f6d760e4822f61b9f2c2adcd18749700fda
[ "MIT" ]
null
null
null
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import "CCDDeviceUploadRequest.h" @interface CCDDeviceUploadRetrieveRequestTypesRequest : CCDDeviceUploadRequest { } - (id)endpointPath; // IMP=0x000000010000ce50 - (id)httpMethod; // IMP=0x000000010000ce44 - (long long)requestType; // IMP=0x000000010000ce3c @end
23.263158
120
0.744344
2313d4d142b26f99c1ead71f247492c9ff37d659
26,044
c
C
arch/arm/src/tms570/tms570_serial.c
huahang/incubator-nuttx
10c4aff6ca6d77da9cde42d4e72e60e843a27aca
[ "MIT" ]
1
2020-07-02T22:38:02.000Z
2020-07-02T22:38:02.000Z
arch/arm/src/tms570/tms570_serial.c
huahang/incubator-nuttx
10c4aff6ca6d77da9cde42d4e72e60e843a27aca
[ "MIT" ]
7
2020-04-19T08:02:08.000Z
2020-06-29T12:04:41.000Z
arch/arm/src/tms570/tms570_serial.c
huahang/incubator-nuttx
10c4aff6ca6d77da9cde42d4e72e60e843a27aca
[ "MIT" ]
1
2019-12-18T01:41:24.000Z
2019-12-18T01:41:24.000Z
/**************************************************************************** * arch/arm/src/tms570/tms570_serial.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * 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 NuttX 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. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <sys/types.h> #include <stdint.h> #include <stdbool.h> #include <unistd.h> #include <semaphore.h> #include <string.h> #include <errno.h> #include <debug.h> #ifdef CONFIG_SERIAL_TERMIOS # include <termios.h> #endif #include <nuttx/irq.h> #include <nuttx/arch.h> #include <nuttx/fs/ioctl.h> #include <nuttx/serial/serial.h> #include <arch/board/board.h> #include "up_arch.h" #include "up_internal.h" #include "hardware/tms570_sci.h" #include "tms570_lowputc.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #ifdef USE_SERIALDRIVER /* Which SCI with be tty0/console and which tty1? */ /* First pick the console and ttys0. This could be any of SCI1-1 */ #if defined(CONFIG_SCI1_SERIAL_CONSOLE) # define CONSOLE_DEV g_sci1port /* SCI1 is console */ # define TTYS0_DEV g_sci1port /* SCI1 is ttyS0 */ # define SCI1_ASSIGNED 1 #elif defined(CONFIG_SCI2_SERIAL_CONSOLE) # define CONSOLE_DEV g_sci2port /* SCI2 is console */ # define TTYS0_DEV g_sci2port /* SCI2 is ttyS0 */ # define SCI2_ASSIGNED 1 #else # undef CONSOLE_DEV /* No console */ # if defined(CONFIG_TMS570_SCI1) # define TTYS0_DEV g_sci1port /* SCI1 is ttyS0 */ # define SCI1_ASSIGNED 1 # elif defined(CONFIG_TMS570_SCI2) # define TTYS0_DEV g_sci2port /* SCI2 is ttyS0 */ # define SCI2_ASSIGNED 1 # endif #endif /* Pick ttys1. This could be any of SCI1-1, excluding the console * SCI. */ #if defined(CONFIG_TMS570_SCI1) && !defined(SCI1_ASSIGNED) # define TTYS1_DEV g_sci1port /* SCI1 is ttyS1 */ # define SCI1_ASSIGNED 1 #elif defined(CONFIG_TMS570_SCI2) && !defined(SCI2_ASSIGNED) # define TTYS1_DEV g_sci2port /* SCI2 is ttyS1 */ # define SCI2_ASSIGNED 1 #endif /* BAUD definitions * * The source clock is selectable and could be one of: * * - The peripheral clock * - A division of the peripheral clock, where the divider is product- * dependent, but generally set to 8 * - A processor/peripheral independent clock source fully programmable * provided by PMC (PCK) * - The external clock, available on the SCK pin * * Only the first two options are supported by this driver. The divided * peripheral clock is only used for very low BAUD selections. */ #define FAST_SCI_CLOCK BOARD_MCK_FREQUENCY #define SLOW_SCI_CLOCK (BOARD_MCK_FREQUENCY >> 3) /**************************************************************************** * Private Types ****************************************************************************/ struct tms570_dev_s { const uint32_t scibase; /* Base address of SCI registers */ struct sci_config_s config; /* SCI configuration */ uint8_t irq; /* IRQ associated with this SCI */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ static int tms570_setup(struct uart_dev_s *dev); static void tms570_shutdown(struct uart_dev_s *dev); static int tms570_attach(struct uart_dev_s *dev); static void tms570_detach(struct uart_dev_s *dev); static int tms570_interrupt(int irq, void *context, FAR void *arg); static int tms570_ioctl(struct file *filep, int cmd, unsigned long arg); static int tms570_receive(struct uart_dev_s *dev, uint32_t *status); static void tms570_rxint(struct uart_dev_s *dev, bool enable); static bool tms570_rxavailable(struct uart_dev_s *dev); static void tms570_send(struct uart_dev_s *dev, int ch); static void tms570_txint(struct uart_dev_s *dev, bool enable); static bool tms570_txready(struct uart_dev_s *dev); static bool tms570_txempty(struct uart_dev_s *dev); /**************************************************************************** * Private Data ****************************************************************************/ static const struct uart_ops_s g_sci_ops = { .setup = tms570_setup, .shutdown = tms570_shutdown, .attach = tms570_attach, .detach = tms570_detach, .ioctl = tms570_ioctl, .receive = tms570_receive, .rxint = tms570_rxint, .rxavailable = tms570_rxavailable, #ifdef CONFIG_SERIAL_IFLOWCONTROL .rxflowcontrol = NULL, #endif .send = tms570_send, .txint = tms570_txint, .txready = tms570_txready, .txempty = tms570_txempty, }; /* I/O buffers */ #ifdef CONFIG_TMS570_SCI1 static char g_sci1rxbuffer[CONFIG_SCI1_RXBUFSIZE]; static char g_sci1txbuffer[CONFIG_SCI1_TXBUFSIZE]; #endif #ifdef CONFIG_TMS570_SCI2 static char g_sci2rxbuffer[CONFIG_SCI2_RXBUFSIZE]; static char g_sci2txbuffer[CONFIG_SCI2_TXBUFSIZE]; #endif /* This describes the state of the SCI1 port. */ #ifdef CONFIG_TMS570_SCI1 static struct tms570_dev_s g_sci1priv = { .scibase = TMS570_SCI1_BASE, .config = { .baud = CONFIG_SCI1_BAUD, .parity = CONFIG_SCI1_PARITY, .bits = CONFIG_SCI1_BITS, .stopbits2 = CONFIG_SCI1_2STOP, }, .irq = TMS570_REQ_SCI1_0, }; static uart_dev_t g_sci1port = { .recv = { .size = CONFIG_SCI1_RXBUFSIZE, .buffer = g_sci1rxbuffer, }, .xmit = { .size = CONFIG_SCI1_TXBUFSIZE, .buffer = g_sci1txbuffer, }, .ops = &g_sci_ops, .priv = &g_sci1priv, }; #endif /* This describes the state of the SCI2 port. */ #ifdef CONFIG_TMS570_SCI2 static struct tms570_dev_s g_sci2priv = { .scibase = TMS570_SCI2_BASE, .config = { .baud = CONFIG_SCI2_BAUD, .parity = CONFIG_SCI2_PARITY, .bits = CONFIG_SCI2_BITS, .stopbits2 = CONFIG_SCI2_2STOP, }, .irq = TMS570_REQ_SCI2_0, }; static uart_dev_t g_sci2port = { .recv = { .size = CONFIG_SCI2_RXBUFSIZE, .buffer = g_sci2rxbuffer, }, .xmit = { .size = CONFIG_SCI2_TXBUFSIZE, .buffer = g_sci2txbuffer, }, .ops = &g_sci_ops, .priv = &g_sci2priv, }; #endif /**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** * Name: tms570_serialin ****************************************************************************/ static inline uint32_t tms570_serialin(struct tms570_dev_s *priv, int offset) { return getreg32(priv->scibase + offset); } /**************************************************************************** * Name: tms570_serialout ****************************************************************************/ static inline void tms570_serialout(struct tms570_dev_s *priv, int offset, uint32_t value) { putreg32(value, priv->scibase + offset); } /**************************************************************************** * Name: tms570_restoresciint ****************************************************************************/ static inline void tms570_restoresciint(struct tms570_dev_s *priv, uint32_t ints) { /* Restore the previous interrupt state (assuming all interrupts disabled) */ tms570_serialout(priv, TMS570_SCI_SETINT_OFFSET, ints); } /**************************************************************************** * Name: tms570_disableallints ****************************************************************************/ static void tms570_disableallints(struct tms570_dev_s *priv, uint32_t *ints) { irqstate_t flags; /* The following must be atomic */ flags = enter_critical_section(); if (ints) { /* Return the current enable bitsopop9 */ *ints = tms570_serialin(priv, TMS570_SCI_SETINT_OFFSET); } /* Disable all interrupts */ tms570_serialout(priv, TMS570_SCI_CLEARINT_OFFSET, SCI_INT_ALLINTS); leave_critical_section(flags); } /**************************************************************************** * Name: tms570_setup * * Description: * Configure the SCI baud, bits, parity, etc. This method is called the * first time that the serial port is opened. * ****************************************************************************/ static int tms570_setup(struct uart_dev_s *dev) { #ifndef CONFIG_SUPPRESS_SCI_CONFIG struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; /* Configure baud, number of bits, stop bits, and parity */ return tms570_sci_configure(priv->scibase, &priv->config); #else return OK; #endif } /**************************************************************************** * Name: tms570_shutdown * * Description: * Disable the SCI. This method is called when the serial * port is closed * ****************************************************************************/ static void tms570_shutdown(struct uart_dev_s *dev) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; /* Reset and disable receiver and transmitter */ tms570_serialout(priv, TMS570_SCI_GCR1_OFFSET, 0); /* Disable all interrupts */ tms570_disableallints(priv, NULL); } /**************************************************************************** * Name: tms570_attach * * Description: * Configure the SCI to operation in interrupt driven mode. This method is * called when the serial port is opened. Normally, this is just after the * the setup() method is called, however, the serial console may operate in * a non-interrupt driven mode during the boot phase. * * RX and TX interrupts are not enabled when by the attach method (unless the * hardware supports multiple levels of interrupt enabling). The RX and TX * interrupts are not enabled until the txint() and rxint() methods are called. * ****************************************************************************/ static int tms570_attach(struct uart_dev_s *dev) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; int ret; /* Attach and enable the IRQ */ ret = irq_attach(priv->irq, tms570_interrupt, dev); if (ret == OK) { /* Enable the interrupt (RX and TX interrupts are still disabled * in the SCI */ up_enable_irq(priv->irq); } return ret; } /**************************************************************************** * Name: tms570_detach * * Description: * Detach SCI interrupts. This method is called when the serial port is * closed normally just before the shutdown method is called. The exception * is the serial console which is never shutdown. * ****************************************************************************/ static void tms570_detach(struct uart_dev_s *dev) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; up_disable_irq(priv->irq); irq_detach(priv->irq); } /**************************************************************************** * Name: tms570_interrupt * * Description: * This is the common SCI interrupt handler. It will be invoked * when an interrupt received on the device. It should call * sci_transmitchars or sci_receivechar to perform the appropriate data * transfers. * ****************************************************************************/ static int tms570_interrupt(int irq, void *context, FAR void *arg) { struct uart_dev_s *dev = (struct uart_dev_s *)arg; struct tms570_dev_s *priv; uint32_t intvec; DEBUGASSERT(dev != NULL && dev->priv != NULL); priv = (struct tms570_dev_s *)dev->priv; /* Loop until there are no further pending interrupts */ for (; ; ) { /* Get the next pending interrupt. For most interrupts, reading the * INVECT0 register clears the corresonding INTFLAG. */ intvec = tms570_serialin(priv, TMS570_SCI_INTVECT0_OFFSET) & SCI_INTVECT_MASK; /* Handle the pending interrupt */ switch (intvec) { case SCI_INTVECT_NONE: /* No interrupt */ return OK; case SCI_INTVECT_WAKEUP: /* Wake-up interrupt */ /* SCI sets the WAKEUP flag if bus activity on the RX line * either prevents power-down mode from being entered, or RX * line activity causes an exit from power-down mode. If * enabled wakeup interrupt is triggered once WAKEUP flag is * set. * * REVISIT: This interrupt is ignored because for now the * break detect interrupt is never enabled. */ break; /* SCI Errors * * REVISIT: These error interrupta are ignored because for now the * break detect interrupt is never enabled. */ case SCI_INTVECT_PE: /* Parity error interrupt */ case SCI_INTVECT_FE: /* Framing error interrupt */ case SCI_INTVECT_OE: /* Overrun error interrupt */ case SCI_INTVECT_BRKDT: /* Break detect interrupt */ case SCI_INTVECT_BE: /* Bit error interrupt */ break; case SCI_INTVECT_RX: /* Receive interrupt */ { /* Receive data ready... process incoming bytes */ uart_recvchars(dev); } break; case SCI_INTVECT_TX: /* Tranmit interrupt */ { /* Transmit data register available ... process outgoing bytes */ uart_xmitchars(dev); } break; /* LIN mode only. These should never occur in SCI mode */ case SCI_INTVECT_ISFE: /* Inconsistent synch field error interrupt */ case SCI_INTVECT_ID: /* Identification interrupt */ case SCI_INTVECT_PBE: /* Physical bus error interrupt */ case SCI_INTVECT_CE: /* Checksum error interrupt */ case SCI_INTVECT_NRE: /* No response error interrupt */ case SCI_INTVECT_TOAWUS: /* Timeout after wakeup signal interrupt */ case SCI_INTVECT_TOA3WUS: /* Timeout after 2 Wakeup signls interrupt */ case SCI_INTVECT_TIMEOUT: /* Timeout interrupt */ default: DEBUGPANIC(); } } return OK; } /**************************************************************************** * Name: tms570_ioctl * * Description: * All ioctl calls will be routed through this method * ****************************************************************************/ static int tms570_ioctl(struct file *filep, int cmd, unsigned long arg) { #if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) struct inode *inode = filep->f_inode; struct uart_dev_s *dev = inode->i_private; #endif int ret = OK; switch (cmd) { #ifdef CONFIG_SERIAL_TIOCSERGSTRUCT case TIOCSERGSTRUCT: { struct tms570_dev_s *user = (struct tms570_dev_s *)arg; if (!user) { ret = -EINVAL; } else { memcpy(user, dev, sizeof(struct tms570_dev_s)); } } break; #endif #ifdef CONFIG_SERIAL_TERMIOS case TCGETS: { struct termios *termiosp = (struct termios *)arg; struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; if (!termiosp) { ret = -EINVAL; break; } /* Return baud */ cfsetispeed(termiosp, priv->config.baud); /* Return parity */ termiosp->c_cflag = ((priv->config.parity != 0) ? PARENB : 0) | ((priv->config.parity == 1) ? PARODD : 0); /* Return stop bits */ termiosp->c_cflag |= (priv->config.stopbits2) ? CSTOPB : 0; /* Return number of bits */ switch (priv->config.bits) { case 5: termiosp->c_cflag |= CS5; break; case 6: termiosp->c_cflag |= CS6; break; case 7: termiosp->c_cflag |= CS7; break; default: case 8: termiosp->c_cflag |= CS8; break; case 9: termiosp->c_cflag |= CS8 /* CS9 */; break; } } break; case TCSETS: { struct termios *termiosp = (struct termios *)arg; struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; uint32_t baud; uint32_t ints; uint8_t parity; uint8_t nbits; bool stop2; if (!termiosp) { ret = -EINVAL; break; } /* Decode baud. */ ret = OK; baud = cfgetispeed(termiosp); /* Decode number of bits */ switch (termiosp->c_cflag & CSIZE) { case CS5: nbits = 5; break; case CS6: nbits = 6; break; case CS7: nbits = 7; break; case CS8: nbits = 8; break; #if 0 case CS9: nbits = 9; break; #endif default: ret = -EINVAL; break; } /* Decode parity */ if ((termiosp->c_cflag & PARENB) != 0) { parity = (termiosp->c_cflag & PARODD) ? 1 : 2; } else { parity = 0; } /* Decode stop bits */ stop2 = (termiosp->c_cflag & CSTOPB) != 0; /* Verify that all settings are valid before committing */ if (ret == OK) { /* Commit */ priv->config.baud = baud; priv->config.parity = parity; priv->config.bits = nbits; priv->config.stopbits2 = stop2; /* effect the changes immediately - note that we do not * implement TCSADRAIN / TCSAFLUSH */ tms570_disableallints(priv, &ints); ret = tms570_sci_configure(priv->scibase, &priv->config); /* Restore the interrupt state */ tms570_restoresciint(priv, ints); } } break; #endif /* CONFIG_SERIAL_TERMIOS */ default: ret = -ENOTTY; break; } return ret; } /**************************************************************************** * Name: tms570_receive * * Description: * Called (usually) from the interrupt level to receive one * character from the SCI. Error bits associated with the * receipt are provided in the return 'status'. * ****************************************************************************/ static int tms570_receive(struct uart_dev_s *dev, uint32_t *status) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; /* Return the error information in the saved status. */ *status = tms570_serialin(priv, TMS570_SCI_FLR_OFFSET); /* Then return the actual received byte */ return (int)(tms570_serialin(priv, TMS570_SCI_RD_OFFSET) & 0xff); } /**************************************************************************** * Name: tms570_rxint * * Description: * Call to enable or disable RXRDY interrupts * ****************************************************************************/ static void tms570_rxint(struct uart_dev_s *dev, bool enable) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; if (enable) { /* Receive an interrupt when their is anything in the Rx data register (or an Rx * timeout occurs). */ #ifndef CONFIG_SUPPRESS_SERIAL_INTS tms570_serialout(priv, TMS570_SCI_SETINT_OFFSET, SCI_INT_RX); #endif } else { tms570_serialout(priv, TMS570_SCI_CLEARINT_OFFSET, SCI_INT_RX); } } /**************************************************************************** * Name: tms570_rxavailable * * Description: * Return true if the receive holding register is not empty * ****************************************************************************/ static bool tms570_rxavailable(struct uart_dev_s *dev) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; return ((tms570_serialin(priv, TMS570_SCI_FLR_OFFSET) & SCI_FLR_RXRDY) != 0); } /**************************************************************************** * Name: tms570_send * * Description: * This method will send one byte on the SCI *- ****************************************************************************/ static void tms570_send(struct uart_dev_s *dev, int ch) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; tms570_serialout(priv, TMS570_SCI_TD_OFFSET, (uint32_t)ch); } /**************************************************************************** * Name: tms570_txint * * Description: * Call to enable or disable TX interrupts * ****************************************************************************/ static void tms570_txint(struct uart_dev_s *dev, bool enable) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; irqstate_t flags; flags = enter_critical_section(); if (enable) { /* Set to receive an interrupt when the TX holding register register * is empty */ #ifndef CONFIG_SUPPRESS_SERIAL_INTS tms570_serialout(priv, TMS570_SCI_SETINT_OFFSET, SCI_INT_TX); /* Fake a TX interrupt here by just calling uart_xmitchars() with * interrupts disabled (note this may recurse). */ uart_xmitchars(dev); #endif } else { /* Disable the TX interrupt */ tms570_serialout(priv, TMS570_SCI_CLEARINT_OFFSET, SCI_INT_TX); } leave_critical_section(flags); } /**************************************************************************** * Name: tms570_txready * * Description: * Return true if the transmit holding register is empty (TXRDY) * ****************************************************************************/ static bool tms570_txready(struct uart_dev_s *dev) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; return ((tms570_serialin(priv, TMS570_SCI_FLR_OFFSET) & SCI_FLR_TXRDY) != 0); } /**************************************************************************** * Name: tms570_txempty * * Description: * Return true if the transmit holding and shift registers are empty * ****************************************************************************/ static bool tms570_txempty(struct uart_dev_s *dev) { struct tms570_dev_s *priv = (struct tms570_dev_s *)dev->priv; return ((tms570_serialin(priv, TMS570_SCI_FLR_OFFSET) & SCI_FLR_TXEMPTY) != 0); } /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: up_serialinit * * Description: * Register serial console and serial ports. * ****************************************************************************/ void up_serialinit(void) { /* Disable all SCIS */ tms570_disableallints(TTYS0_DEV.priv, NULL); #ifdef TTYS1_DEV tms570_disableallints(TTYS1_DEV.priv, NULL); #endif #ifdef CONSOLE_DEV /* Configure whichever one is the console. NOTE: This was already done * in tms570_lowsetup(). */ CONSOLE_DEV.isconsole = true; tms570_setup(&CONSOLE_DEV); /* Register the console */ (void)uart_register("/dev/console", &CONSOLE_DEV); #endif /* Register all SCIs */ (void)uart_register("/dev/ttyS0", &TTYS0_DEV); #ifdef TTYS1_DEV (void)uart_register("/dev/ttyS1", &TTYS1_DEV); #endif } #endif /* USE_SERIALDRIVER */
29.428249
86
0.540585
0372f436ab3120e2c82b5999863cc248cf4647cd
1,407
h
C
src/data/exporters/qt/ReGlossyExporter.h
danielbui78/reality
7ecd01b71f28e581becfe5093fab3ddcd6d9b2c1
[ "BSD-3-Clause" ]
2
2021-12-25T17:24:03.000Z
2022-03-14T05:07:51.000Z
src/data/exporters/qt/ReGlossyExporter.h
danielbui78/reality
7ecd01b71f28e581becfe5093fab3ddcd6d9b2c1
[ "BSD-3-Clause" ]
null
null
null
src/data/exporters/qt/ReGlossyExporter.h
danielbui78/reality
7ecd01b71f28e581becfe5093fab3ddcd6d9b2c1
[ "BSD-3-Clause" ]
2
2021-12-10T05:33:04.000Z
2021-12-10T16:38:54.000Z
/** * \file * Reality plug-in * Copyright (c) Pret-a-3D/Paolo Ciccone 2012. All rights reserved. */ #ifndef RE_QT_GLOSSY_EXPORTER_H #define RE_QT_GLOSSY_EXPORTER_H #include "ReGlossy.h" #include "ReQtMaterialExporter.h" namespace Reality { class RE_LIB_ACCESS ReQtGlossyExporter : public ReQtMaterialExporter { public: void exportMaterial( const ReMaterial* basemat, boost::any& result ) { matData.clear(); if (basemat->getType() != MatGlossy) { return; } auto mat = static_cast<const Glossy*>(basemat); addBasicInformation(mat); matData["surfaceFuzz"] = mat->getSurfaceFuzz(); matData["uGlossiness"] = mat->getUGlossiness(); matData["vGlossiness"] = mat->getVGlossiness(); matData["coatThickness"] = mat->getCoatThickness(); matData["translucent"] = mat->isTranslucent(); matData["topCoat"] = mat->hasTopCoat(); exportAlphaChannel(mat); exportModifiers(mat); boost::any textureData; exportTextures(mat, textureData); // The value returned by exportTextures() is a map containing // the definition of the textures and the channels. We need // to inject those two sets into the matData map QVariantMap tmp = boost::any_cast<QVariantMap>(textureData); matData["textures"] = tmp.value("textures"); matData["channels"] = tmp.value("channels"); result = matData; } }; } #endif
27.588235
76
0.681592
1b0f587a2e51f1ec67f391cda1f10c4373817a07
950
h
C
System/Library/PrivateFrameworks/CMCapture.framework/BWMetadataFormat.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
2
2021-04-15T10:50:21.000Z
2021-08-19T19:00:09.000Z
System/Library/PrivateFrameworks/CMCapture.framework/BWMetadataFormat.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/CMCapture.framework/BWMetadataFormat.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
null
null
null
/* * This header is generated by classdump-dyld 1.5 * on Wednesday, April 14, 2021 at 2:33:48 PM Mountain Standard Time * Operating System: Version 14.4 (Build 18K802) * Image Source: /System/Library/PrivateFrameworks/CMCapture.framework/CMCapture * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. Updated by Kevin Bradley. */ #import <CMCapture/CMCapture-Structs.h> #import <CMCapture/BWFormat.h> @interface BWMetadataFormat : BWFormat { opaqueCMFormatDescriptionRef _desc; } +(void)initialize; +(id)formatWithMetadataFormatDescription:(opaqueCMFormatDescriptionRef)arg1 ; -(id)debugDescription; -(id)description; -(void)dealloc; -(opaqueCMFormatDescriptionRef)formatDescription; -(unsigned)mediaType; -(id)_initWithMetadataFormat:(opaqueCMFormatDescriptionRef)arg1 ; @end
35.185185
130
0.681053
1eb00f8d982e7c54af4b6b7c1445f628d095d360
2,095
h
C
Mir3EIClientDev/Mir3EIClient/Sound/Sound.h
etorth/legendOfMir3_src
e7c47bb2375ddcc74e9f480e613aad79e66a7c08
[ "MIT" ]
7
2020-07-06T06:12:01.000Z
2021-07-26T14:01:40.000Z
Mir3EIClientDev/Mir3EIClient/Sound/Sound.h
etorth/legendOfMir3_src
e7c47bb2375ddcc74e9f480e613aad79e66a7c08
[ "MIT" ]
null
null
null
Mir3EIClientDev/Mir3EIClient/Sound/Sound.h
etorth/legendOfMir3_src
e7c47bb2375ddcc74e9f480e613aad79e66a7c08
[ "MIT" ]
14
2019-04-08T10:52:05.000Z
2021-07-25T15:27:01.000Z
// Sound.h: interface for the CSound class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_SOUND_H__DC5CA4B7_9E44_462D_BEF8_B1E4FDD01802__INCLUDED_) #define AFX_SOUND_H__DC5CA4B7_9E44_462D_BEF8_B1E4FDD01802__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define MAKEVOL(right,left) MAKELONG(((right*65535L)/100), ((left*65535L)/100)) class CSound { public: HRESULT Enable3d(VOID); HRESULT SetFormat( long Frequency, BOOL Bit16, BOOL stereo ); HRESULT Create(void *hWnd, BOOL Exclusive); HRESULT GetCaps(void); LPDIRECTSOUND3DLISTENER Get3dListener( void ) { return m_pDSListener;} LPDIRECTSOUND GetDS( void ) { return m_pDS; } BOOL GetSoundOn(void) { return m_SoundOff; } DWORD GetCDVolume( void ); DWORD GetDIGIVolume( void ); DWORD GetMIDIVolume( void ); HRESULT SetMIDIVolume( BYTE rvol, BYTE lvol ); HRESULT SetDIGIVolume( BYTE rvol, BYTE lvol ); HRESULT SetCDVolume( BYTE rvol, BYTE lvol ); HRESULT ContinuousPlay( BOOL Enable ); HRESULT Set3dFactors( float DopplerFactor, float RolloffFactor, float DistanceFactor ); HRESULT Place3dListener( float posX, float posY, float posZ, float frontX=0.0, float frontY=0.0, float frontZ=1.0, float topX=0.0, float topY=1.0, float topZ=0.0, BOOL setOrientation=FALSE ); VOID FreeDirectSound(VOID); CSound(); virtual ~CSound(); private: LPDIRECTSOUND3DBUFFER m_pDS3DBuffer; // 3D sound buffer DS3DBUFFER m_dsBufferParams; // 3D buffer properties DS3DLISTENER m_dsListenerParams; // Listener properties DWORD m_dwBufferBytes; DWORD m_dwDSBufferSize; BOOL m_bDeferSettings; LPDIRECTSOUND m_pDS; // DirectSound object BOOL m_SoundOff; BOOL m_3dSound; // Stores if 3d Sound is enabled LPDIRECTSOUND3DLISTENER m_pDSListener; // 3D listener object DSCAPS m_DSCaps; // Direct sound capabilities }; #endif // !defined(AFX_SOUND_H__DC5CA4B7_9E44_462D_BEF8_B1E4FDD01802__INCLUDED_)
31.742424
196
0.688305
9b0a540c43a9ef5f98d62a0de6ac4c6ae7f7e3fe
21,032
h
C
src/Magnum/Shaders/MeshVisualizer.h
felixguendling/magnum
8439cb792b3af9a878591186596e2f0c406b0897
[ "MIT" ]
4,038
2015-01-03T20:13:09.000Z
2022-03-29T06:19:13.000Z
src/Magnum/Shaders/MeshVisualizer.h
felixguendling/magnum
8439cb792b3af9a878591186596e2f0c406b0897
[ "MIT" ]
470
2015-01-02T13:19:22.000Z
2022-03-29T11:27:00.000Z
src/Magnum/Shaders/MeshVisualizer.h
felixguendling/magnum
8439cb792b3af9a878591186596e2f0c406b0897
[ "MIT" ]
473
2015-01-15T07:00:01.000Z
2022-03-28T01:04:18.000Z
#ifndef Magnum_Shaders_MeshVisualizer_h #define Magnum_Shaders_MeshVisualizer_h /* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Vladimír Vondruš <mosra@centrum.cz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** @file * @brief Struct @ref Magnum::Shaders::MeshVisualizerDrawUniform2D, @ref Magnum::Shaders::MeshVisualizerDrawUniform3D, @ref Magnum::Shaders::MeshVisualizerMaterialUniform */ #include "Magnum/Magnum.h" #include "Magnum/Math/Color.h" #include "Magnum/Math/Matrix.h" #ifdef MAGNUM_BUILD_DEPRECATED #include <Corrade/Utility/Macros.h> #include "Magnum/Shaders/MeshVisualizerGL.h" #endif namespace Magnum { namespace Shaders { /** @brief Per-draw uniform for 2D mesh visualizer shaders @m_since_latest Together with the generic @ref TransformationProjectionUniform2D contains parameters that are specific to each draw call. Material-related properties are expected to be shared among multiple draw calls and thus are provided in a separate @ref MeshVisualizerMaterialUniform structure, referenced by @ref materialId. @see @ref MeshVisualizerGL2D::bindDrawBuffer() */ struct MeshVisualizerDrawUniform2D { /** @brief Construct with default parameters */ constexpr explicit MeshVisualizerDrawUniform2D(DefaultInitT = DefaultInit) noexcept: #if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN) _pad0{}, /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif materialId{0} #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) #ifndef CORRADE_TARGET_BIG_ENDIAN , _pad0{} #endif , _pad1{}, _pad2{}, _pad3{} #endif {} /** @brief Construct without initializing the contents */ explicit MeshVisualizerDrawUniform2D(NoInitT) noexcept {} /** @{ * @name Convenience setters * * Provided to allow the use of method chaining for populating a structure * in a single expression, otherwise equivalent to accessing the fields * directly. Also guaranteed to provide backwards compatibility when * packing of the actual fields changes. */ /** * @brief Set the @ref materialId field * @return Reference to self (for method chaining) */ MeshVisualizerDrawUniform2D& setMaterialId(UnsignedInt id) { materialId = id; return *this; } /** * @} */ /** @var materialId * @brief Material ID * * References a particular material from a * @ref MeshVisualizerMaterialUniform array. Useful when an UBO with * more than one material is supplied or in a multi-draw scenario. Should * be less than the material count passed to the @ref MeshVisualizerGL2D::MeshVisualizerGL2D(Flags, UnsignedInt, UnsignedInt) * / @ref MeshVisualizerGL3D::MeshVisualizerGL3D(Flags, UnsignedInt, UnsignedInt) * constructor, if material count is @cpp 1 @ce, this field is assumed to * be @cpp 0 @ce and isn't even read by the shader. Default value is * @cpp 0 @ce, meaning the first material gets used. */ /* This field is an UnsignedInt in the shader and materialId is extracted as (value & 0xffff), so the order has to be different on BE */ #ifndef CORRADE_TARGET_BIG_ENDIAN alignas(4) UnsignedShort materialId; /* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK I MADE THOSE UNNAMED, YOU DUMB FOOL */ #ifndef DOXYGEN_GENERATING_OUTPUT UnsignedShort #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :16; /* reserved for skinOffset */ #endif #else alignas(4) UnsignedShort #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :16; /* reserved for skinOffset */ UnsignedShort materialId; #endif /* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK I MADE THOSE UNNAMED, YOU DUMB FOOL */ #ifndef DOXYGEN_GENERATING_OUTPUT Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; #endif }; /** @brief Per-draw uniform for 3D mesh visualizer shaders @m_since_latest Together with the generic @ref TransformationUniform3D contains parameters that are specific to each draw call. Material-related properties are expected to be shared among multiple draw calls and thus are provided in a separate @ref MeshVisualizerMaterialUniform structure, referenced by @ref materialId. @see @ref MeshVisualizerGL3D::bindDrawBuffer() */ struct MeshVisualizerDrawUniform3D { /** @brief Construct with default parameters */ constexpr explicit MeshVisualizerDrawUniform3D(DefaultInitT = DefaultInit) noexcept: normalMatrix{Math::IdentityInit} #if ((defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8)) && defined(CORRADE_TARGET_BIG_ENDIAN) , _pad0{} /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif , materialId{0} #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) #ifndef CORRADE_TARGET_BIG_ENDIAN , _pad0{} #endif , _pad1{}, _pad2{}, _pad3{} #endif {} /** @brief Construct without initializing the contents */ explicit MeshVisualizerDrawUniform3D(NoInitT) noexcept: normalMatrix{NoInit} {} /** @{ * @name Convenience setters * * Provided to allow the use of method chaining for populating a structure * in a single expression, otherwise equivalent to accessing the fields * directly. Also guaranteed to provide backwards compatibility when * packing of the actual fields changes. */ /** * @brief Set the @ref normalMatrix field * @return Reference to self (for method chaining) * * The matrix is expanded to @relativeref{Magnum,Matrix3x4}, with the * bottom row being zeros. */ MeshVisualizerDrawUniform3D& setNormalMatrix(const Matrix3x3& matrix) { normalMatrix = Matrix3x4{matrix}; return *this; } /** * @brief Set the @ref materialId field * @return Reference to self (for method chaining) */ MeshVisualizerDrawUniform3D& setMaterialId(UnsignedInt id) { materialId = id; return *this; } /** * @} */ /** * @brief Normal matrix * * Default value is an identity matrix. The bottom row is unused and acts * only as a padding to match uniform buffer packing rules. * @see @ref MeshVisualizerGL3D::setNormalMatrix() */ Matrix3x4 normalMatrix; /** @var materialId * @brief Material ID * * References a particular material from a * @ref MeshVisualizerMaterialUniform array. Useful when an UBO with * more than one material is supplied or in a multi-draw scenario. Should * be less than the material count passed to @ref MeshVisualizerGL2D / * @ref MeshVisualizerGL3D constructor. Default value is @cpp 0 @ce, * meaning the first material gets used. */ /* This field is an UnsignedInt in the shader and materialId is extracted as (value & 0xffff), so the order has to be different on BE */ #ifndef CORRADE_TARGET_BIG_ENDIAN UnsignedShort materialId; /* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK I MADE THOSE UNNAMED, YOU DUMB FOOL */ #ifndef DOXYGEN_GENERATING_OUTPUT UnsignedShort #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :16; /* reserved for skinOffset */ #endif #else UnsignedShort #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :16; /* reserved for skinOffset */ UnsignedShort materialId; #endif /* warning: Member __pad1__ is not documented. FFS DOXYGEN WHY DO YOU THINK I MADE THOSE UNNAMED, YOU DUMB FOOL */ #ifndef DOXYGEN_GENERATING_OUTPUT Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad2 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad3 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; #endif }; /** @brief Material uniform for mesh visualizer shaders @m_since_latest Describes material properties referenced from @ref MeshVisualizerDrawUniform2D::materialId and @ref MeshVisualizerDrawUniform3D::materialId. */ struct MeshVisualizerMaterialUniform { /** @brief Construct with default parameters */ constexpr explicit MeshVisualizerMaterialUniform(DefaultInitT = DefaultInit) noexcept: color{1.0f, 1.0f, 1.0f, 1.0f}, wireframeColor{0.0f, 0.0f, 0.0f, 1.0f}, wireframeWidth{1.0f}, colorMapOffset{1.0f/512.0f}, colorMapScale{1.0f/256.0f}, lineWidth{1.0f}, lineLength{1.0f}, smoothness{2.0f} #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) /* Otherwise it refuses to constexpr, on 3.8 at least */ , _pad0{}, _pad1{} #endif {} /** @brief Construct without initializing the contents */ explicit MeshVisualizerMaterialUniform(NoInitT) noexcept: color{NoInit}, wireframeColor{NoInit} {} /** @{ * @name Convenience setters * * Provided to allow the use of method chaining for populating a structure * in a single expression, otherwise equivalent to accessing the fields * directly. Also guaranteed to provide backwards compatibility when * packing of the actual fields changes. */ /** * @brief Set the @ref color field * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setColor(const Color4& color) { this->color = color; return *this; } /** * @brief Set the @ref wireframeColor field * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setWireframeColor(const Color4& color) { wireframeColor = color; return *this; } /** * @brief Set the @ref wireframeWidth field * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setWireframeWidth(Float width) { wireframeWidth = width; return *this; } /** * @brief Set the @ref colorMapOffset and @ref colorMapScale fields * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setColorMapTransformation(Float offset, Float scale) { colorMapOffset = offset; colorMapScale = scale; return *this; } /** * @brief Set the @ref lineWidth field * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setLineWidth(Float width) { lineWidth = width; return *this; } /** * @brief Set the @ref lineLength field * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setLineLength(Float length) { lineLength = length; return *this; } /** * @brief Set the @ref smoothness field * @return Reference to self (for method chaining) */ MeshVisualizerMaterialUniform& setSmoothness(Float smoothness) { this->smoothness = smoothness; return *this; } /** * @} */ /** * @brief Base object color * * Default value is @cpp 0xffffffff_rgbaf @ce. * * Used only if @ref MeshVisualizerGL3D::Flag::Wireframe "MeshVisualizerGL*D::Flag::Wireframe" * or @relativeref{MeshVisualizerGL3D,Flag::InstancedObjectId} / * @relativeref{MeshVisualizerGL3D,Flag::PrimitiveId} / * @relativeref{MeshVisualizerGL3D,Flag::PrimitiveIdFromVertexId} is * enabled. In case of the latter, the color is multiplied with the color * map coming from @ref MeshVisualizerGL3D::bindColorMapTexture() "MeshVisualizerGL*D::bindColorMapTexture()". * @see @ref MeshVisualizerGL2D::setColor(), * @ref MeshVisualizerGL3D::setColor() */ Color4 color; /** * @brief Wireframe color * * Default value is @cpp 0x000000ff_rgbaf @ce. * * Used only if @ref MeshVisualizerGL3D::Flag::Wireframe "MeshVisualizerGL*D::Flag::Wireframe" * is enabled. * @see @ref MeshVisualizerGL2D::setWireframeColor(), * @ref MeshVisualizerGL3D::setWireframeColor() */ Color4 wireframeColor; /** * @brief Wireframe width * * The value is in screen space (depending on * @ref MeshVisualizerGL3D::setViewportSize() "MeshVisualizerGL*D::setViewportSize()"), * default value is @cpp 1.0f @ce. * * Used only if @ref MeshVisualizerGL3D::Flag::Wireframe "MeshVisualizerGL*D::Flag::Wireframe" * is enabled. * @see @ref MeshVisualizerGL2D::setWireframeWidth(), * @ref MeshVisualizerGL3D::setWireframeWidth() */ Float wireframeWidth; /** * @brief Color map offset * * Together with @ref colorMapScale forms an offset and scale applied to * the input value coming either from the * @ref MeshVisualizerGL3D::ObjectId "MeshVisualizerGL*D::ObjectId" * attribute or @glsl gl_PrimitiveID @ce, resulting value is then used to * fetch a color from a color map bound with @ref MeshVisualizerGL3D::bindColorMapTexture() "MeshVisualizerGL*D::bindColorMapTexture()". * Default offset and scale values are @cpp 1.0f/512.0f @ce and * @cpp 1.0/256.0f @ce, meaning that for a 256-entry colormap the first 256 * values get an exact color from it and the next values will be either * clamped to last color or repeated depending on the color map texture * wrapping mode. * * Used only if @ref MeshVisualizerGL3D::Flag::InstancedObjectId "MeshVisualizerGL*D::Flag::InstancedObjectId" or * @relativeref{MeshVisualizerGL3D,Flag::PrimitiveId} / * @relativeref{MeshVisualizerGL3D,Flag::PrimitiveIdFromVertexId} is * enabled. * @see @ref MeshVisualizerGL2D::setColorMapTransformation(), * @ref MeshVisualizerGL3D::setColorMapTransformation() */ Float colorMapOffset; /** * @brief Color map offset * * See @ref colorMapOffset for more information. * * Used only by @ref MeshVisualizerGL3D and only if * @ref MeshVisualizerGL3D::Flag::InstancedObjectId "MeshVisualizerGL*D::Flag::InstancedObjectId" or * @relativeref{MeshVisualizerGL3D,Flag::PrimitiveId} / * @relativeref{MeshVisualizerGL3D,Flag::PrimitiveIdFromVertexId} is * enabled. * @see @ref MeshVisualizerGL2D::setColorMapTransformation(), * @ref MeshVisualizerGL3D::setColorMapTransformation() */ Float colorMapScale; /** * @brief Line width * * The value is in screen space (depending on * @ref MeshVisualizerGL3D::setViewportSize() "MeshVisualizerGL*D::setViewportSize()"), * default value is @cpp 1.0f @ce. * * Used only by @ref MeshVisualizerGL3D and only if * @ref MeshVisualizerGL3D::Flag::TangentDirection, * @relativeref{MeshVisualizerGL3D,Flag::BitangentFromTangentDirection}, * @relativeref{MeshVisualizerGL3D,Flag::BitangentDirection} or * @relativeref{MeshVisualizerGL3D,Flag::NormalDirection} is enabled. * @see @ref MeshVisualizerGL3D::setLineWidth() */ Float lineWidth; /** * @brief Line length * * The value is in object space, default value is @cpp 1.0f @ce. * * Used only by @ref MeshVisualizerGL3D and only if * @ref MeshVisualizerGL3D::Flag::TangentDirection, * @relativeref{MeshVisualizerGL3D,Flag::BitangentFromTangentDirection}, * @relativeref{MeshVisualizerGL3D,Flag::BitangentDirection} or * @relativeref{MeshVisualizerGL3D,Flag::NormalDirection} is enabled. * @see @ref MeshVisualizerGL3D::setLineLength() */ Float lineLength; /** * @brief Line smoothness * * The value is in screen space (depending on * @ref MeshVisualizerGL3D::setViewportSize() "MeshVisualizerGL*D::setViewportSize()"), * initial value is @cpp 2.0f @ce. * * Used only if @ref MeshVisualizerGL3D::Flag::Wireframe "MeshVisualizerGL*D::Flag::Wireframe", * @ref MeshVisualizerGL3D::Flag::TangentDirection, * @relativeref{MeshVisualizerGL3D,Flag::BitangentFromTangentDirection}, * @relativeref{MeshVisualizerGL3D,Flag::BitangentDirection} or * @relativeref{MeshVisualizerGL3D,Flag::NormalDirection} is enabled. * @see @ref MeshVisualizerGL2D::setSmoothness(), * @ref MeshVisualizerGL3D::setSmoothness() */ Float smoothness; /* warning: Member __pad0__ is not documented. FFS DOXYGEN WHY DO YOU THINK I MADE THOSE UNNAMED, YOU DUMB FOOL */ #ifndef DOXYGEN_GENERATING_OUTPUT Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad0 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; Int #if (defined(CORRADE_TARGET_CLANG) && __clang_major__ < 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ < 8) _pad1 /* Otherwise it refuses to constexpr, on 3.8 at least */ #endif :32; #endif }; #ifdef MAGNUM_BUILD_DEPRECATED /** @brief @copybrief MeshVisualizerGL2D * @m_deprecated_since_latest Use @ref MeshVisualizerGL2D instead. */ typedef CORRADE_DEPRECATED("use MeshVisualizerGL2D instead") MeshVisualizerGL2D MeshVisualizer2D; /** @brief @copybrief MeshVisualizerGL3D * @m_deprecated_since_latest Use @ref MeshVisualizerGL3D instead. */ typedef CORRADE_DEPRECATED("use MeshVisualizerGL3D instead") MeshVisualizerGL3D MeshVisualizer3D; /** @brief @copybrief MeshVisualizerGL3D * @m_deprecated_since{2020,06} Use @ref MeshVisualizerGL3D instead. */ typedef CORRADE_DEPRECATED("use MeshVisualizerGL3D instead") MeshVisualizerGL3D MeshVisualizer; #endif }} #endif
39.238806
292
0.687096
9b422a5a6f83f1777271f0041b63e588650eaf39
212,085
h
C
Privacy Permissions Checker/Privacy Permissions Checker/PowerPoint.h
Panopto/test-mac-privacy-consent
f56a115adcf2e702734a91b7d3e80784baa66d9e
[ "Apache-2.0" ]
9
2018-09-06T19:55:04.000Z
2021-11-02T13:49:14.000Z
Privacy Permissions Checker/Privacy Permissions Checker/PowerPoint.h
Panopto/test-mac-privacy-consent
f56a115adcf2e702734a91b7d3e80784baa66d9e
[ "Apache-2.0" ]
null
null
null
Privacy Permissions Checker/Privacy Permissions Checker/PowerPoint.h
Panopto/test-mac-privacy-consent
f56a115adcf2e702734a91b7d3e80784baa66d9e
[ "Apache-2.0" ]
1
2018-09-06T19:55:14.000Z
2018-09-06T19:55:14.000Z
/* * PowerPoint.h */ #import <AppKit/AppKit.h> #import <ScriptingBridge/ScriptingBridge.h> @class PowerPointBaseObject, PowerPointBaseApplication, PowerPointBaseDocument, PowerPointBasicWindow, PowerPointPrintSettings, PowerPointCommandBarControl, PowerPointCommandBarButton, PowerPointCommandBarCombobox, PowerPointCommandBarPopup, PowerPointCommandBar, PowerPointDocumentProperty, PowerPointCustomDocumentProperty, PowerPointWebPageFont, PowerPointActionSetting, PowerPointAnimationBehavior, PowerPointAnimationPoint, PowerPointAnimationSettings, PowerPointApplication, PowerPointAutocorrectEntry, PowerPointAutocorrect, PowerPointBulletFormat, PowerPointColorScheme, PowerPointColorsEffect, PowerPointCommandEffect, PowerPointCustomLayout, PowerPointDefaultWebOptions, PowerPointDesign, PowerPointDocumentWindow, PowerPointEffectInformation, PowerPointEffectParameters, PowerPointEffect, PowerPointFilterEffect, PowerPointFirstLetterException, PowerPointFont, PowerPointHeaderOrFooter, PowerPointHeadersAndFooters, PowerPointHyperlink, PowerPointMaster, PowerPointMotionEffect, PowerPointNamedSlideShow, PowerPointPageSetup, PowerPointPane, PowerPointParagraphFormat, PowerPointPlaySettings, PowerPointPreferences, PowerPointPresentation, PowerPointPresenterTool, PowerPointPresenterViewWindow, PowerPointPrintOptions, PowerPointPrintRange, PowerPointPropertyEffect, PowerPointRotatingEffect, PowerPointRulerLevel, PowerPointRuler, PowerPointSaveAsMovieSettings, PowerPointScaleEffect, PowerPointSelection, PowerPointSequence, PowerPointSetEffect, PowerPointSlideRange, PowerPointSlideShowSettings, PowerPointSlideShowTransition, PowerPointSlideShowView, PowerPointSlideShowWindow, PowerPointSlide, PowerPointSoundEffect, PowerPointTabStop, PowerPointTextStyleLevel, PowerPointTextStyle, PowerPointTimeline, PowerPointTiming, PowerPointTwoInitialCapsException, PowerPointView, PowerPointWebOptions, PowerPointAdjustment, PowerPointCalloutFormat, PowerPointConnectorFormat, PowerPointFillFormat, PowerPointGlowFormat, PowerPointGradientStop, PowerPointLineFormat, PowerPointLinkFormat, PowerPointOfficeTheme, PowerPointPictureFormat, PowerPointPlaceholderFormat, PowerPointReflectionFormat, PowerPointShadowFormat, PowerPointShapeRange, PowerPointShape, PowerPointCallout, PowerPointComment, PowerPointConnector, PowerPointLineShape, PowerPointMediaObject, PowerPointPicture, PowerPointPlaceHolder, PowerPointShapeTable, PowerPointSoftEdgeFormat, PowerPointTextBox, PowerPointTextColumn, PowerPointTextFrame, PowerPointThemeColorScheme, PowerPointThemeColor, PowerPointThemeEffectScheme, PowerPointThemeFontScheme, PowerPointThemeFont, PowerPointMajorThemeFont, PowerPointMinorThemeFont, PowerPointThreeDFormat, PowerPointWordArtFormat, PowerPointTextRange, PowerPointCharacter, PowerPointLine, PowerPointParagraph, PowerPointSentence, PowerPointTextFlow, PowerPointWord, PowerPointCell, PowerPointColumn, PowerPointRow, PowerPointTable; typedef enum { PowerPointSavoYes = 'yes ' /* Save objects now */, PowerPointSavoNo = 'no ' /* Do not save objects */, PowerPointSavoAsk = 'ask ' /* Ask the user whether to save */ } PowerPointSavo; typedef enum { PowerPointKfrmIndex = 'indx' /* keyform designating indexed access */, PowerPointKfrmNamed = 'name' /* keyform designating named access */, PowerPointKfrmId = 'ID ' /* keyform designating access by unique identifier */ } PowerPointKfrm; typedef enum { PowerPointPPfdMacintoshPath = 'utxt' /* Maintosh path i.e. Foo:bar.txt */, PowerPointPPfdPosixPath = 'file' /* Posix path i.e. file:://foo/bar.txt */ } PowerPointPPfd; typedef enum { PowerPointPPffSaveAsPresentation = '\001\000\000\000', PowerPointPPffSaveAsTemplate = '\000\000\000\000', PowerPointPPffSaveAsRTF = '\001\000\000\000', PowerPointPPffSaveAsShow = '\000\000\000\000', PowerPointPPffSaveAsDefault = '\001\000\000\000', PowerPointPPffSaveAsHTML = '\000\000\000\000', PowerPointPPffSaveAsMovie = '\001\000\000\000', PowerPointPPffSaveAsPackage = '\000\000\000\000', PowerPointPPffSaveAsPDF = '\001\000\000\000', PowerPointPPffSaveAsOpenXMLPresentation = '\000\000\000\000', PowerPointPPffSaveAsOpenXMLPresentationMacroEnabled = '\001\000\000\000', PowerPointPPffSaveAsOpenXMLShow = '\000\000\000\000', PowerPointPPffSaveAsOpenXMLShowMacroEnabled = '\001\000\000\000', PowerPointPPffSaveAsOpenXMLTemplate = '\000\000\000\000', PowerPointPPffSaveAsOpenXMLTemplateMacroEnabled = '\001\000\000\000', PowerPointPPffSaveAsOpenXMLTheme = '\000\000\000\000' } PowerPointPPff; typedef enum { PowerPointMlDsLineDashStyleUnset = '\000\000\000\000', PowerPointMlDsLineDashStyleSolid = '\001\000\000\000', PowerPointMlDsLineDashStyleSquareDot = '\000\000\000\000', PowerPointMlDsLineDashStyleRoundDot = '\001\000\000\000', PowerPointMlDsLineDashStyleDash = '\000\000\000\000', PowerPointMlDsLineDashStyleDashDot = '\001\000\000\000', PowerPointMlDsLineDashStyleDashDotDot = '\000\000\000\000', PowerPointMlDsLineDashStyleLongDash = '\001\000\000\000', PowerPointMlDsLineDashStyleLongDashDot = '\000\000\000\000', PowerPointMlDsLineDashStyleLongDashDotDot = '\001\000\000\000', PowerPointMlDsLineDashStyleSystemDash = '\000\000\000\000', PowerPointMlDsLineDashStyleSystemDot = '\001\000\000\000', PowerPointMlDsLineDashStyleSystemDashDot = '\000\000\000\000' } PowerPointMlDs; typedef enum { PowerPointMLnSLineStyleUnset = '\000\000\000\000', PowerPointMLnSSingleLine = '\001\000\000\000', PowerPointMLnSThinThinLine = '\000\000\000\000', PowerPointMLnSThinThickLine = '\001\000\000\000', PowerPointMLnSThickThinLine = '\000\000\000\000', PowerPointMLnSThickBetweenThinLine = '\001\000\000\000' } PowerPointMLnS; typedef enum { PowerPointMAhSArrowheadStyleUnset = '\001\000\000\000', PowerPointMAhSNoArrowhead = '\000\000\000\000', PowerPointMAhSTriangleArrowhead = '\001\000\000\000', PowerPointMAhSOpen_arrowhead = '\000\000\000\000', PowerPointMAhSStealthArrowhead = '\001\000\000\000', PowerPointMAhSDiamondArrowhead = '\000\000\000\000', PowerPointMAhSOvalArrowhead = '\001\000\000\000' } PowerPointMAhS; typedef enum { PowerPointMAhWArrowheadWidthUnset = '\001\000\000\000', PowerPointMAhWNarrowWidthArrowhead = '\000\000\000\000', PowerPointMAhWMediumWidthArrowhead = '\001\000\000\000', PowerPointMAhWWideArrowhead = '\000\000\000\000' } PowerPointMAhW; typedef enum { PowerPointMAhLArrowheadLengthUnset = '\000\000\000\000', PowerPointMAhLShortArrowhead = '\001\000\000\000', PowerPointMAhLMediumArrowhead = '\000\000\000\000', PowerPointMAhLLongArrowhead = '\001\000\000\000' } PowerPointMAhL; typedef enum { PowerPointMFdTFillUnset = '\001\000\000\000', PowerPointMFdTFillSolid = '\000\000\000\000', PowerPointMFdTFillPatterned = '\001\000\000\000', PowerPointMFdTFillGradient = '\000\000\000\000', PowerPointMFdTFillTextured = '\001\000\000\000', PowerPointMFdTFillBackground = '\000\000\000\000', PowerPointMFdTFillPicture = '\001\000\000\000' } PowerPointMFdT; typedef enum { PowerPointMGdSGradientUnset = '\001\000\000\000', PowerPointMGdSHorizontalGradient = '\000\000\000\000', PowerPointMGdSVerticalGradient = '\001\000\000\000', PowerPointMGdSDiagonalUpGradient = '\000\000\000\000', PowerPointMGdSDiagonalDownGradient = '\001\000\000\000', PowerPointMGdSFromCornerGradient = '\000\000\000\000', PowerPointMGdSFromTitleGradient = '\001\000\000\000', PowerPointMGdSFromCenterGradient = '\000\000\000\000' } PowerPointMGdS; typedef enum { PowerPointMGCtGradientTypeUnset = '\003\357\377\376', PowerPointMGCtSingleShadeGradientType = '\000\000\003\360', PowerPointMGCtTwoColorsGradientType = '\000\000\003\360', PowerPointMGCtPresetColorsGradientType = '\000\000\003\360', PowerPointMGCtMultiColorsGradientType = '\000\000\003\360' } PowerPointMGCt; typedef enum { PowerPointMxtTTextureTypeTextureTypeUnset = '\003\360\377\376', PowerPointMxtTTextureTypePresetTexture = '\000\000\003\361', PowerPointMxtTTextureTypeUserDefinedTexture = '\000\000\003\361' } PowerPointMxtT; typedef enum { PowerPointMPzTPresetTextureUnset = '\000\000\000\000', PowerPointMPzTTexturePapyrus = '\001\000\000\000', PowerPointMPzTTextureCanvas = '\000\000\000\000', PowerPointMPzTTextureDenim = '\001\000\000\000', PowerPointMPzTTextureWovenMat = '\000\000\000\000', PowerPointMPzTTextureWaterDroplets = '\001\000\000\000', PowerPointMPzTTexturePaperBag = '\000\000\000\000', PowerPointMPzTTextureFishFossil = '\001\000\000\000', PowerPointMPzTTextureSand = '\000\000\000\000', PowerPointMPzTTextureGreenMarble = '\001\000\000\000', PowerPointMPzTTextureWhiteMarble = '\000\000\000\000', PowerPointMPzTTextureBrownMarble = '\001\000\000\000', PowerPointMPzTTextureGranite = '\000\000\000\000', PowerPointMPzTTextureNewsprint = '\001\000\000\000', PowerPointMPzTTextureRecycledPaper = '\000\000\000\000', PowerPointMPzTTextureParchment = '\001\000\000\000', PowerPointMPzTTextureStationery = '\000\000\000\000', PowerPointMPzTTextureBlueTissuePaper = '\001\000\000\000', PowerPointMPzTTexturePinkTissuePaper = '\000\000\000\000', PowerPointMPzTTexturePurpleMesh = '\001\000\000\000', PowerPointMPzTTextureBouquet = '\000\000\000\000', PowerPointMPzTTextureCork = '\001\000\000\000', PowerPointMPzTTextureWalnut = '\000\000\000\000', PowerPointMPzTTextureOak = '\001\000\000\000', PowerPointMPzTTextureMediumWood = '\000\000\000\000' } PowerPointMPzT; typedef enum { PowerPointPpTyPatternUnset = '\000\000\000\000', PowerPointPpTyFivePercentPattern = '\001\000\000\000', PowerPointPpTyTenPercentPattern = '\000\000\000\000', PowerPointPpTyTwentyPercentPattern = '\001\000\000\000', PowerPointPpTyTwentyFivePercentPattern = '\000\000\000\000', PowerPointPpTyThirtyPercentPattern = '\001\000\000\000', PowerPointPpTyFortyPercentPattern = '\000\000\000\000', PowerPointPpTyFiftyPercentPattern = '\001\000\000\000', PowerPointPpTySixtyPercentPattern = '\000\000\000\000', PowerPointPpTySeventyPercentPattern = '\001\000\000\000', PowerPointPpTySeventyFivePercentPattern = '\000\000\000\000', PowerPointPpTyEightyPercentPattern = '\001\000\000\000', PowerPointPpTyNinetyPercentPattern = '\000\000\000\000', PowerPointPpTyDarkHorizontalPattern = '\001\000\000\000', PowerPointPpTyDarkVerticalPattern = '\000\000\000\000', PowerPointPpTyDarkDownwardDiagonalPattern = '\001\000\000\000', PowerPointPpTyDarkUpwardDiagonalPattern = '\000\000\000\000', PowerPointPpTySmallCheckerBoardPattern = '\001\000\000\000', PowerPointPpTyTrellisPattern = '\000\000\000\000', PowerPointPpTyLightHorizontalPattern = '\001\000\000\000', PowerPointPpTyLightVerticalPattern = '\000\000\000\000', PowerPointPpTyLightDownwardDiagonalPattern = '\001\000\000\000', PowerPointPpTyLightUpwardDiagonalPattern = '\000\000\000\000', PowerPointPpTySmallGridPattern = '\001\000\000\000', PowerPointPpTyDottedDiamondPattern = '\000\000\000\000', PowerPointPpTyWideDownwardDiagonal = '\001\000\000\000', PowerPointPpTyWideUpwardDiagonalPattern = '\000\000\000\000', PowerPointPpTyDashedUpwardDiagonalPattern = '\001\000\000\000', PowerPointPpTyDashedDownwardDiagonalPattern = '\000\000\000\000', PowerPointPpTyNarrowVerticalPattern = '\001\000\000\000', PowerPointPpTyNarrowHorizontalPattern = '\000\000\000\000', PowerPointPpTyDashedVerticalPattern = '\001\000\000\000', PowerPointPpTyDashedHorizontalPattern = '\000\000\000\000', PowerPointPpTyLargeConfettiPattern = '\001\000\000\000', PowerPointPpTyLargeGridPattern = '\000\000\000\000', PowerPointPpTyHorizontalBrickPattern = '\001\000\000\000', PowerPointPpTyLargeCheckerBoardPattern = '\000\000\000\000', PowerPointPpTySmallConfettiPattern = '\001\000\000\000', PowerPointPpTyZigZagPattern = '\000\000\000\000', PowerPointPpTySolidDiamondPattern = '\001\000\000\000', PowerPointPpTyDiagonalBrickPattern = '\000\000\000\000', PowerPointPpTyOutlinedDiamondPattern = '\001\000\000\000', PowerPointPpTyPlaidPattern = '\000\000\000\000', PowerPointPpTySpherePattern = '\001\000\000\000', PowerPointPpTyWeavePattern = '\000\000\000\000', PowerPointPpTyDottedGridPattern = '\001\000\000\000', PowerPointPpTyDivotPattern = '\000\000\000\000', PowerPointPpTyShinglePattern = '\001\000\000\000', PowerPointPpTyWavePattern = '\000\000\000\000', PowerPointPpTyHorizontalPattern = '\001\000\000\000', PowerPointPpTyVerticalPattern = '\000\000\000\000', PowerPointPpTyCrossPattern = '\001\000\000\000', PowerPointPpTyDownwardDiagonalPattern = '\000\000\000\000', PowerPointPpTyUpwardDiagonalPattern = '\001\000\000\000', PowerPointPpTyDiagonalCrossPattern = '\000\000\000\000' } PowerPointPpTy; typedef enum { PowerPointMPGbPresetGradientUnset = '\000\000\000\000', PowerPointMPGbGradientEarlySunset = '\001\000\000\000', PowerPointMPGbGradientLateSunset = '\000\000\000\000', PowerPointMPGbGradientNightfall = '\001\000\000\000', PowerPointMPGbGradientDaybreak = '\000\000\000\000', PowerPointMPGbGradientHorizon = '\001\000\000\000', PowerPointMPGbGradientDesert = '\000\000\000\000', PowerPointMPGbGradientOcean = '\001\000\000\000', PowerPointMPGbGradientCalmWater = '\000\000\000\000', PowerPointMPGbGradientFire = '\001\000\000\000', PowerPointMPGbGradientFog = '\000\000\000\000', PowerPointMPGbGradientMoss = '\001\000\000\000', PowerPointMPGbGradientPeacock = '\000\000\000\000', PowerPointMPGbGradientWheat = '\001\000\000\000', PowerPointMPGbGradientParchment = '\000\000\000\000', PowerPointMPGbGradientMahogany = '\001\000\000\000', PowerPointMPGbGradientRainbow = '\000\000\000\000', PowerPointMPGbGradientRainbow2 = '\001\000\000\000', PowerPointMPGbGradientGold = '\000\000\000\000', PowerPointMPGbGradientGold2 = '\001\000\000\000', PowerPointMPGbGradientBrass = '\000\000\000\000', PowerPointMPGbGradientChrome = '\001\000\000\000', PowerPointMPGbGradientChrome2 = '\000\000\000\000', PowerPointMPGbGradientSilver = '\001\000\000\000', PowerPointMPGbGradientSapphire = '\000\000\000\000' } PowerPointMPGb; typedef enum { PowerPointMSdTShadowUnset = '\003_\377\376', PowerPointMSdTShadow1 = '\000\000\003`', PowerPointMSdTShadow2 = '\000\000\003`', PowerPointMSdTShadow3 = '\000\000\003`', PowerPointMSdTShadow4 = '\000\000\003`', PowerPointMSdTShadow5 = '\000\000\003`', PowerPointMSdTShadow6 = '\000\000\003`', PowerPointMSdTShadow7 = '\000\000\003`', PowerPointMSdTShadow8 = '\000\000\003`', PowerPointMSdTShadow9 = '\000\000\003`', PowerPointMSdTShadow10 = '\000\000\003`', PowerPointMSdTShadow11 = '\000\000\003`', PowerPointMSdTShadow12 = '\000\000\003`', PowerPointMSdTShadow13 = '\000\000\003`', PowerPointMSdTShadow14 = '\000\000\003`', PowerPointMSdTShadow15 = '\000\000\003`', PowerPointMSdTShadow16 = '\000\000\003`', PowerPointMSdTShadow17 = '\000\000\003`', PowerPointMSdTShadow18 = '\000\000\003`', PowerPointMSdTShadow19 = '\000\000\003`', PowerPointMSdTShadow20 = '\000\000\003`' } PowerPointMSdT; typedef enum { PowerPointMPXFWordartFormatUnset = '\003\361\377\376', PowerPointMPXFWordartFormat1 = '\000\000\003\362', PowerPointMPXFWordartFormat2 = '\000\000\003\362', PowerPointMPXFWordartFormat3 = '\000\000\003\362', PowerPointMPXFWordartFormat4 = '\000\000\003\362', PowerPointMPXFWordartFormat5 = '\000\000\003\362', PowerPointMPXFWordartFormat6 = '\000\000\003\362', PowerPointMPXFWordartFormat7 = '\000\000\003\362', PowerPointMPXFWordartFormat8 = '\000\000\003\362', PowerPointMPXFWordartFormat9 = '\000\000\003\362', PowerPointMPXFWordartFormat10 = '\000\000\003\362', PowerPointMPXFWordartFormat11 = '\000\000\003\362', PowerPointMPXFWordartFormat12 = '\000\000\003\362', PowerPointMPXFWordartFormat13 = '\000\000\003\362', PowerPointMPXFWordartFormat14 = '\000\000\003\362', PowerPointMPXFWordartFormat15 = '\000\000\003\362', PowerPointMPXFWordartFormat16 = '\000\000\003\362', PowerPointMPXFWordartFormat17 = '\000\000\003\362', PowerPointMPXFWordartFormat18 = '\000\000\003\362', PowerPointMPXFWordartFormat19 = '\000\000\003\362', PowerPointMPXFWordartFormat20 = '\000\000\003\362', PowerPointMPXFWordartFormat21 = '\000\000\003\362', PowerPointMPXFWordartFormat22 = '\000\000\003\362', PowerPointMPXFWordartFormat23 = '\000\000\003\362', PowerPointMPXFWordartFormat24 = '\000\000\003\362', PowerPointMPXFWordartFormat25 = '\000\000\003\362', PowerPointMPXFWordartFormat26 = '\000\000\003\362', PowerPointMPXFWordartFormat27 = '\000\000\003\362', PowerPointMPXFWordartFormat28 = '\000\000\003\362', PowerPointMPXFWordartFormat29 = '\000\000\003\362', PowerPointMPXFWordartFormat30 = '\000\000\003\362' } PowerPointMPXF; typedef enum { PowerPointMPTsTextEffectShapeUnset = '\000\000\000\000', PowerPointMPTsPlainText = '\001\000\000\000', PowerPointMPTsStop = '\000\000\000\000', PowerPointMPTsTriangleUp = '\001\000\000\000', PowerPointMPTsTriangleDown = '\000\000\000\000', PowerPointMPTsChevronUp = '\001\000\000\000', PowerPointMPTsChevronDown = '\000\000\000\000', PowerPointMPTsRingInside = '\001\000\000\000', PowerPointMPTsRingOutside = '\000\000\000\000', PowerPointMPTsArchUpCurve = '\001\000\000\000', PowerPointMPTsArchDownCurve = '\000\000\000\000', PowerPointMPTsCircleCurve = '\001\000\000\000', PowerPointMPTsButtonCurve = '\000\000\000\000', PowerPointMPTsArchUpPour = '\001\000\000\000', PowerPointMPTsArchDownPour = '\000\000\000\000', PowerPointMPTsCirclePour = '\001\000\000\000', PowerPointMPTsButtonPour = '\000\000\000\000', PowerPointMPTsCurveUp = '\001\000\000\000', PowerPointMPTsCurveDown = '\000\000\000\000', PowerPointMPTsCanUp = '\001\000\000\000', PowerPointMPTsCanDown = '\000\000\000\000', PowerPointMPTsWave1 = '\001\000\000\000', PowerPointMPTsWave2 = '\000\000\000\000', PowerPointMPTsDoubleWave1 = '\001\000\000\000', PowerPointMPTsDoubleWave2 = '\000\000\000\000', PowerPointMPTsInflate = '\001\000\000\000', PowerPointMPTsDeflate = '\000\000\000\000', PowerPointMPTsInflateBottom = '\001\000\000\000', PowerPointMPTsDeflateBottom = '\000\000\000\000', PowerPointMPTsInflateTop = '\001\000\000\000', PowerPointMPTsDeflateTop = '\000\000\000\000', PowerPointMPTsDeflateInflate = '\001\000\000\000', PowerPointMPTsDeflateInflateDeflate = '\000\000\000\000', PowerPointMPTsFadeRight = '\001\000\000\000', PowerPointMPTsFadeLeft = '\000\000\000\000', PowerPointMPTsFadeUp = '\001\000\000\000', PowerPointMPTsFadeDown = '\000\000\000\000', PowerPointMPTsSlantUp = '\001\000\000\000', PowerPointMPTsSlantDown = '\000\000\000\000', PowerPointMPTsCascadeUp = '\001\000\000\000', PowerPointMPTsCascadeDown = '\000\000\000\000' } PowerPointMPTs; typedef enum { PowerPointMTxATextEffectAlignmentUnset = '\000\000\000\000', PowerPointMTxALeftTextEffectAlignment = '\001\000\000\000', PowerPointMTxACenteredTextEffectAlignment = '\000\000\000\000', PowerPointMTxARightTextEffectAlignment = '\001\000\000\000', PowerPointMTxAJustifyTextEffectAlignment = '\000\000\000\000', PowerPointMTxAWordJustifyTextEffectAlignment = '\001\000\000\000', PowerPointMTxAStretchJustifyTextEffectAlignment = '\000\000\000\000' } PowerPointMTxA; typedef enum { PowerPointMPLdPresetLightingDirectionUnset = '\000\000\000\000', PowerPointMPLdLightFromTopLeft = '\001\000\000\000', PowerPointMPLdLightFromTop = '\000\000\000\000', PowerPointMPLdLightFromTopRight = '\001\000\000\000', PowerPointMPLdLightFromLeft = '\000\000\000\000', PowerPointMPLdLightFromNone = '\001\000\000\000', PowerPointMPLdLightFromRight = '\000\000\000\000', PowerPointMPLdLightFromBottomLeft = '\001\000\000\000', PowerPointMPLdLightFromBottom = '\000\000\000\000', PowerPointMPLdLightFromBottomRight = '\001\000\000\000' } PowerPointMPLd; typedef enum { PowerPointMlSfLightingSoftnessUnset = '\001\000\000\000', PowerPointMlSfLightingDim = '\000\000\000\000', PowerPointMlSfLightingNormal = '\001\000\000\000', PowerPointMlSfLightingBright = '\000\000\000\000' } PowerPointMlSf; typedef enum { PowerPointMPMtPresetMaterialUnset = '\000\000\000\000', PowerPointMPMtMatte = '\001\000\000\000', PowerPointMPMtPlastic = '\000\000\000\000', PowerPointMPMtMetal = '\001\000\000\000', PowerPointMPMtWireframe = '\000\000\000\000', PowerPointMPMtMatte2 = '\001\000\000\000', PowerPointMPMtPlastic2 = '\000\000\000\000', PowerPointMPMtMetal2 = '\001\000\000\000', PowerPointMPMtWarmMatte = '\000\000\000\000', PowerPointMPMtTranslucentPowder = '\001\000\000\000', PowerPointMPMtPowder = '\000\000\000\000', PowerPointMPMtDarkEdge = '\001\000\000\000', PowerPointMPMtSoftEdge = '\000\000\000\000', PowerPointMPMtMaterialClear = '\001\000\000\000', PowerPointMPMtFlat = '\000\000\000\000', PowerPointMPMtSoftMetal = '\001\000\000\000' } PowerPointMPMt; typedef enum { PowerPointMExDPresetExtrusionDirectionUnset = '\001\000\000\000', PowerPointMExDExtrudeBottomRight = '\000\000\000\000', PowerPointMExDExtrudeBottom = '\001\000\000\000', PowerPointMExDExtrudeBottomLeft = '\000\000\000\000', PowerPointMExDExtrudeRight = '\001\000\000\000', PowerPointMExDExtrudeNone = '\000\000\000\000', PowerPointMExDExtrudeLeft = '\001\000\000\000', PowerPointMExDExtrudeTopRight = '\000\000\000\000', PowerPointMExDExtrudeTop = '\001\000\000\000', PowerPointMExDExtrudeTopLeft = '\000\000\000\000' } PowerPointMExD; typedef enum { PowerPointM3DFPresetThreeDFormatUnset = '\000\000\000\000', PowerPointM3DFFormat1 = '\001\000\000\000', PowerPointM3DFFormat2 = '\000\000\000\000', PowerPointM3DFFormat3 = '\001\000\000\000', PowerPointM3DFFormat4 = '\000\000\000\000', PowerPointM3DFFormat5 = '\001\000\000\000', PowerPointM3DFFormat6 = '\000\000\000\000', PowerPointM3DFFormat7 = '\001\000\000\000', PowerPointM3DFFormat8 = '\000\000\000\000', PowerPointM3DFFormat9 = '\001\000\000\000', PowerPointM3DFFormat10 = '\000\000\000\000', PowerPointM3DFFormat11 = '\001\000\000\000', PowerPointM3DFFormat12 = '\000\000\000\000', PowerPointM3DFFormat13 = '\001\000\000\000', PowerPointM3DFFormat14 = '\000\000\000\000', PowerPointM3DFFormat15 = '\001\000\000\000', PowerPointM3DFFormat16 = '\000\000\000\000', PowerPointM3DFFormat17 = '\001\000\000\000', PowerPointM3DFFormat18 = '\000\000\000\000', PowerPointM3DFFormat19 = '\001\000\000\000', PowerPointM3DFFormat20 = '\000\000\000\000' } PowerPointM3DF; typedef enum { PowerPointMExCExtrusionColorUnset = '\000\000\000\000', PowerPointMExCExtrusionColorAutomatic = '\001\000\000\000', PowerPointMExCExtrusionColorCustom = '\000\000\000\000' } PowerPointMExC; typedef enum { PowerPointMCtTConnectorTypeUnset = '\000\000\000\000', PowerPointMCtTStraight = '\001\000\000\000', PowerPointMCtTElbow = '\000\000\000\000', PowerPointMCtTCurve = '\001\000\000\000' } PowerPointMCtT; typedef enum { PowerPointMHzAHorizontalAnchorUnset = '\001\000\000\000', PowerPointMHzAHorizontalAnchorNone = '\000\000\000\000', PowerPointMHzAHorizontalAnchorCenter = '\001\000\000\000' } PowerPointMHzA; typedef enum { PowerPointMVtAVerticalAnchorUnset = '\001\000\000\000', PowerPointMVtAAnchorTop = '\000\000\000\000', PowerPointMVtAAnchorTopBaseline = '\001\000\000\000', PowerPointMVtAAnchorMiddle = '\000\000\000\000', PowerPointMVtAAnchorBottom = '\001\000\000\000', PowerPointMVtAAnchorBottomBaseline = '\000\000\000\000' } PowerPointMVtA; typedef enum { PowerPointMAsTAutoshapeShapeTypeUnset = '\000\000\000\000', PowerPointMAsTAutoshapeRectangle = '\001\000\000\000', PowerPointMAsTAutoshapeParallelogram = '\000\000\000\000', PowerPointMAsTAutoshapeTrapezoid = '\001\000\000\000', PowerPointMAsTAutoshapeDiamond = '\000\000\000\000', PowerPointMAsTAutoshapeRoundedRectangle = '\001\000\000\000', PowerPointMAsTAutoshapeOctagon = '\000\000\000\000', PowerPointMAsTAutoshapeIsoscelesTriangle = '\001\000\000\000', PowerPointMAsTAutoshapeRightTriangle = '\000\000\000\000', PowerPointMAsTAutoshapeOval = '\001\000\000\000', PowerPointMAsTAutoshapeHexagon = '\000\000\000\000', PowerPointMAsTAutoshapeCross = '\001\000\000\000', PowerPointMAsTAutoshapeRegularPentagon = '\000\000\000\000', PowerPointMAsTAutoshapeCan = '\001\000\000\000', PowerPointMAsTAutoshapeCube = '\000\000\000\000', PowerPointMAsTAutoshapeBevel = '\001\000\000\000', PowerPointMAsTAutoshapeFoldedCorner = '\000\000\000\000', PowerPointMAsTAutoshapeSmileyFace = '\001\000\000\000', PowerPointMAsTAutoshapeDonut = '\000\000\000\000', PowerPointMAsTAutoshapeNoSymbol = '\001\000\000\000', PowerPointMAsTAutoshapeBlockArc = '\000\000\000\000', PowerPointMAsTAutoshapeHeart = '\001\000\000\000', PowerPointMAsTAutoshapeLightningBolt = '\000\000\000\000', PowerPointMAsTAutoshapeSun = '\001\000\000\000', PowerPointMAsTAutoshapeMoon = '\000\000\000\000', PowerPointMAsTAutoshapeArc = '\001\000\000\000', PowerPointMAsTAutoshapeDoubleBracket = '\000\000\000\000', PowerPointMAsTAutoshapeDoubleBrace = '\001\000\000\000', PowerPointMAsTAutoshapePlaque = '\000\000\000\000', PowerPointMAsTAutoshapeLeftBracket = '\001\000\000\000', PowerPointMAsTAutoshapeRightBracket = '\000\000\000\000', PowerPointMAsTAutoshapeLeftBrace = '\001\000\000\000', PowerPointMAsTAutoshapeRightBrace = '\000\000\000\000', PowerPointMAsTAutoshapeRightArrow = '\001\000\000\000', PowerPointMAsTAutoshapeLeftArrow = '\000\000\000\000', PowerPointMAsTAutoshapeUpArrow = '\001\000\000\000', PowerPointMAsTAutoshapeDownArrow = '\000\000\000\000', PowerPointMAsTAutoshapeLeftRightArrow = '\001\000\000\000', PowerPointMAsTAutoshapeUpDownArrow = '\000\000\000\000', PowerPointMAsTAutoshapeQuadArrow = '\001\000\000\000', PowerPointMAsTAutoshapeLeftRightUpArrow = '\000\000\000\000', PowerPointMAsTAutoshapeBentArrow = '\001\000\000\000', PowerPointMAsTAutoshapeUTurnArrow = '\000\000\000\000', PowerPointMAsTAutoshapeLeftUpArrow = '\001\000\000\000', PowerPointMAsTAutoshapeBentUpArrow = '\000\000\000\000', PowerPointMAsTAutoshapeCurvedRightArrow = '\001\000\000\000', PowerPointMAsTAutoshapeCurvedLeftArrow = '\000\000\000\000', PowerPointMAsTAutoshapeCurvedUpArrow = '\001\000\000\000', PowerPointMAsTAutoshapeCurvedDownArrow = '\000\000\000\000', PowerPointMAsTAutoshapeStripedRightArrow = '\001\000\000\000', PowerPointMAsTAutoshapeNotchedRightArrow = '\000\000\000\000', PowerPointMAsTAutoshapePentagon = '\001\000\000\000', PowerPointMAsTAutoshapeChevron = '\000\000\000\000', PowerPointMAsTAutoshapeRightArrowCallout = '\001\000\000\000', PowerPointMAsTAutoshapeLeftArrowCallout = '\000\000\000\000', PowerPointMAsTAutoshapeUpArrowCallout = '\001\000\000\000', PowerPointMAsTAutoshapeDownArrowCallout = '\000\000\000\000', PowerPointMAsTAutoshapeLeftRightArrowCallout = '\001\000\000\000', PowerPointMAsTAutoshapeUpDownArrowCallout = '\000\000\000\000', PowerPointMAsTAutoshapeQuadArrowCallout = '\001\000\000\000', PowerPointMAsTAutoshapeCircularArrow = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartProcess = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartAlternateProcess = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartDecision = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartData = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartPredefinedProcess = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartInternalStorage = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartDocument = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartMultiDocument = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartTerminator = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartPreparation = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartManualInput = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartManualOperation = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartConnector = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartOffpageConnector = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartCard = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartPunchedTape = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartSummingJunction = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartOr = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartCollate = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartSort = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartExtract = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartMerge = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartStoredData = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartDelay = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartSequentialAccessStorage = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartMagneticDisk = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartDirectAccessStorage = '\001\000\000\000', PowerPointMAsTAutoshapeFlowchartDisplay = '\000\000\000\000', PowerPointMAsTAutoshapeExplosionOne = '\001\000\000\000', PowerPointMAsTAutoshapeExplosionTwo = '\000\000\000\000', PowerPointMAsTAutoshapeFourPointStar = '\001\000\000\000', PowerPointMAsTAutoshapeFivePointStar = '\000\000\000\000', PowerPointMAsTAutoshapeEightPointStar = '\001\000\000\000', PowerPointMAsTAutoshapeSixteenPointStar = '\000\000\000\000', PowerPointMAsTAutoshapeTwentyFourPointStar = '\001\000\000\000', PowerPointMAsTAutoshapeThirtyTwoPointStar = '\000\000\000\000', PowerPointMAsTAutoshapeUpRibbon = '\001\000\000\000', PowerPointMAsTAutoshapeDownRibbon = '\000\000\000\000', PowerPointMAsTAutoshapeCurvedUpRibbon = '\001\000\000\000', PowerPointMAsTAutoshapeCurvedDownRibbon = '\000\000\000\000', PowerPointMAsTAutoshapeVerticalScroll = '\001\000\000\000', PowerPointMAsTAutoshapeHorizontalScroll = '\000\000\000\000', PowerPointMAsTAutoshapeWave = '\001\000\000\000', PowerPointMAsTAutoshapeDoubleWave = '\000\000\000\000', PowerPointMAsTAutoshapeRectangularCallout = '\001\000\000\000', PowerPointMAsTAutoshapeRoundedRectangularCallout = '\000\000\000\000', PowerPointMAsTAutoshapeOvalCallout = '\001\000\000\000', PowerPointMAsTAutoshapeCloudCallout = '\000\000\000\000', PowerPointMAsTAutoshapeLineCalloutOne = '\001\000\000\000', PowerPointMAsTAutoshapeLineCalloutTwo = '\000\000\000\000', PowerPointMAsTAutoshapeLineCalloutThree = '\001\000\000\000', PowerPointMAsTAutoshapeLineCalloutFour = '\000\000\000\000', PowerPointMAsTAutoshapeLineCalloutOneAccentBar = '\001\000\000\000', PowerPointMAsTAutoshapeLineCalloutTwoAccentBar = '\000\000\000\000', PowerPointMAsTAutoshapeLineCalloutThreeAccentBar = '\001\000\000\000', PowerPointMAsTAutoshapeLineCalloutFourAccentBar = '\000\000\000\000', PowerPointMAsTAutoshapeLineCalloutOneNoBorder = '\001\000\000\000', PowerPointMAsTAutoshapeLineCalloutTwoNoBorder = '\000\000\000\000', PowerPointMAsTAutoshapeLineCalloutThreeNoBorder = '\001\000\000\000', PowerPointMAsTAutoshapeLineCalloutFourNoBorder = '\000\000\000\000', PowerPointMAsTAutoshapeCalloutOneBorderAndAccentBar = '\001\000\000\000', PowerPointMAsTAutoshapeCalloutTwoBorderAndAccentBar = '\000\000\000\000', PowerPointMAsTAutoshapeCalloutThreeBorderAndAccentBar = '\001\000\000\000', PowerPointMAsTAutoshapeCalloutFourBorderAndAccentBar = '\000\000\000\000', PowerPointMAsTAutoshapeActionButtonCustom = '\001\000\000\000', PowerPointMAsTAutoshapeActionButtonHome = '\000\000\000\000', PowerPointMAsTAutoshapeActionButtonHelp = '\001\000\000\000', PowerPointMAsTAutoshapeActionButtonInformation = '\000\000\000\000', PowerPointMAsTAutoshapeActionButtonBackOrPrevious = '\001\000\000\000', PowerPointMAsTAutoshapeActionButtonForwardOrNext = '\000\000\000\000', PowerPointMAsTAutoshapeActionButtonBeginning = '\001\000\000\000', PowerPointMAsTAutoshapeActionButtonEnd = '\000\000\000\000', PowerPointMAsTAutoshapeActionButtonReturn = '\001\000\000\000', PowerPointMAsTAutoshapeActionButtonDocument = '\000\000\000\000', PowerPointMAsTAutoshapeActionButtonSound = '\001\000\000\000', PowerPointMAsTAutoshapeActionButtonMovie = '\000\000\000\000', PowerPointMAsTAutoshapeBalloon = '\001\000\000\000', PowerPointMAsTAutoshapeNotPrimitive = '\000\000\000\000', PowerPointMAsTAutoshapeFlowchartOfflineStorage = '\001\000\000\000', PowerPointMAsTAutoshapeLeftRightRibbon = '\000\000\000\000', PowerPointMAsTAutoshapeDiagonalStripe = '\001\000\000\000', PowerPointMAsTAutoshapePie = '\000\000\000\000', PowerPointMAsTAutoshapeNonIsoscelesTrapezoid = '\001\000\000\000', PowerPointMAsTAutoshapeDecagon = '\000\000\000\000', PowerPointMAsTAutoshapeHeptagon = '\001\000\000\000', PowerPointMAsTAutoshapeDodecagon = '\000\000\000\000', PowerPointMAsTAutoshapeSixPointsStar = '\001\000\000\000', PowerPointMAsTAutoshapeSevenPointsStar = '\000\000\000\000', PowerPointMAsTAutoshapeTenPointsStar = '\001\000\000\000', PowerPointMAsTAutoshapeTwelvePointsStar = '\000\000\000\000', PowerPointMAsTAutoshapeRoundOneRectangle = '\001\000\000\000', PowerPointMAsTAutoshapeRoundTwoSameRectangle = '\000\000\000\000', PowerPointMAsTAutoshapeRoundTwoDiagonalRectangle = '\001\000\000\000', PowerPointMAsTAutoshapeSnipRoundRectangle = '\000\000\000\000', PowerPointMAsTAutoshapeSnipOneRectangle = '\001\000\000\000', PowerPointMAsTAutoshapeSnipTwoSameRectangle = '\000\000\000\000', PowerPointMAsTAutoshapeSnipTwoDiagonalRectangle = '\001\000\000\000', PowerPointMAsTAutoshapeFrame = '\000\000\000\000', PowerPointMAsTAutoshapeHalfFrame = '\001\000\000\000', PowerPointMAsTAutoshapeTear = '\000\000\000\000', PowerPointMAsTAutoshapeChord = '\001\000\000\000', PowerPointMAsTAutoshapeCorner = '\000\000\000\000', PowerPointMAsTAutoshapeMathPlus = '\001\000\000\000', PowerPointMAsTAutoshapeMathMinus = '\000\000\000\000', PowerPointMAsTAutoshapeMathMultiply = '\001\000\000\000', PowerPointMAsTAutoshapeMathDivide = '\000\000\000\000', PowerPointMAsTAutoshapeMathEqual = '\001\000\000\000', PowerPointMAsTAutoshapeMathNotEqual = '\000\000\000\000', PowerPointMAsTAutoshapeCornerTabs = '\001\000\000\000', PowerPointMAsTAutoshapeSquareTabs = '\000\000\000\000', PowerPointMAsTAutoshapePlaqueTabs = '\001\000\000\000', PowerPointMAsTAutoshapeGearSix = '\000\000\000\000', PowerPointMAsTAutoshapeGearNine = '\001\000\000\000', PowerPointMAsTAutoshapeFunnel = '\000\000\000\000', PowerPointMAsTAutoshapePieWedge = '\001\000\000\000', PowerPointMAsTAutoshapeLeftCircularArrow = '\000\000\000\000', PowerPointMAsTAutoshapeLeftRightCircularArrow = '\001\000\000\000', PowerPointMAsTAutoshapeSwooshArrow = '\000\000\000\000', PowerPointMAsTAutoshapeCloud = '\001\000\000\000', PowerPointMAsTAutoshapeChartX = '\000\000\000\000', PowerPointMAsTAutoshapeChartStar = '\001\000\000\000', PowerPointMAsTAutoshapeChartPlus = '\000\000\000\000', PowerPointMAsTAutoshapeLineInverse = '\001\000\000\000' } PowerPointMAsT; typedef enum { PowerPointMShpShapeTypeUnset = '\001\000\000\000', PowerPointMShpShapeTypeAuto = '\000\000\000\000', PowerPointMShpShapeTypeCallout = '\001\000\000\000', PowerPointMShpShapeTypeChart = '\000\000\000\000', PowerPointMShpShapeTypeComment = '\001\000\000\000', PowerPointMShpShapeTypeFreeForm = '\000\000\000\000', PowerPointMShpShapeTypeGroup = '\001\000\000\000', PowerPointMShpShapeTypeEmbeddedOLEControl = '\000\000\000\000', PowerPointMShpShapeTypeFormControl = '\001\000\000\000', PowerPointMShpShapeTypeLine = '\000\000\000\000', PowerPointMShpShapeTypeLinkedOLEObject = '\001\000\000\000', PowerPointMShpShapeTypeLinkedPicture = '\000\000\000\000', PowerPointMShpShapeTypeOLEControl = '\001\000\000\000', PowerPointMShpShapeTypePicture = '\000\000\000\000', PowerPointMShpShapeTypePlaceHolder = '\001\000\000\000', PowerPointMShpShapeTypeWordArt = '\000\000\000\000', PowerPointMShpShapeTypeMedia = '\001\000\000\000', PowerPointMShpShapeTypeTextBox = '\000\000\000\000', PowerPointMShpShapeTypeTable = '\001\000\000\000', PowerPointMShpShapeTypeSmartartGraphic = '\000\000\000\000' } PowerPointMShp; typedef enum { PowerPointMCrTColorTypeUnset = '\000\000\000\000', PowerPointMCrTRGB = '\001\000\000\000', PowerPointMCrTScheme = '\000\000\000\000' } PowerPointMCrT; typedef enum { PowerPointMPcPictureColorTypeUnset = '\000\000\000\000', PowerPointMPcPictureColorAutomatic = '\001\000\000\000', PowerPointMPcPictureColorGrayScale = '\000\000\000\000', PowerPointMPcPictureColorBlackAndWhite = '\001\000\000\000', PowerPointMPcPictureColorWatermark = '\000\000\000\000' } PowerPointMPc; typedef enum { PowerPointMCAtAngleUnset = '\000\000\000\000', PowerPointMCAtAngleAutomatic = '\001\000\000\000', PowerPointMCAtAngle30 = '\000\000\000\000', PowerPointMCAtAngle45 = '\001\000\000\000', PowerPointMCAtAngle60 = '\000\000\000\000', PowerPointMCAtAngle90 = '\001\000\000\000' } PowerPointMCAt; typedef enum { PowerPointMCDtDropUnset = '\001\000\000\000', PowerPointMCDtDropCustom = '\000\000\000\000', PowerPointMCDtDropTop = '\001\000\000\000', PowerPointMCDtDropCenter = '\000\000\000\000', PowerPointMCDtDropBottom = '\001\000\000\000' } PowerPointMCDt; typedef enum { PowerPointMCotCalloutUnset = '\001\000\000\000', PowerPointMCotCalloutOne = '\000\000\000\000', PowerPointMCotCalloutTwo = '\001\000\000\000', PowerPointMCotCalloutThree = '\000\000\000\000', PowerPointMCotCalloutFour = '\001\000\000\000' } PowerPointMCot; typedef enum { PowerPointTxOrTextOrientationUnset = '\001\000\000\000', PowerPointTxOrHorizontal = '\000\000\000\000', PowerPointTxOrUpward = '\001\000\000\000', PowerPointTxOrDownward = '\000\000\000\000', PowerPointTxOrVerticalEastAsian = '\001\000\000\000', PowerPointTxOrVertical = '\000\000\000\000', PowerPointTxOrHorizontalRotatedEastAsian = '\001\000\000\000' } PowerPointTxOr; typedef enum { PowerPointMSFrScaleFromTopLeft = '\001\000\000\000', PowerPointMSFrScaleFromMiddle = '\000\000\000\000', PowerPointMSFrScaleFromBottomRight = '\001\000\000\000' } PowerPointMSFr; typedef enum { PowerPointMPzCPresetCameraUnset = '\001\000\000\000', PowerPointMPzCCameraLegacyObliqueFromTopLeft = '\000\000\000\000', PowerPointMPzCCameraLegacyObliqueFromTop = '\001\000\000\000', PowerPointMPzCCameraLegacyObliqueFromTopright = '\000\000\000\000', PowerPointMPzCCameraLegacyObliqueFromLeft = '\001\000\000\000', PowerPointMPzCCameraLegacyObliqueFromFront = '\000\000\000\000', PowerPointMPzCCameraLegacyObliqueFromRight = '\001\000\000\000', PowerPointMPzCCameraLegacyObliqueFromBottomLeft = '\000\000\000\000', PowerPointMPzCCameraLegacyObliqueFromBottom = '\001\000\000\000', PowerPointMPzCCameraLegacyObliqueFromBottomRight = '\000\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromTopLeft = '\001\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromTop = '\000\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromTopRight = '\001\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromLeft = '\000\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromFront = '\001\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromRight = '\000\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromBottomLeft = '\001\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromBottom = '\000\000\000\000', PowerPointMPzCCameraLegacyPerspectiveFromBottomRight = '\001\000\000\000', PowerPointMPzCCameraOrthographic = '\000\000\000\000', PowerPointMPzCCameraIsometricFromTopUp = '\001\000\000\000', PowerPointMPzCCameraIsometricFromTopDown = '\000\000\000\000', PowerPointMPzCCameraIsometricFromBottomUp = '\001\000\000\000', PowerPointMPzCCameraIsometricFromBottomDown = '\000\000\000\000', PowerPointMPzCCameraIsometricFromLeftUp = '\001\000\000\000', PowerPointMPzCCameraIsometricFromLeftDown = '\000\000\000\000', PowerPointMPzCCameraIsometricFromRightUp = '\001\000\000\000', PowerPointMPzCCameraIsometricFromRightDown = '\000\000\000\000', PowerPointMPzCCameraIsometricOffAxis1FromLeft = '\001\000\000\000', PowerPointMPzCCameraIsometricOffAxis1FromRight = '\000\000\000\000', PowerPointMPzCCameraIsometricOffAxis1FromTop = '\001\000\000\000', PowerPointMPzCCameraIsometricOffAxis2FromLeft = '\000\000\000\000', PowerPointMPzCCameraIsometricOffAxis2FromRight = '\001\000\000\000', PowerPointMPzCCameraIsometricOffAxis2FromTop = '\000\000\000\000', PowerPointMPzCCameraIsometricOffAxis3FromLeft = '\001\000\000\000', PowerPointMPzCCameraIsometricOffAxis3FromRight = '\000\000\000\000', PowerPointMPzCCameraIsometricOffAxis3FromBottom = '\001\000\000\000', PowerPointMPzCCameraIsometricOffAxis4FromLeft = '\000\000\000\000', PowerPointMPzCCameraIsometricOffAxis4FromRight = '\001\000\000\000', PowerPointMPzCCameraIsometricOffAxis4FromBottom = '\000\000\000\000', PowerPointMPzCCameraObliqueFromTopLeft = '\001\000\000\000', PowerPointMPzCCameraObliqueFromTop = '\000\000\000\000', PowerPointMPzCCameraObliqueFromTopRight = '\001\000\000\000', PowerPointMPzCCameraObliqueFromLeft = '\000\000\000\000', PowerPointMPzCCameraObliqueFromRight = '\001\000\000\000', PowerPointMPzCCameraObliqueFromBottomLeft = '\000\000\000\000', PowerPointMPzCCameraObliqueFromBottom = '\001\000\000\000', PowerPointMPzCCameraObliqueFromBottomRight = '\000\000\000\000', PowerPointMPzCCameraPerspectiveFromFront = '\001\000\000\000', PowerPointMPzCCameraPerspectiveFromLeft = '\000\000\000\000', PowerPointMPzCCameraPerspectiveFromRight = '\001\000\000\000', PowerPointMPzCCameraPerspectiveFromAbove = '\000\000\000\000', PowerPointMPzCCameraPerspectiveFromBelow = '\001\000\000\000', PowerPointMPzCCameraPerspectiveFromAboveFacingLeft = '\000\000\000\000', PowerPointMPzCCameraPerspectiveFromAboveFacingRight = '\001\000\000\000', PowerPointMPzCCameraPerspectiveContrastingFacingLeft = '\000\000\000\000', PowerPointMPzCCameraPerspectiveContrastingFacingRight = '\001\000\000\000', PowerPointMPzCCameraPerspectiveHeroicFacingLeft = '\000\000\000\000', PowerPointMPzCCameraPerspectiveHeroicFacingRight = '\001\000\000\000', PowerPointMPzCCameraPerspectiveHeroicExtremeFacingLeft = '\000\000\000\000', PowerPointMPzCCameraPerspectiveHeroicExtremeFacingRight = '\001\000\000\000', PowerPointMPzCCameraPerspectiveRelaxed = '\000\000\000\000', PowerPointMPzCCameraPerspectiveRelaxedModerately = '\001\000\000\000' } PowerPointMPzC; typedef enum { PowerPointMLtTLightRigUnset = '\001\000\000\000', PowerPointMLtTLightRigFlat1 = '\000\000\000\000', PowerPointMLtTLightRigFlat2 = '\001\000\000\000', PowerPointMLtTLightRigFlat3 = '\000\000\000\000', PowerPointMLtTLightRigFlat4 = '\001\000\000\000', PowerPointMLtTLightRigNormal1 = '\000\000\000\000', PowerPointMLtTLightRigNormal2 = '\001\000\000\000', PowerPointMLtTLightRigNormal3 = '\000\000\000\000', PowerPointMLtTLightRigNormal4 = '\001\000\000\000', PowerPointMLtTLightRigHarsh1 = '\000\000\000\000', PowerPointMLtTLightRigHarsh2 = '\001\000\000\000', PowerPointMLtTLightRigHarsh3 = '\000\000\000\000', PowerPointMLtTLightRigHarsh4 = '\001\000\000\000', PowerPointMLtTLightRigThreePoint = '\000\000\000\000', PowerPointMLtTLightRigBalanced = '\001\000\000\000', PowerPointMLtTLightRigSoft = '\000\000\000\000', PowerPointMLtTLightRigHarsh = '\001\000\000\000', PowerPointMLtTLightRigFlood = '\000\000\000\000', PowerPointMLtTLightRigContrasting = '\001\000\000\000', PowerPointMLtTLightRigMorning = '\000\000\000\000', PowerPointMLtTLightRigSunrise = '\001\000\000\000', PowerPointMLtTLightRigSunset = '\000\000\000\000', PowerPointMLtTLightRigChilly = '\001\000\000\000', PowerPointMLtTLightRigFreezing = '\000\000\000\000', PowerPointMLtTLightRigFlat = '\001\000\000\000', PowerPointMLtTLightRigTwoPoint = '\000\000\000\000', PowerPointMLtTLightRigGlow = '\001\000\000\000', PowerPointMLtTLightRigBrightRoom = '\000\000\000\000' } PowerPointMLtT; typedef enum { PowerPointMBlTBevelTypeUnset = '\000\000\000\000', PowerPointMBlTBevelNone = '\001\000\000\000', PowerPointMBlTBevelRelaxedInset = '\000\000\000\000', PowerPointMBlTBevelCircle = '\001\000\000\000', PowerPointMBlTBevelSlope = '\000\000\000\000', PowerPointMBlTBevelCross = '\001\000\000\000', PowerPointMBlTBevelAngle = '\000\000\000\000', PowerPointMBlTBevelSoftRound = '\001\000\000\000', PowerPointMBlTBevelConvex = '\000\000\000\000', PowerPointMBlTBevelCoolSlant = '\001\000\000\000', PowerPointMBlTBevelDivot = '\000\000\000\000', PowerPointMBlTBevelRiblet = '\001\000\000\000', PowerPointMBlTBevelHardEdge = '\000\000\000\000', PowerPointMBlTBevelArtDeco = '\001\000\000\000' } PowerPointMBlT; typedef enum { PowerPointMSStShadowStyleUnset = '\001\000\000\000', PowerPointMSStShadowStyleInner = '\000\000\000\000', PowerPointMSStShadowStyleOuter = '\001\000\000\000' } PowerPointMSSt; typedef enum { PowerPointPpgAParagraphAlignmentUnset = '\001\000\000\000', PowerPointPpgAParagraphAlignLeft = '\000\000\000\000', PowerPointPpgAParagraphAlignCenter = '\001\000\000\000', PowerPointPpgAParagraphAlignRight = '\000\000\000\000', PowerPointPpgAParagraphAlignJustify = '\001\000\000\000', PowerPointPpgAParagraphAlignDistribute = '\000\000\000\000', PowerPointPpgAParagraphAlignThai = '\001\000\000\000', PowerPointPpgAParagraphAlignJustifyLow = '\000\000\000\000' } PowerPointPpgA; typedef enum { PowerPointMTStStrikeUnset = '\000\000\000\000', PowerPointMTStNoStrike = '\001\000\000\000', PowerPointMTStSingleStrike = '\000\000\000\000', PowerPointMTStDoubleStrike = '\001\000\000\000' } PowerPointMTSt; typedef enum { PowerPointMTCaCapsUnset = '\001\000\000\000', PowerPointMTCaNoCaps = '\000\000\000\000', PowerPointMTCaSmallCaps = '\001\000\000\000', PowerPointMTCaAllCaps = '\000\000\000\000' } PowerPointMTCa; typedef enum { PowerPointMTUlUnderlineUnset = '\003\356\377\376', PowerPointMTUlNoUnderline = '\000\000\003\357', PowerPointMTUlUnderlineWordsOnly = '\000\000\003\357', PowerPointMTUlUnderlineSingleLine = '\000\000\003\357', PowerPointMTUlUnderlineDoubleLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyLine = '\000\000\003\357', PowerPointMTUlUnderlineDottedLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyDottedLine = '\000\000\003\357', PowerPointMTUlUnderlineDashLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyDashLine = '\000\000\003\357', PowerPointMTUlUnderlineLongDashLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyLongDashLine = '\000\000\003\357', PowerPointMTUlUnderlineDotDashLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyDotDashLine = '\000\000\003\357', PowerPointMTUlUnderlineDotDotDashLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyDotDotDashLine = '\000\000\003\357', PowerPointMTUlUnderlineWavyLine = '\000\000\003\357', PowerPointMTUlUnderlineHeavyWavyLine = '\000\000\003\357', PowerPointMTUlUnderlineWavyDoubleLine = '\000\000\003\357' } PowerPointMTUl; typedef enum { PowerPointMTTATabUnset = '\000\000\000\000', PowerPointMTTALeftTab = '\001\000\000\000', PowerPointMTTACenterTab = '\000\000\000\000', PowerPointMTTARightTab = '\001\000\000\000', PowerPointMTTADecimalTab = '\000\000\000\000' } PowerPointMTTA; typedef enum { PowerPointMTCWCharacterWrapUnset = '\000\000\000\000', PowerPointMTCWNoCharacterWrap = '\001\000\000\000', PowerPointMTCWStandardCharacterWrap = '\000\000\000\000', PowerPointMTCWStrictCharacterWrap = '\001\000\000\000', PowerPointMTCWCustomCharacterWrap = '\000\000\000\000' } PowerPointMTCW; typedef enum { PowerPointMTFAFontAlignmentUnset = '\000\000\000\000', PowerPointMTFAAutomaticAlignment = '\001\000\000\000', PowerPointMTFATopAlignment = '\000\000\000\000', PowerPointMTFACenterAlignment = '\001\000\000\000', PowerPointMTFABaselineAlignment = '\000\000\000\000', PowerPointMTFABottomAlignment = '\001\000\000\000' } PowerPointMTFA; typedef enum { PowerPointPAtSAutoSizeUnset = '\001\000\000\000', PowerPointPAtSAutoSizeNone = '\000\000\000\000', PowerPointPAtSShapeToFitText = '\001\000\000\000', PowerPointPAtSTextToFitShape = '\000\000\000\000' } PowerPointPAtS; typedef enum { PowerPointMPFoPathTypeUnset = '\000\000\000\000', PowerPointMPFoNoPathType = '\001\000\000\000', PowerPointMPFoPathType1 = '\000\000\000\000', PowerPointMPFoPathType2 = '\001\000\000\000', PowerPointMPFoPathType3 = '\000\000\000\000', PowerPointMPFoPathType4 = '\001\000\000\000' } PowerPointMPFo; typedef enum { PowerPointMWFoWarpFormatUnset = '\001\000\000\000', PowerPointMWFoWarpFormat1 = '\000\000\000\000', PowerPointMWFoWarpFormat2 = '\001\000\000\000', PowerPointMWFoWarpFormat3 = '\000\000\000\000', PowerPointMWFoWarpFormat4 = '\001\000\000\000', PowerPointMWFoWarpFormat5 = '\000\000\000\000', PowerPointMWFoWarpFormat6 = '\001\000\000\000', PowerPointMWFoWarpFormat7 = '\000\000\000\000', PowerPointMWFoWarpFormat8 = '\001\000\000\000', PowerPointMWFoWarpFormat9 = '\000\000\000\000', PowerPointMWFoWarpFormat10 = '\001\000\000\000', PowerPointMWFoWarpFormat11 = '\000\000\000\000', PowerPointMWFoWarpFormat12 = '\001\000\000\000', PowerPointMWFoWarpFormat13 = '\000\000\000\000', PowerPointMWFoWarpFormat14 = '\001\000\000\000', PowerPointMWFoWarpFormat15 = '\000\000\000\000', PowerPointMWFoWarpFormat16 = '\001\000\000\000', PowerPointMWFoWarpFormat17 = '\000\000\000\000', PowerPointMWFoWarpFormat18 = '\001\000\000\000', PowerPointMWFoWarpFormat19 = '\000\000\000\000', PowerPointMWFoWarpFormat20 = '\001\000\000\000', PowerPointMWFoWarpFormat21 = '\000\000\000\000', PowerPointMWFoWarpFormat22 = '\001\000\000\000', PowerPointMWFoWarpFormat23 = '\000\000\000\000', PowerPointMWFoWarpFormat24 = '\001\000\000\000', PowerPointMWFoWarpFormat25 = '\000\000\000\000', PowerPointMWFoWarpFormat26 = '\001\000\000\000', PowerPointMWFoWarpFormat27 = '\000\000\000\000', PowerPointMWFoWarpFormat28 = '\001\000\000\000', PowerPointMWFoWarpFormat29 = '\000\000\000\000', PowerPointMWFoWarpFormat30 = '\001\000\000\000', PowerPointMWFoWarpFormat31 = '\000\000\000\000', PowerPointMWFoWarpFormat32 = '\001\000\000\000', PowerPointMWFoWarpFormat33 = '\000\000\000\000', PowerPointMWFoWarpFormat34 = '\001\000\000\000', PowerPointMWFoWarpFormat35 = '\000\000\000\000', PowerPointMWFoWarpFormat36 = '\001\000\000\000' } PowerPointMWFo; typedef enum { PowerPointPCgCCaseSentence = '\001\000\000\000', PowerPointPCgCCaseLower = '\000\000\000\000', PowerPointPCgCCaseUpper = '\001\000\000\000', PowerPointPCgCCaseTitle = '\000\000\000\000', PowerPointPCgCCaseToggle = '\001\000\000\000' } PowerPointPCgC; typedef enum { PowerPointMDTFDateTimeFormatUnset = '\001\000\000\000', PowerPointMDTFDateTimeFormatMdyy = '\000\000\000\000', PowerPointMDTFDateTimeFormatDdddMMMMddyyyy = '\001\000\000\000', PowerPointMDTFDateTimeFormatDMMMMyyyy = '\000\000\000\000', PowerPointMDTFDateTimeFormatMMMMdyyyy = '\001\000\000\000', PowerPointMDTFDateTimeFormatDMMMyy = '\000\000\000\000', PowerPointMDTFDateTimeFormatMMMMyy = '\001\000\000\000', PowerPointMDTFDateTimeFormatMMyy = '\000\000\000\000', PowerPointMDTFDateTimeFormatMMddyyHmm = '\001\000\000\000', PowerPointMDTFDateTimeFormatMMddyyhmmAMPM = '\000\000\000\000', PowerPointMDTFDateTimeFormatHmm = '\001\000\000\000', PowerPointMDTFDateTimeFormatHmmss = '\000\000\000\000', PowerPointMDTFDateTimeFormatHmmAMPM = '\001\000\000\000', PowerPointMDTFDateTimeFormatHmmssAMPM = '\000\000\000\000', PowerPointMDTFDateTimeFormatFigureOut = '\001\000\000\000' } PowerPointMDTF; typedef enum { PowerPointMSETSoftEdgeUnset = '\001\000\000\000', PowerPointMSETNoSoftEdge = '\000\000\000\000', PowerPointMSETSoftEdgeType1 = '\001\000\000\000', PowerPointMSETSoftEdgeType2 = '\000\000\000\000', PowerPointMSETSoftEdgeType3 = '\001\000\000\000', PowerPointMSETSoftEdgeType4 = '\000\000\000\000', PowerPointMSETSoftEdgeType5 = '\001\000\000\000', PowerPointMSETSoftEdgeType6 = '\000\000\000\000' } PowerPointMSET; typedef enum { PowerPointMCSIFirstDarkSchemeColor = '\000\000\000\000', PowerPointMCSIFirstLightSchemeColor = '\001\000\000\000', PowerPointMCSISecondDarkSchemeColor = '\000\000\000\000', PowerPointMCSISecondLightSchemeColor = '\001\000\000\000', PowerPointMCSIFirstAccentSchemeColor = '\000\000\000\000', PowerPointMCSISecondAccentSchemeColor = '\001\000\000\000', PowerPointMCSIThirdAccentSchemeColor = '\000\000\000\000', PowerPointMCSIFourthAccentSchemeColor = '\001\000\000\000', PowerPointMCSIFifthAccentSchemeColor = '\000\000\000\000', PowerPointMCSISixthAccentSchemeColor = '\001\000\000\000', PowerPointMCSIHyperlinkSchemeColor = '\000\000\000\000', PowerPointMCSIFollowedHyperlinkSchemeColor = '\001\000\000\000' } PowerPointMCSI; typedef enum { PowerPointMCoIThemeColorUnset = '\001\000\000\000', PowerPointMCoINoThemeColor = '\000\000\000\000', PowerPointMCoIFirstDarkThemeColor = '\001\000\000\000', PowerPointMCoIFirstLightThemeColor = '\000\000\000\000', PowerPointMCoISecondDarkThemeColor = '\001\000\000\000', PowerPointMCoISecondLightThemeColor = '\000\000\000\000', PowerPointMCoIFirstAccentThemeColor = '\001\000\000\000', PowerPointMCoISecondAccentThemeColor = '\000\000\000\000', PowerPointMCoIThirdAccentThemeColor = '\001\000\000\000', PowerPointMCoIFourthAccentThemeColor = '\000\000\000\000', PowerPointMCoIFifthAccentThemeColor = '\001\000\000\000', PowerPointMCoISixthAccentThemeColor = '\000\000\000\000', PowerPointMCoIHyperlinkThemeColor = '\001\000\000\000', PowerPointMCoIFollowedHyperlinkThemeColor = '\000\000\000\000', PowerPointMCoIFirstTextThemeColor = '\001\000\000\000', PowerPointMCoIFirstBackgroundThemeColor = '\000\000\000\000', PowerPointMCoISecondTextThemeColor = '\001\000\000\000', PowerPointMCoISecondBackgroundThemeColor = '\000\000\000\000' } PowerPointMCoI; typedef enum { PowerPointMFLIThemeFontLatin = '\000\000\000\000', PowerPointMFLIThemeFontComplexScript = '\001\000\000\000', PowerPointMFLIThemeFontHighAnsi = '\000\000\000\000', PowerPointMFLIThemeFontEastAsian = '\001\000\000\000' } PowerPointMFLI; typedef enum { PowerPointMSSIShapeStyleUnset = '\001\000\000\000', PowerPointMSSIShapeNotAPreset = '\000\000\000\000', PowerPointMSSIShapePreset1 = '\001\000\000\000', PowerPointMSSIShapePreset2 = '\000\000\000\000', PowerPointMSSIShapePreset3 = '\001\000\000\000', PowerPointMSSIShapePreset4 = '\000\000\000\000', PowerPointMSSIShapePreset5 = '\001\000\000\000', PowerPointMSSIShapePreset6 = '\000\000\000\000', PowerPointMSSIShapePreset7 = '\001\000\000\000', PowerPointMSSIShapePreset8 = '\000\000\000\000', PowerPointMSSIShapePreset9 = '\001\000\000\000', PowerPointMSSIShapePreset10 = '\000\000\000\000', PowerPointMSSIShapePreset11 = '\001\000\000\000', PowerPointMSSIShapePreset12 = '\000\000\000\000', PowerPointMSSIShapePreset13 = '\001\000\000\000', PowerPointMSSIShapePreset14 = '\000\000\000\000', PowerPointMSSIShapePreset15 = '\001\000\000\000', PowerPointMSSIShapePreset16 = '\000\000\000\000', PowerPointMSSIShapePreset17 = '\001\000\000\000', PowerPointMSSIShapePreset18 = '\000\000\000\000', PowerPointMSSIShapePreset19 = '\001\000\000\000', PowerPointMSSIShapePreset20 = '\000\000\000\000', PowerPointMSSIShapePreset21 = '\001\000\000\000', PowerPointMSSIShapePreset22 = '\000\000\000\000', PowerPointMSSIShapePreset23 = '\001\000\000\000', PowerPointMSSIShapePreset24 = '\000\000\000\000', PowerPointMSSIShapePreset25 = '\001\000\000\000', PowerPointMSSIShapePreset26 = '\000\000\000\000', PowerPointMSSIShapePreset27 = '\001\000\000\000', PowerPointMSSIShapePreset28 = '\000\000\000\000', PowerPointMSSIShapePreset29 = '\001\000\000\000', PowerPointMSSIShapePreset30 = '\000\000\000\000', PowerPointMSSIShapePreset31 = '\001\000\000\000', PowerPointMSSIShapePreset32 = '\000\000\000\000', PowerPointMSSIShapePreset33 = '\001\000\000\000', PowerPointMSSIShapePreset34 = '\000\000\000\000', PowerPointMSSIShapePreset35 = '\001\000\000\000', PowerPointMSSIShapePreset36 = '\000\000\000\000', PowerPointMSSIShapePreset37 = '\001\000\000\000', PowerPointMSSIShapePreset38 = '\000\000\000\000', PowerPointMSSIShapePreset39 = '\001\000\000\000', PowerPointMSSIShapePreset40 = '\000\000\000\000', PowerPointMSSIShapePreset41 = '\001\000\000\000', PowerPointMSSIShapePreset42 = '\000\000\000\000', PowerPointMSSILinePreset1 = '\001\000\000\000', PowerPointMSSILinePreset2 = '\000\000\000\000', PowerPointMSSILinePreset3 = '\001\000\000\000', PowerPointMSSILinePreset4 = '\000\000\000\000', PowerPointMSSILinePreset5 = '\001\000\000\000', PowerPointMSSILinePreset6 = '\000\000\000\000', PowerPointMSSILinePreset7 = '\001\000\000\000', PowerPointMSSILinePreset8 = '\000\000\000\000', PowerPointMSSILinePreset9 = '\001\000\000\000', PowerPointMSSILinePreset10 = '\000\000\000\000', PowerPointMSSILinePreset11 = '\001\000\000\000', PowerPointMSSILinePreset12 = '\000\000\000\000', PowerPointMSSILinePreset13 = '\001\000\000\000', PowerPointMSSILinePreset14 = '\000\000\000\000', PowerPointMSSILinePreset15 = '\001\000\000\000', PowerPointMSSILinePreset16 = '\000\000\000\000', PowerPointMSSILinePreset17 = '\001\000\000\000', PowerPointMSSILinePreset18 = '\000\000\000\000', PowerPointMSSILinePreset19 = '\001\000\000\000', PowerPointMSSILinePreset20 = '\000\000\000\000', PowerPointMSSILinePreset21 = '\001\000\000\000' } PowerPointMSSI; typedef enum { PowerPointMBSIBackgroundUnset = '\001\000\000\000', PowerPointMBSIBackgroundNotAPreset = '\000\000\000\000', PowerPointMBSIBackgroundPreset1 = '\001\000\000\000', PowerPointMBSIBackgroundPreset2 = '\000\000\000\000', PowerPointMBSIBackgroundPreset3 = '\001\000\000\000', PowerPointMBSIBackgroundPreset4 = '\000\000\000\000', PowerPointMBSIBackgroundPreset5 = '\001\000\000\000', PowerPointMBSIBackgroundPreset6 = '\000\000\000\000', PowerPointMBSIBackgroundPreset7 = '\001\000\000\000', PowerPointMBSIBackgroundPreset8 = '\000\000\000\000', PowerPointMBSIBackgroundPreset9 = '\001\000\000\000', PowerPointMBSIBackgroundPreset10 = '\000\000\000\000', PowerPointMBSIBackgroundPreset11 = '\001\000\000\000', PowerPointMBSIBackgroundPreset12 = '\000\000\000\000' } PowerPointMBSI; typedef enum { PowerPointPDrTTextDirectionUnset = '\000\000\000\000', PowerPointPDrTLeftToRight = '\001\000\000\000', PowerPointPDrTRightToLeft = '\000\000\000\000' } PowerPointPDrT; typedef enum { PowerPointPBtTBulletTypeUnset = '\000\000\000\000', PowerPointPBtTBulletTypeNone = '\001\000\000\000', PowerPointPBtTBulletTypeUnnumbered = '\000\000\000\000', PowerPointPBtTBulletTypeNumbered = '\001\000\000\000', PowerPointPBtTPictureBulletType = '\000\000\000\000' } PowerPointPBtT; typedef enum { PowerPointPBtSNumberedBulletStyleUnset = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleAlphaLowercasePeriod = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleAlphaUppercasePeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleArabicRightParen = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleArabicPeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleRomanLowercaseParenBoth = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleRomanLowercaseParenRight = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleRomanLowercasePeriod = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleRomanUppercasePeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleAlphaLowercaseParenBoth = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleAlphaLowercaseParenRight = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleAlphaUppercaseParenBoth = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleAlphaUppercaseParenRight = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleArabicParenBoth = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleArabicPlain = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleRomanUppercaseParenBoth = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleRomanUppercaseParenRight = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleSimplifiedChinesePlain = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleSimplifiedChinesePeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleCircleNumberPlain = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleCircleNumberWhitePlain = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleCircleNumberBlackPlain = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleTraditionalChinesePlain = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleTraditionalChinesePeriod = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleArabicAlphaDash = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleArabicAbjadDash = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleHebrewAlphaDash = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleKanjiKoreanPlain = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleKanjiKoreanPeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleArabicDBPlain = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleArabicDBPeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleThaiAlphaPeriod = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleThaiAlphaParenRight = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleThaiAlphaParenBoth = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleThaiNumberPeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleThaiNumberParenRight = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleThaiParenBoth = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleHindiAlphaPeriod = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleHindiNumberPeriod = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleKanjiSimpifiedChineseDBPeriod = '\001\000\000\000', PowerPointPBtSNumberedBulletStyleHindiNumberParenRight = '\000\000\000\000', PowerPointPBtSNumberedBulletStyleHindiAlpha1Period = '\001\000\000\000' } PowerPointPBtS; typedef enum { PowerPointPTSpTabstopUnset = '\001\000\000\000', PowerPointPTSpTabstopLeft = '\000\000\000\000', PowerPointPTSpTabstopCenter = '\001\000\000\000', PowerPointPTSpTabstopRight = '\000\000\000\000', PowerPointPTSpTabstopDecimal = '\001\000\000\000' } PowerPointPTSp; typedef enum { PowerPointMRfTReflectionUnset = '\003\351\377\376', PowerPointMRfTReflectionTypeNone = '\000\000\003\352', PowerPointMRfTReflectionType1 = '\000\000\003\352', PowerPointMRfTReflectionType2 = '\000\000\003\352', PowerPointMRfTReflectionType3 = '\000\000\003\352', PowerPointMRfTReflectionType4 = '\000\000\003\352', PowerPointMRfTReflectionType5 = '\000\000\003\352', PowerPointMRfTReflectionType6 = '\000\000\003\352', PowerPointMRfTReflectionType7 = '\000\000\003\352', PowerPointMRfTReflectionType8 = '\000\000\003\352', PowerPointMRfTReflectionType9 = '\000\000\003\352' } PowerPointMRfT; typedef enum { PowerPointMTtATextureUnset = '\003\352\377\376', PowerPointMTtATextureTopLeft = '\000\000\003\353', PowerPointMTtATextureTop = '\000\000\003\353', PowerPointMTtATextureTopRight = '\000\000\003\353', PowerPointMTtATextureLeft = '\000\000\003\353', PowerPointMTtATextureCenter = '\000\000\003\353', PowerPointMTtATextureRight = '\000\000\003\353', PowerPointMTtATextureBottomLeft = '\000\000\003\353', PowerPointMTtATextureBotton = '\000\000\003\353', PowerPointMTtATextureBottomRight = '\000\000\003\353' } PowerPointMTtA; typedef enum { PowerPointPBlABaselineAlignmentUnset = '\003\353\377\376', PowerPointPBlABaselineAlignBaseline = '\000\000\003\354', PowerPointPBlABaselineAlignTop = '\000\000\003\354', PowerPointPBlABaselineAlignCenter = '\000\000\003\354', PowerPointPBlABaselineAlignEastAsian50 = '\000\000\003\354', PowerPointPBlABaselineAlignAutomatic = '\000\000\003\354' } PowerPointPBlA; typedef enum { PowerPointMCbFClipboardFormatUnset = '\003\354\377\376', PowerPointMCbFNativeClipboardFormat = '\000\000\003\355', PowerPointMCbFHTMlClipboardFormat = '\000\000\003\355', PowerPointMCbFRTFClipboardFormat = '\000\000\003\355', PowerPointMCbFPlainTextClipboardFormat = '\000\000\003\355' } PowerPointMCbF; typedef enum { PowerPointMTiPInsertBefore = '\000\000\003\356', PowerPointMTiPInsertAfter = '\000\000\003\356' } PowerPointMTiP; typedef enum { PowerPointMPiTSaveAsDefault = '\003\362\377\376', PowerPointMPiTSaveAsPNGFile = '\000\000\003\363', PowerPointMPiTSaveAsBMPFile = '\000\000\003\363', PowerPointMPiTSaveAsGIFFile = '\000\000\003\363', PowerPointMPiTSaveAsJPGFile = '\000\000\003\363', PowerPointMPiTSaveAsPDFFile = '\000\000\003\363' } PowerPointMPiT; typedef enum { PowerPointMAlCAlignLefts = '\001\000\000\000', PowerPointMAlCAlignCenters = '\000\000\000\000', PowerPointMAlCAlignRights = '\001\000\000\000', PowerPointMAlCAlignTops = '\000\000\000\000', PowerPointMAlCAlignMiddles = '\001\000\000\000', PowerPointMAlCAlignBottoms = '\000\000\000\000' } PowerPointMAlC; typedef enum { PowerPointMDsCDistributeHorizontally = '\000\000\000\000', PowerPointMDsCDistributeVertically = '\001\000\000\000' } PowerPointMDsC; typedef enum { PowerPointMOrTOrientationUnset = '\001\000\000\000', PowerPointMOrTHorizontalOrientation = '\000\000\000\000', PowerPointMOrTVerticalOrientation = '\001\000\000\000' } PowerPointMOrT; typedef enum { PowerPointMZoCBringShapeToFront = '\001\000\000\000', PowerPointMZoCSendShapeToBack = '\000\000\000\000', PowerPointMZoCBringShapeForward = '\001\000\000\000', PowerPointMZoCSendShapeBackward = '\000\000\000\000', PowerPointMZoCBringShapeInFrontOfText = '\001\000\000\000', PowerPointMZoCSendShapeBehindText = '\000\000\000\000' } PowerPointMZoC; typedef enum { PowerPointMSgTLine = '\000\000\000\000', PowerPointMSgTCurve = '\001\000\000\000' } PowerPointMSgT; typedef enum { PowerPointMEdTAuto = '\001\000\000\000', PowerPointMEdTCorner = '\000\000\000\000', PowerPointMEdTSmooth = '\001\000\000\000', PowerPointMEdTSymmetric = '\000\000\000\000' } PowerPointMEdT; typedef enum { PowerPointMFlCFlipHorizontal = '\000\000\000\000', PowerPointMFlCFlipVertical = '\001\000\000\000' } PowerPointMFlC; typedef enum { PowerPointMTriTrue = '\001\000\000\000', PowerPointMTriFalse = '\000\000\000\000', PowerPointMTriCTrue = '\001\000\000\000', PowerPointMTriToggle = '\000\000\000\000', PowerPointMTriTriStateUnset = '\001\000\000\000' } PowerPointMTri; typedef enum { PowerPointMBWBlackAndWhiteUnset = '\001\000\000\000', PowerPointMBWBlackAndWhiteModeAutomatic = '\000\000\000\000', PowerPointMBWBlackAndWhiteModeGrayScale = '\001\000\000\000', PowerPointMBWBlackAndWhiteModeLightGrayScale = '\000\000\000\000', PowerPointMBWBlackAndWhiteModeInverseGrayScale = '\001\000\000\000', PowerPointMBWBlackAndWhiteModeGrayOutline = '\000\000\000\000', PowerPointMBWBlackAndWhiteModeBlackTextAndLine = '\001\000\000\000', PowerPointMBWBlackAndWhiteModeHighContrast = '\000\000\000\000', PowerPointMBWBlackAndWhiteModeBlack = '\001\000\000\000', PowerPointMBWBlackAndWhiteModeWhite = '\000\000\000\000', PowerPointMBWBlackAndWhiteModeDontShow = '\001\000\000\000' } PowerPointMBW; typedef enum { PowerPointMBPSBarLeft = '\001\000\000\000', PowerPointMBPSBarTop = '\000\000\000\000', PowerPointMBPSBarRight = '\001\000\000\000', PowerPointMBPSBarBottom = '\000\000\000\000', PowerPointMBPSBarFloating = '\001\000\000\000', PowerPointMBPSBarPopUp = '\000\000\000\000', PowerPointMBPSBarMenu = '\001\000\000\000' } PowerPointMBPS; typedef enum { PowerPointMBPtNoProtection = '\001\000\000\000', PowerPointMBPtNoCustomize = '\000\000\000\000', PowerPointMBPtNoResize = '\001\000\000\000', PowerPointMBPtNoMove = '\000\000\000\000', PowerPointMBPtNoChangeVisible = '\001\000\000\000', PowerPointMBPtNoChangeDock = '\000\000\000\000', PowerPointMBPtNoVerticalDock = '\001\000\000\000', PowerPointMBPtNoHorizontalDock = '\000\000\000\000' } PowerPointMBPt; typedef enum { PowerPointMBTYNormalCommandBar = '\000\000\000\000', PowerPointMBTYMenubarCommandBar = '\001\000\000\000', PowerPointMBTYPopupCommandBar = '\000\000\000\000' } PowerPointMBTY; typedef enum { PowerPointMCLTControlCustom = '\000\000\000\000', PowerPointMCLTControlButton = '\001\000\000\000', PowerPointMCLTControlEdit = '\000\000\000\000', PowerPointMCLTControlDropDown = '\001\000\000\000', PowerPointMCLTControlCombobox = '\000\000\000\000', PowerPointMCLTButtonDropDown = '\001\000\000\000', PowerPointMCLTSplitDropDown = '\000\000\000\000', PowerPointMCLTOCXDropDown = '\001\000\000\000', PowerPointMCLTGenericDropDown = '\000\000\000\000', PowerPointMCLTGraphicDropDown = '\001\000\000\000', PowerPointMCLTControlPopup = '\000\000\000\000', PowerPointMCLTGraphicPopup = '\001\000\000\000', PowerPointMCLTButtonPopup = '\000\000\000\000', PowerPointMCLTSplitButtonPopup = '\001\000\000\000', PowerPointMCLTSplitButtonMRUPopup = '\000\000\000\000', PowerPointMCLTControlLabel = '\001\000\000\000', PowerPointMCLTExpandingGrid = '\000\000\000\000', PowerPointMCLTSplitExpandingGrid = '\001\000\000\000', PowerPointMCLTControlGrid = '\000\000\000\000', PowerPointMCLTControlGauge = '\001\000\000\000', PowerPointMCLTGraphicCombobox = '\000\000\000\000', PowerPointMCLTControlPane = '\001\000\000\000', PowerPointMCLTActiveX = '\000\000\000\000', PowerPointMCLTControlGroup = '\001\000\000\000', PowerPointMCLTControlTab = '\000\000\000\000', PowerPointMCLTControlSpinner = '\001\000\000\000' } PowerPointMCLT; typedef enum { PowerPointMBnsButtonStateUp = '\001\000\000\000', PowerPointMBnsButtonStateDown = '\000\000\000\000', PowerPointMBnsButtonStateUnset = '\001\000\000\000' } PowerPointMBns; typedef enum { PowerPointMcOuNeither = '\001\000\000\000', PowerPointMcOuServer = '\000\000\000\000', PowerPointMcOuClient = '\001\000\000\000', PowerPointMcOuBoth = '\000\000\000\000' } PowerPointMcOu; typedef enum { PowerPointMBTsButtonAutomatic = '\000\000\000\000', PowerPointMBTsButtonIcon = '\001\000\000\000', PowerPointMBTsButtonCaption = '\000\000\000\000', PowerPointMBTsButtonIconAndCaption = '\001\000\000\000' } PowerPointMBTs; typedef enum { PowerPointMXcbComboboxStyleNormal = '\001\000\000\000', PowerPointMXcbComboboxStyleLabel = '\000\000\000\000' } PowerPointMXcb; typedef enum { PowerPointMMNANone = '\000\000\000\000', PowerPointMMNARandom = '\001\000\000\000', PowerPointMMNAUnfold = '\000\000\000\000', PowerPointMMNASlide = '\001\000\000\000' } PowerPointMMNA; typedef enum { PowerPointMHlTHyperlinkTypeTextRange = '\001\000\000\000', PowerPointMHlTHyperlinkTypeShape = '\000\000\000\000', PowerPointMHlTHyperlinkTypeInlineShape = '\001\000\000\000' } PowerPointMHlT; typedef enum { PowerPointMXiMAppendString = '\001\000\000\000', PowerPointMXiMPostString = '\000\000\000\000' } PowerPointMXiM; typedef enum { PowerPointMANTIdle = '\000\000\000\000', PowerPointMANTGreeting = '\001\000\000\000', PowerPointMANTGoodbye = '\000\000\000\000', PowerPointMANTBeginSpeaking = '\001\000\000\000', PowerPointMANTCharacterSuccessMajor = '\000\000\000\000', PowerPointMANTGetAttentionMajor = '\001\000\000\000', PowerPointMANTGetAttentionMinor = '\000\000\000\000', PowerPointMANTSearching = '\001\000\000\000', PowerPointMANTPrinting = '\000\000\000\000', PowerPointMANTGestureRight = '\001\000\000\000', PowerPointMANTWritingNotingSomething = '\000\000\000\000', PowerPointMANTWorkingAtSomething = '\001\000\000\000', PowerPointMANTThinking = '\000\000\000\000', PowerPointMANTSendingMail = '\001\000\000\000', PowerPointMANTListensToComputer = '\000\000\000\000', PowerPointMANTDisappear = '\001\000\000\000', PowerPointMANTAppear = '\000\000\000\000', PowerPointMANTGetArtsy = '\001\000\000\000', PowerPointMANTGetTechy = '\000\000\000\000', PowerPointMANTGetWizardy = '\001\000\000\000', PowerPointMANTCheckingSomething = '\000\000\000\000', PowerPointMANTLookDown = '\001\000\000\000', PowerPointMANTLookDownLeft = '\000\000\000\000', PowerPointMANTLookDownRight = '\001\000\000\000', PowerPointMANTLookLeft = '\000\000\000\000', PowerPointMANTLookRight = '\001\000\000\000', PowerPointMANTLookUp = '\000\000\000\000', PowerPointMANTLookUpLeft = '\001\000\000\000', PowerPointMANTLookUpRight = '\000\000\000\000', PowerPointMANTSaving = '\001\000\000\000', PowerPointMANTGestureDown = '\000\000\000\000', PowerPointMANTGestureLeft = '\001\000\000\000', PowerPointMANTGestureUp = '\000\000\000\000', PowerPointMANTEmptyTrash = '\001\000\000\000' } PowerPointMANT; typedef enum { PowerPointMBStButtonNone = '\001\000\000\000', PowerPointMBStButtonOk = '\000\000\000\000', PowerPointMBStButtonCancel = '\001\000\000\000', PowerPointMBStButtonsOkCancel = '\000\000\000\000', PowerPointMBStButtonsYesNo = '\001\000\000\000', PowerPointMBStButtonsYesNoCancel = '\000\000\000\000', PowerPointMBStButtonsBackClose = '\001\000\000\000', PowerPointMBStButtonsNextClose = '\000\000\000\000', PowerPointMBStButtonsBackNextClose = '\001\000\000\000', PowerPointMBStButtonsRetryCancel = '\000\000\000\000', PowerPointMBStButtonsAbortRetryIgnore = '\001\000\000\000', PowerPointMBStButtonsSearchClose = '\000\000\000\000', PowerPointMBStButtonsBackNextSnooze = '\001\000\000\000', PowerPointMBStButtonsTipsOptionsClose = '\000\000\000\000', PowerPointMBStButtonsYesAllNoCancel = '\001\000\000\000' } PowerPointMBSt; typedef enum { PowerPointMIctIconNone = '\001\000\000\000', PowerPointMIctIconApplication = '\000\000\000\000', PowerPointMIctIconAlert = '\001\000\000\000', PowerPointMIctIconTip = '\000\000\000\000', PowerPointMIctIconAlertCritical = '\001\000\000\000', PowerPointMIctIconAlertWarning = '\000\000\000\000', PowerPointMIctIconAlertInfo = '\001\000\000\000' } PowerPointMIct; typedef enum { PowerPointMWAtInactive = '\001\000\000\000', PowerPointMWAtActive = '\000\000\000\000', PowerPointMWAtSuspend = '\001\000\000\000', PowerPointMWAtResume = '\000\000\000\000' } PowerPointMWAt; typedef enum { PowerPointMeDPPropertyTypeNumber = '\000\000\000\000', PowerPointMeDPPropertyTypeBoolean = '\001\000\000\000', PowerPointMeDPPropertyTypeDate = '\000\000\000\000', PowerPointMeDPPropertyTypeString = '\001\000\000\000', PowerPointMeDPPropertyTypeFloat = '\000\000\000\000' } PowerPointMeDP; typedef enum { PowerPointMAScMsoAutomationSecurityLow = '\000\000\000\000', PowerPointMAScMsoAutomationSecurityByUI = '\001\000\000\000', PowerPointMAScMsoAutomationSecurityForceDisable = '\000\000\000\000' } PowerPointMASc; typedef enum { PowerPointMSszResolution544x376 = '\000\000\000\000', PowerPointMSszResolution640x480 = '\001\000\000\000', PowerPointMSszResolution720x512 = '\000\000\000\000', PowerPointMSszResolution800x600 = '\001\000\000\000', PowerPointMSszResolution1024x768 = '\000\000\000\000', PowerPointMSszResolution1152x882 = '\001\000\000\000', PowerPointMSszResolution1152x900 = '\000\000\000\000', PowerPointMSszResolution1280x1024 = '\001\000\000\000', PowerPointMSszResolution1600x1200 = '\000\000\000\000', PowerPointMSszResolution1800x1440 = '\001\000\000\000', PowerPointMSszResolution1920x1200 = '\000\000\000\000' } PowerPointMSsz; typedef enum { PowerPointMChSArabicCharacterSet = '\000\000\000\000', PowerPointMChSCyrillicCharacterSet = '\001\000\000\000', PowerPointMChSEnglishCharacterSet = '\000\000\000\000', PowerPointMChSGreekCharacterSet = '\001\000\000\000', PowerPointMChSHebrewCharacterSet = '\000\000\000\000', PowerPointMChSJapaneseCharacterSet = '\001\000\000\000', PowerPointMChSKoreanCharacterSet = '\000\000\000\000', PowerPointMChSMultilingualUnicodeCharacterSet = '\001\000\000\000', PowerPointMChSSimplifiedChineseCharacterSet = '\000\000\000\000', PowerPointMChSThaiCharacterSet = '\001\000\000\000', PowerPointMChSTraditionalChineseCharacterSet = '\000\000\000\000', PowerPointMChSVietnameseCharacterSet = '\001\000\000\000' } PowerPointMChS; typedef enum { PowerPointMtEnEncodingThai = '\001\000\000\000', PowerPointMtEnEncodingJapaneseShiftJIS = '\000\000\000\000', PowerPointMtEnEncodingSimplifiedChinese = '\001\000\000\000', PowerPointMtEnEncodingKorean = '\000\000\000\000', PowerPointMtEnEncodingBig5TraditionalChinese = '\001\000\000\000', PowerPointMtEnEncodingLittleEndian = '\000\000\000\000', PowerPointMtEnEncodingBigEndian = '\001\000\000\000', PowerPointMtEnEncodingCentralEuropean = '\000\000\000\000', PowerPointMtEnEncodingCyrillic = '\001\000\000\000', PowerPointMtEnEncodingWestern = '\000\000\000\000', PowerPointMtEnEncodingGreek = '\001\000\000\000', PowerPointMtEnEncodingTurkish = '\000\000\000\000', PowerPointMtEnEncodingHebrew = '\001\000\000\000', PowerPointMtEnEncodingArabic = '\000\000\000\000', PowerPointMtEnEncodingBaltic = '\001\000\000\000', PowerPointMtEnEncodingVietnamese = '\000\000\000\000', PowerPointMtEnEncodingISO88591Latin1 = '\001\000\000\000', PowerPointMtEnEncodingISO88592CentralEurope = '\000\000\000\000', PowerPointMtEnEncodingISO88593Latin3 = '\001\000\000\000', PowerPointMtEnEncodingISO88594Baltic = '\000\000\000\000', PowerPointMtEnEncodingISO88595Cyrillic = '\001\000\000\000', PowerPointMtEnEncodingISO88596Arabic = '\000\000\000\000', PowerPointMtEnEncodingISO88597Greek = '\001\000\000\000', PowerPointMtEnEncodingISO88598Hebrew = '\000\000\000\000', PowerPointMtEnEncodingISO88599Turkish = '\001\000\000\000', PowerPointMtEnEncodingISO885915Latin9 = '\000\000\000\000', PowerPointMtEnEncodingISO2022JapaneseNoHalfWidthKatakana = '\001\000\000\000', PowerPointMtEnEncodingISO2022JapaneseJISX02021984 = '\000\000\000\000', PowerPointMtEnEncodingISO2022JapaneseJISX02011989 = '\001\000\000\000', PowerPointMtEnEncodingISO2022KR = '\000\000\000\000', PowerPointMtEnEncodingISO2022CNTraditionalChinese = '\001\000\000\000', PowerPointMtEnEncodingISO2022CNSimplifiedChinese = '\000\000\000\000', PowerPointMtEnEncodingMacRoman = '\001\000\000\000', PowerPointMtEnEncodingMacJapanese = '\000\000\000\000', PowerPointMtEnEncodingMacTraditionalChinese = '\001\000\000\000', PowerPointMtEnEncodingMacKorean = '\000\000\000\000', PowerPointMtEnEncodingMacArabic = '\001\000\000\000', PowerPointMtEnEncodingMacHebrew = '\000\000\000\000', PowerPointMtEnEncodingMacGreek1 = '\001\000\000\000', PowerPointMtEnEncodingMacCyrillic = '\000\000\000\000', PowerPointMtEnEncodingMacSimplifiedChineseGB2312 = '\001\000\000\000', PowerPointMtEnEncodingMacRomania = '\000\000\000\000', PowerPointMtEnEncodingMacUkraine = '\001\000\000\000', PowerPointMtEnEncodingMacLatin2 = '\000\000\000\000', PowerPointMtEnEncodingMacIcelandic = '\001\000\000\000', PowerPointMtEnEncodingMacTurkish = '\000\000\000\000', PowerPointMtEnEncodingMacCroatia = '\001\000\000\000', PowerPointMtEnEncodingEBCDICUSCanada = '\000\000\000\000', PowerPointMtEnEncodingEBCDICInternational = '\001\000\000\000', PowerPointMtEnEncodingEBCDICMultilingualROECELatin2 = '\000\000\000\000', PowerPointMtEnEncodingEBCDICGreekModern = '\001\000\000\000', PowerPointMtEnEncodingEBCDICTurkishLatin5 = '\000\000\000\000', PowerPointMtEnEncodingEBCDICGermany = '\001\000\000\000', PowerPointMtEnEncodingEBCDICDenmarkNorway = '\000\000\000\000', PowerPointMtEnEncodingEBCDICFinlandSweden = '\001\000\000\000', PowerPointMtEnEncodingEBCDICItaly = '\000\000\000\000', PowerPointMtEnEncodingEBCDICLatinAmericaSpain = '\001\000\000\000', PowerPointMtEnEncodingEBCDICUnitedKingdom = '\000\000\000\000', PowerPointMtEnEncodingEBCDICJapaneseKatakanaExtended = '\001\000\000\000', PowerPointMtEnEncodingEBCDICFrance = '\000\000\000\000', PowerPointMtEnEncodingEBCDICArabic = '\001\000\000\000', PowerPointMtEnEncodingEBCDICGreek = '\000\000\000\000', PowerPointMtEnEncodingEBCDICHebrew = '\001\000\000\000', PowerPointMtEnEncodingEBCDICKoreanExtended = '\000\000\000\000', PowerPointMtEnEncodingEBCDICThai = '\001\000\000\000', PowerPointMtEnEncodingEBCDICIcelandic = '\000\000\000\000', PowerPointMtEnEncodingEBCDICTurkish = '\001\000\000\000', PowerPointMtEnEncodingEBCDICRussian = '\000\000\000\000', PowerPointMtEnEncodingEBCDICSerbianBulgarian = '\001\000\000\000', PowerPointMtEnEncodingEBCDICJapaneseKatakanaExtendedAndJapanese = '\000\000\000\000', PowerPointMtEnEncodingEBCDICUSCanadaAndJapanese = '\001\000\000\000', PowerPointMtEnEncodingEBCDICExtendedAndKorean = '\000\000\000\000', PowerPointMtEnEncodingEBCDICSimplifiedChineseExtendedAndSimplifiedChinese = '\001\000\000\000', PowerPointMtEnEncodingEBCDICUSCanadaAndTraditionalChinese = '\000\000\000\000', PowerPointMtEnEncodingEBCDICJapaneseLatinExtendedAndJapanese = '\001\000\000\000', PowerPointMtEnEncodingOEMUnitedStates = '\000\000\000\000', PowerPointMtEnEncodingOEMGreek = '\001\000\000\000', PowerPointMtEnEncodingOEMBaltic = '\000\000\000\000', PowerPointMtEnEncodingOEMMultilingualLatinI = '\001\000\000\000', PowerPointMtEnEncodingOEMMultilingualLatinII = '\000\000\000\000', PowerPointMtEnEncodingOEMCyrillic = '\001\000\000\000', PowerPointMtEnEncodingOEMTurkish = '\000\000\000\000', PowerPointMtEnEncodingOEMPortuguese = '\001\000\000\000', PowerPointMtEnEncodingOEMIcelandic = '\000\000\000\000', PowerPointMtEnEncodingOEMHebrew = '\001\000\000\000', PowerPointMtEnEncodingOEMCanadianFrench = '\000\000\000\000', PowerPointMtEnEncodingOEMArabic = '\001\000\000\000', PowerPointMtEnEncodingOEMNordic = '\000\000\000\000', PowerPointMtEnEncodingOEMCyrillicII = '\001\000\000\000', PowerPointMtEnEncodingOEMModernGreek = '\000\000\000\000', PowerPointMtEnEncodingEUCJapanese = '\001\000\000\000', PowerPointMtEnEncodingEUCChineseSimplifiedChinese = '\000\000\000\000', PowerPointMtEnEncodingEUCKorean = '\001\000\000\000', PowerPointMtEnEncodingEUCTaiwaneseTraditionalChinese = '\000\000\000\000', PowerPointMtEnEncodingDevanagari = '\001\000\000\000', PowerPointMtEnEncodingBengali = '\000\000\000\000', PowerPointMtEnEncodingTamil = '\001\000\000\000', PowerPointMtEnEncodingTelugu = '\000\000\000\000', PowerPointMtEnEncodingAssamese = '\001\000\000\000', PowerPointMtEnEncodingOriya = '\000\000\000\000', PowerPointMtEnEncodingKannada = '\001\000\000\000', PowerPointMtEnEncodingMalayalam = '\000\000\000\000', PowerPointMtEnEncodingGujarati = '\001\000\000\000', PowerPointMtEnEncodingPunjabi = '\000\000\000\000', PowerPointMtEnEncodingArabicASMO = '\001\000\000\000', PowerPointMtEnEncodingArabicTransparentASMO = '\000\000\000\000', PowerPointMtEnEncodingKoreanJohab = '\001\000\000\000', PowerPointMtEnEncodingTaiwanCNS = '\000\000\000\000', PowerPointMtEnEncodingTaiwanTCA = '\001\000\000\000', PowerPointMtEnEncodingTaiwanEten = '\000\000\000\000', PowerPointMtEnEncodingTaiwanIBM5550 = '\001\000\000\000', PowerPointMtEnEncodingTaiwanTeletext = '\000\000\000\000', PowerPointMtEnEncodingTaiwanWang = '\001\000\000\000', PowerPointMtEnEncodingIA5IRV = '\000\000\000\000', PowerPointMtEnEncodingIA5German = '\001\000\000\000', PowerPointMtEnEncodingIA5Swedish = '\000\000\000\000', PowerPointMtEnEncodingIA5Norwegian = '\001\000\000\000', PowerPointMtEnEncodingUSASCII = '\000\000\000\000', PowerPointMtEnEncodingT61 = '\001\000\000\000', PowerPointMtEnEncodingISO6937NonspacingAccent = '\000\000\000\000', PowerPointMtEnEncodingKOI8R = '\001\000\000\000', PowerPointMtEnEncodingExtAlphaLowercase = '\000\000\000\000', PowerPointMtEnEncodingKOI8U = '\001\000\000\000', PowerPointMtEnEncodingEuropa3 = '\000\000\000\000', PowerPointMtEnEncodingHZGBSimplifiedChinese = '\001\000\000\000', PowerPointMtEnEncodingUTF7 = '\000\000\000\000', PowerPointMtEnEncodingUTF8 = '\001\000\000\000' } PowerPointMtEn; typedef enum { PowerPoint4000CommandBar = 'msCB', PowerPoint4000CommandBarControl = 'mCBC' } PowerPoint4000; typedef enum { PowerPointMHyTHyperlinkRange = '\000\000\000\000', PowerPointMHyTHyperlinkShape = '\001\000\000\000', PowerPointMHyTHyperlinkInlineShape = '\000\000\000\000' } PowerPointMHyT; typedef enum { PowerPointPWnSWindowNormal = '\000\000\000\000', PowerPointPWnSWindowMinimized = '\001\000\000\000' } PowerPointPWnS; typedef enum { PowerPointPArSArrangeTiled = '\001\000\000\000', PowerPointPArSArrangeCascade = '\000\000\000\000' } PowerPointPArS; typedef enum { PowerPointPVTySlideView = '\000\000\000\000', PowerPointPVTyMasterView = '\001\000\000\000', PowerPointPVTyPageView = '\000\000\000\000', PowerPointPVTyHandoutMasterView = '\001\000\000\000', PowerPointPVTyNotesMasterView = '\000\000\000\000', PowerPointPVTyOutlineView = '\001\000\000\000', PowerPointPVTySlideSorterView = '\000\000\000\000', PowerPointPVTyTitleMasterView = '\001\000\000\000', PowerPointPVTyNormalView = '\000\000\000\000', PowerPointPVTyThumbnailView = '\001\000\000\000', PowerPointPVTyThumbnailMasterView = '\000\000\000\000' } PowerPointPVTy; typedef enum { PowerPointPCSiSchemeColorUnset = '\000\000\000\000', PowerPointPCSiNotASchemeColor = '\001\000\000\000', PowerPointPCSiBackgroundScheme = '\000\000\000\000', PowerPointPCSiForegroundScheme = '\001\000\000\000', PowerPointPCSiShadowScheme = '\000\000\000\000', PowerPointPCSiTitleScheme = '\001\000\000\000', PowerPointPCSiFillScheme = '\000\000\000\000', PowerPointPCSiAccent1Scheme = '\001\000\000\000', PowerPointPCSiAccent2Scheme = '\000\000\000\000', PowerPointPCSiAccent3Scheme = '\001\000\000\000' } PowerPointPCSi; typedef enum { PowerPointSSzTSlideSizeOnScreen = '\001\000\000\000', PowerPointSSzTSlideSizeLetterPaper = '\000\000\000\000', PowerPointSSzTSlideSizeA4Paper = '\001\000\000\000', PowerPointSSzTSlideSize35MM = '\000\000\000\000', PowerPointSSzTSlideSizeOverhead = '\001\000\000\000', PowerPointSSzTSlideSizeBanner = '\000\000\000\000', PowerPointSSzTSlideSizeCustom = '\001\000\000\000' } PowerPointSSzT; typedef enum { PowerPointPSATSaveAsPresentation = '\001\000\000\000', PowerPointPSATSaveAsTemplate = '\000\000\000\000', PowerPointPSATSaveAsRTF = '\001\000\000\000', PowerPointPSATSaveAsShow = '\000\000\000\000', PowerPointPSATSaveAsDefault = '\001\000\000\000', PowerPointPSATSaveAsHTML = '\000\000\000\000', PowerPointPSATSaveAsMovie = '\001\000\000\000', PowerPointPSATSaveAsPackage = '\000\000\000\000', PowerPointPSATSaveAsPDF = '\001\000\000\000', PowerPointPSATSaveAsOpenXMLPresentation = '\000\000\000\000', PowerPointPSATSaveAsOpenXMLPresentationMacroEnabled = '\001\000\000\000', PowerPointPSATSaveAsOpenXMLShow = '\000\000\000\000', PowerPointPSATSaveAsOpenXMLShowMacroEnabled = '\001\000\000\000', PowerPointPSATSaveAsOpenXMLTemplate = '\000\000\000\000', PowerPointPSATSaveAsOpenXMLTemplateMacroEnabled = '\001\000\000\000', PowerPointPSATSaveAsOpenXMLTheme = '\000\000\000\000' } PowerPointPSAT; typedef enum { PowerPointPTstTextStyleDefault = '\000\000\001*', PowerPointPTstTextStyleTitle = '\000\000\001*', PowerPointPTstTextStyleBody = '\000\000\001*' } PowerPointPTst; typedef enum { PowerPointPSLoSlideLayoutUnset = '\000\000\000\000', PowerPointPSLoSlideLayoutTitleSlide = '\001\000\000\000', PowerPointPSLoSlideLayoutTextSlide = '\000\000\000\000', PowerPointPSLoSlideLayoutTwoColumnText = '\001\000\000\000', PowerPointPSLoSlideLayoutTable = '\000\000\000\000', PowerPointPSLoSlideLayoutTextAndChart = '\001\000\000\000', PowerPointPSLoSlideLayoutChartAndText = '\000\000\000\000', PowerPointPSLoSlideLayoutOrgchart = '\001\000\000\000', PowerPointPSLoSlideLayoutChart = '\000\000\000\000', PowerPointPSLoSlideLayoutTextAndClipart = '\001\000\000\000', PowerPointPSLoSlideLayoutClipartAndText = '\000\000\000\000', PowerPointPSLoSlideLayoutTitleOnly = '\001\000\000\000', PowerPointPSLoSlideLayoutBlank = '\000\000\000\000', PowerPointPSLoSlideLayoutTextAndObject = '\001\000\000\000', PowerPointPSLoSlideLayoutObjectAndText = '\000\000\000\000', PowerPointPSLoSlideLayoutLargeObject = '\001\000\000\000', PowerPointPSLoSlideLayoutObject = '\000\000\000\000', PowerPointPSLoSlideLayoutMediaClip = '\001\000\000\000', PowerPointPSLoSlideLayoutMediaClipAndText = '\000\000\000\000', PowerPointPSLoSlideLayoutObjectOverText = '\001\000\000\000', PowerPointPSLoSlideLayoutTextOverObject = '\000\000\000\000', PowerPointPSLoSlideLayoutTextAndTwoObjects = '\001\000\000\000', PowerPointPSLoSlideLayoutTwoObjectsAndText = '\000\000\000\000', PowerPointPSLoSlideLayoutTwoObjectsOverText = '\001\000\000\000', PowerPointPSLoSlideLayoutFourObjects = '\000\000\000\000', PowerPointPSLoSlideLayoutVerticalText = '\001\000\000\000', PowerPointPSLoSlideLayoutClipartAndVerticalText = '\000\000\000\000', PowerPointPSLoSlideLayoutVerticalTitleAndText = '\001\000\000\000', PowerPointPSLoSlideLayoutVerticalTitleAndTextOverChart = '\000\000\000\000', PowerPointPSLoSlideLayoutTwoObjects = '\001\000\000\000', PowerPointPSLoSlideLayoutObjectAndTwoObjects = '\000\000\000\000', PowerPointPSLoSlideLayoutTwoObjectsAndObject = '\001\000\000\000', PowerPointPSLoSlideLayoutCustom = '\000\000\000\000', PowerPointPSLoSlideLayoutSectionHeader = '\001\000\000\000', PowerPointPSLoSlideLayoutComparison = '\000\000\000\000', PowerPointPSLoSlideLayoutContentWithCaption = '\001\000\000\000', PowerPointPSLoSlideLayoutPictureWithCaption = '\000\000\000\000' } PowerPointPSLo; typedef enum { PowerPointPEeFEntryEffectUnset = '\000\000\000\000', PowerPointPEeFEntryEffectNone = '\001\000\000\000', PowerPointPEeFEntryEffectCut = '\000\000\000\000', PowerPointPEeFEntryEffectCutBlack = '\001\000\000\000', PowerPointPEeFEntryEffectRandom = '\000\000\000\000', PowerPointPEeFEntryEffectBlindsHorizontal = '\001\000\000\000', PowerPointPEeFEntryEffectBlindsVertical = '\000\000\000\000', PowerPointPEeFEntryEffectCheckerboardAcross = '\001\000\000\000', PowerPointPEeFEntryEffectCheckerboardDown = '\000\000\000\000', PowerPointPEeFEntryEffectCoverLeft = '\001\000\000\000', PowerPointPEeFEntryEffectCoverUp = '\000\000\000\000', PowerPointPEeFEntryEffectCoverRight = '\001\000\000\000', PowerPointPEeFEntryEffectCoverDown = '\000\000\000\000', PowerPointPEeFEntryEffectCoverLeftUp = '\001\000\000\000', PowerPointPEeFEntryEffectCoverRightUp = '\000\000\000\000', PowerPointPEeFEntryEffectCoverLeftDown = '\001\000\000\000', PowerPointPEeFEntryEffectCoverRightDown = '\000\000\000\000', PowerPointPEeFEntryEffectDissolve = '\001\000\000\000', PowerPointPEeFEntryEffectFadeBlack = '\000\000\000\000', PowerPointPEeFEntryEffectUncoverLeft = '\001\000\000\000', PowerPointPEeFEntryEffectUncoverUp = '\000\000\000\000', PowerPointPEeFEntryEffectUncoverRight = '\001\000\000\000', PowerPointPEeFEntryEffectUncoverDown = '\000\000\000\000', PowerPointPEeFEntryEffectUncoverLeftUp = '\001\000\000\000', PowerPointPEeFEntryEffectUncoverRightUp = '\000\000\000\000', PowerPointPEeFEntryEffectUncoverLeftDown = '\001\000\000\000', PowerPointPEeFEntryEffectUncoverRightDown = '\000\000\000\000', PowerPointPEeFEntryEffectRandomBarsHorizontal = '\001\000\000\000', PowerPointPEeFEntryEffectRandomBarsVertical = '\000\000\000\000', PowerPointPEeFEntryEffectStripsLeftUp = '\001\000\000\000', PowerPointPEeFEntryEffectStripsRightUp = '\000\000\000\000', PowerPointPEeFEntryEffectStripsLeftDown = '\001\000\000\000', PowerPointPEeFEntryEffectStripsRightDown = '\000\000\000\000', PowerPointPEeFEntryEffectWipeLeft = '\001\000\000\000', PowerPointPEeFEntryEffectWipeUp = '\000\000\000\000', PowerPointPEeFEntryEffectWipeRight = '\001\000\000\000', PowerPointPEeFEntryEffectWipeDown = '\000\000\000\000', PowerPointPEeFEntryEffectBoxOut = '\001\000\000\000', PowerPointPEeFEntryEffectBoxIn = '\000\000\000\000', PowerPointPEeFEntryEffectFlyFromLeft = '\001\000\000\000', PowerPointPEeFEntryEffectFlyFromTop = '\000\000\000\000', PowerPointPEeFEntryEffectFlyFromRight = '\001\000\000\000', PowerPointPEeFEntryEffectFlyFromBottom = '\000\000\000\000', PowerPointPEeFEntryEffectFlyFromTopLeft = '\001\000\000\000', PowerPointPEeFEntryEffectFlyFromTopRight = '\000\000\000\000', PowerPointPEeFEntryEffectFlyFromBottomLeft = '\001\000\000\000', PowerPointPEeFEntryEffectFlyFromBottomRight = '\000\000\000\000', PowerPointPEeFEntryEffectPeekFromLeft = '\001\000\000\000', PowerPointPEeFEntryEffectPeekFromDown = '\000\000\000\000', PowerPointPEeFEntryEffectPeekFromRight = '\001\000\000\000', PowerPointPEeFEntryEffectPeekFromUp = '\000\000\000\000', PowerPointPEeFEntryEffectCrawlFromLeft = '\001\000\000\000', PowerPointPEeFEntryEffectCrawlFromUp = '\000\000\000\000', PowerPointPEeFEntryEffectCrawlFromRight = '\001\000\000\000', PowerPointPEeFEntryEffectCrawlFromDown = '\000\000\000\000', PowerPointPEeFEntryEffectZoomIn = '\001\000\000\000', PowerPointPEeFEntryEffectZoomInSlightly = '\000\000\000\000', PowerPointPEeFEntryEffectZoomOut = '\001\000\000\000', PowerPointPEeFEntryEffectZoomOutSlightly = '\000\000\000\000', PowerPointPEeFEntryEffectZoomCenter = '\001\000\000\000', PowerPointPEeFEntryEffectZoomBottom = '\000\000\000\000', PowerPointPEeFEntryEffectStretchAcross = '\001\000\000\000', PowerPointPEeFEntryEffectCollapseAcross = '\000\000\000\000', PowerPointPEeFEntryEffectStretchLeft = '\001\000\000\000', PowerPointPEeFEntryEffectCollapseLeft = '\000\000\000\000', PowerPointPEeFEntryEffectStretchUp = '\001\000\000\000', PowerPointPEeFEntryEffectCollapseUp = '\000\000\000\000', PowerPointPEeFEntryEffectStretchRight = '\001\000\000\000', PowerPointPEeFEntryEffectCollapseRight = '\000\000\000\000', PowerPointPEeFEntryEffectStretchDown = '\001\000\000\000', PowerPointPEeFEntryEffectCollapseBottom = '\000\000\000\000', PowerPointPEeFEntryEffectSwivel = '\001\000\000\000', PowerPointPEeFEntryEffectSpiral = '\000\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromLeft = '\001\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromTop = '\000\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromRight = '\001\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromBottom = '\000\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromTopLeft = '\001\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromTopRight = '\000\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromBottomLeft = '\001\000\000\000', PowerPointPEeFEntryEffectFadeFlyFromBottomRight = '\000\000\000\000', PowerPointPEeFEntryEffectSplitHorizontalOut = '\001\000\000\000', PowerPointPEeFEntryEffectSplitHorizontalIn = '\000\000\000\000', PowerPointPEeFEntryEffectSplitVerticalOut = '\001\000\000\000', PowerPointPEeFEntryEffectSplitVerticalIn = '\000\000\000\000', PowerPointPEeFEntryEffectFlashOnceFast = '\001\000\000\000', PowerPointPEeFEntryEffectFlashOnceMedium = '\000\000\000\000', PowerPointPEeFEntryEffectFlashOnceSlow = '\001\000\000\000', PowerPointPEeFEntryEffectAppear = '\000\000\000\000', PowerPointPEeFEntryEffectCircle = '\001\000\000\000', PowerPointPEeFEntryEffectDiamond = '\000\000\000\000', PowerPointPEeFEntryEffectCombHorizontal = '\001\000\000\000', PowerPointPEeFEntryEffectCombVertical = '\000\000\000\000', PowerPointPEeFEntryEffectFade = '\001\000\000\000', PowerPointPEeFEntryEffectFadeSmoothly = '\000\000\000\000', PowerPointPEeFEntryEffectNewsFlash = '\001\000\000\000', PowerPointPEeFEntryEffectSpinner = '\000\000\000\000', PowerPointPEeFEntryEffectPlus = '\001\000\000\000', PowerPointPEeFEntryEffectPushDown = '\000\000\000\000', PowerPointPEeFEntryEffectPushLeft = '\001\000\000\000', PowerPointPEeFEntryEffectPushRight = '\000\000\000\000', PowerPointPEeFEntryEffectPushUp = '\001\000\000\000', PowerPointPEeFEntryEffectWedge = '\000\000\000\000', PowerPointPEeFEntryEffectWheel1Spoke = '\001\000\000\000', PowerPointPEeFEntryEffectWheel2Spokes = '\000\000\000\000', PowerPointPEeFEntryEffectWheel3Spokes = '\001\000\000\000', PowerPointPEeFEntryEffectWheel4Spokes = '\000\000\000\000', PowerPointPEeFEntryEffectWheel8Spokes = '\001\000\000\000', PowerPointPEeFEntryEffectFlipLeft = '\000\000\000\000', PowerPointPEeFEntryEffectFlipRight = '\001\000\000\000', PowerPointPEeFEntryEffectFlipUp = '\000\000\000\000', PowerPointPEeFEntryEffectFlipDown = '\001\000\000\000', PowerPointPEeFEntryEffectCubeLeft = '\000\000\000\000', PowerPointPEeFEntryEffectCubeRight = '\001\000\000\000', PowerPointPEeFEntryEffectCubeUp = '\000\000\000\000', PowerPointPEeFEntryEffectCubeDown = '\001\000\000\000' } PowerPointPEeF; typedef enum { PowerPointPTlEAnimationLevelUnset = '\001\000\000\000', PowerPointPTlEAnimateLevelNone = '\000\000\000\000', PowerPointPTlEAnimateLevelFirstLevel = '\001\000\000\000', PowerPointPTlEAnimateLevelSecondLevel = '\000\000\000\000', PowerPointPTlEAnimateLevelThirdLevel = '\001\000\000\000', PowerPointPTlEAnimateLevelFourthLevel = '\000\000\000\000', PowerPointPTlEAnimateLevelFifthLevel = '\001\000\000\000', PowerPointPTlEAnimateLevelAllLevels = '\000\000\000\000' } PowerPointPTlE; typedef enum { PowerPointPTuEAnimationUnitUnset = '\000\000\000\000', PowerPointPTuETextUnitEffectByParagraph = '\001\000\000\000', PowerPointPTuETextUnitEffectByWord = '\000\000\000\000', PowerPointPTuETextUnitEffectByCharacter = '\001\000\000\000' } PowerPointPTuE; typedef enum { PowerPointPCuEAnimationChartUnset = '\001\000\000\000', PowerPointPCuEChartUnitEffectBySeries = '\000\000\000\000', PowerPointPCuEChartUnitEffectByCategory = '\001\000\000\000', PowerPointPCuEChartUnitEffectBySeriesElement = '\000\000\000\000' } PowerPointPCuE; typedef enum { PowerPointAsAeAfterEffectUnset = '\000\000\000\000', PowerPointAsAeAfterEffectNone = '\001\000\000\000', PowerPointAsAeAfterEffectHide = '\000\000\000\000', PowerPointAsAeAfterEffectDim = '\001\000\000\000' } PowerPointAsAe; typedef enum { PowerPointAdMdAdvanceModeUnset = '\001\000\000\000', PowerPointAdMdAdvanceModeOnClick = '\000\000\000\000' } PowerPointAdMd; typedef enum { PowerPointPSnXSoundEffectUnset = '\000\000\000\000', PowerPointPSnXSoundEffectNone = '\001\000\000\000', PowerPointPSnXSoundEffectStopPrevious = '\000\000\000\000', PowerPointPSnXSoundEffectFile = '\001\000\000\000' } PowerPointPSnX; typedef enum { PowerPointPUdOUpdateOptionUnset = '\001\000\000\000', PowerPointPUdOUpdateOptionManual = '\000\000\000\000' } PowerPointPUdO; typedef enum { PowerPointPDgMDialogModeUnset = '\001\000\000\000', PowerPointPDgMDialogModeModless = '\000\000\000\000', PowerPointPDgMDialogModeModal = '\001\000\000\000' } PowerPointPDgM; typedef enum { PowerPointPDgSDialogStyleUnset = '\001\000\000\000', PowerPointPDgSDialogStyleStandard = '\000\000\000\000' } PowerPointPDgS; typedef enum { PowerPointPSsPSlideShowPointerNone = '\000\000\000\000', PowerPointPSsPSlideShowPointerArrow = '\001\000\000\000', PowerPointPSsPSlideShowPointerPen = '\000\000\000\000', PowerPointPSsPSlideShowPointerAlwaysHidden = '\001\000\000\000' } PowerPointPSsP; typedef enum { PowerPointPShSSlideShowStateRunning = '\001\000\000\000', PowerPointPShSSlideShowStatePaused = '\000\000\000\000', PowerPointPShSSlideShowStateBlackScreen = '\001\000\000\000', PowerPointPShSSlideShowStateWhiteScreen = '\000\000\000\000' } PowerPointPShS; typedef enum { PowerPointPSaMSlideShowAdvanceManualAdvance = '\000\000\000\000', PowerPointPSaMSlideShowAdvanceUseSlideTimings = '\001\000\000\000' } PowerPointPSaM; typedef enum { PowerPointPtOtPrintSlides = '\001\000\000\000', PowerPointPtOtPrintTwoSlideHandouts = '\000\000\000\000', PowerPointPtOtPrintThreeSlideHandouts = '\001\000\000\000', PowerPointPtOtPrintSixSlideHandouts = '\000\000\000\000', PowerPointPtOtPrintNotesPages = '\001\000\000\000', PowerPointPtOtPrintOutline = '\000\000\000\000', PowerPointPtOtPrintFourSlideHandouts = '\001\000\000\000', PowerPointPtOtPrintNineSlideHandouts = '\000\000\000\000' } PowerPointPtOt; typedef enum { PowerPointPrCtPrintColor = '\000\000\000\000', PowerPointPrCtPrintBlackAndWhite = '\001\000\000\000' } PowerPointPrCt; typedef enum { PowerPointPSELSelectionTypeNone = '\001\000\000\000', PowerPointPSELSelectionTypeSlides = '\000\000\000\000', PowerPointPSELSelectionTypeShapes = '\001\000\000\000', PowerPointPSELSelectionTypeText = '\000\000\000\000' } PowerPointPSEL; typedef enum { PowerPointPDtFUnset = '\001\000\000\000', PowerPointPDtFMdyy = '\000\000\000\000', PowerPointPDtFDdddMMMMddyyyy = '\001\000\000\000', PowerPointPDtFMMMMyyyy = '\000\000\000\000', PowerPointPDtFMMMMdyyyy = '\001\000\000\000', PowerPointPDtFMMMyy = '\000\000\000\000', PowerPointPDtFMMMMyy = '\001\000\000\000', PowerPointPDtFMMyy = '\000\000\000\000', PowerPointPDtFMMddyyHmm = '\001\000\000\000', PowerPointPDtFMddyyhmmAMPM = '\000\000\000\000', PowerPointPDtFHmm = '\001\000\000\000', PowerPointPDtFHmmss = '\000\000\000\000', PowerPointPDtFHmmAMPM = '\001\000\000\000', PowerPointPDtFHmmssAMPM = '\000\000\000\000' } PowerPointPDtF; typedef enum { PowerPointPTnSTransitionSpeedUnset = '\000\000\000\000', PowerPointPTnSTransistionSpeedSlow = '\001\000\000\000', PowerPointPTnSTransistionSpeedMedium = '\000\000\000\000' } PowerPointPTnS; typedef enum { PowerPointPMtvMouseActivationMouseClick = '\000\000\000\000', PowerPointPMtvMouseActivationMouseOver = '\001\000\000\000' } PowerPointPMtv; typedef enum { PowerPointPAxTActionTypeUnset = '\001\000\000\000', PowerPointPAxTActionTypeNone = '\000\000\000\000', PowerPointPAxTActionTypeNextSlide = '\001\000\000\000', PowerPointPAxTActionTypePreviousSlide = '\000\000\000\000', PowerPointPAxTActionTypeFirstSlide = '\001\000\000\000', PowerPointPAxTActionTypeLastSlide = '\000\000\000\000', PowerPointPAxTActionTypeLastSlideViewed = '\001\000\000\000', PowerPointPAxTActionTypeEndShow = '\000\000\000\000', PowerPointPAxTActionTypeHyperlinkAction = '\001\000\000\000', PowerPointPAxTActionTypeRunMacro = '\000\000\000\000', PowerPointPAxTActionTypeRunProgram = '\001\000\000\000', PowerPointPAxTActionTypeNamedSlideshowAction = '\000\000\000\000', PowerPointPAxTActionTypeOLEVerb = '\001\000\000\000' } PowerPointPAxT; typedef enum { PowerPointPPhdPlaceholderTypeUnset = '\001\000\000\000', PowerPointPPhdPlaceholderTypeTitlePlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeBodyPlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeCenterTitlePlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeSubtitlePlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeVerticalTitlePlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeVerticalBodyPlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeObjectPlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeChartPlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeBitmapPlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeMediaClipPlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeOrgChartPlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeTablePlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeSlideNumberPlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeHeaderPlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeFooterPlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypeDatePlaceholder = '\001\000\000\000', PowerPointPPhdPlaceholderTypeVerticalObjectPlaceholder = '\000\000\000\000', PowerPointPPhdPlaceholderTypePicturePlaceholder = '\001\000\000\000' } PowerPointPPhd; typedef enum { PowerPointPSStSlideShowTypeSpeaker = '\001\000\000\000', PowerPointPSStSlideShowTypeWindow = '\000\000\000\000', PowerPointPSStSlideShowTypePresenter = '\001\000\000\000', PowerPointPSStSlideShowTypeKiosk = '\000\000\000\000' } PowerPointPSSt; typedef enum { PowerPointRgTyPrintRangeAll = '\000\000\000\000', PowerPointRgTyPrintRangeSelection = '\001\000\000\000', PowerPointRgTyPrintRangeCurrent = '\000\000\000\000', PowerPointRgTyPrintRangeSlideRange = '\001\000\000\000' } PowerPointRgTy; typedef enum { PowerPointMedTMediaTypeUnset = '\000\000\000\000', PowerPointMedTMediaTypeOther = '\001\000\000\000', PowerPointMedTMediaTypeSound = '\000\000\000\000', PowerPointMedTMediaTypeMovie = '\001\000\000\000' } PowerPointMedT; typedef enum { PowerPointPSFySoundFormatUnset = '\001\000\000\000', PowerPointPSFySoundFormatNone = '\000\000\000\000', PowerPointPSFySoundFormatWAV = '\001\000\000\000', PowerPointPSFySoundFormatMIDI = '\000\000\000\000' } PowerPointPSFy; typedef enum { PowerPointPeBlEastAsianLineBreakNormal = '\000\000\000\000', PowerPointPeBlEastAsianLineBreakStrict = '\001\000\000\000', PowerPointPeBlEastAsianLineBreakCustom = '\000\000\000\000' } PowerPointPeBl; typedef enum { PowerPointSRgTSlideShowRangeShowAll = '\000\000\000\000', PowerPointSRgTSlideShowRange = '\001\000\000\000', PowerPointSRgTSlideShowRangeNamedSlideshow = '\000\000\000\000' } PowerPointSRgT; typedef enum { PowerPointFClrFrameColorsBrowserColors = '\000\000\000\000', PowerPointFClrFrameColorsPresentationSchemeTextColor = '\001\000\000\000', PowerPointFClrFrameColorsPresentationSchemeAccentColor = '\000\000\000\000', PowerPointFClrFrameColorsWhiteTextOnBlack = '\001\000\000\000', PowerPointFClrFrameColorsBlackTextOnWhite = '\000\000\000\000' } PowerPointFClr; typedef enum { PowerPointPMOtMovieOptimizationNormal = '\000\000\000\000', PowerPointPMOtMovieOptimizationSize = '\001\000\000\000', PowerPointPMOtMovieOptimizationSpeed = '\000\000\000\000', PowerPointPMOtMovieOptimizationQuality = '\001\000\000\000' } PowerPointPMOt; typedef enum { PowerPointPShFShapeFormatGIF = '\001\000\000\000', PowerPointPShFShapeFormatJPEG = '\000\000\000\000', PowerPointPShFShapeFormatPNG = '\001\000\000\000', PowerPointPShFShapeFormatPICT = '\000\000\000\000' } PowerPointPShF; typedef enum { PowerPointPBrTTopBorder = '\000\000\001\032', PowerPointPBrTLeftBorder = '\000\000\001\032', PowerPointPBrTBottomBorder = '\000\000\001\032', PowerPointPBrTRightBorder = '\000\000\001\032', PowerPointPBrTDiagonalDownBorder = '\000\000\001\032', PowerPointPBrTDiagonalUpBorder = '\000\000\001\032' } PowerPointPBrT; typedef enum { PowerPointPALOPageLayoutNormal = '\000\000\000\000', PowerPointPALOPageLayoutFullScreen = '\001\000\000\000' } PowerPointPALO; typedef enum { PowerPointPBuTRegular = '\001\000\000\000', PowerPointPBuTFancy = '\000\000\000\000', PowerPointPBuTTextOnly = '\001\000\000\000' } PowerPointPBuT; typedef enum { PowerPointPNBpBarPlacementTop = '\001\000\000\000', PowerPointPNBpBarPlacementBottom = '\000\000\000\000' } PowerPointPNBp; typedef enum { PowerPointAnFXAnimationTypeCustom = '\000\000\001\002', PowerPointAnFXAnimationTypeAppear = '\000\000\001\002', PowerPointAnFXAnimationTypeFly = '\000\000\001\002', PowerPointAnFXAnimationTypeBlinds = '\000\000\001\002', PowerPointAnFXAnimationTypeBox = '\000\000\001\002', PowerPointAnFXAnimationTypeCheckerboard = '\000\000\001\002', PowerPointAnFXAnimationTypeCircle = '\000\000\001\002', PowerPointAnFXAnimationTypeCrawl = '\000\000\001\002', PowerPointAnFXAnimationTypeDiamond = '\000\000\001\002', PowerPointAnFXAnimationTypeDissolve = '\000\000\001\002', PowerPointAnFXAnimationTypeFade = '\000\000\001\002', PowerPointAnFXAnimationTypeFlashOnce = '\000\000\001\002', PowerPointAnFXAnimationTypePeek = '\000\000\001\002', PowerPointAnFXAnimationTypePlus = '\000\000\001\002', PowerPointAnFXAnimationTypeRandomBars = '\000\000\001\002', PowerPointAnFXAnimationTypeSpiral = '\000\000\001\002', PowerPointAnFXAnimationTypeSplit = '\000\000\001\002', PowerPointAnFXAnimationTypeStretch = '\000\000\001\002', PowerPointAnFXAnimationTypeStrips = '\000\000\001\002', PowerPointAnFXAnimationTypeSwivel = '\000\000\001\002', PowerPointAnFXAnimationTypeWedge = '\000\000\001\002', PowerPointAnFXAnimationTypeWheel = '\000\000\001\002', PowerPointAnFXAnimationTypeWipe = '\000\000\001\002', PowerPointAnFXAnimationTypeZoom = '\000\000\001\002', PowerPointAnFXAnimationTypeRandomEffect = '\000\000\001\002', PowerPointAnFXAnimationTypeBoomerang = '\000\000\001\002', PowerPointAnFXAnimationTypeBounce = '\000\000\001\002', PowerPointAnFXAnimationTypeColorReveal = '\000\000\001\002', PowerPointAnFXAnimationTypeCredits = '\000\000\001\002', PowerPointAnFXAnimationTypeEaseIn = '\000\000\001\002', PowerPointAnFXAnimationTypeFloat = '\000\000\001\002', PowerPointAnFXAnimationTypeGrowAndTurn = '\000\000\001\002', PowerPointAnFXAnimationTypeLightSpeed = '\000\000\001\002', PowerPointAnFXAnimationTypePinwheel = '\000\000\001\002', PowerPointAnFXAnimationTypeRiseUp = '\000\000\001\002', PowerPointAnFXAnimationTypeSwish = '\000\000\001\002', PowerPointAnFXAnimationTypeThinLine = '\000\000\001\002', PowerPointAnFXAnimationTypeUnfold = '\000\000\001\002', PowerPointAnFXAnimationTypeWhip = '\000\000\001\002', PowerPointAnFXAnimationTypeAscend = '\000\000\001\002', PowerPointAnFXAnimationTypeCenterRevolve = '\000\000\001\002', PowerPointAnFXAnimationTypeFadedSwivel = '\000\000\001\002', PowerPointAnFXAnimationTypeDescend = '\000\000\001\002', PowerPointAnFXAnimationTypeSling = '\000\000\001\002', PowerPointAnFXAnimationTypeSpinner = '\000\000\001\002', PowerPointAnFXAnimationTypeStretchy = '\000\000\001\002', PowerPointAnFXAnimationTypeZip = '\000\000\001\002', PowerPointAnFXAnimationTypeArcUp = '\000\000\001\002', PowerPointAnFXAnimationTypeFadeZoom = '\000\000\001\002', PowerPointAnFXAnimationTypeGlide = '\000\000\001\002', PowerPointAnFXAnimationTypeExpand = '\000\000\001\002', PowerPointAnFXAnimationTypeFlip = '\000\000\001\002', PowerPointAnFXAnimationTypeShimmer = '\000\000\001\002', PowerPointAnFXAnimationTypeFold = '\000\000\001\002', PowerPointAnFXAnimationTypeChangeFillColor = '\000\000\001\002', PowerPointAnFXAnimationTypeChangeFont = '\000\000\001\002', PowerPointAnFXAnimationTypeChangeFontColor = '\000\000\001\002', PowerPointAnFXAnimationTypeChangeFontSize = '\000\000\001\002', PowerPointAnFXAnimationTypeChangeFontStyle = '\000\000\001\002', PowerPointAnFXAnimationTypeGrowShrink = '\000\000\001\002', PowerPointAnFXAnimationTypeChangeLineColor = '\000\000\001\002', PowerPointAnFXAnimationTypeSpin = '\000\000\001\002', PowerPointAnFXAnimationTypeTransparency = '\000\000\001\002', PowerPointAnFXAnimationTypeBoldFlash = '\000\000\001\002', PowerPointAnFXAnimationTypeBlast = '\000\000\001\002', PowerPointAnFXAnimationTypeBoldReveal = '\000\000\001\002', PowerPointAnFXAnimationTypeBrushOnColor = '\000\000\001\002', PowerPointAnFXAnimationTypeBrushOnUnderline = '\000\000\001\002', PowerPointAnFXAnimationTypeColorBlend = '\000\000\001\002', PowerPointAnFXAnimationTypeColorWave = '\000\000\001\002', PowerPointAnFXAnimationTypeComplementaryColor = '\000\000\001\002', PowerPointAnFXAnimationTypeComplementaryColor2 = '\000\000\001\002', PowerPointAnFXAnimationTypeConstrastingColor = '\000\000\001\002', PowerPointAnFXAnimationTypeDarken = '\000\000\001\002', PowerPointAnFXAnimationTypeDesaturate = '\000\000\001\002', PowerPointAnFXAnimationTypeFlashBulb = '\000\000\001\002', PowerPointAnFXAnimationTypeFlicker = '\000\000\001\002', PowerPointAnFXAnimationTypeGrowWithColor = '\000\000\001\002', PowerPointAnFXAnimationTypeLighten = '\000\000\001\002', PowerPointAnFXAnimationTypeStyleEmphasis = '\000\000\001\002', PowerPointAnFXAnimationTypeTeeter = '\000\000\001\002', PowerPointAnFXAnimationTypeVerticalGrow = '\000\000\001\002', PowerPointAnFXAnimationTypeWave = '\000\000\001\002', PowerPointAnFXAnimationTypeMediaPlay = '\000\000\001\002', PowerPointAnFXAnimationTypeMediaPause = '\000\000\001\002', PowerPointAnFXAnimationTypeMediaStop = '\000\000\001\002', PowerPointAnFXAnimationTypeCirclePath = '\000\000\001\002', PowerPointAnFXAnimationTypeRightTrianglePath = '\000\000\001\002', PowerPointAnFXAnimationTypeDiamondPath = '\000\000\001\002', PowerPointAnFXAnimationTypeHexagonPath = '\000\000\001\002', PowerPointAnFXAnimationType5PointStarPath = '\000\000\001\002', PowerPointAnFXAnimationTypeCrescentMoonPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSquarePath = '\000\000\001\002', PowerPointAnFXAnimationTypeTrapezoidPath = '\000\000\001\002', PowerPointAnFXAnimationTypeHeartPath = '\000\000\001\002', PowerPointAnFXAnimationTypeOctagonPath = '\000\000\001\002', PowerPointAnFXAnimationType6PointStarPath = '\000\000\001\002', PowerPointAnFXAnimationTypeFootballPath = '\000\000\001\002', PowerPointAnFXAnimationTypeEqualTrianglePath = '\000\000\001\002', PowerPointAnFXAnimationTypeParallelogramPath = '\000\000\001\002', PowerPointAnFXAnimationTypePentagonPath = '\000\000\001\002', PowerPointAnFXAnimationType4PointStarPath = '\000\000\001\002', PowerPointAnFXAnimationType8PointStarPath = '\000\000\001\002', PowerPointAnFXAnimationTypeTeardropPath = '\000\000\001\002', PowerPointAnFXAnimationTypePointyStarPath = '\000\000\001\002', PowerPointAnFXAnimationTypeCurvedSquarePath = '\000\000\001\002', PowerPointAnFXAnimationTypeCurvedXPath = '\000\000\001\002', PowerPointAnFXAnimationTypeVerticalFigure8Path = '\000\000\001\002', PowerPointAnFXAnimationTypeCurvyStarPath = '\000\000\001\002', PowerPointAnFXAnimationTypeLoopDeLoopPath = '\000\000\001\002', PowerPointAnFXAnimationTypeBuzzsawPath = '\000\000\001\002', PowerPointAnFXAnimationTypeHorizontalFigure8Path = '\000\000\001\002', PowerPointAnFXAnimationTypePeanutPath = '\000\000\001\002', PowerPointAnFXAnimationTypeFigure8FourPath = '\000\000\001\002', PowerPointAnFXAnimationTypeNeutronPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSwooshPath = '\000\000\001\002', PowerPointAnFXAnimationTypeBeanPath = '\000\000\001\002', PowerPointAnFXAnimationTypePlusPath = '\000\000\001\002', PowerPointAnFXAnimationTypeInvertedTrianglePath = '\000\000\001\002', PowerPointAnFXAnimationTypeInvertedSquarePath = '\000\000\001\002', PowerPointAnFXAnimationTypeLeftPath = '\000\000\001\002', PowerPointAnFXAnimationTypeTurnRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeArcDownPath = '\000\000\001\002', PowerPointAnFXAnimationTypeZigzagPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSCurve2Path = '\000\000\001\002', PowerPointAnFXAnimationTypeSineWavePath = '\000\000\001\002', PowerPointAnFXAnimationTypeBounceLeftPath = '\000\000\001\002', PowerPointAnFXAnimationTypeDownPath = '\000\000\001\002', PowerPointAnFXAnimationTypeTurnUpPath = '\000\000\001\002', PowerPointAnFXAnimationTypeArcUpPath = '\000\000\001\002', PowerPointAnFXAnimationTypeHeartbeatPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSpiralRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeWavePath = '\000\000\001\002', PowerPointAnFXAnimationTypeCurvyLeftPath = '\000\000\001\002', PowerPointAnFXAnimationTypeDiagonalDownRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeTurnDownPath = '\000\000\001\002', PowerPointAnFXAnimationTypeArcLeftPath = '\000\000\001\002', PowerPointAnFXAnimationTypeFunnelPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSpringPath = '\000\000\001\002', PowerPointAnFXAnimationTypeBounceRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSpiralLeftPath = '\000\000\001\002', PowerPointAnFXAnimationTypeDiagonalUpRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeTurnUpRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeArcRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeSCurve1Path = '\000\000\001\002', PowerPointAnFXAnimationTypeDecayingWavePath = '\000\000\001\002', PowerPointAnFXAnimationTypeCurvyRightPath = '\000\000\001\002', PowerPointAnFXAnimationTypeStairsDownPath = '\000\000\001\002', PowerPointAnFXAnimationTypeUpPath = '\000\000\001\002', PowerPointAnFXAnimationTypeRightPath = '\000\000\001\002' } PowerPointAnFX; typedef enum { PowerPointAnLvTextByNoLevels = '\000\000\001\001', PowerPointAnLvTextByAllLevels = '\000\000\001\001', PowerPointAnLvTextByFirstLevel = '\000\000\001\001', PowerPointAnLvTextBySecondLevel = '\000\000\001\001', PowerPointAnLvTextByThirdLevel = '\000\000\001\001', PowerPointAnLvTextByFourthLevel = '\000\000\001\001', PowerPointAnLvTextByFifthLevel = '\000\000\001\001', PowerPointAnLvChartAllAtOnce = '\000\000\001\001', PowerPointAnLvChartByCategory = '\000\000\001\001', PowerPointAnLvChartByCtageoryElements = '\000\000\001\001', PowerPointAnLvChartBySeries = '\000\000\001\001', PowerPointAnLvChartBySeriesElements = '\000\000\001\001' } PowerPointAnLv; typedef enum { PowerPointAnTrNoTrigger = '\000\000\000\001', PowerPointAnTrOnPageClick = '\000\000\000\001', PowerPointAnTrWithPrevious = '\000\000\000\001', PowerPointAnTrAfterPrevious = '\000\000\000\001', PowerPointAnTrOnShapeClick = '\000\000\000\001' } PowerPointAnTr; typedef enum { PowerPointAnAENoAfterEffect = '\000\000\000\000', PowerPointAnAEDim = '\001\000\000\000', PowerPointAnAEHide = '\000\000\000\000', PowerPointAnAEHideOnNextClick = '\001\000\000\000' } PowerPointAnAE; typedef enum { PowerPointAnTUByParagraph = '\001\000\000\000', PowerPointAnTUByCharacter = '\000\000\000\000', PowerPointAnTUByWord = '\001\000\000\000' } PowerPointAnTU; typedef enum { PowerPointAnRsRestartAlways = '\001\000\000\000', PowerPointAnRsRestartWhenOff = '\000\000\000\000', PowerPointAnRsNeverRestart = '\001\000\000\000' } PowerPointAnRs; typedef enum { PowerPointAnEAAfterFreeze = '\001\000\000\000', PowerPointAnEAAfterRemove = '\000\000\000\000', PowerPointAnEAAfterHold = '\001\000\000\000', PowerPointAnEAAfterTransition = '\000\000\000\000' } PowerPointAnEA; typedef enum { PowerPointAnDiNoDirection = '\000\000\000\000', PowerPointAnDiUp = '\001\000\000\000', PowerPointAnDiRight = '\000\000\000\000', PowerPointAnDiDown = '\001\000\000\000', PowerPointAnDiLeft = '\000\000\000\000', PowerPointAnDiOrdinalMask = '\001\000\000\000', PowerPointAnDiUpLeft = '\000\000\000\000', PowerPointAnDiUpRight = '\001\000\000\000', PowerPointAnDiDownRight = '\000\000\000\000', PowerPointAnDiDownLeft = '\001\000\000\000', PowerPointAnDiTop = '\000\000\000\000', PowerPointAnDiBottom = '\001\000\000\000', PowerPointAnDiTopLeft = '\000\000\000\000', PowerPointAnDiTopRight = '\001\000\000\000', PowerPointAnDiBottomRight = '\000\000\000\000', PowerPointAnDiBottomLeft = '\001\000\000\000', PowerPointAnDiHorizontal = '\000\000\000\000', PowerPointAnDiVertical = '\001\000\000\000', PowerPointAnDiAcross = '\000\000\000\000', PowerPointAnDiInward = '\001\000\000\000', PowerPointAnDiOut = '\000\000\000\000', PowerPointAnDiClockwise = '\001\000\000\000', PowerPointAnDiCounterclockwise = '\000\000\000\000', PowerPointAnDiHorizontalIn = '\001\000\000\000', PowerPointAnDiHorizontalOut = '\000\000\000\000', PowerPointAnDiVerticalIn = '\001\000\000\000', PowerPointAnDiVerticalOut = '\000\000\000\000', PowerPointAnDiSlightly = '\001\000\000\000', PowerPointAnDiCenter = '\000\000\000\000', PowerPointAnDiInSlightly = '\001\000\000\000', PowerPointAnDiInCenter = '\000\000\000\000', PowerPointAnDiInBottom = '\001\000\000\000', PowerPointAnDiOutSlightly = '\000\000\000\000', PowerPointAnDiOutCenter = '\001\000\000\000', PowerPointAnDiOutBottom = '\000\000\000\000', PowerPointAnDiFontBold = '\001\000\000\000', PowerPointAnDiFontItalic = '\000\000\000\000', PowerPointAnDiFontUnderline = '\001\000\000\000', PowerPointAnDiFontStrikethrough = '\000\000\000\000', PowerPointAnDiFontShadow = '\001\000\000\000', PowerPointAnDiFontAllCaps = '\000\000\000\000', PowerPointAnDiInstant = '\001\000\000\000', PowerPointAnDiGradual = '\000\000\000\000', PowerPointAnDiCycleClockwise = '\001\000\000\000', PowerPointAnDiCycleCounterclockwise = '\000\000\000\000' } PowerPointAnDi; typedef enum { PowerPointAnTyAnimationTypeNone = '\000\000\001\003', PowerPointAnTyAnimationTypeMotion = '\000\000\001\003', PowerPointAnTyAnimationTypeColor = '\000\000\001\003', PowerPointAnTyAnimationTypeScale = '\000\000\001\003', PowerPointAnTyAnimationTypeRotation = '\000\000\001\003', PowerPointAnTyAnimationTypeProperty = '\000\000\001\003', PowerPointAnTyAnimationTypeCommand = '\000\000\001\003', PowerPointAnTyAnimationTypeFilter = '\000\000\001\003', PowerPointAnTyAnimationTypeSet = '\000\000\001\003' } PowerPointAnTy; typedef enum { PowerPointAnppNoAdditive = '\000\000\001\007', PowerPointAnppMotion = '\000\000\001\007' } PowerPointAnpp; typedef enum { PowerPointAnSmNoAccumulate = '\000\000\001\004', PowerPointAnSmAlways = '\000\000\001\004' } PowerPointAnSm; typedef enum { PowerPointAnPrNoProperty = '\000\000\001\005', PowerPointAnPrX = '\000\000\001\005', PowerPointAnPrY = '\000\000\001\005', PowerPointAnPrWidth = '\000\000\001\005', PowerPointAnPrHeight = '\000\000\001\005', PowerPointAnPrOpacity = '\000\000\001\005', PowerPointAnPrRotation = '\000\000\001\005', PowerPointAnPrColors = '\000\000\001\005', PowerPointAnPrVisibility = '\000\000\001\005', PowerPointAnPrTextFontBold = '\000\000\001\005', PowerPointAnPrTextFontColor = '\000\000\001\005', PowerPointAnPrTextFontEmboss = '\000\000\001\005', PowerPointAnPrTextFontItalic = '\000\000\001\005', PowerPointAnPrTextFontName = '\000\000\001\005', PowerPointAnPrTextFontShadow = '\000\000\001\005', PowerPointAnPrTextFontSize = '\000\000\001\005', PowerPointAnPrTextFontSubscript = '\000\000\001\005', PowerPointAnPrTextFontSuperscript = '\000\000\001\005', PowerPointAnPrTextFontUnderline = '\000\000\001\005', PowerPointAnPrTextFontStrikethrough = '\000\000\001\005', PowerPointAnPrTextBulletCharacter = '\000\000\001\005', PowerPointAnPrTextBulletFontName = '\000\000\001\005', PowerPointAnPrTextBulletNumber = '\000\000\001\005', PowerPointAnPrTextBulletColor = '\000\000\001\005', PowerPointAnPrTextBulletRelativeSize = '\000\000\001\005', PowerPointAnPrTextBulletStyle = '\000\000\001\005', PowerPointAnPrTextBulletType = '\000\000\001\005', PowerPointAnPrShapePictureContrast = '\001\005\003\350', PowerPointAnPrShapePictureBrightness = '\001\005\003\351', PowerPointAnPrShapePictureGamma = '\001\005\003\352', PowerPointAnPrShapePictureGrayscale = '\001\005\003\353', PowerPointAnPrShapeFillOn = '\001\005\003\354', PowerPointAnPrShapeFillColor = '\001\005\003\355', PowerPointAnPrShapeFillOpacity = '\001\005\003\356', PowerPointAnPrShapeFillBackColor = '\001\005\003\357', PowerPointAnPrShapeLineOn = '\001\005\003\360', PowerPointAnPrShapeLineColor = '\001\005\003\361', PowerPointAnPrShapeShadowOn = '\001\005\003\362', PowerPointAnPrShapeShadowType = '\001\005\003\363', PowerPointAnPrShapeShadowColor = '\001\005\003\364', PowerPointAnPrShapeShadowOpacity = '\001\005\003\365', PowerPointAnPrShapeShadowOffsetX = '\001\005\003\366', PowerPointAnPrShapeShadowOffsetY = '\001\005\003\367' } PowerPointAnPr; typedef enum { PowerPointAnCTEvent = '\000\000\001\006', PowerPointAnCTCall = '\000\000\001\006', PowerPointAnCTVerb = '\000\000\001\006' } PowerPointAnCT; typedef enum { PowerPointAfetNoFilterEffectType = '\000\000\001\010', PowerPointAfetFilterEffectTypeBarn = '\000\000\001\010', PowerPointAfetFilterEffectTypeBlinds = '\000\000\001\010', PowerPointAfetFilterEffectTypeBox = '\000\000\001\010', PowerPointAfetFilterEffectTypeCheckerboard = '\000\000\001\010', PowerPointAfetFilterEffectTypeCircle = '\000\000\001\010', PowerPointAfetFilterEffectTypeDiamond = '\000\000\001\010', PowerPointAfetFilterEffectTypeDissolve = '\000\000\001\010', PowerPointAfetFilterEffectTypeFade = '\000\000\001\010', PowerPointAfetFilterEffectTypeImage = '\000\000\001\010', PowerPointAfetFilterEffectTypePixelate = '\000\000\001\010', PowerPointAfetFilterEffectTypePlus = '\000\000\001\010', PowerPointAfetFilterEffectTypeRandomBar = '\000\000\001\010', PowerPointAfetFilterEffectTypeSlide = '\000\000\001\010', PowerPointAfetFilterEffectTypeStretch = '\000\000\001\010', PowerPointAfetFilterEffectTypeStrips = '\000\000\001\010', PowerPointAfetFilterEffectTypeWedge = '\000\000\001\010', PowerPointAfetFilterEffectTypeWheel = '\000\000\001\010', PowerPointAfetFilterEffectTypeWipe = '\000\000\001\010' } PowerPointAfet; typedef enum { PowerPointAfesNoEffectSubtype = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeInVertical = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeOutVertical = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeInHorizontal = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeOutHorizontal = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeHorizontal = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeVertical = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeInward = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeOut = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeAcross = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeFromLeft = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeFromRight = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeFromTop = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeFromBottom = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeDownLeft = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeUpLeft = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeDownRight = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeUpRight = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeSpoke1 = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeSpokes2 = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeSpokes3 = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeSpokes4 = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeSpokes8 = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeLeft = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeRight = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeDown = '\000\000\001 ', PowerPointAfesFilterEffectSubtypeUp = '\000\000\001 ' } PowerPointAfes; typedef enum { PowerPoint4002View = 'pVEW', PowerPoint4002Presentation = 'pptP' } PowerPoint4002; typedef enum { PowerPoint4001Slide = 'pSLD', PowerPoint4001Master = 'pMtr', PowerPoint4001Presentation = 'pptP' } PowerPoint4001; typedef enum { PowerPoint4010Shape = 'pShp', PowerPoint4010FillFormat = 'pFFm' } PowerPoint4010; typedef enum { PowerPoint4015Shape = 'pShp', PowerPoint4015FillFormat = 'pFFm' } PowerPoint4015; typedef enum { PowerPoint4023Callout = 'cD00', PowerPoint4023CalloutFormat = 'cCoF' } PowerPoint4023; typedef enum { PowerPoint4018Connector = 'cD01', PowerPoint4018ConnectorFormat = 'pCxF' } PowerPoint4018; typedef enum { PowerPoint4019Connector = 'cD01', PowerPoint4019ConnectorFormat = 'pCxF' } PowerPoint4019; typedef enum { PowerPoint4025Callout = 'cD00', PowerPoint4025CalloutFormat = 'cCoF' } PowerPoint4025; typedef enum { PowerPoint4024Callout = 'cD00', PowerPoint4024CalloutFormat = 'cCoF' } PowerPoint4024; typedef enum { PowerPoint4020Connector = 'cD01', PowerPoint4020ConnectorFormat = 'pCxF' } PowerPoint4020; typedef enum { PowerPoint4021Connector = 'cD01', PowerPoint4021ConnectorFormat = 'pCxF' } PowerPoint4021; typedef enum { PowerPoint4011Shape = 'pShp', PowerPoint4011FillFormat = 'pFFm' } PowerPoint4011; typedef enum { PowerPoint4009Shape = 'pShp', PowerPoint4009ShapeRange = 'ShpR' } PowerPoint4009; typedef enum { PowerPoint4014Shape = 'pShp', PowerPoint4014FillFormat = 'pFFm' } PowerPoint4014; typedef enum { PowerPoint4022Shape = 'pShp', PowerPoint4022ThreeDFormat = 'D3Df' } PowerPoint4022; typedef enum { PowerPoint4016Shape = 'pShp', PowerPoint4016FillFormat = 'pFFm' } PowerPoint4016; typedef enum { PowerPoint4017Shape = 'pShp', PowerPoint4017FillFormat = 'pFFm' } PowerPoint4017; typedef enum { PowerPoint4008Shape = 'pShp', PowerPoint4008ShapeRange = 'ShpR' } PowerPoint4008; typedef enum { PowerPoint4013Shape = 'pShp', PowerPoint4013FillFormat = 'pFFm' } PowerPoint4013; typedef enum { PowerPoint4012Shape = 'pShp', PowerPoint4012FillFormat = 'pFFm' } PowerPoint4012; typedef enum { PowerPoint4003Shape = 'pShp', PowerPoint4003ShapeRange = 'ShpR' } PowerPoint4003; typedef enum { PowerPoint4007Shape = 'pShp', PowerPoint4007ShapeRange = 'ShpR' } PowerPoint4007; typedef enum { PowerPoint4004Shape = 'pShp', PowerPoint4004ShapeRange = 'ShpR' } PowerPoint4004; typedef enum { PowerPoint4005Shape = 'pShp', PowerPoint4005ShapeRange = 'ShpR' } PowerPoint4005; typedef enum { PowerPoint4006Shape = 'pShp', PowerPoint4006ShapeRange = 'ShpR' } PowerPoint4006; /* * Standard Suite */ // A scriptable object @interface PowerPointBaseObject : SBObject @property (copy) NSDictionary *properties; // All of the object's properties - (void) closeSaving:(PowerPointSavo)saving savingIn:(PowerPointPPfd)savingIn; // Close an object - (NSInteger) dataSizeAs:(NSNumber *)as; // Return the size in bytes of an object - (void) delete; // Delete an element from an object - (SBObject *) duplicateTo:(SBObject *)to; // Duplicate object(s) - (BOOL) exists; // Verify if an object exists - (SBObject *) moveTo:(SBObject *)to; // Move object(s) to a new location - (void) open; // Open the specified object(s) - (void) saveIn:(PowerPointPPfd)in_ as:(PowerPointPPff)as; // Save an object - (void) select; // Make a selection - (void) quit; - (void) setPrinterSettingsPrinterSettings:(NSInteger)printerSettings; @end // A basic application program @interface PowerPointBaseApplication : PowerPointBaseObject @property (readonly) BOOL frontmost; // Is this the frontmost application? @property (copy, readonly) NSString *name; // the name @property (copy, readonly) NSString *version; // the version of the application @end // Every document @interface PowerPointBaseDocument : PowerPointBaseObject @property (readonly) BOOL modified; // Has the document been modified since the last save? @property (copy, readonly) NSString *name; // the name @end // Every basic window @interface PowerPointBasicWindow : PowerPointBaseObject @property NSRect bounds; // the boundary rectangle for the window @property (readonly) BOOL closeable; // Does the window have a close box? @property (readonly) BOOL titled; // Does the window have a title bar? @property (readonly) NSInteger entryIndex; // the number of the window @property (readonly) BOOL floating; // Does the window float? @property (readonly) BOOL modal; // Is the window modal? @property NSPoint position; // upper left coordinates of the window @property (readonly) BOOL resizable; // Is the window resizable? @property (readonly) BOOL zoomable; // Is the window zoomable? @property BOOL zoomed; // Is the window zoomed? @property (copy, readonly) NSString *name; // the title of the window @property (readonly) BOOL visible; // Is the window visible? @property (readonly) BOOL collapsable; // Is the window collapasable? @property BOOL collapsed; // Is the window collapsed? @property (readonly) BOOL sheet; // Is this window a sheet window? @end @interface PowerPointPrintSettings : SBObject @property (readonly) NSInteger copies; // the number of copies of a document to be printed @property (readonly) BOOL collating; // Should printed copies be collated? @property (readonly) NSInteger startingPage; // the first page of the document to be printed @property (readonly) NSInteger endingPage; // the last page of the document to be printed @property (readonly) NSInteger pagesAcross; // number of logical pages laid across a physical page @property (readonly) NSInteger pagesDown; // number of logical pages laid out down a physical page @property (copy, readonly) NSDate *requestedPrintTime; // the time at which the desktop printer should print the document... @property (copy, readonly) id errorHandling; // how errors are handled @property (copy, readonly) NSString *faxNumber; // for fax number @property (copy, readonly) NSString *targetPrinter; // the queue name of the target printer - (void) closeSaving:(PowerPointSavo)saving savingIn:(PowerPointPPfd)savingIn; // Close an object - (NSInteger) dataSizeAs:(NSNumber *)as; // Return the size in bytes of an object - (void) delete; // Delete an element from an object - (SBObject *) duplicateTo:(SBObject *)to; // Duplicate object(s) - (BOOL) exists; // Verify if an object exists - (SBObject *) moveTo:(SBObject *)to; // Move object(s) to a new location - (void) open; // Open the specified object(s) - (void) saveIn:(PowerPointPPfd)in_ as:(PowerPointPPff)as; // Save an object - (void) select; // Make a selection - (void) quit; - (void) setPrinterSettingsPrinterSettings:(NSInteger)printerSettings; @end /* * Microsoft Office Suite */ // Every command bar control @interface PowerPointCommandBarControl : PowerPointBaseObject @property BOOL beginGroup; // Returns or sets if the command bar control appears at the beginning of a group of controls on the command bar. @property (readonly) BOOL builtIn; // Returns true if the command bar control is a built-in command bar control. @property (readonly) PowerPointMCLT controlType; // Returns the type of the command bar control. @property (copy) NSString *descriptionText; // Returns or sets the description for a command bar control. The description is not displayed to the user, but it can be useful for documenting the behavior of a control. @property BOOL enabled; // Returns or sets if the command bar control is enabled. @property (readonly) NSInteger entry_index; // Returns the index number for this command bar control. @property NSInteger height; // Returns or sets the height of a command bar control. @property NSInteger helpContextID; // Returns or sets the help context ID number for the Help topic attached to the command bar control. @property (copy) NSString *helpFile; // Returns or sets the file name for the help topic attached to the command bar. To use this property, you must also set the help context ID property. - (NSInteger) id; // Returns the id for a built-in command bar control. @property (readonly) NSInteger leftPosition; // Returns the left position of the command bar control. @property (copy) NSString *name; // Returns or sets the caption text for a command bar control. @property (copy) NSString *parameter; // Returns or sets a string that is used to execute a command. @property NSInteger priority; // Returns or sets the priority of a command bar control. A controls priority determines whether the control can be dropped from a docked command bar if the command bar controls can not fit in a single row. Valid priority number are 0 through 7. @property (copy) NSString *tag; // Returns or sets information about the command bar control, such as data that can be used as an argument in procedures, or information that identifies the control. @property (copy) NSString *tooltipText; // Returns or sets the text displayed in a command bar controls tooltip. @property (readonly) NSInteger top; // Returns the top position of a command bar control. @property BOOL visible; // Returns or sets if the command bar control is visible. @property NSInteger width; // Returns or sets the width in pixels of the command bar control. - (void) execute; // Runs the procedure or built-in command assigned to the specified command bar control. @end // Every command bar button @interface PowerPointCommandBarButton : PowerPointCommandBarControl @property (readonly) BOOL buttonFaceIsDefault; // Returns if the face of a command bar button control is the original built-in face. @property PowerPointMBns buttonState; // Returns or set the appearance of a command bar button control. The property is read-only for built-in command bar buttons. @property PowerPointMBTs buttonStyle; // Returns or sets the way a command button control is displayed. @property NSInteger faceId; // Returns or sets the Id number for the face of the command bar button control. @end // Every command bar combobox @interface PowerPointCommandBarCombobox : PowerPointCommandBarControl @property PowerPointMXcb comboboxStyle; // Returns or sets the way a command bar combobox control is displayed. @property (copy) NSString *comboboxText; // Returns or sets the text in the display or edit portion of the command bar combobox control. @property NSInteger dropDownLines; // Returns or sets the number of lines in a command bar control combobox control. The combobox control must be a custom control. @property NSInteger dropDownWidth; // Returns or sets the width in pixels of the list for the specified command bar combobox control. An error occurs if you attempt to set this property for a built-in combobox control. @property NSInteger listIndex; - (void) addItemToComboboxComboboxItem:(NSString *)comboboxItem entry_index:(NSInteger)entry_index; // Add a new string to a custom combobox control. - (void) clearCombobox; // Clear all of the strings form a custom combobox. - (NSString *) getComboboxItemEntry_index:(NSInteger)entry_index; // Return the string at the given index within a combobox. - (NSInteger) getCountOfComboboxItems; // Return the number of strings within a combobox. - (void) removeAnItemFromComboboxEntry_index:(NSInteger)entry_index; // Remove a string from a custom combobox. - (void) setComboboxItemEntry_index:(NSInteger)entry_index comboboxItem:(NSString *)comboboxItem; // Set the string an a given index for a custom combobox. @end // Every command bar popup @interface PowerPointCommandBarPopup : PowerPointCommandBarControl - (SBElementArray *) commandBarControls; @end // Every command bar @interface PowerPointCommandBar : PowerPointBaseObject - (SBElementArray *) commandBarControls; @property PowerPointMBPS barPosition; // Returns or sets the position of the command bar. @property (readonly) PowerPointMBTY barType; // Returns the type of this command bar. @property (readonly) BOOL builtIn; // True if the command bar is built-in. @property (copy, readonly) NSString *context; // Returns or sets a string that determines where a command bar will be saved. @property (readonly) BOOL embeddable; // Returns if the command bar can be displayed inside the document window. @property BOOL embedded; // Returns or sets if the command bar will be displayed inside the document window. @property BOOL enabled; // Returns or set if the command bar is enabled. @property (readonly) NSInteger entry_index; // The index of the command bar. @property NSInteger height; // Returns or sets the height of the command bar. @property NSInteger leftPosition; // Returns or sets the left position of the command bar. @property (copy) NSString *localName; // Returns or sets the name of the command bar in the localized language of the application. An error is returned when trying to set the local name of a built-in command bar. @property (copy) NSString *name; // Returns or sets the name of the command bar. @property (copy) NSArray *protection; // Returns or sets the way a command bar is protected from user customization. It accepts a list of the following items: no protection, no customize, no resize, no move, no change visible, no change dock, no vertical dock, no horizontal dock. @property NSInteger rowIndex; // Returns or sets the docking order of a command bar in relation to other command bars in the same docking area. Can be an integer greater than zero. @property NSInteger top; // Returns or sets the top position of a command bar. @property BOOL visible; // Returns or sets if the command bar is visible. @property NSInteger width; // Returns or sets the width in pixels of the command bar. @end // Every document property @interface PowerPointDocumentProperty : PowerPointBaseObject @property (copy) NSNumber *documentPropertyType; // Returns or sets the document property type. @property (copy) NSString *linkSource; // Returns or sets the source of a lined custom document property. @property BOOL linkToContent; // True if the value of the document property is lined to the content of the container document. False if the value is static. This only applies to custom document properties. For built-in properties this is always false. @property (copy) NSString *name; // Returns or sets the name of the document property. @property (copy) NSString *value; // Returns or sets the value of the document property. @end // Every custom document property @interface PowerPointCustomDocumentProperty : PowerPointDocumentProperty @end @interface PowerPointWebPageFont : PowerPointBaseObject @property (copy) NSString *fixedWidthFont; // Returns or sets the fixed-width font setting. @property double fixedWidthFontSize; // Returns or sets the fixed-width font size. You can enter half-point sizes; if you enter other fractional point sizes, they are rounded up or down to the nearest half-point. @property (copy) NSString *proportionalFont; // Returns or sets the proportional font setting. @property double proportionalFontSize; // Returns or sets the proportional font size. You can enter half-point sizes; if you enter other fractional point sizes, they are rounded up or down to the nearest half-point. @end /* * Microsoft PowerPoint Suite */ @interface PowerPointActionSetting : PowerPointBaseObject @property PowerPointPAxT action; @property (copy) NSString *actionSettingToRun; @property (copy, readonly) PowerPointSoundEffect *actionSoundEffect; @property (copy) NSString *actionVerb; @property BOOL animateAction; @property (copy, readonly) PowerPointHyperlink *hyperlink; @property (copy) NSString *slideShowName; @end // Every animation behavior @interface PowerPointAnimationBehavior : PowerPointBaseObject @property PowerPointAnSm accumulate; @property PowerPointAnpp additive; @property PowerPointAnTy animationBehaviorType; @property (copy, readonly) PowerPointColorsEffect *colorsEffect; @property (copy, readonly) PowerPointCommandEffect *commandEffect; @property (copy, readonly) PowerPointFilterEffect *filterEffect; @property (copy, readonly) PowerPointMotionEffect *motionEffect; @property (copy, readonly) PowerPointPropertyEffect *propertyEffect; @property (copy, readonly) PowerPointRotatingEffect *rotatingEffect; @property (copy, readonly) PowerPointScaleEffect *scaleEffect; @property (copy, readonly) PowerPointSetEffect *setEffect; @property (copy, readonly) PowerPointTiming *timing; @end // Every animation point @interface PowerPointAnimationPoint : PowerPointBaseObject @property (copy) NSString *formula; @property double time; @property (copy) SBObject *value; @end @interface PowerPointAnimationSettings : PowerPointBaseObject @property double advanceTime; @property PowerPointAsAe afterEffect; @property BOOL animate; @property BOOL animateBackground; @property BOOL animateTextInReverse; @property NSInteger animationOrder; @property (copy, readonly) PowerPointPlaySettings *animationPlaySettings; @property (copy, readonly) PowerPointSoundEffect *animationSoundEffect; @property PowerPointPCuE chartUnitEffect; @property (copy) NSColor *dimColor; @property PowerPointMCoI dimColorThemeIndex; @property PowerPointPEeF entryEffect; @property PowerPointPTlE textLevelEffect; @property PowerPointPTuE textUnitEffect; @end // An AppleScript object representing the Microsoft POWERPOINT application. @interface PowerPointApplication : SBApplication - (SBElementArray *) presentations; - (SBElementArray *) documentWindows; - (SBElementArray *) slideShowWindows; - (SBElementArray *) commandBars; @property (copy, readonly) NSString *Version; @property (copy, readonly) PowerPointPresentation *activePresentation; @property (copy, readonly) NSString *activePrinter; @property (copy, readonly) PowerPointDocumentWindow *activeWindow; @property (copy, readonly) PowerPointAutocorrect *autocorrectObject; // Returns the autocorrect object @property (copy, readonly) NSString *build; @property (copy, readonly) NSString *caption; @property PowerPointPSAT defaultSaveFormat; @property (copy, readonly) PowerPointDefaultWebOptions *defaultWebOptionsObject; @property NSInteger keyboardScript; // Returns the current keyboard script @property (copy, readonly) NSString *name; @property (copy, readonly) NSString *operatingSystem; @property (copy, readonly) NSString *path; @property (copy, readonly) PowerPointPreferences *preferenceObject; @property (copy, readonly) PowerPointSaveAsMovieSettings *saveAsMovieSettingsObject; @property BOOL startUpDialog; - (void) print:(NSArray *)x withProperties:(PowerPointPrintSettings *)withProperties; // Print the specified object(s) - (void) quitSaving:(PowerPointSavo)saving; // Quit an application program - (void) select; // Make a selection - (void) reset:(PowerPoint4000)x; // Resets a built-in command bar or command bar control to its default configuration. - (void) applyTheme:(PowerPoint4001)x fileName:(NSString *)fileName; // Applies a theme or design template to the specified slide, master or presentation - (void) arrangeWindows:(PowerPointPArS)x; // Arrange Document Windows - (void) insertTheText:(NSString *)theText at:(SBObject *)at; - (void) pasteObject:(PowerPoint4002)x; - (void) apply:(PowerPoint4003)x; - (void) automaticLength:(PowerPoint4023)x; - (void) beginConnect:(PowerPoint4018)x connectedShape:(PowerPointShape *)connectedShape connectionSite:(NSInteger)connectionSite; - (void) beginDisconnect:(PowerPoint4019)x; - (void) customDrop:(PowerPoint4024)x dropAmount:(double)dropAmount; - (void) customLength:(PowerPoint4025)x length:(double)length; - (void) endConnect:(PowerPoint4020)x connectedShape:(PowerPointShape *)connectedShape connectionSite:(NSInteger)connectionSite; - (void) endDisconnect:(PowerPoint4021)x; - (void) flip:(PowerPoint4007)x direction:(PowerPointMFlC)direction; - (PowerPointActionSetting *) getActionSettingFor:(PowerPoint4009)x event:(PowerPointPMtv)event; - (void) oneColorGradient:(PowerPoint4010)x style:(PowerPointMGdS)style variant:(NSInteger)variant degree:(double)degree; - (void) patterned:(PowerPoint4011)x pattern:(PowerPointPpTy)pattern; - (void) pickUp:(PowerPoint4004)x; - (void) presetGradient:(PowerPoint4012)x style:(PowerPointMGdS)style variant:(NSInteger)variant gradientType:(PowerPointMPGb)gradientType; - (void) presetTextured:(PowerPoint4013)x texture:(PowerPointMPzT)texture; - (void) rerouteConnections:(PowerPoint4005)x; - (void) resetRotation:(PowerPoint4022)x; // Resets the extrusion rotation around the x-axis and the y-axis to zero so that the front of the extrusion faces forward. This method doesn't reset the rotation around the z-axis. - (void) setShapesDefaultProperties:(PowerPoint4006)x; - (void) solid:(PowerPoint4014)x; - (void) twoColorGradient:(PowerPoint4015)x style:(PowerPointMGdS)style variant:(NSInteger)variant; - (void) userPicture:(PowerPoint4016)x pictureFile:(NSString *)pictureFile; - (void) userTextured:(PowerPoint4017)x textureFile:(NSString *)textureFile; - (void) zOrder:(PowerPoint4008)x zOrderPosition:(PowerPointMZoC)zOrderPosition; @end // Every autocorrect entry @interface PowerPointAutocorrectEntry : PowerPointBaseObject @property (copy, readonly) NSString *autocorrectValue; // Returns the value of the auto correct entry. @property (readonly) NSInteger entry_index; // Returns the index for the position of the object in its container element list. @property (copy, readonly) NSString *name; // Returns the name of the auto correct entry. @end // Represents the autocorrect functionality in PowerPoint. @interface PowerPointAutocorrect : PowerPointBaseObject - (SBElementArray *) autocorrectEntries; - (SBElementArray *) firstLetterExceptions; - (SBElementArray *) twoInitialCapsExceptions; @property BOOL correctDays; // Returns if PowerPoint automatically capitalizes the first letter of days of the week. @property BOOL correctInitialCaps; // Returns if PowerPoint automatically makes the second letter lowercase if the first two letters of a word are typed in uppercase. For example, POwerPoint is corrected to PowerPoint. @property BOOL correctSentenceCaps; // Returns if PowerPoint automatically capitalizes the first letter in each sentence. @property BOOL replaceText; // Returns if Microsoft PowerPoint automatically replaces specified text with entries from the autocorrect list. @end @interface PowerPointBulletFormat : PowerPointBaseObject @property (copy) NSString *bulletCharacter; // Returns or sets the Unicode character value that is used for bullets in the specified text. @property (copy, readonly) PowerPointFont *bulletFont; // Returns a font object that represents character formatting for a bullet format object. @property (readonly) NSInteger bulletNumber; // Returns the bullet number of a paragraph. @property NSInteger bulletStartValue; @property PowerPointPBtS bulletStyle; // Returns or sets a constant that represents the style of a bullet. @property PowerPointPBtT bulletType; // Returns or sets a constant that represents the type of bullet. @property double relativeSize; // Returns or sets the bullet size relative to the size of the first text character in the paragraph. @property BOOL useTextColor; // Determines whether the specified bullets are set to the color of the first text character in the paragraph. @property BOOL useTextFont; // Determines whether the specified bullets are set to the font of the first text character in the paragraph. @property BOOL visible; // Returns or sets a value that specifies whether the bullet is visible. - (void) setBulletPicturePictureFile:(NSString *)pictureFile; // Sets the graphics file to be used for bullets in a bulleted list. @end // Every color scheme @interface PowerPointColorScheme : PowerPointBaseObject - (NSColor *) getColorFromAt:(PowerPointPCSi)at; - (void) setColorForAt:(PowerPointPCSi)at toColor:(NSColor *)toColor; @end @interface PowerPointColorsEffect : PowerPointBaseObject @property (copy) NSColor *by_color; @property PowerPointMCoI by_colorThemeIndex; // Returns an object that represents a change to the color of the object by the specified number, expressed in RGB format. @property (copy) NSColor *from_color; @property PowerPointMCoI from_colorThemeIndex; // Returns or sets an object that represents the starting RGB color value of an animation behavior. @property (copy) NSColor *to_color; @property PowerPointMCoI to_colorThemeIndex; // Returns or sets an object that represents the RGB color value of an animation behavior. @end @interface PowerPointCommandEffect : PowerPointBaseObject @property (copy) NSString *command; @property PowerPointAnCT type; @end // Every custom layout @interface PowerPointCustomLayout : PowerPointBaseObject - (SBElementArray *) shapes; @property (copy, readonly) PowerPointShape *background; @property (copy, readonly) PowerPointDesign *design; @property BOOL displayMasterShapes; @property BOOL followMasterBackground; @property (copy, readonly) PowerPointHeadersAndFooters *headersAndFooters; @property (readonly) double height; @property (copy, readonly) PowerPointThemeColorScheme *themeColorScheme; // Returns the color scheme of a custom layout. @property (copy, readonly) PowerPointTimeline *timeline; @property (readonly) double width; @end @interface PowerPointDefaultWebOptions : PowerPointBaseObject @property BOOL allowPNG; @property BOOL alwaysSaveInDefaultEncoding; @property PowerPointPBuT buttonsType; @property BOOL checkIfOfficeIsHTMLEditor; @property PowerPointMtEn encoding; @property PowerPointFClr frameColors; @property BOOL includeBinaryFile; @property PowerPointPNBp navBarPlacement; @property BOOL supportIE4; @property BOOL supportNN4; @property BOOL supportOlderBrowsers; @property BOOL updateLinksOnSave; @property (copy) NSString *webPageKeywords; @property (copy) NSString *webPageTitle; @end // Every design @interface PowerPointDesign : PowerPointBaseObject @property (copy, readonly) PowerPointMaster *slideMaster; @end // Every document window @interface PowerPointDocumentWindow : PowerPointBasicWindow - (SBElementArray *) panes; @property (readonly) BOOL active; @property (copy, readonly) PowerPointPane *activePane; @property BOOL blackAndWhite; @property (copy, readonly) NSString *caption; @property (readonly) NSInteger entry_index; @property double height; @property double leftPosition; @property (copy, readonly) PowerPointPresentation *presentation; @property (copy, readonly) PowerPointSelection *selection; // Represents the selection in the specified document window. @property NSInteger splitHorizontal; @property NSInteger splitVertical; @property double top; @property (copy, readonly) PowerPointView *view; @property PowerPointPVTy viewType; @property double width; - (void) launchSpellerOn; @end @interface PowerPointEffectInformation : PowerPointBaseObject @property (readonly) PowerPointAnAE afterEffectInformation; @property (readonly) BOOL animateBackgroundInformation; @property (readonly) BOOL animateTextInReverseInformation; @property (readonly) PowerPointAnLv buildByLevel; @property (copy, readonly) NSColor *dim; @property (copy, readonly) PowerPointPlaySettings *playSettingsInformation; @property (copy, readonly) PowerPointSoundEffect *soundEffectInformation; @property (readonly) PowerPointAnTU textUnitEffectInformation; @end @interface PowerPointEffectParameters : PowerPointBaseObject @property double amount; @property (copy, readonly) NSColor *color2; @property (readonly) PowerPointMCoI color2ColorThemeIndex; // Returns an object that represents the color on which to end a color-cycle animation. @property PowerPointAnDi direction; @property (copy) NSString *font2; @property BOOL relative; @property double size2; @end // Every effect @interface PowerPointEffect : PowerPointBaseObject - (SBElementArray *) animationBehaviors; @property PowerPointAnFX animationEffectType; @property (copy, readonly) PowerPointEffectInformation *effectInformation; @property (copy, readonly) PowerPointEffectParameters *effectParameters; @property BOOL exitAnimation; @property (copy, readonly) NSString *name; @property (copy) PowerPointShape *shape; @property NSInteger targetParagraph; @property (readonly) NSInteger textRangeLength; @property (readonly) NSInteger textRangeStart; @property (copy, readonly) PowerPointTiming *timing; - (PowerPointAnimationBehavior *) addBehaviorType:(PowerPointAnTy)type; // add an animation behavior @end @interface PowerPointFilterEffect : PowerPointBaseObject @property PowerPointAfet filterType; @property BOOL reveal; @property PowerPointAfes subtype; @end // Represents an abbreviation excluded from automatic correction. @interface PowerPointFirstLetterException : PowerPointBaseObject @property (readonly) NSInteger entry_index; // Returns the index for the position of the object in its container element list. @property (copy, readonly) NSString *name; // Returns the name of the FirstLetterException. @end // Contains font attributes, such as font name, size, and color, for an object. @interface PowerPointFont : PowerPointBaseObject @property (copy) NSString *ASCIIName; // Returns or sets the font used for Latin text; characters with character codes from 0 through 127. @property BOOL autoRotateNumbers; // Returns or sets a value that specifies whether the numbers in a numbered list should be rotated when the text is rotated. @property double baseLineOffset; // Returns or sets a value specifying the horizontaol offset of the selected font. @property BOOL bold; // Returns or sets a value specifying whether the font should be bold. @property PowerPointMTCa capsType; // Returns or sets a value specifying how the text should be capitalized. @property (copy) NSString *eastAsianName; // Returns or sets the font name used for Asian text. @property (readonly) BOOL embedable; // Returns a value indicating whether the font can be embedded in a page. @property (readonly) BOOL embedded; // Returns a value specifying whether the font is embedded in a page. @property BOOL emboss; @property BOOL equalizeCharacterHeight; // Returns or sets a value specifying whether the text should have the same horizontal height. @property (copy, readonly) PowerPointFillFormat *fillFormat; // Returns a value specifying the fill formatting for text. @property (copy) NSColor *fontColor; @property PowerPointMCoI fontColorThemeIndex; // Returns or sets the color for the specified font. @property (copy) NSString *fontName; // Returns or sets a value specifying the font to use for a selection. @property (copy) NSString *fontNameOther; // Returns or sets the font used for characters whose character set numbers are greater than 127. @property double fontSize; @property (copy, readonly) PowerPointGlowFormat *glowFormat; // Returns a value specifying the glow formatting of the text. @property (copy) NSColor *highlightColor; // Returns or sets the text highlight color for object. @property PowerPointMCoI highlightColorThemeIndex; // Returns or sets the specified text highlight color for object. @property BOOL italic; @property double kerning; // Returns or sets a value specifying the amount of spacing between text characters. @property (copy, readonly) PowerPointLineFormat *lineFormat; // Returns a value specifiying the line formatting of the text. @property (copy, readonly) PowerPointReflectionFormat *reflectionFormat; // Returns a value specifying the reflection formatting of the text. @property (copy, readonly) PowerPointShadowFormat *shadowFormat; // Returns the value specifying the type of shadow effect for the selection of text. @property PowerPointMSET softEdgeFormat; // Returns or sets a value specifying the soft edge fromatting of the text. @property double spacing; // Returns or sets a value specifying the spacing between characters in a selection of text. @property PowerPointMTSt strikeType; // Returns or sets a value specifying the strike format used for a selection of text. @property BOOL subscript; // Returns or sets a value specifying that the selected text should be displayed a subscript. @property BOOL superscript; // Returns or sets a value specifying that the selected text should be displayed a superscript. @property double transparency; @property BOOL underline; @property (copy) NSColor *underlineColor; // Returns or sets the 24-bit color of the underline for the specified font object. @property PowerPointMCoI underlineColorThemeIndex; // Returns a value specifying the color of the underline for the selected text. @property PowerPointMTUl underlineStyle; // Returns or sets a value specifying the underline style for the selected text. @property PowerPointMPXF wordArtStylesFormat; // Returns or sets a value specifying the text effect for the selected text. @end @interface PowerPointHeaderOrFooter : PowerPointBaseObject @property PowerPointPDtF dateFormat; @property (copy) NSString *headerFooterText; @property BOOL useDateFormat; @property BOOL visible; @end @interface PowerPointHeadersAndFooters : PowerPointBaseObject @property (copy, readonly) PowerPointHeaderOrFooter *dateAndTime; @property BOOL displayHeadersFootersOnTitleSlide; @property (copy, readonly) PowerPointHeaderOrFooter *footer; @property (copy, readonly) PowerPointHeaderOrFooter *header; @property (copy, readonly) PowerPointHeaderOrFooter *slideNumber; @end // Every hyperlink @interface PowerPointHyperlink : PowerPointBaseObject @property (copy) NSString *hyperlinkAddress; @property (copy) NSString *hyperlinkSubAddress; @property (readonly) PowerPointMHyT hyperlinkType; @end @interface PowerPointMaster : PowerPointBaseObject - (SBElementArray *) shapes; - (SBElementArray *) hyperlinks; - (SBElementArray *) customLayouts; @property (copy, readonly) PowerPointShape *background; @property (copy, readonly) PowerPointColorScheme *colorScheme; @property (copy, readonly) PowerPointDesign *design; @property (copy, readonly) PowerPointHeadersAndFooters *headersAndFooters; @property (readonly) double height; @property (copy, readonly) PowerPointOfficeTheme *theme; @property (copy, readonly) PowerPointTimeline *timeline; @property (readonly) double width; - (PowerPointTextStyle *) getTextStyleFromAt:(PowerPointPTst)at; @end @interface PowerPointMotionEffect : PowerPointBaseObject @property double byX; @property double byY; @property double fromX; @property double fromY; @property (copy) NSString *path; @property double toX; @property double toY; @end // Every named slide show @interface PowerPointNamedSlideShow : PowerPointBaseObject @property (copy, readonly) NSString *name; @property (readonly) NSInteger numberOfSlides; @property (copy, readonly) NSArray *slideIDs; @end @interface PowerPointPageSetup : PowerPointBaseObject @property NSInteger firstSlideNumber; @property PowerPointMOrT notesOrientation; @property PowerPointMOrT slideOrientation; @property PowerPointSSzT slideSize; @property double slideWidth; @end // Every pane @interface PowerPointPane : PowerPointBaseObject @property (readonly) BOOL active; @property (readonly) PowerPointPVTy paneViewType; @end @interface PowerPointParagraphFormat : PowerPointBaseObject - (SBElementArray *) tabStops; @property PowerPointPpgA alignment; @property PowerPointPBlA baselineAlignment; // Returns or sets a constant that represents the vertical position of fonts in a paragraph. @property (copy, readonly) PowerPointBulletFormat *bulletFormat; @property BOOL eastAsianLineBreakControl; @property double firstLineIndent; // Returns or sets the value, in points, for a first line or hanging indent. @property BOOL hangingPunctuation; // Determines whether hanging punctuation is enabled for the specified paragraphs. @property NSInteger indentLevel; // Returns or sets a value representing the indent level assigned to text in the selected paragraph. @property double leftIndent; // Returns or sets a value that represents the left indent value, in points, for the specified paragraphs. @property BOOL lineRuleAfter; // Determines whether line spacing after the last line in each paragraph is set to a specific number of points or lines. @property BOOL lineRuleBefore; // Determines whether line spacing before the first line in each paragraph is set to a specific number of points or lines. @property BOOL lineRuleWithin; // Determines whether line spacing between base lines is set to a specific number of points or lines. @property double rightIndent; // Returns or sets the right indent, in points, for the specified paragraphs. @property double spaceAfter; // Returns or sets the spacing, in points, after the specified paragraphs. @property double spaceBefore; // Returns or sets the spacing, in points, before the specified paragraphs. @property double spaceWithin; // Returns or sets the amount of space between base lines in the specified paragraph, in points or lines. @property PowerPointPDrT textDirection; // Returns or sets the text direction for the specified paragraph. @property BOOL wordWrap; // Determines whether the application wraps the Latin text in the middle of a word in the specified paragraphs. @end @interface PowerPointPlaySettings : PowerPointBaseObject @property BOOL hideWhileNotPlaying; @property BOOL loopUntilStopped; @property BOOL pauseAnimation; @property BOOL playOnEntry; @property BOOL rewindMove; @property NSInteger stopAfterSlides; @end @interface PowerPointPreferences : PowerPointBaseObject @property NSInteger alwaysSuggestCorrections; @property NSInteger appendDOSExtentions; @property NSInteger autoFit; @property NSInteger autoRecoveryFrequency; @property NSInteger backgroundSpelling; @property NSInteger compressFile; @property NSInteger defaultView; @property NSInteger dragDrop; @property NSInteger endBlankSlide; @property NSInteger filePropertiesPrompt; @property NSInteger fullTextSearch; @property NSInteger hideSpellingErrors; @property NSInteger ignoreNumbersInWords; @property NSInteger ignoreUppercase; @property NSInteger linkSoundLimit; @property NSInteger mruListActive; @property NSInteger mruListSize; @property NSInteger optionBitmap; @property NSInteger rulerUnits; @property NSInteger saveAutoRecovery; @property NSInteger showVerticalRuler; @property NSInteger slideShowControl; @property NSInteger slideShowRightMouse; @property NSInteger smartCutPaste; @property NSInteger smartQuotes; @property NSInteger undoLevelCount; @property (copy) NSString *userInitials; @property (copy) NSString *userName; @property NSInteger wordSelection; @end // Every presentation @interface PowerPointPresentation : PowerPointBaseObject - (SBElementArray *) slides; - (SBElementArray *) colorSchemes; - (SBElementArray *) fonts; - (SBElementArray *) documentWindows; - (SBElementArray *) documentProperties; - (SBElementArray *) customDocumentProperties; - (SBElementArray *) designs; @property (copy, readonly) PowerPointShape *defaultShape; @property PowerPointPeBl eastAsianLineBreakLevel; // Returns or sets the East Asian line break control level for the specified paragraph. @property (copy, readonly) NSString *fullName; @property (copy, readonly) PowerPointMaster *handoutMaster; @property (readonly) BOOL hasTitleMaster; @property PowerPointPDrT layoutDirection; @property (copy, readonly) NSString *name; @property (copy) NSString *noLineBreakAfter; @property (copy) NSString *noLineBreakBefore; @property (copy, readonly) PowerPointMaster *notesMaster; @property (copy, readonly) PowerPointPageSetup *pageSetup; @property (copy, readonly) NSString *path; @property (copy, readonly) PowerPointPrintOptions *printOptions; @property (readonly) BOOL readOnly; @property (copy, readonly) PowerPointSaveAsMovieSettings *saveAsMovieSettings; @property BOOL saved; @property (copy, readonly) PowerPointMaster *slideMaster; @property (copy, readonly) PowerPointSlideShowSettings *slideShowSettings; @property (copy, readonly) PowerPointSlideShowWindow *slideShowWindow; @property (copy, readonly) NSString *templateName; @property (copy, readonly) PowerPointMaster *titleMaster; @property (copy, readonly) PowerPointWebOptions *webOptions; - (PowerPointDesign *) addDesignDesignName:(NSString *)DesignName index:(NSInteger)index; // add a new design - (void) applyTemplateFileName:(NSString *)fileName; // Applies a theme or design template to the specified slide, master or presentation - (void) printOutFrom:(NSInteger)from to:(NSInteger)to printToFile:(NSString *)printToFile copies:(NSInteger)copies collate:(BOOL)collate showDialog:(BOOL)showDialog; - (void) redoTimes:(NSInteger)times; - (void) undoTimes:(NSInteger)times; - (void) updateLinks; @end @interface PowerPointPresenterTool : PowerPointBaseObject @property (copy, readonly) PowerPointSlide *currentPresenterSlide; @property (copy) NSString *notesText; @property NSInteger notesZoom; @property (readonly) BOOL slideMiniature; - (void) endShow; - (void) next; - (void) previous; - (void) toggleSlideMiniature; @end // Every presenter view window @interface PowerPointPresenterViewWindow : PowerPointBasicWindow @property (readonly) BOOL active; @property (readonly) double height; @property (copy, readonly) PowerPointPresentation *presentation; @property (copy, readonly) PowerPointPresenterTool *presenterTool; @property (readonly) double width; @end @interface PowerPointPrintOptions : PowerPointBaseObject - (SBElementArray *) printRanges; @property (copy, readonly) NSString *activePrinter; @property BOOL collate; @property BOOL fitToPage; @property BOOL frameSlides; @property NSInteger numberOfCopies; @property PowerPointPtOt outputType; @property PowerPointPrCt printColorType; @property BOOL printFontsAsGraphics; @property BOOL printHiddenSlides; @property PowerPointRgTy rangeType; @property (copy) NSString *slideShowName; @end // Every print range @interface PowerPointPrintRange : PowerPointBaseObject @property (readonly) NSInteger rangeEnd; @property (readonly) NSInteger rangeStart; @end @interface PowerPointPropertyEffect : PowerPointBaseObject - (SBElementArray *) animationPoints; @property (copy, readonly) id ending; @property PowerPointAnPr propertySetEffect; @property (copy, readonly) id starting; @end @interface PowerPointRotatingEffect : PowerPointBaseObject @property double rotating; @end // Every ruler level @interface PowerPointRulerLevel : PowerPointBaseObject @property double firstMargin; // Returns or sets the first-line indent for the specified outline level, in points. @property double leftMargin; // Returns or sets the left indent for the specified outline level, in points. @end // Represents the ruler for the text in the specified shape or for all text in the specified text style. Contains tab stops and the indentation settings for text outline levels. @interface PowerPointRuler : PowerPointBaseObject - (SBElementArray *) tabStops; - (SBElementArray *) rulerLevels; @end @interface PowerPointSaveAsMovieSettings : PowerPointBaseObject @property BOOL autoLoopEnabled; @property (copy) NSString *backgroundSoundTrackFile; @property NSInteger backgroundTrackSegmentEnd; @property NSInteger backgroundTrackSegmentStart; @property NSInteger backgroundTrackStart; @property BOOL createMoviePreview; @property BOOL forceAllInline; @property BOOL includeNarrationAndSounds; @property (copy) NSString *movieActors; @property (copy) NSString *movieAuthor; @property (copy) NSString *movieCopyright; @property NSInteger movieFrameHeight; @property NSInteger movieFrameWidth; @property (copy) NSString *movieProducer; @property PowerPointPMOt optimization; @property BOOL showMovieController; @property (copy) NSString *transitionDescription; @property BOOL useSingleTransition; @end @interface PowerPointScaleEffect : PowerPointBaseObject @property double byX; @property double byY; @property double fromX; @property double fromY; @property double toX; @property double toY; @end // Represents the selection in the specified document window @interface PowerPointSelection : PowerPointBaseObject @property (copy, readonly) PowerPointShapeRange *childShapeRange; // Returns the child shapes of a selection. @property (readonly) BOOL hasChildShapeRange; // Returns whether the selection contains child shapes. @property (readonly) PowerPointPSEL selectionType; // Represents the type of objects in a selection. @property (copy, readonly) PowerPointShapeRange *shapeRange; // Returns a collection of shapes selected on the specified slide. @property (copy, readonly) PowerPointSlideRange *slideRange; // Returns a collection of selected slides. @property (copy, readonly) PowerPointTextRange *textRange; // Returns the text and text properties of the selected text. - (void) unselect; // Cancels the current selection. @end // Every sequence @interface PowerPointSequence : PowerPointBaseObject - (SBElementArray *) effects; - (PowerPointEffect *) addEffectFor:(PowerPointShape *)for_ fx:(PowerPointAnFX)fx level:(PowerPointAnLv)level trigger:(PowerPointAnTr)trigger index:(NSInteger)index; // add an effect for a shape - (PowerPointEffect *) convertToTextUnitEffectEffect:(PowerPointEffect *)Effect unit:(PowerPointAnTU)unit; // convert an effect to a text unit effect @end @interface PowerPointSetEffect : PowerPointBaseObject @property (copy) id ending; @property PowerPointAnPr propertySetEffect; @end // A collection that represents a notes page or a slide range, which is a set of slides that can contain a single slide to as many as all slides in a presentation. @interface PowerPointSlideRange : PowerPointBaseObject - (SBElementArray *) slides; - (SBElementArray *) shapes; - (SBElementArray *) hyperlinks; @property (copy) PowerPointColorScheme *colorScheme; // Returns or sets the color scheme for the specified slide, slide range, or slide master. @property (copy) PowerPointCustomLayout *customLayout; // Returns the custom layout associated with the specified range of slides. @property (copy) PowerPointDesign *design; @property BOOL displayMasterShapes; // Determines whether the specified range of slides displays the background objects on the slide master. @property BOOL followMasterBackground; // Determines whether the range of slides follows the slide master background. @property (copy, readonly) PowerPointHeadersAndFooters *headersAndFooters; // Returns a collection that represents the header, footer, date and time, and slide number associated with the slide, slide master, or range of slides. @property PowerPointPSLo layout; // Returns or sets the slide layout. @property (copy, readonly) PowerPointSlideRange *notesPage; // Returns a slide range object that represents the notes pages for the specified slide or range of slides. @property (readonly) NSInteger printSteps; @property (readonly) NSInteger slideID; @property (readonly) NSInteger slideIndex; @property (copy, readonly) PowerPointMaster *slideMaster; // Returns the slide master. @property (readonly) NSInteger slideNumber; // Returns the slide number. @property (copy, readonly) PowerPointSlideShowTransition *slideShowTransitions; // Returns the special effects for the specified slide transition. @property (copy, readonly) PowerPointTimeline *timeline; // Returns the animation timeline for the slide. @end @interface PowerPointSlideShowSettings : PowerPointBaseObject - (SBElementArray *) namedSlideShows; @property PowerPointPSaM advanceMode; @property NSInteger endingSlide; @property BOOL loopUntilStopped; @property (copy) NSColor *pointerColor; @property PowerPointMCoI pointerColorThemeIndex; // Returns or sets the color of default pointer color for a presentation. @property PowerPointSRgT rangeType; @property PowerPointPSSt showType; @property (readonly) BOOL showWithAnimation; @property BOOL showWithNarration; @property (copy) NSString *slideShowName; @property NSInteger startingSlide; - (PowerPointSlideShowWindow *) runSlideShow; @end @interface PowerPointSlideShowTransition : PowerPointBaseObject @property BOOL advanceOnClick; @property BOOL advanceOnTime; @property double advanceTime; @property PowerPointPEeF entryEffect; @property BOOL hidden; @property BOOL loopSoundUntilNext; @property (copy, readonly) PowerPointSoundEffect *soundEffectTransition; @end @interface PowerPointSlideShowView : PowerPointBaseObject @property BOOL accelerationsEnabled; @property (readonly) NSInteger currentShowPosition; @property (readonly) BOOL isNamedShow; @property (copy, readonly) PowerPointSlide *lastSlideViewed; @property (copy) NSColor *pointerColor; @property PowerPointMCoI pointerColorThemeIndex; // Returns or sets the color of temporary pointer color for a view of a slide show. @property PowerPointPSsP pointerType; @property (readonly) double presentationElapsedTime; @property double slideElapsedTime; @property (copy, readonly) NSString *slideShowName; @property PowerPointPShS slideState; @property (readonly) NSInteger zoom; - (void) exitSlideShow; - (void) goToFirstSlide; - (void) goToLastSlide; - (void) goToNextSlide; - (void) goToPreviousSlide; - (void) resetSlideTime; @end // Every slide show window @interface PowerPointSlideShowWindow : PowerPointBasicWindow @property (readonly) BOOL active; @property NSRect bounds; @property double height; @property (readonly) BOOL isFullScreen; @property double leftPosition; @property (copy, readonly) PowerPointPresentation *presentation; @property (copy, readonly) PowerPointSlideShowView *slideshowView; @property double top; @property double width; @end // Every slide @interface PowerPointSlide : PowerPointBaseObject - (SBElementArray *) shapes; - (SBElementArray *) hyperlinks; @property (copy, readonly) PowerPointShape *background; @property (copy) PowerPointColorScheme *colorScheme; @property (copy) PowerPointCustomLayout *customLayout; @property (copy) PowerPointDesign *design; @property BOOL displayMasterShapes; @property BOOL followMasterBackground; @property (copy, readonly) PowerPointHeadersAndFooters *headersAndFooters; @property PowerPointPSLo layout; @property (copy, readonly) PowerPointSlide *notesPage; @property (readonly) NSInteger printSteps; @property (readonly) NSInteger slideID; @property (readonly) NSInteger slideIndex; @property (copy, readonly) PowerPointMaster *slideMaster; @property (readonly) NSInteger slideNumber; @property (copy, readonly) PowerPointSlideShowTransition *slideShowTransition; @property (copy, readonly) PowerPointTimeline *timeline; - (void) applyThemeColorSchemeFileName:(NSString *)fileName; // Applies a theme color to the specified slide. - (void) copyObject; - (void) cutObject; @end @interface PowerPointSoundEffect : PowerPointBaseObject @property (copy, readonly) NSString *name; @property PowerPointPSnX soundType; - (void) importSoundFileSoundFileName:(NSString *)soundFileName; - (void) playSoundEffect; @end // Every tab stop @interface PowerPointTabStop : PowerPointBaseObject @property double tabPosition; // Returns or sets the position of a tab stop relative to the left margin. @property PowerPointPTSp tabStopType; // Returns or sets the type of the tab stop object. @end // Every text style level @interface PowerPointTextStyleLevel : PowerPointBaseObject @property (copy, readonly) PowerPointFont *font; @property (copy, readonly) PowerPointParagraphFormat *paragraphFormat; @end @interface PowerPointTextStyle : PowerPointBaseObject - (SBElementArray *) textStyleLevels; @property (copy, readonly) PowerPointRuler *ruler; @property (copy, readonly) PowerPointTextFrame *textFrame; @end @interface PowerPointTimeline : PowerPointBaseObject - (SBElementArray *) sequences; @property (copy, readonly) PowerPointSequence *mainSequence; - (PowerPointSequence *) addSequenceIndex:(NSInteger)index; // add an interactive sequence @end @interface PowerPointTiming : PowerPointBaseObject @property double acceleration; @property BOOL autoreverse; @property double deceleration; @property double duration; @property NSInteger repeatCount; @property double repeatDuration; @property PowerPointAnRs restart; @property BOOL rewind; @property BOOL smoothEnd; @property BOOL smoothStart; @property double speed; @end // Represents a single initial-capital autocorrect exception. @interface PowerPointTwoInitialCapsException : PowerPointBaseObject @property (readonly) NSInteger entry_index; // Returns the index for the position of the object in its container element list. @property (copy, readonly) NSString *name; // Returns the name of the TwoInitialCapsException. @end @interface PowerPointView : PowerPointBaseObject @property BOOL displaySlideMiniature; @property (copy) PowerPointSlide *slide; @property (readonly) PowerPointPVTy viewType; @property NSInteger zoom; @property BOOL zoomToFit; - (void) goToSlideNumber:(NSInteger)number; @end @interface PowerPointWebOptions : PowerPointBaseObject @property BOOL allowPNG; @property PowerPointPBuT buttonsType; @property PowerPointMtEn encoding; @property PowerPointFClr frameColors; @property BOOL includeBinaryFile; @property PowerPointPNBp navBarPlacement; @property PowerPointPALO pageLayout; @property BOOL supportIE4; @property BOOL supportNN4; @property BOOL supportOlderBrowsers; @property (copy) NSString *webPageKeywords; @property (copy) NSString *webPageTitle; @end /* * Drawing Suite */ // Every adjustment @interface PowerPointAdjustment : PowerPointBaseObject @property double adjustment_value; @end @interface PowerPointCalloutFormat : PowerPointBaseObject @property BOOL accent; @property PowerPointMCAt angle; @property BOOL autoAttach; @property (readonly) BOOL autoLength; @property BOOL border; @property (readonly) double calloutFormatLength; @property PowerPointMCot calloutType; @property (readonly) double drop; @property (readonly) PowerPointMCDt dropType; @property double gap; - (void) presetDropDropType:(PowerPointMCDt)dropType; @end @interface PowerPointConnectorFormat : PowerPointBaseObject @property (readonly) BOOL beginConnected; @property (copy, readonly) PowerPointShape *beginConnectedShape; @property (readonly) NSInteger beginConnectionSite; @property PowerPointMCtT connectorType; @property (readonly) BOOL endConnected; @property (copy, readonly) PowerPointShape *endConnectedShape; @property (readonly) NSInteger endConnectionSite; @end // Represents fill formatting for a shape. A shape can have a solid, gradient, texture, pattern, picture, or semi-transparent fill. @interface PowerPointFillFormat : PowerPointBaseObject - (SBElementArray *) gradientStops; @property (copy) NSColor *backColor; @property PowerPointMCoI backColorThemeIndex; // Returns or sets the specified fill background color. @property (readonly) PowerPointMFdT fillFormatType; @property (copy) NSColor *foreColor; @property PowerPointMCoI foreColorThemeIndex; // Returns or sets the specified foreground fill or solid color. @property (readonly) PowerPointMGCt gradientColorType; @property (readonly) double gradientDegree; @property (readonly) PowerPointMGdS gradientStyle; @property (readonly) NSInteger gradientVariant; @property (readonly) PowerPointPpTy pattern; @property (readonly) PowerPointMPGb presetGradientType; @property (readonly) PowerPointMPzT presetTexture; @property BOOL rotateWithObject; // Returns or sets whether the fill rotates with the specified shape. @property PowerPointMTtA textureAlignment; // Returns or sets the texture alignment for the specified object. @property double textureHorizontalScale; // Returns or sets the texture alignment for the specified object. @property (copy, readonly) NSString *textureName; @property double textureOffsetX; // Returns or sets the texture alignment for the specified object. @property double textureOffsetY; // Returns or sets the texture alignment for the specified object. @property BOOL textureTile; // Returns the texture tile style for the specified fill. @property double textureVerticalScale; // Returns or sets the texture alignment for the specified object. @property double transparency; @property BOOL visible; - (void) deleteGradientStopStopIndex:(NSInteger)stopIndex; // Removes a gradient stop. - (void) insertGradientStopCustomColor:(NSColor *)customColor position:(double)position transparency:(double)transparency stopIndex:(NSInteger)stopIndex; // Adds a stop to a gradient. @end // Represents the glow formatting for a shape or range of shapes @interface PowerPointGlowFormat : PowerPointBaseObject @property (copy) NSColor *color; // Returns or sets the color for the specified glow format. @property PowerPointMCoI colorThemeIndex; // Returns or sets the color for the specified glow format. @property double radius; // Returns or sets the length of the radius for the specified glow format. @end // Every gradient stop @interface PowerPointGradientStop : PowerPointBaseObject @property (copy) NSColor *color; // Returns or sets the color for the specified the gradient stop. @property PowerPointMCoI colorThemeIndex; // Returns or sets the color for the specified gradient stop. @property double position; // Returns or sets the position for the specified gradient stop expressed as a percent. @property double transparency; // Returns or sets a value representing the transparency of the gradient fill expressed as a percent. @end @interface PowerPointLineFormat : PowerPointBaseObject @property (copy) NSColor *backColor; @property PowerPointMCoI backColorThemeIndex; // Returns or sets the background color for a patterned line. @property PowerPointMAhL beginArrowHeadLength; @property PowerPointMAhS beginArrowheadStyle; @property PowerPointMAhW beginArrowheadWidth; @property PowerPointMlDs dashStyle; @property PowerPointMAhL endArrowheadLength; @property PowerPointMAhS endArrowheadStyle; @property PowerPointMAhW endArrowheadWidth; @property (copy) NSColor *foreColor; @property PowerPointMCoI foreColorThemeIndex; // Returns or sets the foreground color for the line. @property PowerPointPpTy lineFormatPatterned; @property PowerPointMLnS lineStyle; @property double lineWeight; @property double transparency; @end @interface PowerPointLinkFormat : PowerPointBaseObject @property PowerPointPUdO autoUpdate; @property (copy) NSString *sourceFullName; @end // Represents a Microsoft Office theme. @interface PowerPointOfficeTheme : PowerPointBaseObject @property (copy, readonly) PowerPointThemeColorScheme *themeColorScheme; // Returns the color scheme of a Microsoft Office theme. @property (copy, readonly) PowerPointThemeEffectScheme *themeEffectScheme; // Returns the effects scheme of a Microsoft Office theme. @property (copy, readonly) PowerPointThemeFontScheme *themeFontScheme; // Returns the font scheme of a Microsoft Office theme. @end @interface PowerPointPictureFormat : PowerPointBaseObject @property double brightness; @property PowerPointMPc colorType; @property double contrast; @property double cropBottom; @property double cropLeft; @property double cropRight; @property double cropTop; @property (copy) NSColor *transparencyColor; @property BOOL transparentBackground; @end @interface PowerPointPlaceholderFormat : PowerPointBaseObject @property (readonly) PowerPointMShp containedType; @property (copy) NSString *placeholderName; @property (readonly) PowerPointPPhd placeholderType; @end // Represents the reflection effect in Office graphics. @interface PowerPointReflectionFormat : PowerPointBaseObject @property PowerPointMRfT reflectionType; // Returns or sets the type of the reflection format object. @end @interface PowerPointShadowFormat : PowerPointBaseObject @property double blur; @property (copy) NSColor *foreColor; @property PowerPointMCoI foreColorThemeIndex; // Returns or sets the foreground color for the shadow format. @property BOOL obscured; @property double offsetX; @property double offsetY; @property BOOL rotateWithShape; // Returns or sets whether to rotate the shadow when rotating the shape. @property PowerPointMSSt shadowStyle; // Returns or sets the style of shadow formatting to apply to a shape. @property PowerPointMSdT shadowType; @property double size; // Returns or sets the width of the shadow. @property double transparency; @property BOOL visible; @end // A collection that represents a set of shapes on a document. @interface PowerPointShapeRange : PowerPointBaseObject - (SBElementArray *) adjustments; - (SBElementArray *) shapes; @property (copy, readonly) PowerPointAnimationSettings *animationSettings; // Returns all the special effects that you can apply to the animation of the specified shape. @property PowerPointMAsT autoShapeType; // Returns or sets the shape type for AutoShapes other than a line, freeform drawing, or connector. @property PowerPointMBSI backgroundStyle; // Returns or sets the background style for the specified object. @property PowerPointMBW blackAndWhiteMode; // Returns or sets a value that indicates how the specified shape appears when the presentation is viewed in black-and-white mode. @property (copy, readonly) PowerPointCalloutFormat *calloutFormat; // Returns callout formatting properties for the specified line callout shapes. @property (readonly) BOOL child; // Returns whether all shapes in a shape range are child shapes of the same parent. @property (readonly) NSInteger connectionSiteCount; // Returns the number of connection sites on the specified shape. @property (copy, readonly) PowerPointFillFormat *fillFormat; // Returns the fill format properties for the specified object. @property (copy, readonly) PowerPointGlowFormat *glowFormat; // Returns the glow format for the specified range of shapes. @property (readonly) BOOL hasChild; @property (readonly) BOOL hasTable; // Returns whether the specified shape is a table. @property (readonly) BOOL hasTextFrame; // Returns whether the specified shape has a text frame. @property double height; // Returns or sets the height of the specified object. @property (readonly) BOOL horizontalFlip; // Returns whether the specified shape is flipped around the horizontal axis. @property (readonly) BOOL isConnector; // Determines whether the specified shape is a connector. @property double leftPosition; // Returns or sets a value equal to the distance from the left edge of the leftmost shape in the shape range to the left edge of the slide. @property (copy, readonly) PowerPointLineFormat *lineFormat; // Returns line format properties for the specified line or shape border. @property (copy, readonly) PowerPointLinkFormat *linkFormat; // Returns the properties for linked OLE objects. @property BOOL lockAspectRatio; // Determines whether the specified shape retains its original proportions when you resize it. @property (readonly) PowerPointMedT mediaType; // Returns the OLE media type. @property (copy) NSString *name; // Identifies the shape on a slide. @property (copy, readonly) PowerPointReflectionFormat *reflectionFormat; // Returns the reflection format for the specified range of shapes. @property double rotation; // Returns or sets the number of degrees that the specified shape is rotated around the z-axis. @property (copy, readonly) PowerPointShadowFormat *shadowFormat; // Returns shadow formatting for specified shapes. @property PowerPointMSSI shapeStyle; // Returns or sets the shape style index for the specified object. @property (readonly) PowerPointMShp shapeType; // Represents the type of shape or shapes in a range of shapes. @property (copy, readonly) PowerPointSoftEdgeFormat *softEdgeFormat; // Returns the soft edge format for the specified range of shapes. @property (copy, readonly) PowerPointTextFrame *textFrame; // Returns the alignment and anchoring properties for the specified shape or master text style. @property (copy, readonly) PowerPointThreeDFormat *threeDFormat; // Returns 3-D effect formatting properties for the specified shape. @property double top; // Returns or sets a value equal to the distance from the top edge of the topmost shape in the shape range to the top edge of the document. @property (readonly) BOOL verticalFlip; // Determines whether the specified shape is flipped around the vertical axis. @property BOOL visible; // Returns or sets the visibility of the specified object or the formatting applied to the specified object. @property double width; // Returns or sets the width of the specified object. @property (readonly) NSInteger zOrderPosition; // Returns the position of the specified shape in the z-order. - (void) alignAlignType:(PowerPointMAlC)alignType relativeToSlide:(BOOL)relativeToSlide; // Aligns the shapes in the specified range of shapes. - (void) copyShapeRange; - (void) cutShapeRange; - (void) distributeDistributeType:(PowerPointMDsC)distributeType relativeToSlide:(BOOL)relativeToSlide; // Evenly distributes the shapes in the specified range of shapes. You can specify whether you want to distribute the shapes horizontally or vertically and whether you want to distribute them over the entire slide or just over the space they originally occup - (PowerPointShape *) group; // Groups the shapes in the specified shape range. - (PowerPointShape *) regroup; // Regroups the group that the specified shape range belonged to previously. - (PowerPointShapeRange *) ungroup; // Ungroups any grouped shapes in the specified shape or range of shapes. @end // Every shape @interface PowerPointShape : PowerPointBaseObject - (SBElementArray *) shapes; - (SBElementArray *) callouts; - (SBElementArray *) connectors; - (SBElementArray *) pictures; - (SBElementArray *) lineShapes; - (SBElementArray *) placeHolders; - (SBElementArray *) textBoxes; - (SBElementArray *) comments; - (SBElementArray *) shapeTables; - (SBElementArray *) adjustments; @property (copy, readonly) PowerPointAnimationSettings *animationSettings; @property PowerPointMAsT autoShapeType; @property PowerPointMBSI backgroundStyle; // Returns or sets the background style. @property PowerPointMBW blackAndWhiteMode; @property (readonly) BOOL child; // True if the shape is a child shape. @property (readonly) NSInteger connectionSiteCount; @property (copy, readonly) PowerPointFillFormat *fillFormat; // Returns a fill format object that contains fill formatting properties for the specified shape. @property (copy, readonly) PowerPointGlowFormat *glowFormat; // Returns the formatting properties for a glow effect. @property (readonly) BOOL hasTable; @property (readonly) BOOL hasTextFrame; @property double height; @property (readonly) BOOL horizontalFlip; @property (readonly) BOOL isConnector; @property double leftPosition; @property (copy, readonly) PowerPointLineFormat *lineFormat; @property (copy, readonly) PowerPointLinkFormat *linkFormat; @property BOOL lockAspectRatio; @property (readonly) PowerPointMedT mediaType; @property (copy) NSString *name; @property (copy, readonly) PowerPointReflectionFormat *reflectionFormat; // Returns the formatting properties for a reflection effect. @property double rotation; @property (copy, readonly) PowerPointShadowFormat *shadowFormat; @property PowerPointMSSI shapeStyle; // Returns or sets the shape style corresponding to the Quick Styles. @property (readonly) PowerPointMShp shapeType; @property (copy, readonly) PowerPointSoftEdgeFormat *softEdgeFormat; // Returns the formatting properties for a soft edge effect. @property (copy, readonly) PowerPointTextFrame *textFrame; @property (copy, readonly) PowerPointThreeDFormat *threeDFormat; // Returns a threeD format object that contains 3-D-effect formatting properties for the specified shape. @property double top; @property (readonly) BOOL verticalFlip; @property BOOL visible; @property double width; @property (copy, readonly) PowerPointWordArtFormat *wordArtFormat; // Returns the formatting properties for a word art effect. @property (readonly) NSInteger zOrderPosition; - (void) copyShape; - (void) cutShape; - (void) saveAsPicturePictureType:(PowerPointMPiT)pictureType fileName:(NSString *)fileName; // Saves the shape in the requested file using the stated graphic format @end // Every callout @interface PowerPointCallout : PowerPointShape @property (readonly) PowerPointMCot calloutType; @property (copy, readonly) PowerPointCalloutFormat *calloutFormat; @end // Every comment @interface PowerPointComment : PowerPointShape @end // Every connector @interface PowerPointConnector : PowerPointShape @property (copy, readonly) PowerPointConnectorFormat *connectorFormat; @property (readonly) PowerPointMCtT connectorType; @end // Every line shape @interface PowerPointLineShape : PowerPointShape @property double beginLineX; @property double beginLineY; @property double endLineX; @property double endLineY; @end // Every media object @interface PowerPointMediaObject : PowerPointShape @property (copy, readonly) NSString *fileName; @end // Every picture @interface PowerPointPicture : PowerPointShape @property (copy, readonly) NSString *fileName; @property (readonly) BOOL linkToFile; @property (copy, readonly) PowerPointPictureFormat *pictureFormat; @property (readonly) BOOL saveWithDocument; - (void) scaleHeightFactor:(double)factor relativeToOriginalSize:(BOOL)relativeToOriginalSize scale:(PowerPointMSFr)scale; - (void) scaleWidthFactor:(double)factor relativeToOriginalSize:(BOOL)relativeToOriginalSize scale:(PowerPointMSFr)scale; @end // Every place holder @interface PowerPointPlaceHolder : PowerPointShape @property (copy, readonly) PowerPointPlaceholderFormat *placeHolderFormat; @property (readonly) PowerPointPPhd placeholderType; @end // Every shape table @interface PowerPointShapeTable : PowerPointShape @property (readonly) NSInteger numberOfColumns; @property (readonly) NSInteger numberOfRows; @property (copy, readonly) PowerPointTable *tableObject; @end // Represents the soft edge formatting for a shape or range of shapes @interface PowerPointSoftEdgeFormat : PowerPointBaseObject @property PowerPointMSET softEdgeType; // Returns or sets the type soft edge format object. @end // Every text box @interface PowerPointTextBox : PowerPointShape @property (readonly) PowerPointTxOr textOrientation; @end // Represents a single text column. @interface PowerPointTextColumn : PowerPointBaseObject @property NSInteger columnNumber; // Returns or sets the index of the text column object. @property double spacing; // Returns or sets the spacing between text columns in a text column object. @property PowerPointPDrT textDirection; // Returns or sets the direction of text in the text column object. @end @interface PowerPointTextFrame : PowerPointBaseObject @property PowerPointPAtS autoSize; @property (readonly) BOOL hasText; // Returns whether the specified text frame has text. @property PowerPointMHzA horizontalAnchor; @property double marginBottom; @property double marginLeft; @property double marginRight; @property double marginTop; @property (readonly) PowerPointTxOr orientation; @property PowerPointMPFo pathFormat; // Returns or sets the path type for the specified text frame. @property (copy, readonly) PowerPointRuler *ruler; @property (copy, readonly) PowerPointTextColumn *textColumn; // Returns the text column object that represents the columns within the text frame. @property PowerPointTxOr textOrientation; @property (copy, readonly) PowerPointTextRange *textRange; @property (copy, readonly) PowerPointThreeDFormat *threeDFormat; // Returns the 3-D–effect formatting properties for the specified text. @property PowerPointMVtA verticalAnchor; @property PowerPointMWFo warpFormat; // Returns or sets the warp type for the specified text frame. @property (readonly) PowerPointMPXF wordArtStylesFormat; // Returns or sets a value specifying the text effect for the selected text. @property BOOL wordWrap; // Returns or sets text break lines within or past the boundaries of the shape. @property PowerPointMPXF wordartFormat; // Returns or sets the WordArt type for the specified text frame. @end // Represents the color scheme of an Office Theme @interface PowerPointThemeColorScheme : PowerPointBaseObject - (SBElementArray *) themeColors; - (NSColor *) getCustomColorName:(NSString *)name; // Returns the custom color for the specified Microsoft Office theme. - (void) loadThemeColorSchemeFileName:(NSString *)fileName; // Loads the color scheme of a Microsoft Office theme from a file. - (void) saveThemeColorSchemeFileName:(NSString *)fileName; // Saves the color scheme of a Microsoft Office theme to a file. @end // Represents a color in the color scheme of a Microsoft Office 2007 theme. @interface PowerPointThemeColor : PowerPointBaseObject @property (copy) NSColor *RGB; // Returns or sets a value of a color in the color scheme of a Microsoft Office theme. @property (readonly) PowerPointMCSI themeColorSchemeIndex; // Returns the index value a color scheme of a Microsoft Office theme. @end // Represents the effect scheme of a Microsoft Office theme. @interface PowerPointThemeEffectScheme : PowerPointBaseObject - (void) loadThemeEffectSchemeFileName:(NSString *)fileName; // Loads the effects scheme of a Microsoft Office theme from a file. @end // Represents the font scheme of a Microsoft Office theme. @interface PowerPointThemeFontScheme : PowerPointBaseObject - (SBElementArray *) minorThemeFonts; - (SBElementArray *) majorThemeFonts; - (void) loadThemeFontSchemeFileName:(NSString *)fileName; // Loads the font scheme of a Microsoft Office theme from a file. - (void) saveThemeFontSchemeFileName:(NSString *)fileName; // Saves the font scheme of a Microsoft Office theme to a file. @end // Every theme font @interface PowerPointThemeFont : PowerPointBaseObject @property (copy) NSString *name; // Returns or sets a value specifying the font to use for a selection. @end // Every major theme font @interface PowerPointMajorThemeFont : PowerPointThemeFont @end // Every minor theme font @interface PowerPointMinorThemeFont : PowerPointThemeFont @end // Represents a shape's three-dimensional formatting. @interface PowerPointThreeDFormat : PowerPointBaseObject @property double ZDistance; // Returns or sets a Single that represents the distance from the center of an object or text. @property double bevelBottomDepth; // Returns or sets the depth/height of the bottom bevel. @property double bevelBottomInset; // Returns or sets the inset size/width for the bottom bevel. @property PowerPointMBlT bevelBottomType; // Returns or sets the bevel type for the bottom bevel. @property double bevelTopDepth; // Returns or sets the depth/height of the top bevel. @property double bevelTopInset; // Returns or sets the inset size/width for the top bevel. @property PowerPointMBlT bevelTopType; // Returns or sets the bevel type for the top bevel. @property (copy) NSColor *contourColor; // Returns or sets the color of the contour of an object or text. @property PowerPointMCoI contourColorThemeIndex; // Returns or sets the color for the specified contour. @property double contourWidth; // Returns or sets the width of the contour of an object or text. @property double depth; // Returns or sets the depth of the shape's extrusion. @property (copy) NSColor *extrusionColor; // Returns or sets a RGB color that represents the color of the shape's extrusion. @property PowerPointMCoI extrusionColorThemeIndex; // Returns or sets the color for the specified extrusion. @property PowerPointMExC extrusionColorType; // Returns or sets a value that indicates what will determine the extrusion color. @property double fieldOfView; // Returns or sets the amount of perspective for an object or text. @property double lightAngle; // Returns or sets the angle of the lighting. @property BOOL perspective; // Returns or sets if the extrusion appears in perspective that is, if the walls of the extrusion narrow toward a vanishing point. If false, the extrusion is a parallel, or orthographic, projection that is, if the walls don't narrow toward a vanishing point. @property PowerPointMPzC presetCamera; // Returns a constant that represents the camera preset. @property PowerPointMExD presetExtrusionDirection; // Sets or returns the direction that the extrusion's sweep path takes away from the extruded shape. @property PowerPointMPLd presetLightingDirection; // Returns or sets the position of the light source relative to the extrusion. @property PowerPointMLtT presetLightingRig; // Returns a constant that represents the lighting preset. @property PowerPointMlSf presetLightingSoftness; // Returns or sets the intensity of the extrusion lighting. @property PowerPointMPMt presetMaterial; // Returns or sets the extrusion surface material. @property PowerPointM3DF presetThreeDFormat; // Sets or returns the preset extrusion format. Each preset extrusion format contains a set of preset values for the various properties of the extrusion. @property BOOL projectText; // Returns or sets whether text on a shape rotates with shape. @property double rotationX; // Returns or sets the rotation of the extruded shape around the x-axis in degrees. A positive value indicates upward rotation; a negative value indicates downward rotation. @property double rotationY; // Returns or sets the rotation of the extruded shape around the y-axis, in degrees. A positive value indicates rotation to the left; a negative value indicates rotation to the right. @property double rotationZ; // Returns or sets the rotation of the extruded shape around the z-axis, in degrees. A positive value indicates clockwise rotation; a negative value indicates anti-clockwise rotation. @property BOOL visible; // Returns or sets if the specified object, or the formatting applied to it, is visible. @end @interface PowerPointWordArtFormat : PowerPointBaseObject @property BOOL fontBold; @property BOOL fontItalic; @property (copy) NSString *fontName; @property BOOL kernedPairs; @property BOOL normalizedHeight; @property PowerPointMPTs presetShape; @property BOOL rotatedChars; @property PowerPointMTxA textAlignment; @property double tracking; @property PowerPointMPXF wordArtStylesFormat; // Returns or sets a value specifying the text effect for the selected text. @property (copy) NSString *wordArtText; - (void) toggleVerticalText; @end /* * Text Suite */ @interface PowerPointTextRange : PowerPointBaseObject - (SBElementArray *) characters; - (SBElementArray *) words; - (SBElementArray *) sentences; - (SBElementArray *) lines; - (SBElementArray *) paragraphs; - (SBElementArray *) textFlows; @property (readonly) double boundsHeight; @property (readonly) double boundsWidth; @property (copy) NSString *content; @property (copy, readonly) PowerPointFont *font; @property NSInteger indentLevel; @property (readonly) double leftBounds; @property (readonly) NSInteger offset; @property (copy, readonly) PowerPointParagraphFormat *paragraphFormat; @property (readonly) NSInteger textLength; @property (readonly) double topBounds; - (void) addPeriodsTo; - (void) changeCaseTo:(PowerPointPCgC)to; - (void) copyTextRange; - (void) cutTextRange; - (NSArray *) getRotatedTextBounds; // Returns back a list containing the four point of the text bounds as follows {x1, y1}, {x2, y2}, {x3, y3}, {x4, y4} } - (PowerPointActionSetting *) getTextActionSettingResult:(PowerPointPMtv)result; - (void) insertTextTextRangeInsertWhere:(PowerPointMTiP)insertWhere newText:(NSString *)newText; // Adds text to existing text. - (void) pasteTextRange; - (void) removePeriodsFrom; @end // Every character @interface PowerPointCharacter : PowerPointTextRange @end // Every line @interface PowerPointLine : PowerPointTextRange @end // Every paragraph @interface PowerPointParagraph : PowerPointTextRange @end // Every sentence @interface PowerPointSentence : PowerPointTextRange @end // Every text flow @interface PowerPointTextFlow : PowerPointTextRange @end // Every word @interface PowerPointWord : PowerPointTextRange @end /* * Table Suite */ // Every cell @interface PowerPointCell : PowerPointBaseObject @property (readonly) BOOL selected; @property (copy, readonly) PowerPointShape *shape; - (PowerPointLineFormat *) getBorderEdge:(PowerPointPBrT)edge; - (void) mergeMergeWith:(PowerPointCell *)mergeWith; - (void) splitNumberOfRows:(NSInteger)numberOfRows numberOfColumns:(NSInteger)numberOfColumns; @end // Every column @interface PowerPointColumn : PowerPointBaseObject - (SBElementArray *) cells; @property double width; @end // Every row @interface PowerPointRow : PowerPointBaseObject - (SBElementArray *) cells; @property double height; @end // Every table @interface PowerPointTable : PowerPointBaseObject - (SBElementArray *) columns; - (SBElementArray *) rows; @property PowerPointPDrT tableDirection; - (PowerPointCell *) getCellFromRow:(NSInteger)row column:(NSInteger)column; @end
46.931843
2,848
0.76782
b73386e602eec52c6c336d327db501755ad8f3c3
292
c
C
src/libc/stdio/feof.c
NuxiNL/CloudLibc
d361c06c3fab3a7814d05b4630abe6da0cc7d757
[ "BSD-2-Clause" ]
298
2015-03-04T13:36:51.000Z
2021-12-19T05:11:58.000Z
src/libc/stdio/feof.c
NuxiNL/CloudLibc
d361c06c3fab3a7814d05b4630abe6da0cc7d757
[ "BSD-2-Clause" ]
31
2015-07-27T14:51:55.000Z
2020-09-14T15:59:57.000Z
src/libc/stdio/feof.c
NuxiNL/CloudLibc
d361c06c3fab3a7814d05b4630abe6da0cc7d757
[ "BSD-2-Clause" ]
18
2016-03-27T13:49:22.000Z
2021-09-21T19:02:04.000Z
// Copyright (c) 2015 Nuxi, https://nuxi.nl/ // // SPDX-License-Identifier: BSD-2-Clause #include <common/stdio.h> #include <stdbool.h> #include <stdio.h> int feof(FILE *stream) { flockfile(stream); bool result = (stream->flags & F_EOF) != 0; funlockfile(stream); return result; }
18.25
45
0.667808
632d362bc4617615af69f602fab68a50ee52c8ec
4,193
h
C
source/programs/xterm/error.h
binaryblob01/zfree86
e80ea992d87501b8e3e2d7c07a414591c2e11c70
[ "Xnet", "X11" ]
1
2021-09-08T21:13:25.000Z
2021-09-08T21:13:25.000Z
source/programs/xterm/error.h
binaryblob01/zfree86
e80ea992d87501b8e3e2d7c07a414591c2e11c70
[ "Xnet", "X11" ]
null
null
null
source/programs/xterm/error.h
binaryblob01/zfree86
e80ea992d87501b8e3e2d7c07a414591c2e11c70
[ "Xnet", "X11" ]
1
2021-01-22T00:19:47.000Z
2021-01-22T00:19:47.000Z
/* $XTermId: error.h,v 1.17 2006/02/12 22:43:55 tom Exp $ */ /* $XFree86: xc/programs/xterm/error.h,v 1.10 2006/02/13 01:14:58 dickey Exp $ */ /* * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. * * All Rights Reserved * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and that * both that copyright notice and this permission notice appear in * supporting documentation, and that the name of Digital Equipment * Corporation not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior permission. * * * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL * DIGITAL BE LIABLE FOR ANY SPECIAL, 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. */ /* @(#)error.h X10/6.6 11/6/86 */ /* main.c */ #define ERROR_FIONBIO 11 /* main: ioctl() failed on FIONBIO */ #define ERROR_F_GETFL 12 /* main: ioctl() failed on F_GETFL */ #define ERROR_F_SETFL 13 /* main: ioctl() failed on F_SETFL */ #define ERROR_OPDEVTTY 14 /* spawn: open() failed on /dev/tty */ #define ERROR_TIOCGETP 15 /* spawn: ioctl() failed on TIOCGETP */ #define ERROR_PTSNAME 17 /* spawn: ptsname() failed */ #define ERROR_OPPTSNAME 18 /* spawn: open() failed on ptsname */ #define ERROR_PTEM 19 /* spawn: ioctl() failed on I_PUSH/"ptem" */ #define ERROR_CONSEM 20 /* spawn: ioctl() failed on I_PUSH/"consem" */ #define ERROR_LDTERM 21 /* spawn: ioctl() failed on I_PUSH/"ldterm" */ #define ERROR_TTCOMPAT 22 /* spawn: ioctl() failed on I_PUSH/"ttcompat" */ #define ERROR_TIOCSETP 23 /* spawn: ioctl() failed on TIOCSETP */ #define ERROR_TIOCSETC 24 /* spawn: ioctl() failed on TIOCSETC */ #define ERROR_TIOCSETD 25 /* spawn: ioctl() failed on TIOCSETD */ #define ERROR_TIOCSLTC 26 /* spawn: ioctl() failed on TIOCSLTC */ #define ERROR_TIOCLSET 27 /* spawn: ioctl() failed on TIOCLSET */ #define ERROR_INIGROUPS 28 /* spawn: initgroups() failed */ #define ERROR_FORK 29 /* spawn: fork() failed */ #define ERROR_EXEC 30 /* spawn: exec() failed */ #define ERROR_PTYS 32 /* get_pty: not enough ptys */ #define ERROR_PTY_EXEC 34 /* waiting for initial map */ #define ERROR_SETUID 35 /* spawn: setuid() failed */ #define ERROR_INIT 36 /* spawn: can't initialize window */ #define ERROR_TIOCKSET 46 /* spawn: ioctl() failed on TIOCKSET */ #define ERROR_TIOCKSETC 47 /* spawn: ioctl() failed on TIOCKSETC */ #define ERROR_SPREALLOC 48 /* spawn: realloc of ttydev failed */ #define ERROR_LUMALLOC 49 /* luit: command-line malloc failed */ /* charproc.c */ #define ERROR_SELECT 50 /* in_put: select() failed */ #define ERROR_VINIT 54 /* VTInit: can't initialize window */ #define ERROR_KMMALLOC1 57 /* HandleKeymapChange: malloc failed */ /* Tekproc.c */ #define ERROR_TSELECT 60 /* Tinput: select() failed */ #define ERROR_TINIT 64 /* TekInit: can't initialize window */ /* button.c */ #define ERROR_BMALLOC2 71 /* SaltTextAway: malloc() failed */ /* misc.c */ #define ERROR_LOGEXEC 80 /* StartLog: exec() failed */ #define ERROR_XERROR 83 /* xerror: XError event */ #define ERROR_XIOERROR 84 /* xioerror: X I/O error */ /* screen.c */ #define ERROR_SCALLOC 90 /* Alloc: calloc() failed on base */ #define ERROR_SCALLOC2 91 /* Alloc: calloc() failed on rows */ #define ERROR_SREALLOC 92 /* ScreenResize: realloc() failed on alt base */ #define ERROR_RESIZE 96 /* ScreenResize: malloc() or realloc() failed */ #define ERROR_SAVE_PTR 102 /* ScrnPointers: malloc/realloc() failed */ /* scrollbar.c */ #define ERROR_SBRALLOC 110 /* ScrollBarOn: realloc() failed on base */ #define ERROR_SBRALLOC2 111 /* ScrollBarOn: realloc() failed on rows */ /* util.c */ #define ERROR_MMALLOC 121 /* my_memmove: malloc/realloc failed */
47.11236
81
0.717625
5383e3fbcde10a9dcec1e0a6f32b9eeee2d65ce7
301
h
C
rnPageDemo/rnPageDemo/REDSwizzle.h
tacrednow/rnPage
adfe99a01cd840d5739fdfd5d49605f7610b40db
[ "MIT" ]
null
null
null
rnPageDemo/rnPageDemo/REDSwizzle.h
tacrednow/rnPage
adfe99a01cd840d5739fdfd5d49605f7610b40db
[ "MIT" ]
null
null
null
rnPageDemo/rnPageDemo/REDSwizzle.h
tacrednow/rnPage
adfe99a01cd840d5739fdfd5d49605f7610b40db
[ "MIT" ]
null
null
null
// // REDSwizzle.h // sxsiosapp // // Created by rednow on 2018/4/25. // Copyright © 2018年 mshare. All rights reserved. // #import <Foundation/Foundation.h> #import <objc/runtime.h> extern void REDSwizzleMethod(Class originalCls, SEL originalSelector, Class swizzledCls, SEL swizzledSelector);
21.5
111
0.737542
8f82c5e3e5251e01ba597254872b6c4cf3007910
11,180
h
C
source/MaterialXRuntime/Private/PvtPrim.h
muenstc/MaterialX
b8365086a738fddae683065d78f65410aacd0dc4
[ "BSD-3-Clause" ]
101
2017-08-08T12:08:01.000Z
2022-03-17T06:37:58.000Z
source/MaterialXRuntime/Private/PvtPrim.h
testpassword/MaterialX
7c69782196b11fa43c67aee0707801983bb81e6c
[ "BSD-3-Clause" ]
1,002
2018-01-09T10:33:07.000Z
2022-03-31T18:35:04.000Z
source/MaterialXRuntime/Private/PvtPrim.h
testpassword/MaterialX
7c69782196b11fa43c67aee0707801983bb81e6c
[ "BSD-3-Clause" ]
24
2018-01-05T20:16:36.000Z
2022-02-03T15:40:14.000Z
// // TM & (c) 2019 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. // All rights reserved. See LICENSE.txt for license. // #ifndef MATERIALX_PVTPRIM_H #define MATERIALX_PVTPRIM_H #include <MaterialXRuntime/Private/PvtPort.h> #include <MaterialXRuntime/Private/PvtRelationship.h> #include <MaterialXRuntime/RtNodeGraph.h> #include <MaterialXRuntime/RtPrim.h> #include <MaterialXRuntime/RtPath.h> /// @file /// TODO: Docs namespace MaterialX { // Allocator class handling allocation of data for prims. // The data allocated is kept by the allocator and freed // upon allocator destruction or by calling free() explicitly. // NOTE: Data is stored as raw byte pointers and destructors // for allocated objects will not be called when freeing data. class PvtAllocator { public: ~PvtAllocator() { free(); } // Allocate and return a block of data. uint8_t* alloc(size_t size) { uint8_t* ptr = new uint8_t[size]; _storage.push_back(ptr); return ptr; } // Allocate and return a single object of templated type. // The object constructor is called to initialize it. template<class T> T* allocType() { uint8_t* buffer = alloc(sizeof(T)); return new (buffer) T(); } // Free all allocated data. void free() { for (uint8_t* ptr : _storage) { delete[] ptr; } _storage.clear(); } private: vector<uint8_t*> _storage; }; class RtPrimIterator; class PvtNodeGraphPrim; class PvtPrim : public PvtObject { RT_DECLARE_RUNTIME_OBJECT(PvtPrim) public: template<class T = PvtPrim> static PvtObjHandle createNew(const RtTypeInfo* type, const RtString& name, PvtPrim* parent) { // Make the name unique. const RtString primName = parent->makeUniqueChildName(name); return PvtObjHandle(new T(type, primName, parent)); } RtPrim prim() const { return RtPrim(hnd()); } void dispose(bool state); void destroy(); const RtTypeInfo* getTypeInfo() const { return _typeInfo; } template<class T> bool hasApi() const { static_assert(std::is_base_of<RtSchemaBase, T>::value, "Templated type must be a concrete subclass of RtSchemaBase"); return _typeInfo->isCompatible(T::typeName()); } PvtRelationship* createRelationship(const RtString& name); void removeRelationship(const RtString& name); RtString renameRelationship(const RtString& name, const RtString& newName) { return _rel.rename(name, newName, this); } PvtRelationship* getRelationship(const RtString& name) { PvtObject* obj = _rel.find(name); return obj ? obj->asA<PvtRelationship>() : nullptr; } const PvtObjectVec& getAllRelationships() const { return _rel.vec(); } PvtPort* getPort(const RtString& name) const { PvtObject* obj = _inputs.find(name); if (!obj) { obj = _outputs.find(name); } return obj ? obj->asA<PvtPort>() : nullptr; } PvtInput* createInput(const RtString& name, const RtString& type, uint32_t flags = 0); void removeInput(const RtString& name); RtString renameInput(const RtString& name, const RtString& newName) { return _inputs.rename(name, newName, this); } size_t numInputs() const { return _inputs.size(); } PvtInput* getInput(size_t index) const { return _inputs[index]->asA<PvtInput>(); } PvtInput* getInput(const RtString& name) const { PvtObject* obj = _inputs.find(name); return obj ? obj->asA<PvtInput>() : nullptr; } const PvtObjectVec& getInputs() const { return _inputs.vec(); } PvtOutput* createOutput(const RtString& name, const RtString& type, uint32_t flags = 0); void removeOutput(const RtString& name); RtString renameOutput(const RtString& name, const RtString& newName) { return _outputs.rename(name, newName, this); } size_t numOutputs() const { return _outputs.size(); } PvtOutput* getOutput(size_t index = 0) const { return _outputs[index]->asA<PvtOutput>(); } PvtOutput* getOutput(const RtString& name) const { PvtObject* obj = _outputs.find(name); return obj ? obj->asA<PvtOutput>() : nullptr; } const PvtObjectVec& getOutputs() const { return _outputs.vec(); } size_t numChildren() const { return _prims.size(); } PvtPrim* getChild(size_t index) const { return _prims[index]->asA<PvtPrim>(); } PvtPrim* getChild(const RtString& name) const { PvtObject* obj = _prims.find(name); return obj ? obj->asA<PvtPrim>() : nullptr; } RtString renameChild(const RtString& name, const RtString& newName) { return _prims.rename(name, newName, this); } RtPrimIterator getChildren(RtObjectPredicate predicate = nullptr) const; const PvtObjectVec& getAllChildren() const { return _prims.vec(); } PvtAllocator& getAllocator() { return _allocator; } RtString makeUniqueChildName(const RtString& name) const; // Validate that typenames match when creating a new prim. static void validateCreation(const RtTypeInfo& typeInfo, const RtString& typeName, const RtString& name) { if (typeName != typeInfo.getShortTypeName()) { throw ExceptionRuntimeError("Type names mismatch when creating prim '" + name.str() + "'"); } } // Validate that typenames match and that parent path is at the root. static void validateCreation(const RtTypeInfo& typeInfo, const RtString& typeName, const RtString& name, const RtPath& parentPath) { validateCreation(typeInfo, typeName, name); if (!parentPath.isRoot()) { throw ExceptionRuntimeError("A '" + typeName.str() + "' prim can only be created at the top / root level"); } } protected: PvtPrim(const RtTypeInfo* typeInfo, const RtString& name, PvtPrim* parent); void addChildPrim(PvtPrim* prim); void removeChildPrim(PvtPrim* prim); const RtTypeInfo* _typeInfo; // Relationships PvtObjectList _rel; // Inputs PvtObjectList _inputs; // Outputs PvtObjectList _outputs; // Child prims PvtObjectList _prims; PvtAllocator _allocator; friend class PvtApi; friend class PvtStage; friend class RtNodeGraph; friend class RtPrimIterator; friend class RtInputIterator; friend class RtOutputIterator; friend class RtRelationshipIterator; }; struct PvtAttributeSpec { RtString name; RtString type; // TODO: Use an RtValue instead of string value. // Need better handling of ownership of large values // for this, which is part of another change list. // RtValue value; string value; bool custom; bool exportable; }; class RtAttributeSpecList { public: ~RtAttributeSpecList() { for (RtAttributeSpec* spec : _vec) { delete spec; } _map.clear(); _vec.clear(); } void add(RtAttributeSpec* spec) { _map[spec->getName()] = spec; _vec.push_back(spec); } size_t size() const { return _vec.size(); } bool empty() const { return _vec.empty(); } size_t count(const RtString& name) const { return _map.count(name); } RtAttributeSpec* find(const RtString& name) const { auto it = _map.find(name); return it != _map.end() ? it->second : nullptr; } RtAttributeSpec* operator[](size_t i) const { return i < _vec.size() ? _vec[i] : nullptr; } private: RtStringMap<RtAttributeSpec*> _map; RtAttributeSpecVec _vec; friend class PvtPrimSpec; }; class PvtPrimSpec : public RtPrimSpec { public: PvtPrimSpec() { } const RtAttributeSpec* getAttribute(const RtString& name) const override { return _primAttr.find(name); } const RtAttributeSpecVec& getAttributes() const override { return _primAttr._vec; } const RtAttributeSpec* getPortAttribute(const RtPort& port, const RtString& name) const override; RtAttributeSpecVec getPortAttributes(const RtPort& port) const override; RtAttributeSpec* create(const RtString& name, const RtString& type, const string& value, bool exportable, bool custom); void addPrimAttribute(const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _primAttr.add(create(name, type, value, exportable, custom)); } void addInputAttribute(const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _inputAttr.add(create(name, type, value, exportable, custom)); } void addInputAttributeByName(const RtString& portName, const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _inputAttrByName[portName].add(create(name, type, value, exportable, custom)); } void addInputAttributeByType(const RtString& portType, const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _inputAttrByType[portType].add(create(name, type, value, exportable, custom)); } void addOutputAttribute(const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _outputAttr.add(create(name, type, value, exportable, custom)); } void addOutputAttributeByName(const RtString& portName, const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _outputAttrByName[portName].add(create(name, type, value, exportable, custom)); } void addOutputAttributeByType(const RtString& portType, const RtString& name, const RtString& type, const string& value = EMPTY_STRING, bool exportable = false, bool custom = false) { _outputAttrByType[portType].add(create(name, type, value, exportable, custom)); } RtAttributeSpecList _primAttr; RtAttributeSpecList _inputAttr; RtAttributeSpecList _outputAttr; RtStringMap<RtAttributeSpecList> _inputAttrByName; RtStringMap<RtAttributeSpecList> _inputAttrByType; RtStringMap<RtAttributeSpecList> _outputAttrByName; RtStringMap<RtAttributeSpecList> _outputAttrByType; PvtAllocator _allocator; // TODO: Start using this allocator, change default value from strings to actual value type. }; } #endif
26.305882
134
0.644365
e97c058bf1d5393de9f7b19b48ba33bc2a06ab9b
1,632
h
C
PrivateFrameworks/SocialAppsCore/SOCloudKitPurchaseStorageAlertController.h
phatblat/macOSPrivateFrameworks
9047371eb80f925642c8a7c4f1e00095aec66044
[ "MIT" ]
17
2018-11-13T04:02:58.000Z
2022-01-20T09:27:13.000Z
PrivateFrameworks/SocialAppsCore/SOCloudKitPurchaseStorageAlertController.h
phatblat/macOSPrivateFrameworks
9047371eb80f925642c8a7c4f1e00095aec66044
[ "MIT" ]
3
2018-04-06T02:02:27.000Z
2018-10-02T01:12:10.000Z
PrivateFrameworks/SocialAppsCore/SOCloudKitPurchaseStorageAlertController.h
phatblat/macOSPrivateFrameworks
9047371eb80f925642c8a7c4f1e00095aec66044
[ "MIT" ]
1
2018-09-28T13:54:23.000Z
2018-09-28T13:54:23.000Z
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" #import "IMCloudKitEventHandler.h" @class NSString, NSWindow, iCloudPurchaseStorageController; @interface SOCloudKitPurchaseStorageAlertController : NSObject <IMCloudKitEventHandler> { iCloudPurchaseStorageController *_purchaseStorageController; NSWindow *_window; CDUnknownBlockType _completion; } @property(copy) CDUnknownBlockType completion; // @synthesize completion=_completion; @property __weak NSWindow *window; // @synthesize window=_window; @property(readonly) iCloudPurchaseStorageController *purchaseStorageController; // @synthesize purchaseStorageController=_purchaseStorageController; - (void).cxx_destruct; - (void)cloudKitEventNotificationManager:(id)arg1 didPerformAdditionalStorageRequiredCheck:(BOOL)arg2 additionalStorageRequired:(unsigned long long)arg3 forAccountId:(id)arg4 error:(id)arg5; - (void)presentFetchingAccountIDFailedAlertWithError:(id)arg1; - (void)presentUserNeedsMoreStorageAlertWithAccountID:(id)arg1; - (void)presentPurchaseStorageControllerWithAccountID:(id)arg1; - (void)_windowDidEndSheet:(id)arg1; - (void)finishWithSuccess:(BOOL)arg1 error:(id)arg2; - (void)removeObservers; - (void)addObservers; - (void)dealloc; - (void)beginSheetModalForWindow:(id)arg1 completion:(CDUnknownBlockType)arg2; // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
37.953488
190
0.803922
8f188a00b565acd7018fd11bce17a745742153d0
635
c
C
cs220/fall_2015/homework/h5/h5graded-tcsiwula.c
tcsiwula/c_code
5c194d6fd5fbbb268a7505287855b37b32e70ad9
[ "MIT" ]
1
2016-02-15T06:08:23.000Z
2016-02-15T06:08:23.000Z
cs220/fall_2015/homework/h5/h5graded-tcsiwula.c
tcsiwula/C
5c194d6fd5fbbb268a7505287855b37b32e70ad9
[ "MIT" ]
null
null
null
cs220/fall_2015/homework/h5/h5graded-tcsiwula.c
tcsiwula/C
5c194d6fd5fbbb268a7505287855b37b32e70ad9
[ "MIT" ]
null
null
null
/* *Linked List* Test 1 1 / 2 Test 2 1 / 2 Test 3 1 / 2 Test 4 1 / 2 *MPI* Correctly handle the case when there's only 1 process. 2 / 2 Correctly compute dest process rank when p > 1. 0 / 2 dest should be next higher process (rank + 1, not rank - 1) Use MPI_ANY_SOURCE or correctly compute the source process rank when p > 1. 0 / 2 source should be next lower rank process (rank - 1, not rank + 1) Correctly send, receive, and print the greeting when p > 1. 0 / 2 Incorrect dest and source Total 6 / 16 */
42.333333
153
0.559055
6a0ac09aabac724cff86c38007380e057b8dc273
1,176
h
C
Folly/folly/io/async/PasswordInFile.h
hasridha/react-native
dbf44ed0ba802ed80d9df9a913228b7aa19b17a1
[ "CC-BY-4.0", "MIT" ]
2,114
2020-05-06T10:05:45.000Z
2022-03-31T23:19:28.000Z
Folly/folly/io/async/PasswordInFile.h
hasridha/react-native
dbf44ed0ba802ed80d9df9a913228b7aa19b17a1
[ "CC-BY-4.0", "MIT" ]
623
2020-05-05T21:24:26.000Z
2022-03-30T21:00:31.000Z
Folly/folly/io/async/PasswordInFile.h
hasridha/react-native
dbf44ed0ba802ed80d9df9a913228b7aa19b17a1
[ "CC-BY-4.0", "MIT" ]
214
2019-04-11T09:36:41.000Z
2022-02-19T08:10:31.000Z
/* * Copyright 2017-present Facebook, 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 <folly/io/async/SSLContext.h> // PasswordCollector namespace folly { class PasswordInFile : public PasswordCollector { public: explicit PasswordInFile(const std::string& file); ~PasswordInFile() override; void getPassword(std::string& password, int /* size */) const override { password = password_; } const char* getPasswordStr() const { return password_.c_str(); } std::string describe() const override { return fileName_; } protected: std::string fileName_; std::string password_; }; } // namespace folly
26.133333
75
0.721939
6a1d404b34e733a2caee680314a4ddabb4307964
1,910
h
C
model.h
erwincoumans/tinyrenderer
0e8b3fe69f34f0b01683760c3eee29b077410631
[ "Zlib" ]
12
2017-03-20T15:11:48.000Z
2022-03-03T23:40:05.000Z
model.h
erwincoumans/tinyrenderer
0e8b3fe69f34f0b01683760c3eee29b077410631
[ "Zlib" ]
null
null
null
model.h
erwincoumans/tinyrenderer
0e8b3fe69f34f0b01683760c3eee29b077410631
[ "Zlib" ]
1
2016-09-19T13:08:51.000Z
2016-09-19T13:08:51.000Z
#ifndef __MODEL_H__ #define __MODEL_H__ #include <vector> #include <string> #include "geometry.h" #include "tgaimage.h" namespace TinyRender2 { class Model { private: std::vector<Vec3f> verts_; std::vector<std::vector<Vec3i> > faces_; // attention, this Vec3i means vertex/uv/normal std::vector<Vec3f> norms_; std::vector<Vec2f> uv_; TGAImage2 diffusemap_; TGAImage2 normalmap_; TGAImage2 specularmap_; Vec4f m_colorRGBA; void load_texture(std::string filename, const char* suffix, TGAImage2& img); public: Model(const char* filename); Model(); void setColorRGBA(const float rgba[4]) { for (int i = 0; i < 4; i++) m_colorRGBA[i] = rgba[i]; } const Vec4f& getColorRGBA() const { return m_colorRGBA; } void loadDiffuseTexture(const char* relativeFileName); void setDiffuseTextureFromData(const unsigned char* textureImage, int textureWidth, int textureHeight); void reserveMemory(int numVertices, int numIndices); void addVertex(float x, float y, float z, float normalX, float normalY, float normalZ, float u, float v); void addTriangle(int vertexposIndex0, int normalIndex0, int uvIndex0, int vertexposIndex1, int normalIndex1, int uvIndex1, int vertexposIndex2, int normalIndex2, int uvIndex2); ~Model(); int nverts(); int nnormals() { return norms_.size(); } int nfaces(); Vec3f normal(int iface, int nthvert) const; Vec3f normal(Vec2f uv) const; Vec3f vert(int i) const; Vec3f vert(int iface, int nthvert) const; Vec3f* readWriteVertices() { if (verts_.empty()) return 0; return &verts_[0]; } Vec3f* readWriteNormals() { if (norms_.empty()) return 0; return &norms_[0]; } Vec2f uv(int iface, int nthvert) const; TGAColor2 diffuse(Vec2f uv) const; float specular(Vec2f uv) const; std::vector<int> face(int idx) const; }; } #endif //__MODEL_H__
23.875
107
0.692147
5f9ac46c3191cac0fcd87ba9615a60d81340d2b7
2,923
h
C
snort-2.9.15.1/src/dynamic-output/plugins/output_api.h
wenze1367/snort-2.9.15-read-annotation
d5c76ec0e699b173caabd917b921412c03233149
[ "BSD-2-Clause" ]
null
null
null
snort-2.9.15.1/src/dynamic-output/plugins/output_api.h
wenze1367/snort-2.9.15-read-annotation
d5c76ec0e699b173caabd917b921412c03233149
[ "BSD-2-Clause" ]
null
null
null
snort-2.9.15.1/src/dynamic-output/plugins/output_api.h
wenze1367/snort-2.9.15-read-annotation
d5c76ec0e699b173caabd917b921412c03233149
[ "BSD-2-Clause" ]
2
2020-11-26T13:27:14.000Z
2022-03-20T02:12:55.000Z
/* ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** 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. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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. ** ** Date: 01-27-2012 ** Author: Hui Cao <hcao@sourcefire.com> */ #ifndef _OUTPUT_API_H #define _OUTPUT_API_H #include "output_common.h" typedef enum _DynamicOutputTypeFlag { DYNAMIC_OUTPUT_TYPE_FLAG__ALERT = 0x00000001, DYNAMIC_OUTPUT_TYPE_FLAG__LOG = 0x00000002, DYNAMIC_OUTPUT_TYPE_FLAG__ALL = 0x7fffffff } DynamicOutputTypeFlag; struct _output_dict_entry { char *key; char *value; struct _output_dict_entry *next; }; typedef struct _output_module { /* The version of the API this module implements. This *must* be the first element in the structure. */ const uint32_t api_major_version; const uint32_t api_minor_version; /* The version of the OUTPUT module itself - can be completely arbitrary. */ const uint32_t module_version; /* The name of the module (tcpdump, alert_full, unified, etc.) */ const char *name; /* Various flags describing the module and its capabilities (alert, log etc.) */ const uint32_t type; /* The name of the default log file */ const char *default_file; /* load output module*/ void (*load) (struct _SnortConfig *, char *arg); /* Parse the output device configuration --required*/ int (*parse_args) (void **config, char *arg, const char *default_output_file); /* Post configuration*/ void (*postconfig)(struct _SnortConfig *, int unused, void *data); /* Alert function */ void (*alert_output) (void *packet, char *msg, void *arg, void *event); /* Log function */ void (*log_output) (void *packet, char *msg, void *arg, void *event); /* Restart/rotate the device */ void (*rotate) (struct _SnortConfig *, int signal, void *arg); /* Close the device and clean up --required */ void (*shutdown) (int signal, void *arg); void *next; } Output_Module_t; void init_output_module(struct _SnortConfig *, Output_Module_t *, char *); #define OUTPUT_API_MAJOR_VERSION 0x00020000 #define OUTPUT_API_MINOR_VERSION 0x00000001 #endif /* _OUTPUT_API_H */
35.646341
84
0.713308
5c6d785522ce4a8f55bee36b7313a24eb85e808d
5,192
h
C
Sources/Elastos/Frameworks/Droid/Base/Core/inc/elastos/droid/app/DatePickerDialog.h
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
7
2017-07-13T10:34:54.000Z
2021-04-16T05:40:35.000Z
Sources/Elastos/Frameworks/Droid/Base/Core/inc/elastos/droid/app/DatePickerDialog.h
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
null
null
null
Sources/Elastos/Frameworks/Droid/Base/Core/inc/elastos/droid/app/DatePickerDialog.h
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
9
2017-07-13T12:33:20.000Z
2021-06-19T02:46:48.000Z
//========================================================================= // Copyright (C) 2012 The Elastos 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 __ELASTOS_DROID_APP_DATEPICKER_DIALOG_H__ #define __ELASTOS_DROID_APP_DATEPICKER_DIALOG_H__ #include "Elastos.Droid.Widget.h" #include "elastos/droid/app/AlertDialog.h" using Elastos::Droid::Content::IContext; using Elastos::Droid::Content::IDialogInterfaceOnClickListener; using Elastos::Droid::Os::IBundle; using Elastos::Droid::Utility::ITypedValue; using Elastos::Droid::View::ILayoutInflater; using Elastos::Droid::View::IView; using Elastos::Droid::Widget::IDatePicker; using Elastos::Droid::Widget::IDatePickerOnDateChangedListener; using Elastos::Droid::Widget::IDatePickerValidationCallback; using Elastos::Utility::ICalendar; namespace Elastos { namespace Droid { namespace App { /** * A simple dialog containing an {@link android.widget.DatePicker}. * * <p>See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a> * guide.</p> */ class ECO_PUBLIC DatePickerDialog : public AlertDialog , public IDatePickerDialog , public IDialogInterfaceOnClickListener , public IDatePickerOnDateChangedListener { private: class MyValidationCallback : public Object , public IDatePickerValidationCallback { public: CAR_INTERFACE_DECL() MyValidationCallback( /* [in] */ DatePickerDialog* host); //@Override CARAPI OnValidationChanged( /* [in] */ Boolean valid); private: DatePickerDialog* mHost; }; public: CAR_INTERFACE_DECL() DatePickerDialog(); virtual ~DatePickerDialog(); /** * @param context The context the dialog is to run in. * @param callBack How the parent is notified that the date is set. * @param year The initial year of the dialog. * @param monthOfYear The initial month of the dialog. * @param dayOfMonth The initial day of the dialog. */ CARAPI constructor( /* [in] */ IContext* context, /* [in] */ IDatePickerDialogOnDateSetListener* callBack, /* [in] */ Int32 year, /* [in] */ Int32 monthOfYear, /* [in] */ Int32 dayOfMonth); /** * @param context The context the dialog is to run in. * @param theme the theme to apply to this dialog * @param listener How the parent is notified that the date is set. * @param year The initial year of the dialog. * @param monthOfYear The initial month of the dialog. * @param dayOfMonth The initial day of the dialog. */ CARAPI constructor( /* [in] */ IContext* context, /* [in] */ Int32 theme, /* [in] */ IDatePickerDialogOnDateSetListener* callBack, /* [in] */ Int32 year, /* [in] */ Int32 monthOfYear, /* [in] */ Int32 dayOfMonth); static Int32 ResolveDialogTheme( /* [in] */ IContext* context, /* [in] */ Int32 resid); //@Override CARAPI OnDateChanged( /* [in] */ IDatePicker* view, /* [in] */ Int32 year, /* [in] */ Int32 month, /* [in] */ Int32 day); //@Override CARAPI OnClick( /* [in] */ IDialogInterface* dialog, /* [in] */ Int32 which); /** * Gets the {@link DatePicker} contained in this dialog. * * @return The calendar view. */ CARAPI GetDatePicker( /* [out] */ IDatePicker** picker); /** * Sets the current date. * * @param year The date year. * @param monthOfYear The date month. * @param dayOfMonth The date day of month. */ CARAPI UpdateDate( /* [in] */ Int32 year, /* [in] */ Int32 monthOfYear, /* [in] */ Int32 dayOfMonth); // @Override CARAPI OnSaveInstanceState( /* [out] */ IBundle** bundle); // @Override CARAPI OnRestoreInstanceState( /* [in] */ IBundle* savedInstanceState); private: void UpdateTitle( /* [in] */ Int32 year, /* [in] */ Int32 month, /* [in] */ Int32 day); private: AutoPtr<IDatePickerValidationCallback> mValidationCallback; static const String YEAR;// = "year"; static const String MONTH;// = "month"; static const String DAY;// = "day"; AutoPtr<IDatePicker> mDatePicker; AutoPtr<IDatePickerDialogOnDateSetListener> mDateSetListener; AutoPtr<ICalendar> mCalendar; Boolean mTitleNeedsUpdate; }; } // namespace App } // namespace Droid } // namespace Elastos #endif //__ELASTOS_DROID_APP_DATEPICKER_DIALOG_H__
29.83908
83
0.62943
d9f3d25ae59399891e6fe9e80c4cc5c312162cbd
1,299
h
C
rpoly.h
RodrigoTomeES/PreliminaryOrbitDetermination
653fd91e2874487d07ed6574a3c33015ff91a6c8
[ "MIT" ]
null
null
null
rpoly.h
RodrigoTomeES/PreliminaryOrbitDetermination
653fd91e2874487d07ed6574a3c33015ff91a6c8
[ "MIT" ]
null
null
null
rpoly.h
RodrigoTomeES/PreliminaryOrbitDetermination
653fd91e2874487d07ed6574a3c33015ff91a6c8
[ "MIT" ]
1
2021-09-28T14:44:09.000Z
2021-09-28T14:44:09.000Z
#pragma once #include "cpp.h" BEGIN_C_DECLS; // Opaque state handle struct RPoly_State; // Allocate state for finding roots of a real polynomial. // Degrees up to max_degree are supported by returned state. struct RPoly_State *real_poly_alloc(int max_degree); // Release state void real_poly_release(struct RPoly_State *s); // Find roots of a polynomial with real coefficients. // p[] holds coefficients of the polynomial: // p(x) = p[0]*x^degree + ... + p[degree] // // Caller must have already allocated 'state'. // Returns number of roots stored in zeror[], zeroi[]. int real_poly_roots_compute(const double p[], int degree, struct RPoly_State *state, double zeror[], double zeroi[]); // Convenience function. // Find roots of a polynomial with real coefficients. // p[] holds coefficients of the polynomial: // p(x) = p[0]*x^degree + ... + p[degree] // // Returns number of roots stored in zeror[], zeroi[] static inline int real_poly_roots(const double p[], int degree, double zeror[], double zeroi[]) { struct RPoly_State *state = real_poly_alloc(degree); int nr = real_poly_roots_compute(p, degree, state, zeror, zeroi); real_poly_release(state); return nr; } END_C_DECLS;
29.522727
69
0.670516
cefbd6123cd8d4d784e66735df4100143e5f2ec8
452
h
C
UIButtonBlocks/UIButton+Blocks.h
MatthewYe/UIButton-MMBlocks
46ecf45409d7dc92cc608fb0f8ff202c737a8dd2
[ "MIT" ]
null
null
null
UIButtonBlocks/UIButton+Blocks.h
MatthewYe/UIButton-MMBlocks
46ecf45409d7dc92cc608fb0f8ff202c737a8dd2
[ "MIT" ]
null
null
null
UIButtonBlocks/UIButton+Blocks.h
MatthewYe/UIButton-MMBlocks
46ecf45409d7dc92cc608fb0f8ff202c737a8dd2
[ "MIT" ]
null
null
null
// // UIButton+Blocks.h // UIButtonBlocks // // Created by Matthew on 16/1/13. // Copyright © 2016年 Matthew.ye. All rights reserved. // #import <UIKit/UIKit.h> typedef void(^ButtonBlock)(UIButton* btn); @interface UIButton (MMBlocks) - (void)addAction:(ButtonBlock)block forControlEvent:(UIControlEvents)controlEvent; /* does not support remove one specific block*/ - (void)removeAllActionForControlEvent:(UIControlEvents)controlEvent; @end
21.52381
69
0.747788